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

@khorsheed/dsh-file-preview

v0.4.5

Published

Session products preview, host+client in one: the read-only file-preview Remote service (the files a session wrote or edited, current content, per-change diffs) plus the right-sidebar 会话产物 tab, per-turn change cards, and the file detail view

Downloads

1,048

Readme

@khorsheed/dsh-file-preview

English | 中文

agent 碰过的文件一页看全:改了什么、现在长什么样,看完还能顺手改一笔。

agent 干了半天活,到底动了哪些文件、改成了什么样,以前得自己去翻目录、对 diff。装上会话产物,这个会话读过、写过、改过的文件都排在右栏一页里;点开一个,看到的是渲染好的文档,也能一次次往回翻 agent 的每一次修改。你得到的是一份随会话长出来的清单,哪里不对,当场改掉保存。

能做什么

  • 动过的文件都在一页:右栏向导页里点「会话产物」,这个会话碰过的文件按最近活动排好,可以搜索;agent 用命令行顺手写出来的文件也算在内。
  • 命令行写出的文件重启后还在:经过验证的写入会记进会话历史,宿主重启后仍能从产物视图找回。
  • 点开就是看得懂的样子:Markdown 显示成文档,JSON 是可折叠的树,CSV 是表格,代码带高亮,图片直接显示,文档里引用的本地图片和链接也能看、能点;带脚本的网页先问你,再放进隔离环境里运行。
  • 每一次修改都能翻回去看:切到「改动」,一次次往前翻 agent 对这个文件的每一次写入和修改。
  • 每轮结束一张小卡:对话里每一轮末尾有一张「N 个产物」卡片,列出这一轮改了哪些文件、各增删多少行,点一下就打开。
  • 看到不对,当场改:点「编辑」直接改,「预览」里同步看效果,⌘S 或「保存」写回去。你改的时候 agent 也动了这个文件,会提醒你,选「仍然覆盖」或「放弃修改,重新载入」;切到别的文件再回来,没保存的草稿还在。
  • 一键回到你的工具:「复制路径」「打开所在文件夹」「在 IDE 中打开」,在本机打开页面时就能用。

安装

在 DSH 的「插件 → 添加插件」里输入下面的包名,点安装:

@khorsheed/dsh-file-preview

它也会跟着「基础体验」(@khorsheed/dsh-basic)一起装好。装完在任意会话里打开右栏向导页的「会话产物」,或者点对话里的「N 个产物」卡片。

已知限制

  • 只列当前会话碰过的文件;想随便翻本机目录,用「文件列表」插件。
  • 手机上只能看不能改;图片、非 UTF-8 的文件和太大的文件也不能编辑。
  • PDF、压缩包这类显示不了的文件,交给 DSH 自带的预览打开。

Compatibility

需要 DSH 0.2.2-rc.2 或更新版本,已在 0.2.2-rc.2 上验证。

给开发者

  • 入口:src/index.ts(读写文件的宿主服务)、src/client/index.ts(右栏页面与回合卡片)。命令行安装:dsh plugin --profile web add @khorsheed/dsh-file-preview。
  • 服务方法、配置项、给服务端调用方的只读接口、兼容细节和内部结构,都在完整参考里。
  • 隶属 dsh-plugins,问题与贡献请到该仓库;变更见 CHANGELOG.md。