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

@falling-ts/pi-working

v1.2.0

Published

把 pi 运行时的状态指示器翻译为中文(可切英文), 并细分出请求中/响应中/执行中三个阶段。

Readme

pi-working

把 pi 运行时的状态指示器翻译为中文(可切英文), 并细分出 pi 原生未区分的三个阶段:请求中 / 响应中 / 执行中。

状态机

| pi 的运行阶段 | 状态文案(中文,默认) | 状态文案(英文) | | --- | --- | --- | | 运行中,尚未归入具体阶段 | 工作中… | Working… | | 已发出模型请求,尚未收到首个 token | 请求中… | Requesting… | | 已收到首个 token,正在流式生成 | 响应中… | Responding… | | 正在执行工具 / 命令等非模型工作 | 执行中… | Executing… |

迁移顺序:

agent_start                 → 工作中
before_provider_request     → 请求中      ← 已请求模型
message_update(首个 token)  → 响应中      ← text/thinking/toolcall 的首个 delta
tool_execution_start        → 执行中      ← 调用工具、命令等非模型工作
before_provider_request     → 请求中      ← 工具结果回填后再次请求
agent_settled               → 清除

判断"首个 token"依据的是 pi 的 AssistantMessageEvent:text_delta、thinking_delta、 toolcall_start 三者之一首次出现,即认为模型已开始响应。

安装

从 npm

pi install npm:@falling-ts/pi-working

从 git

pi install git:github.com/falling-ts/pi-working

软链接(本机开发)

New-Item -ItemType SymbolicLink `
  -Path "$env:USERPROFILE\.pi\agent\extensions\pi-working" `
  -Target "D:\AI\pi-s\pi-working"

单次试用(不写入配置):

pi -e npm:@falling-ts/pi-working

卸载:pi remove npm:@falling-ts/pi-working(或对应的 git 源)。

语言切换

环境变量 PI_WORKING_LANG:

| 值 | 行为 | | --- | --- | | 未设置 / 其它值 | 中文(默认) | | en | 英文 |

$env:PI_WORKING_LANG="en"; pi     # 英文
Remove-Item Env:\PI_WORKING_LANG  # 恢复默认中文
PI_WORKING_LANG=en pi             # 英文

命令

| 命令 | 作用 | | --- | --- | | /working | 显示当前语言与阶段 | | /working request | 预览"请求中"(其余可选:working respond execute clear) | | /working clear | 清除指示器 |

已知限制(上游硬编码)

pi 的部分状态文案硬编码在 TUI 组件里,扩展没有对应 API 可改。本扩展只改「工作指示器」 那一行(ctx.ui.setWorkingMessage()),影响范围如下:

| pi 的状态 | 能否改造 | 说明 | | --- | --- | --- | | Working | ✅ 可改 | 本扩展的主战场 | | Compacting context… / Auto-compacting… / Context overflow detected… | ❌ 不可改 | CompactionStatusIndicator 硬编码;且其 kind 不是 working,setWorkingMessage 也影响不到它 | | Retrying (1/3) in 5s… | ❌ 不可改 | RetryStatusIndicator 硬编码,且扩展层没有暴露重试事件,无法监听 | | Summarizing branch… | ❌ 不可改 | BranchSummaryStatusIndicator 硬编码,同样无事件 |

为什么不用 footer 兜底:pi 内核自身从不往 footer 写文字(setExtensionStatus 在内核中只有扩展通道一处调用), 该通道专供扩展。用它补中文只会在屏幕最下方多出一行与工作指示器重复的内容, 而且替换不掉 pi 自己的英文行 —— 净负面,因此本扩展刻意不介入压缩、重试、分支摘要。

此外:

  • RPC 模式下 setWorkingMessage 是 no-op(上游注释:需要 TUI loader 访问权),本扩展仅在 TUI 模式生效。
  • print / JSON 模式没有 UI,指示器自然不显示,但状态机逻辑照常运行(可用于 /working 排错)。

pi 包规范

  • package.json 用 pi.extensions 显式声明入口;
  • 宿主包 @earendil-works/pi-coding-agent 只出现在 peerDependencies(">=1.4.0",即不低于上游最新发布),不得放进 dependencies;
  • keywords 含 pi-package,满足 Pi 包画廊 收录条件。

发布为 scoped 包 @falling-ts/pi-working,公开包需带 publishConfig.access: "public"。 发布命令(本机默认 registry 是淘宝镜像,必须显式指定 npmjs):

npm publish --registry=https://registry.npmjs.org/

License

MIT