From e945436b6f71afa4860e68558de17c6fba88a1f7 Mon Sep 17 00:00:00 2001 From: Ariane Emory <97994360+ariane-emory@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:46:04 -0400 Subject: [PATCH] feat(tui): allow variant_list keybind for the "Switch model variant" command (#21185) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> --- packages/opencode/src/cli/cmd/tui/app.tsx | 1 + packages/opencode/src/config/config.ts | 1 + packages/web/src/content/docs/ar/keybinds.mdx | 1 + packages/web/src/content/docs/bs/keybinds.mdx | 1 + packages/web/src/content/docs/da/keybinds.mdx | 1 + packages/web/src/content/docs/de/keybinds.mdx | 1 + packages/web/src/content/docs/es/keybinds.mdx | 1 + packages/web/src/content/docs/fr/keybinds.mdx | 1 + packages/web/src/content/docs/it/keybinds.mdx | 1 + packages/web/src/content/docs/ja/keybinds.mdx | 1 + packages/web/src/content/docs/keybinds.mdx | 1 + packages/web/src/content/docs/ko/keybinds.mdx | 1 + packages/web/src/content/docs/nb/keybinds.mdx | 1 + packages/web/src/content/docs/pl/keybinds.mdx | 1 + packages/web/src/content/docs/pt-br/keybinds.mdx | 1 + packages/web/src/content/docs/ru/keybinds.mdx | 1 + packages/web/src/content/docs/th/keybinds.mdx | 1 + packages/web/src/content/docs/tr/keybinds.mdx | 1 + packages/web/src/content/docs/zh-cn/keybinds.mdx | 1 + packages/web/src/content/docs/zh-tw/keybinds.mdx | 1 + 20 files changed, 20 insertions(+) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 7904e3b79d..4161c025c1 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -599,6 +599,7 @@ function App(props: { onSnapshot?: () => Promise }) { { title: "Switch model variant", value: "variant.list", + keybind: "variant_list", category: "Agent", hidden: local.model.variant.list().length === 0, slash: { diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index b11ae83192..efae2ca551 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -669,6 +669,7 @@ export namespace Config { agent_cycle: z.string().optional().default("tab").describe("Next agent"), agent_cycle_reverse: z.string().optional().default("shift+tab").describe("Previous agent"), variant_cycle: z.string().optional().default("ctrl+t").describe("Cycle model variants"), + variant_list: z.string().optional().default("none").describe("List model variants"), input_clear: z.string().optional().default("ctrl+c").describe("Clear input field"), input_paste: z.string().optional().default("ctrl+v").describe("Paste from clipboard"), input_submit: z.string().optional().default("return").describe("Submit input"), diff --git a/packages/web/src/content/docs/ar/keybinds.mdx b/packages/web/src/content/docs/ar/keybinds.mdx index 986313a5b5..d40d49729e 100644 --- a/packages/web/src/content/docs/ar/keybinds.mdx +++ b/packages/web/src/content/docs/ar/keybinds.mdx @@ -53,6 +53,7 @@ description: خصّص اختصارات لوحة المفاتيح. "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/bs/keybinds.mdx b/packages/web/src/content/docs/bs/keybinds.mdx index a70fdedaef..31fed59005 100644 --- a/packages/web/src/content/docs/bs/keybinds.mdx +++ b/packages/web/src/content/docs/bs/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode ima listu veza tipki koje možete prilagoditi putem `tui.json`. "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/da/keybinds.mdx b/packages/web/src/content/docs/da/keybinds.mdx index 237c36f775..7b2f2a7f31 100644 --- a/packages/web/src/content/docs/da/keybinds.mdx +++ b/packages/web/src/content/docs/da/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode har en liste over nøglebindinger, som du kan tilpasse gennem `tui.json "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/de/keybinds.mdx b/packages/web/src/content/docs/de/keybinds.mdx index 628c65006d..26edf9bdbb 100644 --- a/packages/web/src/content/docs/de/keybinds.mdx +++ b/packages/web/src/content/docs/de/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode verfügt über eine Liste von Tastenkombinationen, die Sie über `tui.j "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/es/keybinds.mdx b/packages/web/src/content/docs/es/keybinds.mdx index 4c1f7e1a80..2fc57fa69f 100644 --- a/packages/web/src/content/docs/es/keybinds.mdx +++ b/packages/web/src/content/docs/es/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode tiene una lista de combinaciones de teclas que puede personalizar a tra "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/fr/keybinds.mdx b/packages/web/src/content/docs/fr/keybinds.mdx index 281e5df743..feb4ba37f6 100644 --- a/packages/web/src/content/docs/fr/keybinds.mdx +++ b/packages/web/src/content/docs/fr/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode a une liste de raccourcis clavier que vous pouvez personnaliser via la "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/it/keybinds.mdx b/packages/web/src/content/docs/it/keybinds.mdx index e599f4e417..aef0a4c936 100644 --- a/packages/web/src/content/docs/it/keybinds.mdx +++ b/packages/web/src/content/docs/it/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode ha una lista di scorciatoie che puoi personalizzare tramite `tui.json`. "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/ja/keybinds.mdx b/packages/web/src/content/docs/ja/keybinds.mdx index 3ec9ca94d5..8d2de3ba95 100644 --- a/packages/web/src/content/docs/ja/keybinds.mdx +++ b/packages/web/src/content/docs/ja/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode には、`tui.json` を通じてカスタマイズできるキーバイ "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx index 74ef30577e..5488aaf81c 100644 --- a/packages/web/src/content/docs/keybinds.mdx +++ b/packages/web/src/content/docs/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode has a list of keybinds that you can customize through `tui.json`. "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/ko/keybinds.mdx b/packages/web/src/content/docs/ko/keybinds.mdx index fa8b4e9bdd..b6a605f2eb 100644 --- a/packages/web/src/content/docs/ko/keybinds.mdx +++ b/packages/web/src/content/docs/ko/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode에는 `tui.json`을 통해 커스터마이즈할 수 있는 키바인 "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/nb/keybinds.mdx b/packages/web/src/content/docs/nb/keybinds.mdx index f9837480dc..623f7aa241 100644 --- a/packages/web/src/content/docs/nb/keybinds.mdx +++ b/packages/web/src/content/docs/nb/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode har en liste over tastebindinger som du kan tilpasse gjennom `tui.json` "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/pl/keybinds.mdx b/packages/web/src/content/docs/pl/keybinds.mdx index 4744ffc783..0d3068feaf 100644 --- a/packages/web/src/content/docs/pl/keybinds.mdx +++ b/packages/web/src/content/docs/pl/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode zawiera listę skrótów klawiszowych, które można dostosować za pom "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/pt-br/keybinds.mdx b/packages/web/src/content/docs/pt-br/keybinds.mdx index 6c7fcd208e..e1f0f8e7ca 100644 --- a/packages/web/src/content/docs/pt-br/keybinds.mdx +++ b/packages/web/src/content/docs/pt-br/keybinds.mdx @@ -53,6 +53,7 @@ O opencode tem uma lista de atalhos de teclado que você pode personalizar atrav "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/ru/keybinds.mdx b/packages/web/src/content/docs/ru/keybinds.mdx index bfd4bf0c24..bde4e15530 100644 --- a/packages/web/src/content/docs/ru/keybinds.mdx +++ b/packages/web/src/content/docs/ru/keybinds.mdx @@ -53,6 +53,7 @@ opencode имеет список сочетаний клавиш, которые "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/th/keybinds.mdx b/packages/web/src/content/docs/th/keybinds.mdx index ce3234a04a..2f5bcc5d74 100644 --- a/packages/web/src/content/docs/th/keybinds.mdx +++ b/packages/web/src/content/docs/th/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode มีรายการปุ่มลัดที่คุณปร "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/tr/keybinds.mdx b/packages/web/src/content/docs/tr/keybinds.mdx index 7d3142bf38..bbf8c3bfa9 100644 --- a/packages/web/src/content/docs/tr/keybinds.mdx +++ b/packages/web/src/content/docs/tr/keybinds.mdx @@ -53,6 +53,7 @@ opencode, `tui.json` aracılığıyla özelleştirebileceğiniz bir tuş bağlan "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/zh-cn/keybinds.mdx b/packages/web/src/content/docs/zh-cn/keybinds.mdx index 33f75c6dc8..0989a30f57 100644 --- a/packages/web/src/content/docs/zh-cn/keybinds.mdx +++ b/packages/web/src/content/docs/zh-cn/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode 提供了一系列快捷键,您可以通过 `tui.json` 进行自定 "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab", diff --git a/packages/web/src/content/docs/zh-tw/keybinds.mdx b/packages/web/src/content/docs/zh-tw/keybinds.mdx index 574404b2fd..61d902141a 100644 --- a/packages/web/src/content/docs/zh-tw/keybinds.mdx +++ b/packages/web/src/content/docs/zh-tw/keybinds.mdx @@ -53,6 +53,7 @@ OpenCode 提供了一系列快捷鍵,您可以透過 `tui.json` 進行自訂 "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "variant_cycle": "ctrl+t", + "variant_list": "none", "command_list": "ctrl+p", "agent_list": "a", "agent_cycle": "tab",