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

dsh-redo

v0.5.0

Published

Edit or retry an already-sent user message and regenerate in place: rewinds the model context to that message without leaving the session

Readme


这是什么

DSH 的会话是只追加的日志,消息发出去就没有"改一下再发"的入口。dsh-redo 把这件事补上:选中任意一条 自己发过的消息,改文字、换图片,或者原样再来一次,模型上下文会原地回到那条消息之前并重新生成。

  • 消息发错了(错字、贴错内容、图配错)→ 改完重发。
  • 回答不满意或渠道抽风 → 原样重发,不用等它失败。
  • 想换个问法继续同一段对话 → 从任意一条消息重写,后面的内容作废。

功能

  • 重新生成:任意一条用户消息都能重发,一键,不经过输入框。
  • 编辑重发:消息连同它的回答立刻从对话里消失,文字和图片回到底部输入框;改完按发送,旧的那段被替换, 新的内容落在原位——不会多出一条。
  • 图片跟着走:存的图读回字节、重新挂成草稿,发送时一起上送。
  • 破坏性操作有确认:撤回中段消息前会说明之后有几轮离开上下文;输入框本来有内容时再问一句是否替换。
  • 生成中禁用:回答还在生成时按钮置灰,先把当前回答处理掉。

安装

需要 DSH >= 0.2.2-rc.1 < 0.3.0,在 Web GUI 里使用。发布物已含构建好的 lib/,不需要自己 build。

dsh plugin --profile <profile> add dsh-redo
dsh --profile <profile>

从源码装(改代码时用):

git clone https://github.com/Imzl-zl/dsh-redo.git && cd dsh-redo
npm install && npm run build
dsh plugin --profile <profile> add <本仓库绝对路径>

使用

  1. 鼠标移到任意一条自己发的消息上,气泡下方出现操作行。
  2. 重新生成:原样重发,一键完成。
  3. 编辑重发:这条消息立刻从对话里消失,内容回到输入框。中段消息会先确认;输入框非空时会问是否替换。
  4. 改完按发送——这一次发送就是在重写那段对话。

编辑用的是原生 composer,@ 引用、斜杠命令、图片预览、Esc 撤销都是原生行为。

限制

  • 点了不发会还原:登记的有效期是 5 分钟,过期或刷新后那条消息重新出现——因为它确实还没被撤回。
  • 文件附件不支持:带文件的消息两个按钮置灰,避免静默丢内容;图片不受影响。
  • 日志里仍留着原文:会话是只追加的,撤回是追加一条遮蔽记录,不是删除。模型和界面都已生效, 但用脚本回放日志仍能看到被撤回的那条文本。
  • 很久以前的重写可能不再隐藏:界面上的隐藏依赖已加载的会话窗口;一次很早的替换若已落到窗口之外, 刷新后旧消息会重新显示(模型上下文仍然正确)。

兼容性

| 项目 | 说明 | | --- | --- | | DSH | >= 0.2.2-rc.1 < 0.3.0,基于 0.2.2-rc.2(cordis 4.1.0)验证 | | 平台 | Web GUI | | 扩展点 | keyed slot conversation.chat.node、agent/pre-step、agent/request、ctx.commands |

开发

npm install
npm test            # node --test,直接跑 TypeScript 源码
npm run typecheck
npm run build       # 产物 lib/ 不入库

设计与实现细节见 docs/design.md,变更记录见 CHANGELOG.md。

友链

Linux.do

License

MIT