diff options
| author | Sebastian <[email protected]> | 2026-03-28 00:44:46 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-27 23:44:46 +0000 |
| commit | f3997d8082413c8b3a506d24fbfb3c58a0c3dedb (patch) | |
| tree | 615a6331ab6896abd62a05a9a2894e34203e098a /packages/plugin | |
| parent | 02b19bc3d733ee2e4220971fa421d4a6f05a9468 (diff) | |
| download | opencode-f3997d8082413c8b3a506d24fbfb3c58a0c3dedb.tar.gz opencode-f3997d8082413c8b3a506d24fbfb3c58a0c3dedb.zip | |
Single target plugin entrypoints (#19467)
Diffstat (limited to 'packages/plugin')
| -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 } |
