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

@muzi3/prompt-nav

v0.1.5

Published

Pi extension: 左上角常驻的 prompt 导航方框——显示当前停留的 user prompt,点击展开当前对话的 prompt 列表,选中即把 transcript 滚到那一条。

Readme

@muzi3/prompt-nav

Pi 扩展:终端左上角常驻一块 prompt 导航色块。色块里是当前滚动位置停留的那条 user prompt, 点一下展开当前对话的 prompt 列表,选中某条就把 transcript 滚到它的顶部——不 fork、不改会话、 不回填编辑器。

 ❯ 你先根据dsh现状,列出哪些地方是卡点

只有一行,底色与正文 user 消息一致(userMessageBg),宽度等于整个页面宽度(与正文行同宽)。

安装

pi install npm:@muzi3/prompt-nav
# 本地开发:pi install /path/to/packages/prompt-nav

交互

| 操作 | 效果 | |------|------| | 左键点色块 | 展开当前对话的 prompt 列表,并按当前滚动位置预选 | | 左键点列表项 / Enter | 滚到那条 prompt 的顶部并收起 | | ↑ / ↓ | 移动选中项(展开态) | | Escape / 点列表外 | 收起 |

折叠态完全不拦键盘,编辑器和宿主快捷键照常工作;只有展开态才接管方向键、Enter 和 Escape。

实现要点

  • 定位靠宿主的 OSC133 标记:宿主渲染 user message 时会在首行加 \x1b]133;A,本扩展渲染一遍 transcript 拿到每个 prompt 的行号,再用 ScrollView.scrollTo(row) 定位。
  • 宽度自校验:换行差一列会让行号整体错位,所以渲染行数和 ScrollView.contentHeight 对不上时 会退回少一列再试一次。
  • 只在全屏模式有效:regular 模式下 transcript 在终端 scrollback 里,没有可编程滚动入口, 点击只会提示不支持。
  • 常驻 overlay 的代价:它一直挂在 overlay 栈上,因此存在期间切换 TUI 模式会被宿主拒绝 (Close active overlays before changing TUI mode)。这是用 host overlay API 换取「常驻浮层」的取舍。
  • 布局前宿主会用 0 宽测量一次,此时必须仍返回一行,否则 overlay 高度会被记成 0 之后再也长不出来。

测试

npm test --workspace=@muzi3/prompt-nav

覆盖 prompt 提取、摘要、方框/列表渲染、窗口化、键盘与鼠标交互、真实 ScrollView 跳转、 非全屏提示以及安装/摘除。

License

MIT