co-mono/packages/coding-agent/src
Aos Dabbagh 23a4fd1159 fix: load keybindings before --resume session picker
The problem: I wanted to be able to select my session (either from
`/resume` or `--resume`) with different keybindings.

The issue: when running `pi --resume`, custom keybindings from
`~/.pi/agent/keybindings.json` were not being applied to the session
picker. This happened because `KeybindingsManager.create()` was only
called when `InteractiveMode` initialized, but the session picker runs
before that in `main.ts`.

The session picker uses `getEditorKeybindings()` for navigation
(selectUp/selectDown etc.), which returns the global default keybindings
if `setEditorKeybindings()` hasn't been called yet.

Fix: Call `KeybindingsManager.create()` inside the `--resume` block
before showing the session picker. This loads user keybindings and sets
them globally.

The current fix results in double-init of keybindings when entering
interactive mode which _should_ be harmless, since it's the same same
config loaded twice, but is minimal and only affects the `--resume`
path.

I considered passing keybindings from `main()` to `InteractiveMode` -
it's cleaner but requires API changes.

Also documented the `select*` keybindings in README.md.
2026-01-11 19:22:52 +01:00
..
cli feat: Add skill slash commands and fuzzy matching for all commands 2026-01-11 17:56:11 +01:00
core feat(coding-agent): add model_select extension hook 2026-01-11 18:12:09 +01:00
modes fix: Model selector fuzzy search matches id + provider 2026-01-11 18:04:57 +01:00
utils feat: Add skill slash commands and fuzzy matching for all commands 2026-01-11 17:56:11 +01:00
cli.ts Remove old implementation files (main.ts, cli.ts, tui-renderer.ts), rename new files 2025-12-09 01:21:28 +01:00
config.ts chore: remove deprecation comment from getToolsDir, add changelog entry for #470 2026-01-05 20:26:48 +01:00
index.ts feat(coding-agent): add FooterDataProvider for git branch and extension statuses 2026-01-09 07:39:30 -08:00
main.ts fix: load keybindings before --resume session picker 2026-01-11 19:22:52 +01:00
migrations.ts chore: remove deprecation comment from getToolsDir, add changelog entry for #470 2026-01-05 20:26:48 +01:00