feat(plugin): align hooks with client APIs
This commit is contained in:
parent
650d774372
commit
6ae2fa5196
65 changed files with 978 additions and 664 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import type { ReferenceGitSource, ReferenceLocalSource } from "@opencode-ai/sdk/v2/types"
|
||||
import type { Hooks } from "./registration.js"
|
||||
import type { ReferenceApi } from "@opencode-ai/client/effect/api"
|
||||
import type { Effect } from "effect"
|
||||
import type { TransformHook } from "./registration.js"
|
||||
|
||||
export interface ReferenceDraft {
|
||||
add(name: string, source: ReferenceLocalSource | ReferenceGitSource): void
|
||||
|
|
@ -7,6 +9,7 @@ export interface ReferenceDraft {
|
|||
list(): readonly (readonly [string, ReferenceLocalSource | ReferenceGitSource])[]
|
||||
}
|
||||
|
||||
export type ReferenceHooks = Hooks<{
|
||||
transform: ReferenceDraft
|
||||
}>
|
||||
export interface ReferenceHooks extends ReferenceApi<unknown> {
|
||||
readonly transform: TransformHook<ReferenceDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue