pi-calm1.0.2
Make Pi easier to follow while it works: keep the conversation and Working... visible while quietly hiding tool chatter and optional thinking. Toggle it with /calm on, /calm thinking, and /calm off.
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.
Reports 0
No reports yet.
Readme
pi-calm
让 Pi 工作时更清爽、更容易跟进。
English | 简体中文
pi-calm 保留对话内容和 Working... 状态,同时把工具执行噪音和可选的思考内容安静地收起来。它只改变终端展示,不会改变工具执行、模型上下文或 session 数据。
保留什么,隐藏什么
Calm 默认开启:
| 保留显示 | 收起(仅展示层) |
|---|---|
| 用户真实提示 | 思考 / CoT 区块(/calm thinking 可显示) |
| 助手真实文本 | 常规工具执行噪音(内置工具与自定义工具) |
交付型关键工具(plan_mode_complete, PI_CALM_VISIBLE_TOOLS) |
带 U+2063 envelope 的操作型用户行 |
Pi 原生 Working... 行 |
隐藏内容仍会保存在 session 中,关闭 Calm 后会恢复显示。
安装
GitHub
pi install git:github.com/JesseZhang97/pi-calm
npm
pi install npm:pi-calm
本地路径
pi install /path/to/calm-mode
本包包含 pi-package keyword 和 pi manifest,可以被 Pi package gallery/index 发现。
安装后重启 Pi,或执行 /reload。
使用
/calm on # 开启 Calm,隐藏思考
/calm thinking # 保持 Calm,切换思考 / CoT 显示
/calm off # 关闭 Calm,恢复普通 transcript
只有这三个命令。输入 /calm 后,Pi 会提供参数补全。
Working... 始终保持显示,扩展加载后不能被关闭。
偏好设置
默认保存于:
~/.pi/agent/calm
| 文件内容 | 含义 |
|---|---|
on |
Calm 开启,隐藏思考(默认) |
on thinking |
Calm 开启,显示思考 / CoT |
off |
Calm 关闭 |
可通过 PI_CALM_PREFERENCE_PATH 覆盖保存路径。
交付型工具白名单
Calm 默认收起过程型的工具噪音(read, bash, edit 等),但对于结果即为最终交付物的工具,保留在 transcript 中完整呈现:
plan_mode_complete:默认放行,确保pi-plan-mode生成的计划 Markdown 在终端中清晰可读。PI_CALM_VISIBLE_TOOLS:可通过此环境变量配置需要额外放行的工具名列表(逗号分隔):
export PI_CALM_VISIBLE_TOOLS="generate_report,review_summary"
展示范围
Calm 使用 Pi 的展示层 seam:
- 绝大多数
ToolExecutionComponent工具行都会隐藏,包括任意第三方 custom tools - 交付型关键工具(如
pi-plan-mode的plan_mode_complete,以及通过PI_CALM_VISIBLE_TOOLS环境变量指定的工具)会保留正常显示 - custom messages 和 custom entries 仍然显示
- compaction / branch summary 仍然显示
!/!!用户 bash 行仍然显示/export和/share序列化时会临时恢复标准展示
隐藏只影响终端展示,不会删除 session 数据。
开发验证
node --experimental-strip-types tests/self-check.ts
License
MIT