mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-09 15:54:14 +00:00
16 lines
698 B
TypeScript
16 lines
698 B
TypeScript
import type { ReferenceGitSource, ReferenceLocalSource } from "@opencode/client"
|
|
import type { ReferenceApi } from "@opencode/client/effect/api"
|
|
import type { Effect } from "effect"
|
|
import type { Transform } from "./registration.js"
|
|
|
|
export interface ReferenceEditor {
|
|
add(name: string, source: ReferenceLocalSource | ReferenceGitSource): void
|
|
remove(name: string): void
|
|
list(): readonly (readonly [string, ReferenceLocalSource | ReferenceGitSource])[]
|
|
get(name: string): ReferenceLocalSource | ReferenceGitSource | undefined
|
|
}
|
|
|
|
export interface ReferenceDomain extends ReferenceApi<unknown> {
|
|
readonly transform: Transform<ReferenceEditor>
|
|
readonly reload: () => Effect.Effect<void>
|
|
}
|