| 58 | } |
| 59 | |
| 60 | function groupFor(id: string): KeybindGroup { |
| 61 | if (id === PALETTE_ID) return "General" |
| 62 | if (id.startsWith("terminal.")) return "Terminal" |
| 63 | if (id.startsWith("model.") || id.startsWith("agent.") || id.startsWith("mcp.")) return "Model and agent" |
| 64 | if (id.startsWith("file.") || id.startsWith("fileTree.")) return "Navigation" |
| 65 | if (id.startsWith("prompt.")) return "Prompt" |
| 66 | if ( |
| 67 | id.startsWith("session.") || |
| 68 | id.startsWith("message.") || |
| 69 | id.startsWith("permissions.") || |
| 70 | id.startsWith("steps.") || |
| 71 | id.startsWith("review.") |
| 72 | ) |
| 73 | return "Session" |
| 74 | |
| 75 | return "General" |
| 76 | } |
| 77 | |
| 78 | function isModifier(key: string) { |
| 79 | return key === "Shift" || key === "Control" || key === "Alt" || key === "Meta" |