summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAriane Emory <[email protected]>2025-12-15 17:03:50 -0500
committerGitHub <[email protected]>2025-12-15 16:03:50 -0600
commit8fcc80bc2025b64872a839b49484db1ccc7a00fa (patch)
tree67886e65f0d57ac4a6bab7a448dfca31b0cfcbf7 /packages
parent0beccc406e450d0ffce3c9d105c3813bc9b24d45 (diff)
downloadopencode-8fcc80bc2025b64872a839b49484db1ccc7a00fa.tar.gz
opencode-8fcc80bc2025b64872a839b49484db1ccc7a00fa.zip
fix: restore ability to bind keys for model_cycle_favorite model_cycle_favorite_reverse (resolves #5198) (#5202)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/cli/cmd/tui/app.tsx18
-rw-r--r--packages/opencode/src/config/config.ts2
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts8
-rw-r--r--packages/sdk/openapi.json10
4 files changed, 38 insertions, 0 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx
index 69db202ee..a1a8a5e80 100644
--- a/packages/opencode/src/cli/cmd/tui/app.tsx
+++ b/packages/opencode/src/cli/cmd/tui/app.tsx
@@ -298,6 +298,24 @@ function App() {
},
},
{
+ 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",
keybind: "agent_list",
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index d0fb12c58..9cf3507e1 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -460,6 +460,8 @@ export namespace Config {
model_list: z.string().optional().default("<leader>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("<leader>a").describe("List agents"),
agent_cycle: z.string().optional().default("tab").describe("Next agent"),
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index a92709561..ca8d25fd5 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -918,6 +918,14 @@ export type KeybindsConfig = {
*/
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
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index 5a978c69c..3be96c599 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -7169,6 +7169,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",