@zzs-fun/current-question
pi extension that pins your recent questions above the editor — navigate, expand, copy, and reply with context.
Package details
Install @zzs-fun/current-question from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@zzs-fun/current-question- Package
@zzs-fun/current-question- Version
0.1.2- Published
- Jul 11, 2026
- Downloads
- 454/mo · 35/wk
- Author
- zzs-fun
- License
- MIT
- Types
- extension
- Size
- 38.3 KB
- Dependencies
- 0 dependencies · 3 peers
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
current-question
English | Chinese (Simplified)
A pi coding agent extension that pins your recent questions above the editor — navigate, expand, copy, and reply with context.
current-question is a pi extension that pins the last N user questions above the editor, so you can quickly find "which of my questions produced the answer below" in long sessions.
Features
- Shows the last N user questions (default 5; set with
/current-question <number>) - One line per question; long lines are truncated with
...(correctly handles double-width CJK characters) - Title carries the round counter:
❯ Current Questions (N)where N is the current question round - Collapsed by default;
Ctrl+Alt+Lexpands the selected entry to show the full question + its answer,Ctrl+Alt+Hcollapses - Collapsed:
Ctrl+Alt+Hhides the widget; hidden:Ctrl+Alt+Lshows it again - Expanded:
Ctrl+Alt+J/Kscrolls the answer; collapsed:Ctrl+Alt+J/Kswitches entries (vim-style j=down/k=up; in expanded mode j scrolls the answer forward, in collapsed mode j goes to an earlier question) - Selection can exceed the visible window: the list holds all history, the window shows a fixed
maxLinesrows and follows the selection; stops silently at top/bottom - Expanded answer is shown in a fixed-height scrollable window; stops silently at top/bottom
- Expanded height adapts to the terminal: long questions are truncated, the answer window is dynamically compressed by terminal height to avoid hitting the top and causing streaming jitter
Ctrl+Alt+Bcopies the selected entry's full question + answerCtrl+Alt+Gopens an external editor to compose a reply with the selected Q&A as context (vi-family editors auto-lock the history region read-only)- After a new message is sent, the selection snaps back to the newest entry and collapses
- Uses
sessionManageras the single source of truth; stays consistent after/undo,/redo,/tree, and compaction
Install
# Install globally
pi install npm:@zzs-fun/current-question
# Or install for the current project only
pi install -l npm:@zzs-fun/current-question
Shortcuts
| Shortcut | Collapsed | Expanded |
|---|---|---|
Ctrl+Alt+J |
Select an earlier question | Scroll answer down |
Ctrl+Alt+K |
Select a newer question | Scroll answer up |
Ctrl+Alt+L |
Expand the selected entry (full question + answer) | — |
Ctrl+Alt+H |
Hide the widget | Collapse the selected entry |
Ctrl+Alt+B |
Copy the full question + answer | Copy the full question + answer |
Ctrl+Alt+G |
Open external editor with Q&A context | Same |
Note: overrides the editor's default
Ctrl+Alt+J/Ctrl+Alt+Kcursor movement.
Command
/current-question [on|off|toggle|<number>]
on/off/toggle: toggle the widget- number: set how many entries to show (e.g.
/current-question 8), and enables it - no argument: equivalent to
toggle
License
MIT