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

@jwbz/pi-tidy

v0.1.2

Published

🧹 pi TUI 简洁化:单行工具状态槽 + 隐藏工具行 + edit/write diff 常驻渲染 + 紧凑消息

Downloads

51

Readme

🧹 @jwbz/pi-tidy

pi TUI 简洁化扩展:隐藏工具噪音行,把「正在做什么」压缩成一行状态,把 edit/write 的 diff 变成常驻的整洁渲染。

功能

1. 单行工具状态槽

工具状态显示在输入框上方的一行槽位,新状态覆盖旧状态,不累积:

⠹ thinking · 1.2k chars · 45s      ← 深度思考:spinner 动画 + 实时字数 + 计时(不会误判卡死)
✓ edit  E:/tmp/a.ts · +2/-1 ← 工具完成(tool_result)
  • 思考过程实时可见:message_update 的 thinking 流驱动,工具与工具之间的思考也会显示(每次思考段重启 spinner + 计数 + 计时),thinking_end 后停转保留摘要
  • 内置 7 个工具(bash/read/edit/write/grep/find/ls)+ 其他扩展工具(todo/fetch/search…)全部只占这一行
  • 完成行带 ✓/✗、参数摘要、结果统计(exit code、±行数、匹配数等)
  • 回合结束自动清空

2. edit/write diff 常驻对话流

diff 不丢、不闪:作为独立消息渲染在对话流里,折叠时一行摘要(路径 + 增减行数),展开时完整彩色 diff:

 src/foo.ts · +12/-3          ← 折叠态
  • Alt+E:全局展开/折叠所有 diff

3. 隐藏原生工具行

patch 渲染组件,pi 原生工具执行行(含其他扩展的工具)全部不占行,状态统一由单行槽位展示。

4. 紧凑消息

  • AI 文本消息固定恰好 1 行前置空行(压缩 thinking 块产生的多余 Spacer 与空标签行)
  • 思考块保持折叠且不显示标签行,思考状态由单行槽位展示
  • 隐藏 "Working..." 指示器

安装

pi install npm:@jwbz/pi-tidy

重启 pi 或 /reload 生效。

首次启动会检测 hideThinkingBlock 设置,未开启时自动写入 ~/.pi/agent/settings.json 并提示重启(思考折叠所需)。

快捷键

| 快捷键 | 功能 | |---|---| | Alt+E | 展开/折叠所有 diff |

环境要求

  • pi TUI 模式(非 TUI 模式自动降级:单行槽位、隐藏工具行不生效,其余逻辑安全跳过)
  • Windows / macOS / Linux 均可;渲染依赖 TUI 组件

其他扩展接入

  • 需要隐藏自己工具的渲染行:本扩展已全局 patch 工具行渲染,无需额外操作
  • 扩展工具的状态摘要自动显示在槽位中(tool_call/tool_result 事件全覆盖)

本地开发

pi -e ./               # 临时试装,只对当前 run 生效
pi install ./          # 正式装本地路径

发布

npm publish --access public

License

MIT(diff 渲染库 src/ 移植自 pi-tool-display,MIT)