From 6d3933634c90a48ecbf3e00911237b6cd3bceb68 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 16 Oct 2025 15:45:49 -0400 Subject: [PATCH] sync --- .../cli/cmd/tui/component/prompt/index.tsx | 1 - packages/sdk/js/src/gen/types.gen.ts | 116 ++++-------------- 2 files changed, 23 insertions(+), 94 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 2efbc83d0..c7cd50dd1 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -77,7 +77,6 @@ export function Prompt(props: PromptProps) { title: "Clear prompt", value: "prompt.clear", disabled: true, - keybind: "input_clear", category: "Prompt", onSelect: (dialog) => { setStore("prompt", { diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 481761b25..4cdefab65 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -1062,50 +1062,27 @@ export type EventTuiPromptAppend = { } } -export type EventTuiPromptSubmit = { - type: "tui.prompt.submit" - properties: { - [key: string]: unknown - } -} - -export type EventTuiPromptClear = { - type: "tui.prompt.clear" - properties: { - [key: string]: unknown - } -} - export type EventTuiCommandExecute = { type: "tui.command.execute" properties: { - command: "session.list" - [key: string]: - | { - command: string - } - | "session.list" - } -} - -export type EventTuiSessionList = { - type: "tui.session.list" - properties: { - [key: string]: unknown - } -} - -export type EventTuiThemeList = { - type: "tui.theme.list" - properties: { - [key: string]: unknown - } -} - -export type EventTuiModelList = { - type: "tui.model.list" - properties: { - [key: string]: unknown + command: + | ( + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + ) + | string } } @@ -1306,12 +1283,7 @@ export type Event = | EventSessionDeleted | EventSessionError | EventTuiPromptAppend - | EventTuiPromptSubmit - | EventTuiPromptClear | EventTuiCommandExecute - | EventTuiSessionList - | EventTuiThemeList - | EventTuiModelList | EventTuiToastShow | EventServerConnected @@ -1585,38 +1557,9 @@ export type SessionGetResponses = { export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses] export type SessionUpdateData = { - body?: - | { - text: string - } - | { - [key: string]: unknown - } - | { - [key: string]: unknown - } - | { - [key: string]: unknown - } - | { - [key: string]: unknown - } - | { - [key: string]: unknown - } - | { - command: "session.list" - [key: string]: - | { - command: string - } - | "session.list" - } - | { - title?: string - message: string - variant: "info" | "success" | "warning" | "error" - } + body?: { + title?: string + } path: { id: string } @@ -2652,12 +2595,7 @@ export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromp export type TuiExecuteCommandData = { body?: { - command: "session.list" - [key: string]: - | { - command: string - } - | "session.list" + command: string } path?: never query?: { @@ -2707,15 +2645,7 @@ export type TuiShowToastResponses = { export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses] export type TuiPublishData = { - body?: - | EventTuiPromptAppend - | EventTuiPromptSubmit - | EventTuiPromptClear - | EventTuiCommandExecute - | EventTuiSessionList - | EventTuiThemeList - | EventTuiModelList - | EventTuiToastShow + body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow path?: never query?: { directory?: string