npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-interrupt-steer

v0.1.0

Published

Interrupt a Pi run and send the editor text as the next prompt.

Readme

pi-interrupt-steer

Interrupt a running Pi turn and send the editor text as one new user message.

Install

pi install npm:pi-interrupt-steer

External contract

The default shortcut is ctrl+alt+enter. While Pi is streaming, it aborts the current operation and waits up to five seconds for Pi to become idle before sending the editor text. Pi first restores queued steering messages, then queued follow-up messages, and appends the text already in the editor. Each part is separated by a blank line. Pi stores steering and follow-up messages in separate queues, so their original cross-type typing order is not preserved. The extension sends that combined text once, then treats a user message_start as acceptance only when the message text exactly matches what it sent. For string content it compares the string; for content parts it compares their text joined together. Other user messages are ignored while it waits up to 60 seconds. It clears the editor only if it still contains the submitted text. A prompt rewritten by another extension can still be sent, but the original editor text stays and the timeout warning appears. While waiting for Pi to become idle or start a matching message, repeated shortcut presses show an info notice and do not abort or send again. If Pi does not start a matching message within 60 seconds, the text stays in the editor and the warning says to check the transcript before sending it again; an input handler may have handled the prompt without starting a message.

When Pi is idle, the shortcut sends the editor text without aborting. With an empty editor and no queued session messages, it leaves the run alone and shows a notification. During compaction, the shortcut cannot see Pi's separate compaction queue, so an empty-editor press with no session messages visible to the shortcut does not interrupt Pi; Pi delivers its compaction queue after compaction. For idle sends as well, the extension clears the editor only after a matching user message_start and only if the editor still contains the submitted text.

The terminal must send ctrl+alt+enter distinctly for this shortcut to fire. A terminal without the kitty keyboard protocol may send the legacy ESC CR sequence instead. Pi interprets that as alt+enter: the editor text is queued as a follow-up, the current response finishes first, and the run is not interrupted.

Settings

Set key in pi-interrupt-steer.json in the Pi agent settings directory, or use PI_INTERRUPT_STEER_KEY:

| setting | default | environment variable | purpose | |---|---|---|---| | key | ctrl+alt+enter | PI_INTERRUPT_STEER_KEY | Shortcut with one or more modifiers and a letter, digit, or named key. |

For example:

{
  "key": "ctrl+shift+x"
}

Valid modifiers are ctrl, alt, shift, and super. Valid named keys are enter, escape, tab, space, backspace, delete, up, down, left, right, home, and end.

If the contract is unmet

An invalid key uses ctrl+alt+enter and shows one warning. If Pi does not emit a matching user message_start within 60 seconds after the send, the text remains in the editor and the extension warns you to check the transcript before sending it again. If the editor changes while Pi is processing the message, the extension leaves the current text there when it differs from the submitted text.