pi-next-cue

Predicts your next prompt after each agent turn — Tab to fill, Enter to send.

Packages

Package details

extension

Install pi-next-cue from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-next-cue
Package
pi-next-cue
Version
1.0.1
Published
Jun 21, 2026
Downloads
not available
Author
ouzhenkun
License
MIT
Types
extension
Size
15.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-next-cue

Predicts your next prompt after each agent turn — Tab to fill, Enter to send.

npm version License: MIT

Why

After the agent finishes, you usually know what to type next. Pi-next-cue predicts it and shows a hint above your editor — saving keystrokes and keeping you in flow.

Install

pi install npm:pi-next-cue

Requires Pi v0.37.0+.

How It Works

The hint widget shows one of two states, depending on context:

Predicted prompt (after agent responds):

→ run the tests

Your last message (for reference):

↩ fix the login redirect bug
  • Next prompt you're likely to send — generated by a lightweight LLM after each agent turn
  • The last message you sent — so you never lose context of what you asked

When the editor is empty:

  • Tab fills the hint into the editor for editing
  • Enter sends the hint directly

When you start typing, the hint stays visible but won't interfere — Tab and Enter only trigger when the editor is empty.

Features

  • Adaptive tone — matches your language and communication style from recent messages
  • Correction learning — remembers when you ignore suggestions, avoids repeating rejected directions
  • Tool-aware — considers whether the last tool succeeded or failed when predicting
  • Lightweight — single LLM call with minimal context, no background indexing

Configuration

Pi-next-cue uses your session's current model by default. To use a specific fast/cheap model or customize keybindings, create ~/.pi/agent/pi-next-cue.json:

{
  "provider": "deepseek",
  "model": "deepseek-chat",
  "keys": {
    "fill": "tab",
    "send": "enter"
  }
}

All fields are optional. Defaults: tab to fill, enter to send. Key names follow Pi's keybinding format.

Events

Other extensions can control hint visibility:

// Hide the hint (e.g. when showing a dialog)
pi.events.emit("pi-next-cue:pause");

// Restore the hint
pi.events.emit("pi-next-cue:resume");

License

MIT