diff options
Diffstat (limited to 'packages/plugin/src')
| -rw-r--r-- | packages/plugin/src/index.ts | 3 | ||||
| -rw-r--r-- | packages/plugin/src/tui.ts | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index d289689b9..a264cf5aa 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -42,7 +42,8 @@ export type Plugin = (input: PluginInput, options?: PluginOptions) => Promise<Ho export type PluginModule = { id?: string - server?: Plugin + server: Plugin + tui?: never } type Rule = { diff --git a/packages/plugin/src/tui.ts b/packages/plugin/src/tui.ts index 62747884f..cbb6f62b6 100644 --- a/packages/plugin/src/tui.ts +++ b/packages/plugin/src/tui.ts @@ -15,7 +15,7 @@ import type { } from "@opencode-ai/sdk/v2" import type { CliRenderer, ParsedKey, RGBA } from "@opentui/core" import type { JSX, SolidPlugin } from "@opentui/solid" -import type { Config as PluginConfig, Plugin, PluginModule, PluginOptions } from "./index.js" +import type { Config as PluginConfig, PluginOptions } from "./index.js" export type { CliRenderer, SlotMode } from "@opentui/core" @@ -107,6 +107,8 @@ export type TuiDialogPromptProps = { description?: () => JSX.Element placeholder?: string value?: string + busy?: boolean + busyText?: string onConfirm?: (value: string) => void onCancel?: () => void } @@ -414,6 +416,8 @@ export type TuiPluginApi = { export type TuiPlugin = (api: TuiPluginApi, options: PluginOptions | undefined, meta: TuiPluginMeta) => Promise<void> -export type TuiPluginModule = PluginModule & { - tui?: TuiPlugin +export type TuiPluginModule = { + id?: string + tui: TuiPlugin + server?: never } |
