@shelken/pi-command-history

按工作目录持久化输入历史,支持 shift+up/down 回填

Packages

Package details

extension

Install @shelken/pi-command-history from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@shelken/pi-command-history
Package
@shelken/pi-command-history
Version
0.1.6
Published
Oct 10, 2026
Downloads
205/mo · 184/wk
Author
shelken
License
MIT
Types
extension
Size
7.9 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

pi-command-history

按工作目录持久化输入历史;跨 session 用快捷键回填。

初始 fork 自 ross-jill-ws/pi-command-history。

功能

类型 名称 作用
快捷键 shift+up 更早的一条历史
快捷键 shift+down 更新的一条;回到末尾时恢复原编辑内容
  • 非空输入都会记(含 / 命令)
  • 重复内容移到最新;每个目录最多 500 条(load 时压缩)
  • 文件:~/.pi/folder-history/*.jsonl(每行 { cwd, text })
  • 文件名把 / 换成 - 可能碰撞,靠行内 cwd 隔离

安装

pi install npm:@shelken/pi-command-history

装好后 /reload,在同一工作目录输入几条,用 shift+up 试回填。

配置

无配置文件。

验证

bun --filter @shelken/pi-command-history test