From 0276aea49dcb9b7b9a36ba895742f77fb7fef339 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Sun, 7 Dec 2025 07:33:03 -0500 Subject: [PATCH 1/5] fix: restore model_cycle_favorite keybinds with minimal changes - Add model_cycle_favorite and model_cycle_favorite_reverse to Keybinds schema - Add TUI handlers for favorite model cycling - Add missing types to JS SDK KeybindsConfig - Both keybinds default to 'none' to maintain no new default keybindings - Total: 28 lines across 3 files Resolves #5198 --- packages/opencode/src/cli/cmd/tui/app.tsx | 18 ++++++++++++++++++ packages/opencode/src/config/config.ts | 2 ++ packages/sdk/js/src/gen/types.gen.ts | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 3fb20f16797..ef4b125d704 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -266,6 +266,24 @@ function App() { local.model.cycle(-1) }, }, + { + title: "Favorite cycle", + value: "model.cycle_favorite", + keybind: "model_cycle_favorite", + category: "Agent", + onSelect: () => { + local.model.cycleFavorite(1) + }, + }, + { + title: "Favorite cycle reverse", + value: "model.cycle_favorite_reverse", + keybind: "model_cycle_favorite_reverse", + category: "Agent", + onSelect: () => { + local.model.cycleFavorite(-1) + }, + }, { title: "Switch agent", value: "agent.list", diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index d38de8a9407..250cecd82fa 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -438,6 +438,8 @@ export namespace Config { model_list: z.string().optional().default("m").describe("List available models"), 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"), + model_cycle_favorite_reverse: z.string().optional().default("none").describe("Previous favorite model"), command_list: z.string().optional().default("ctrl+p").describe("List available commands"), agent_list: z.string().optional().default("a").describe("List agents"), agent_cycle: z.string().optional().default("tab").describe("Next agent"), diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index c640f41a719..31a1699aacb 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -894,6 +894,14 @@ export type KeybindsConfig = { * 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 */ From b32a5d3c879c81af9eb4c60265cc700f3d26f72d Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Mon, 8 Dec 2025 20:49:17 -0500 Subject: [PATCH 2/5] Regenerate SDK types with favorite keybinds --- packages/sdk/js/src/v2/gen/types.gen.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 9b80026f067..a934efd3390 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -896,6 +896,14 @@ export type KeybindsConfig = { * 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 */ From 46c2ed94238a321b980080130d130fd5d5e844b8 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Mon, 8 Dec 2025 20:50:39 -0500 Subject: [PATCH 3/5] fix(#5198): restore model_cycle_favorite keybindings Restore the model_cycle_favorite and model_cycle_favorite_reverse keybindings that were accidentally removed from the UI configuration. These commands allow users to cycle through their favorite models with customizable keybinds. Changes: - Add model_cycle_favorite and model_cycle_favorite_reverse to Keybinds schema (default to 'none' to maintain no new default keybindings) - Restore UI command handlers for favorite model cycling in app.tsx - Regenerate SDK types to include the restored keybindings Resolves #5198 --- packages/sdk/js/openapi.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/sdk/js/openapi.json b/packages/sdk/js/openapi.json index 421edfaf1b1..660cb263e74 100644 --- a/packages/sdk/js/openapi.json +++ b/packages/sdk/js/openapi.json @@ -7575,6 +7575,16 @@ "default": "shift+f2", "type": "string" }, + "model_cycle_favorite": { + "description": "Next favorite model", + "default": "none", + "type": "string" + }, + "model_cycle_favorite_reverse": { + "description": "Previous favorite model", + "default": "none", + "type": "string" + }, "command_list": { "description": "List available commands", "default": "ctrl+p", From 2d7d73df2fd949f49a3aa6594dab53ad50bce5dc Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Wed, 10 Dec 2025 15:11:31 -0500 Subject: [PATCH 4/5] Fix type error: useKittyKeyboard should be boolean --- packages/opencode/src/cli/cmd/tui/app.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 7cd3c327b29..4e7abd04983 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -144,7 +144,7 @@ export function tui(input: { url: string; args: Args; onExit?: () => Promise Date: Wed, 10 Dec 2025 19:44:37 -0500 Subject: [PATCH 5/5] fix: uncorrupt --- packages/opencode/src/cli/cmd/tui/app.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 4e7abd04983..7cd3c327b29 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -144,7 +144,7 @@ export function tui(input: { url: string; args: Args; onExit?: () => Promise