Skip to content
PifeatureCLI & tooling1 file · +9 −7

Add right-arrow open-file to files-widget browser

Session from pi-extensions-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk

1msession
0interventions
GOAL

Make right arrow key open a selected file in the files-widget browser, instead of only expanding directories.

  1. Prompt · +0
    Can we make it so that right arrow on a selected file opens that file?
  2. Agent did · +0m
    Located files-widget/browser.ts and read the keyboard handling code for the browser input.
  3. Agent did · +0m
    Modified handleBrowserInput so right arrow (and 'l') opens a file when selected, still expands collapsed directories, no-ops on expanded ones.
  4. Prompt · +1m
    great, commit/push
  5. Fail · +1m
    Git commit failed with a stale index.lock error from another git process.
  6. Fail · +1m
    Attempt to remove the lock file failed because it no longer existed, yet the commit still hadn't gone through.
  7. Agent did · +1m
    Checked git status, then re-ran add/commit/push successfully, producing commit dce9b6a pushed to main.
  8. Outcome · +1m
    Feature shipped: 1 file changed, 2 insertions, commit dce9b6a pushed to main.
VERDICT

I'd start the same way next time — describe the keybinding behavior I want and let it find the file itself. The only friction was a transient git lock error on commit, which resolved itself once I checked git status and re-ran the commit; no real intervention was needed from me.

I tried this · 0

Discussion · 0

How Builds work