thiagowfx's avatar

Β¬ just serendipity πŸ€ (not just serendipity)

pi: cycle models backward with ctrl+n

β€’ 117 words β€’ 1 min β€’ updated

Previously.

Problem statement: pi binds ctrl+p to app.model.cycleForward1 by default, but has no default binding to cycle backward other than shift+ctrl+p, which is arguably difficult to remember.

Every keybinding in pi is namespaced and overridable via ~/.pi/agent/keybindings.json, documented in docs/keybindings.md:

json
{
  "app.model.cycleBackward": [
    "shift+ctrl+p",
    "ctrl+n"
  ]
}

ctrl+n is also the default for app.session.toggleNamedFilter, but that only fires inside the session picker, not while a model selector or the main editor has focus.

Run /reload in pi to pick up the keybinding addition without restarting the session.

∴ ctrl+p/ctrl+n now cycle models forward/backward, matching the readline (emacs!) history bindings I already have muscle memory for.


πŸ€– Drafted with /bloggify.


  1. It cycles through models selected in /scoped-models↩︎