This commit is contained in:
Sebastian Herrlinger
2026-02-13 23:22:45 +01:00
parent 27090c122d
commit 9a5cf7dfe5
7 changed files with 175 additions and 72 deletions

View File

@@ -66,16 +66,19 @@ export type TuiEventBus = {
) => () => void
}
export type TuiPluginInput = {
export type TuiPluginInput<Renderer = unknown> = {
client: ReturnType<typeof createOpencodeClientV2>
event: TuiEventBus
url: string
directory?: string
renderer: Renderer
}
export type TuiPlugin = (input: TuiPluginInput, options?: PluginOptions) => Promise<void>
export type TuiPlugin<Renderer = unknown> = (input: TuiPluginInput<Renderer>, options?: PluginOptions) => Promise<void>
export type PluginModule = Plugin | { server?: Plugin; tui?: TuiPlugin; themes?: Record<string, ThemeJson> }
export type PluginModule<Renderer = unknown> =
| Plugin
| { server?: Plugin; tui?: TuiPlugin<Renderer>; themes?: Record<string, ThemeJson> }
export type AuthHook = {
provider: string