mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: restore ability to bind keys for model_cycle_favorite model_cycle_favorite_reverse (resolves #5198) (#5202)
This commit is contained in:
parent
0beccc406e
commit
8fcc80bc20
4 changed files with 38 additions and 0 deletions
|
|
@ -297,6 +297,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",
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -917,6 +917,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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue