Sfoglia il codice sorgente

feat(tui): allow variant_list keybind for the "Switch model variant" command (#21185)

Co-authored-by: Aiden Cline <[email protected]>
Ariane Emory 1 settimana fa
parent
commit
e945436b6f

+ 1 - 0
packages/opencode/src/cli/cmd/tui/app.tsx

@@ -599,6 +599,7 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
     {
       title: "Switch model variant",
       value: "variant.list",
+      keybind: "variant_list",
       category: "Agent",
       hidden: local.model.variant.list().length === 0,
       slash: {

+ 1 - 0
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"),

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",

+ 1 - 0
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": "<leader>a",
     "agent_cycle": "tab",