From 787d4d9ed5f584a123c56853cbb92ba33b74b7b7 Mon Sep 17 00:00:00 2001 From: Idris Gadi Date: Sun, 25 Jan 2026 15:01:50 +0530 Subject: [PATCH 1/5] feat: add recent list toggle --- .../cli/cmd/tui/component/dialog-model.tsx | 30 +++++++++++++++---- .../src/cli/cmd/tui/ui/dialog-select.tsx | 11 +++++++ packages/opencode/src/config/config.ts | 5 ++++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx index 4ad92eeb8395..125e5aa5e649 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx @@ -1,6 +1,7 @@ -import { createMemo, createSignal } from "solid-js" +import { createMemo, createSignal, createEffect, on } from "solid-js" import { useLocal } from "@tui/context/local" import { useSync } from "@tui/context/sync" +import { useKV } from "@tui/context/kv" import { map, pipe, flatMap, entries, filter, sortBy, take } from "remeda" import { DialogSelect, type DialogSelectRef } from "@tui/ui/dialog-select" import { useDialog } from "@tui/ui/dialog" @@ -20,8 +21,10 @@ export function DialogModel(props: { providerID?: string }) { const sync = useSync() const dialog = useDialog() const keybind = useKeybind() + const kv = useKV() const [ref, setRef] = createSignal>() const [query, setQuery] = createSignal("") + const [showRecent, setShowRecent] = kv.signal("model_list_recents_visibility", true) const connected = useConnected() const providers = createDialogProviderOptions() @@ -39,11 +42,12 @@ export function DialogModel(props: { providerID?: string }) { const favorites = connected() ? local.model.favorite() : [] const recents = local.model.recent() - const recentList = showSections - ? recents.filter( - (item) => !favorites.some((fav) => fav.providerID === item.providerID && fav.modelID === item.modelID), - ) - : [] + const recentList = + showSections && showRecent() + ? recents.filter( + (item) => !favorites.some((fav) => fav.providerID === item.providerID && fav.modelID === item.modelID), + ) + : [] const favoriteOptions = showSections ? favorites.flatMap((item) => { @@ -204,6 +208,12 @@ export function DialogModel(props: { providerID?: string }) { return "Select model" }) + createEffect( + on(showRecent, () => { + ref()?.scrollToCurrent() + }), + ) + return ( { + setShowRecent((prev) => !prev) + }, + }, ]} ref={setRef} onFilter={setQuery} diff --git a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx index 56d8453c9378..0ff2e3e7b7ae 100644 --- a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx +++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx @@ -44,6 +44,7 @@ export interface DialogSelectOption { export type DialogSelectRef = { filter: string filtered: DialogSelectOption[] + scrollToCurrent: () => void } export function DialogSelect(props: DialogSelectProps) { @@ -214,6 +215,16 @@ export function DialogSelect(props: DialogSelectProps) { get filtered() { return filtered() }, + scrollToCurrent: () => { + const current = props.current + if (!current) return + const currentIndex = flat().findIndex((opt) => isDeepEqual(opt.value, current)) + if (currentIndex >= 0) { + setTimeout(() => { + moveTo(currentIndex, true) + }, 0) + } + }, } props.ref?.(ref) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 54ca94ae4d3f..9640f7c29fda 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -737,6 +737,11 @@ export namespace Config { .describe("Toggle code block concealment in messages"), tool_details: z.string().optional().default("none").describe("Toggle tool details visibility"), model_list: z.string().optional().default("m").describe("List available models"), + model_list_recent_toggle: z + .string() + .optional() + .default("ctrl+h") + .describe("Toggle recent models section visibility"), model_cycle_recent: z.string().optional().default("f2").describe("Next recently used model"), model_cycle_recent_reverse: z.string().optional().default("shift+f2").describe("Previous recently used model"), model_cycle_favorite: z.string().optional().default("none").describe("Next favorite model"), From 7529c2a4a5abf99af2fd9f5e47c3b744991d5852 Mon Sep 17 00:00:00 2001 From: Idris Gadi Date: Tue, 27 Jan 2026 00:21:13 +0530 Subject: [PATCH 2/5] chore: make it single line config instead of multi line --- packages/opencode/src/config/config.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 9640f7c29fda..412e81a38bbc 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -737,11 +737,7 @@ export namespace Config { .describe("Toggle code block concealment in messages"), tool_details: z.string().optional().default("none").describe("Toggle tool details visibility"), model_list: z.string().optional().default("m").describe("List available models"), - model_list_recent_toggle: z - .string() - .optional() - .default("ctrl+h") - .describe("Toggle recent models section visibility"), + model_list_recent_toggle: z.string().optional().default("ctrl+h").describe("Toggle recent models section visibility"), model_cycle_recent: z.string().optional().default("f2").describe("Next recently used model"), model_cycle_recent_reverse: z.string().optional().default("shift+f2").describe("Previous recently used model"), model_cycle_favorite: z.string().optional().default("none").describe("Next favorite model"), From 1d9896a0b79914e7e3f79b831afe358f84f3fb0d Mon Sep 17 00:00:00 2001 From: Idris Gadi Date: Sat, 31 Jan 2026 20:21:53 +0530 Subject: [PATCH 3/5] fix: commit types as I have added new keybind config --- packages/opencode/src/config/config.ts | 6 +++++- packages/sdk/js/src/v2/gen/types.gen.ts | 4 ++++ packages/sdk/openapi.json | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 412e81a38bbc..9640f7c29fda 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -737,7 +737,11 @@ export namespace Config { .describe("Toggle code block concealment in messages"), tool_details: z.string().optional().default("none").describe("Toggle tool details visibility"), model_list: z.string().optional().default("m").describe("List available models"), - model_list_recent_toggle: z.string().optional().default("ctrl+h").describe("Toggle recent models section visibility"), + model_list_recent_toggle: z + .string() + .optional() + .default("ctrl+h") + .describe("Toggle recent models section visibility"), model_cycle_recent: z.string().optional().default("f2").describe("Next recently used model"), model_cycle_recent_reverse: z.string().optional().default("shift+f2").describe("Previous recently used model"), model_cycle_favorite: z.string().optional().default("none").describe("Next favorite model"), diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 0cf70241ef6f..bb3b2b266fc2 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1093,6 +1093,10 @@ export type KeybindsConfig = { * List available models */ model_list?: string + /** + * Toggle recent models section visibility + */ + model_list_recent_toggle?: string /** * Next recently used model */ diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index d179ed8b8c4e..24674ae4395b 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -8614,6 +8614,11 @@ "default": "m", "type": "string" }, + "model_list_recent_toggle": { + "description": "Toggle recent models section visibility", + "default": "ctrl+h", + "type": "string" + }, "model_cycle_recent": { "description": "Next recently used model", "default": "f2", From 6ca829ba2bb921f377ba8fccd6bd3b47fb27e7b6 Mon Sep 17 00:00:00 2001 From: Idris Gadi Date: Wed, 11 Feb 2026 16:54:27 +0530 Subject: [PATCH 4/5] fix: filter recents properly --- .../opencode/src/cli/cmd/tui/component/dialog-model.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx index 44c2e65c173d..59cafa63ec65 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx @@ -63,12 +63,12 @@ export function DialogModel(props: { providerID?: string }) { } const favoriteOptions = toOptions(favorites, "Favorites") - const recentOptions = toOptions( + const recentOptions = showRecent() ? toOptions( recents.filter( (item) => !favorites.some((fav) => fav.providerID === item.providerID && fav.modelID === item.modelID), ), "Recent", - ) + ) : [] const providerOptions = pipe( sync.data.provider, @@ -100,7 +100,7 @@ export function DialogModel(props: { providerID?: string }) { if (!showSections) return true if (favorites.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID)) return false - if (recents.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID)) + if (recents.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID) && showRecent()) return false return true }), @@ -173,6 +173,7 @@ export function DialogModel(props: { providerID?: string }) { }, }, ]} + ref={setRef} onFilter={setQuery} flat={true} skipFilter={true} From 09bcde09f31deefe63e4bbee8e2c029b59096489 Mon Sep 17 00:00:00 2001 From: Idris Gadi Date: Sat, 28 Feb 2026 17:42:06 +0530 Subject: [PATCH 5/5] feat: regenerate types --- .../cli/cmd/tui/component/dialog-model.tsx | 19 +- packages/sdk/js/src/v2/gen/types.gen.ts | 737 +++++++----------- 2 files changed, 312 insertions(+), 444 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx index 59cafa63ec65..5bc4bb6cc28a 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx @@ -63,12 +63,14 @@ export function DialogModel(props: { providerID?: string }) { } const favoriteOptions = toOptions(favorites, "Favorites") - const recentOptions = showRecent() ? toOptions( - recents.filter( - (item) => !favorites.some((fav) => fav.providerID === item.providerID && fav.modelID === item.modelID), - ), - "Recent", - ) : [] + const recentOptions = showRecent() + ? toOptions( + recents.filter( + (item) => !favorites.some((fav) => fav.providerID === item.providerID && fav.modelID === item.modelID), + ), + "Recent", + ) + : [] const providerOptions = pipe( sync.data.provider, @@ -100,7 +102,10 @@ export function DialogModel(props: { providerID?: string }) { if (!showSections) return true if (favorites.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID)) return false - if (recents.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID) && showRecent()) + if ( + recents.some((item) => item.providerID === x.value.providerID && item.modelID === x.value.modelID) && + showRecent() + ) return false return true }), diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index b809e0496f4e..385de2cc85e3 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -90,6 +90,22 @@ export type EventFileEdited = { } } +export type OutputFormatText = { + type: "text" +} + +export type JsonSchema = { + [key: string]: unknown +} + +export type OutputFormatJsonSchema = { + type: "json_schema" + schema: JsonSchema + retryCount?: number +} + +export type OutputFormat = OutputFormatText | OutputFormatJsonSchema + export type FileDiff = { file: string before: string @@ -106,6 +122,7 @@ export type UserMessage = { time: { created: number } + format?: OutputFormat summary?: { title?: string body?: string @@ -152,6 +169,14 @@ export type MessageAbortedError = { } } +export type StructuredOutputError = { + name: "StructuredOutputError" + data: { + message: string + retries: number + } +} + export type ContextOverflowError = { name: "ContextOverflowError" data: { @@ -189,6 +214,7 @@ export type AssistantMessage = { | UnknownError | MessageOutputLengthError | MessageAbortedError + | StructuredOutputError | ContextOverflowError | ApiError parentID: string @@ -212,6 +238,7 @@ export type AssistantMessage = { write: number } } + structured?: unknown variant?: string finish?: string } @@ -498,7 +525,17 @@ export type EventMessagePartUpdated = { type: "message.part.updated" properties: { part: Part - delta?: string + } +} + +export type EventMessagePartDelta = { + type: "message.part.delta" + properties: { + sessionID: string + messageID: string + partID: string + field: string + delta: string } } @@ -668,10 +705,6 @@ export type Todo = { * Priority level of the task: high, medium, low */ priority: string - /** - * Unique identifier for the todo item - */ - id: string } export type EventTodoUpdated = { @@ -841,6 +874,7 @@ export type EventSessionError = { | UnknownError | MessageOutputLengthError | MessageAbortedError + | StructuredOutputError | ContextOverflowError | ApiError } @@ -853,6 +887,35 @@ export type EventVcsBranchUpdated = { } } +export type EventWorktreeReady = { + type: "worktree.ready" + properties: { + name: string + branch: string + } +} + +export type EventWorktreeFailed = { + type: "worktree.failed" + properties: { + message: string + } +} + +export type EventWorkspaceReady = { + type: "workspace.ready" + properties: { + name: string + } +} + +export type EventWorkspaceFailed = { + type: "workspace.failed" + properties: { + message: string + } +} + export type Pty = { id: string title: string @@ -892,21 +955,6 @@ export type EventPtyDeleted = { } } -export type EventWorktreeReady = { - type: "worktree.ready" - properties: { - name: string - branch: string - } -} - -export type EventWorktreeFailed = { - type: "worktree.failed" - properties: { - message: string - } -} - export type Event = | EventInstallationUpdated | EventInstallationUpdateAvailable @@ -920,6 +968,7 @@ export type Event = | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated + | EventMessagePartDelta | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied @@ -944,404 +993,20 @@ export type Event = | EventSessionDiff | EventSessionError | EventVcsBranchUpdated + | EventWorktreeReady + | EventWorktreeFailed + | EventWorkspaceReady + | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted - | EventWorktreeReady - | EventWorktreeFailed export type GlobalEvent = { directory: string payload: Event } -/** - * Custom keybind configurations - */ -export type KeybindsConfig = { - /** - * Leader key for keybind combinations - */ - leader?: string - /** - * Exit the application - */ - app_exit?: string - /** - * Open external editor - */ - editor_open?: string - /** - * List available themes - */ - theme_list?: string - /** - * Toggle sidebar - */ - sidebar_toggle?: string - /** - * Toggle session scrollbar - */ - scrollbar_toggle?: string - /** - * Toggle username visibility - */ - username_toggle?: string - /** - * View status - */ - status_view?: string - /** - * Export session to editor - */ - session_export?: string - /** - * Create a new session - */ - session_new?: string - /** - * List all sessions - */ - session_list?: string - /** - * Show session timeline - */ - session_timeline?: string - /** - * Fork session from message - */ - session_fork?: string - /** - * Rename session - */ - session_rename?: string - /** - * Delete session - */ - session_delete?: string - /** - * Delete stash entry - */ - stash_delete?: string - /** - * Open provider list from model dialog - */ - model_provider_list?: string - /** - * Toggle model favorite status - */ - model_favorite_toggle?: string - /** - * Share current session - */ - session_share?: string - /** - * Unshare current session - */ - session_unshare?: string - /** - * Interrupt current session - */ - session_interrupt?: string - /** - * Compact the session - */ - session_compact?: string - /** - * Scroll messages up by one page - */ - messages_page_up?: string - /** - * Scroll messages down by one page - */ - messages_page_down?: string - /** - * Scroll messages up by one line - */ - messages_line_up?: string - /** - * Scroll messages down by one line - */ - messages_line_down?: string - /** - * Scroll messages up by half page - */ - messages_half_page_up?: string - /** - * Scroll messages down by half page - */ - messages_half_page_down?: string - /** - * Navigate to first message - */ - messages_first?: string - /** - * Navigate to last message - */ - messages_last?: string - /** - * Navigate to next message - */ - messages_next?: string - /** - * Navigate to previous message - */ - messages_previous?: string - /** - * Navigate to last user message - */ - messages_last_user?: string - /** - * Copy message - */ - messages_copy?: string - /** - * Undo message - */ - messages_undo?: string - /** - * Redo message - */ - messages_redo?: string - /** - * Toggle code block concealment in messages - */ - messages_toggle_conceal?: string - /** - * Toggle tool details visibility - */ - tool_details?: string - /** - * List available models - */ - model_list?: string - /** - * Toggle recent models section visibility - */ - model_list_recent_toggle?: string - /** - * Next recently used model - */ - model_cycle_recent?: string - /** - * Previous recently used model - */ - model_cycle_recent_reverse?: string - /** - * Next favorite model - */ - model_cycle_favorite?: string - /** - * Previous favorite model - */ - model_cycle_favorite_reverse?: string - /** - * List available commands - */ - command_list?: string - /** - * List agents - */ - agent_list?: string - /** - * Next agent - */ - agent_cycle?: string - /** - * Previous agent - */ - agent_cycle_reverse?: string - /** - * Cycle model variants - */ - variant_cycle?: string - /** - * Clear input field - */ - input_clear?: string - /** - * Paste from clipboard - */ - input_paste?: string - /** - * Submit input - */ - input_submit?: string - /** - * Insert newline in input - */ - input_newline?: string - /** - * Move cursor left in input - */ - input_move_left?: string - /** - * Move cursor right in input - */ - input_move_right?: string - /** - * Move cursor up in input - */ - input_move_up?: string - /** - * Move cursor down in input - */ - input_move_down?: string - /** - * Select left in input - */ - input_select_left?: string - /** - * Select right in input - */ - input_select_right?: string - /** - * Select up in input - */ - input_select_up?: string - /** - * Select down in input - */ - input_select_down?: string - /** - * Move to start of line in input - */ - input_line_home?: string - /** - * Move to end of line in input - */ - input_line_end?: string - /** - * Select to start of line in input - */ - input_select_line_home?: string - /** - * Select to end of line in input - */ - input_select_line_end?: string - /** - * Move to start of visual line in input - */ - input_visual_line_home?: string - /** - * Move to end of visual line in input - */ - input_visual_line_end?: string - /** - * Select to start of visual line in input - */ - input_select_visual_line_home?: string - /** - * Select to end of visual line in input - */ - input_select_visual_line_end?: string - /** - * Move to start of buffer in input - */ - input_buffer_home?: string - /** - * Move to end of buffer in input - */ - input_buffer_end?: string - /** - * Select to start of buffer in input - */ - input_select_buffer_home?: string - /** - * Select to end of buffer in input - */ - input_select_buffer_end?: string - /** - * Delete line in input - */ - input_delete_line?: string - /** - * Delete to end of line in input - */ - input_delete_to_line_end?: string - /** - * Delete to start of line in input - */ - input_delete_to_line_start?: string - /** - * Backspace in input - */ - input_backspace?: string - /** - * Delete character in input - */ - input_delete?: string - /** - * Undo in input - */ - input_undo?: string - /** - * Redo in input - */ - input_redo?: string - /** - * Move word forward in input - */ - input_word_forward?: string - /** - * Move word backward in input - */ - input_word_backward?: string - /** - * Select word forward in input - */ - input_select_word_forward?: string - /** - * Select word backward in input - */ - input_select_word_backward?: string - /** - * Delete word forward in input - */ - input_delete_word_forward?: string - /** - * Delete word backward in input - */ - input_delete_word_backward?: string - /** - * Previous history item - */ - history_previous?: string - /** - * Next history item - */ - history_next?: string - /** - * Next child session - */ - session_child_cycle?: string - /** - * Previous child session - */ - session_child_cycle_reverse?: string - /** - * Go to parent session - */ - session_parent?: string - /** - * Suspend terminal - */ - terminal_suspend?: string - /** - * Toggle terminal title - */ - terminal_title_toggle?: string - /** - * Toggle tips on home screen - */ - tips_toggle?: string - /** - * Toggle thinking blocks visibility - */ - display_thinking?: string -} - /** * Log level */ @@ -1524,7 +1189,8 @@ export type ProviderConfig = { [key: string]: string } provider?: { - npm: string + npm?: string + api?: string } /** * Variant-specific configuration @@ -1640,34 +1306,7 @@ export type Config = { * JSON schema reference for configuration validation */ $schema?: string - /** - * Theme name to use for the interface - */ - theme?: string - keybinds?: KeybindsConfig logLevel?: LogLevel - /** - * TUI specific settings - */ - tui?: { - /** - * TUI scroll speed - */ - scroll_speed?: number - /** - * Scroll acceleration settings - */ - scroll_acceleration?: { - /** - * Enable scroll acceleration - */ - enabled: boolean - } - /** - * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column - */ - diff_style?: "auto" | "stacked" - } server?: ServerConfig /** * Command configuration, see https://opencode.ai/docs/commands @@ -2004,6 +1643,16 @@ export type WorktreeCreateInput = { startCommand?: string } +export type Workspace = { + id: string + branch: string | null + projectID: string + config: { + directory: string + type: "worktree" + } +} + export type WorktreeRemoveInput = { directory: string } @@ -2012,6 +1661,45 @@ export type WorktreeResetInput = { directory: string } +export type ProjectSummary = { + id: string + name?: string + worktree: string +} + +export type GlobalSession = { + id: string + slug: string + projectID: string + directory: string + parentID?: string + summary?: { + additions: number + deletions: number + files: number + diffs?: Array + } + share?: { + url: string + } + title: string + version: string + time: { + created: number + updated: number + compacting?: number + archived?: number + } + permission?: PermissionRuleset + revert?: { + messageID: string + partID?: string + snapshot?: string + diff?: string + } + project: ProjectSummary | null +} + export type McpResource = { name: string uri: string @@ -2811,6 +2499,93 @@ export type WorktreeCreateResponses = { export type WorktreeCreateResponse = WorktreeCreateResponses[keyof WorktreeCreateResponses] +export type ExperimentalWorkspaceRemoveData = { + body?: never + path: { + id: string + } + query?: { + directory?: string + } + url: "/experimental/workspace/{id}" +} + +export type ExperimentalWorkspaceRemoveErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalWorkspaceRemoveError = + ExperimentalWorkspaceRemoveErrors[keyof ExperimentalWorkspaceRemoveErrors] + +export type ExperimentalWorkspaceRemoveResponses = { + /** + * Workspace removed + */ + 200: Workspace +} + +export type ExperimentalWorkspaceRemoveResponse = + ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses] + +export type ExperimentalWorkspaceCreateData = { + body?: { + branch: string | null + config: { + directory: string + type: "worktree" + } + } + path: { + id: string + } + query?: { + directory?: string + } + url: "/experimental/workspace/{id}" +} + +export type ExperimentalWorkspaceCreateErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalWorkspaceCreateError = + ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors] + +export type ExperimentalWorkspaceCreateResponses = { + /** + * Workspace created + */ + 200: Workspace +} + +export type ExperimentalWorkspaceCreateResponse = + ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses] + +export type ExperimentalWorkspaceListData = { + body?: never + path?: never + query?: { + directory?: string + } + url: "/experimental/workspace" +} + +export type ExperimentalWorkspaceListResponses = { + /** + * Workspaces + */ + 200: Array +} + +export type ExperimentalWorkspaceListResponse = + ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses] + export type WorktreeResetData = { body?: WorktreeResetInput path?: never @@ -2838,6 +2613,51 @@ export type WorktreeResetResponses = { export type WorktreeResetResponse = WorktreeResetResponses[keyof WorktreeResetResponses] +export type ExperimentalSessionListData = { + body?: never + path?: never + query?: { + /** + * Filter sessions by project directory + */ + directory?: string + /** + * Only return root sessions (no parentID) + */ + roots?: boolean + /** + * Filter sessions updated on or after this timestamp (milliseconds since epoch) + */ + start?: number + /** + * Return sessions updated before this timestamp (milliseconds since epoch) + */ + cursor?: number + /** + * Filter sessions by title (case-insensitive) + */ + search?: string + /** + * Maximum number of sessions to return + */ + limit?: number + /** + * Include archived sessions (default false) + */ + archived?: boolean + } + url: "/experimental/session" +} + +export type ExperimentalSessionListResponses = { + /** + * List of sessions + */ + 200: Array +} + +export type ExperimentalSessionListResponse = ExperimentalSessionListResponses[keyof ExperimentalSessionListResponses] + export type ExperimentalResourceListData = { body?: never path?: never @@ -3406,6 +3226,7 @@ export type SessionPromptData = { tools?: { [key: string]: boolean } + format?: OutputFormat system?: string variant?: string parts: Array @@ -3447,6 +3268,46 @@ export type SessionPromptResponses = { export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses] +export type SessionDeleteMessageData = { + body?: never + path: { + /** + * Session ID + */ + sessionID: string + /** + * Message ID + */ + messageID: string + } + query?: { + directory?: string + } + url: "/session/{sessionID}/message/{messageID}" +} + +export type SessionDeleteMessageErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} + +export type SessionDeleteMessageError = SessionDeleteMessageErrors[keyof SessionDeleteMessageErrors] + +export type SessionDeleteMessageResponses = { + /** + * Successfully deleted message + */ + 200: boolean +} + +export type SessionDeleteMessageResponse = SessionDeleteMessageResponses[keyof SessionDeleteMessageResponses] + export type SessionMessageData = { body?: never path: { @@ -3593,6 +3454,7 @@ export type SessionPromptAsyncData = { tools?: { [key: string]: boolean } + format?: OutputFormat system?: string variant?: string parts: Array @@ -4041,7 +3903,8 @@ export type ProviderListResponses = { [key: string]: string } provider?: { - npm: string + npm?: string + api?: string } variants?: { [key: string]: {