# dsh-plugin-edit-message
[English](README.md) · **中文** **DSH(DeepSeek Harness)Web GUI 插件:智能体回复被中断后,一键把最后一条用户消息文本载回输入框,改完直接发送——不用再重新打一遍。** ## 为什么做这个 发出一条消息、停止回复、想稍微改一下再重新问,目前只能把整段提示词重新打一遍。本插件在输入框工具行加了一个「编辑上一条消息」按钮:点击后把最后一条用户消息的文本原样载入输入框并聚焦,直接修改、发送即可。 它是**纯客户端插件**——会话日志保持只追加(append-only)。发送编辑后的文本会作为新的一轮**追加**(原消息和被中断的回复仍保留在记录里)。它完全不触碰 host、会话日志或 agent 循环。 ## 安装 插件以 `dsh.bundle` + `dsh.client` 包形式发布,适用于任何能加载第三方 bundle 的 DSH 环境(源码 `dsh web`、DSH Desktop、自定义 profile)。 ### 从 npm 安装(已发布,推荐) ```sh dsh plugin --profile web add dsh-plugin-edit-message ``` 装完后**完全退出并重新打开 GUI**——客户端插件 bundle 在启动时注册。 **DSH Desktop 用户**:Desktop 的 `DSH_HOME` 位于 `%APPDATA%\dsh-desktop\harness`,需显式指定: ```bash DSH_HOME="${APPDATA}/dsh-desktop/harness" \ dsh plugin --profile web add dsh-plugin-edit-message ``` 然后退出重开 DSH Desktop。 ### 从 GitHub 或本地源码安装(未发布版本) ```sh # GitHub 仓库 dsh plugin --profile web add git+https://github.com/WyxBUPT-22/dsh-plugin-edit-message.git # 本地 checkout(先 pnpm install && pnpm run build) dsh plugin --profile web add /path/to/dsh-plugin-edit-message ``` ### 从源码构建安装 仓库完全自包含:devDependencies 从 npm 解析官方 harness 客户端包,**不需要**任何 `deepseek-harness` checkout。 ```sh pnpm install # 从 npm 拉取官方客户端包 pnpm run build # 产出 lib/index.js + lib/client.js + lib/types dsh plugin --profile