feat(keybindings): 注册 EffortPanel context 与 6 个 action

绑定 ←/→/h/l/home/end/enter/escape/q/ctrl+c 到 effortPanel:* action。
与 ModelPicker context 范式一致,避免左右键被全局 keybinding 拦截。

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-14 14:26:20 +08:00
parent d09e294bbe
commit 7663b74559
2 changed files with 23 additions and 0 deletions

View File

@@ -326,6 +326,22 @@ export const DEFAULT_BINDINGS: KeybindingBlock[] = [
space: 'modelPicker:toggle1M',
},
},
// Effort panel (slash /effort without args)
{
context: 'EffortPanel',
bindings: {
left: 'effortPanel:decrease',
right: 'effortPanel:increase',
h: 'effortPanel:decrease',
l: 'effortPanel:increase',
home: 'effortPanel:home',
end: 'effortPanel:end',
enter: 'effortPanel:confirm',
escape: 'effortPanel:cancel',
q: 'effortPanel:cancel',
'ctrl+c': 'effortPanel:cancel',
},
},
// Select component navigation (used by /model, /resume, permission prompts, etc.)
{
context: 'Select',

View File

@@ -154,6 +154,13 @@ export const KEYBINDING_ACTIONS = [
'modelPicker:decreaseEffort',
'modelPicker:increaseEffort',
'modelPicker:toggle1M',
// Effort panel actions (slash /effort without args)
'effortPanel:decrease',
'effortPanel:increase',
'effortPanel:home',
'effortPanel:end',
'effortPanel:confirm',
'effortPanel:cancel',
// Select component actions (distinct from confirm: to avoid collisions)
'select:next',
'select:previous',