omp packages

@qcts33/pi-herdr-editor0.1.4

Open a Herdr pane with an external editor to compose messages to a pi agent — a non-blocking analogue of Ctrl+G.

qcts33 Published 24 days ago MIT ~552 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@qcts33/pi-herdr-editor

A pi package that opens a sibling Herdr pane hosting an external editor for composing a message to the agent — a non-blocking analogue of pi's built-in Ctrl+G, which keeps the agent's output visible while you write.

How it works

Invoking /herdr-editor (or alt+g):

  1. Splits the current Herdr pane and waits for the new shell to become ready.
  2. Runs a probe that prints a start marker through the same printer the sentinel uses, and waits for it with a bounded timeout: if it never arrives — a pane shell that cannot run the command — the cycle fails with an error notification quoting the pane instead of waiting forever.
  3. Runs $VISUAL/$EDITOR on a temp file seeded with the current input-box content, through the shell's own eval so a malformed editor command cannot suppress the sentinel.
  4. Waits (indefinitely) for a unique sentinel printed after the editor exits.
  5. Places the edited text back into pi's input box — not submitted; press Enter to send, inheriting pi's normal busy/idle handling.

The pane is closed when the compose cycle ends. Content that trims to empty cancels, leaving the input box unchanged. Outside Herdr it degrades to pi's built-in external-editor dialog.

The compose pane's shell is detected from the pane's own process, so PowerShell (pwsh, powershell) and POSIX shells (sh, bash, zsh, fish, …) work regardless of platform — Herdr's terminal.default_shell decides. A pane running a shell the extension cannot print through (nushell, cmd.exe, …) falls back to the fullscreen dialog instead of hanging.

Install

pi install npm:@qcts33/pi-herdr-editor

Requires HERDR_ENV=1 (running inside Herdr) for the pane flow; otherwise the fullscreen fallback is used.

License

MIT