dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness 消息级删除插件,用于避免用户误发或错误的助手消息污染会话上下文。
简体中文 | English
A per-message delete plugin for DeepSeek Harness that keeps accidental or mistaken messages out of the model context. It adds a delete button to the action area of every chat message: once confirmed, the message is removed from the model context through the host's official surface-replace contract (an assistant reply takes its thinking, tool calls, and injected context with it) and hidden from the visible transcript. Raw log bytes are never rewritten and can be recovered at any time.
conversation.chat.assistant-actions slot; user input, machine-injected context rows, tool-call cards, THINK cards, model-retry lines, and terminal turn-error banners are enhanced via DOM augmentation (the host has no extension point for these sides). Chrome-row trash buttons (anything outside the user/assistant action strips) stay hidden by default and appear on message hover.Tooltip, and the Modal+Button confirm dialog; adapts to light and dark themes automatically.surfaceOp: { op: 'replace' } placeholder node is appended (the same mechanism as the host's /compact); shadowed messages no longer enter deriveMessages()./status preflight at load time.assistant/message + paired tool/result); other steps in the same window survive. The confirm title and tooltip explicitly state the scope ("Delete this step" vs "Delete this entire attempt")./status preflight on hover/click: refused targets gray out and state the localized reason instead of firing a doomed request; already-deleted rows heal silently; an unreachable host leaves icons neutral and clickable (the server always has final say).Clicking the trash in different locations produces different deletion scopes, dialog titles, and tooltips:
| Click target | Deletion scope | Dialog title | Tooltip |
|---|---|---|---|
| THINK card 🗑️ | This step only | Delete this step? | Delete this step |
| Tool-call card 🗑️ | This step only (owning assistant/msg + tool/results) | Delete this step? | Delete this step |
| Context-injection row 🗑️ | Entire window | Delete entire attempt? | Delete entire attempt |
| Retry line / error banner 🗑️ | Entire window | Delete entire attempt? | Delete entire attempt |
| User message 🗑️ | That message only | Delete this message? | Delete |
| Assistant slot (beside copy) 🗑️ | Entire window (reply + thinking + tools + injected context) | Delete this message? | Delete |
Step-level deletion applies to multi-step turns: only the target step's
assistant/messageand pairedtool/resultare removed; other steps in the same window survive. Whole-window cleanup is for one-shot sweeps of failed or interrupted turns.
Screenshot files live in docs/screenshots/; see that directory's README for what each image should show.
user/message and assistant/message surface nodes inside closed turns are accepted — real user input is a single-node replace, while assistant messages, machine-injected rows, and non-surface chrome anchors such as tool/call or llm/retry plan the whole user-input window as one unit; messages carrying tool calls cannot be deleted alone, already-shadowed messages and in-progress turns are refused with machine reason codes (localized in the UI).dsh plugin --profile web add github:viplocco/dsh-delete-message#v0.2.3
After installing, fully restart the DSH Web process (the host-side plugin tree is read only at startup); the client bundle is served dynamically per request by the host, so updates take effect on a hard refresh.
The DSH Desktop shell renders the same web frontend (the @deepseek-ai/dsh-web-app composition + the same WebServer origin), so this plugin is natively desktop-compatible — the only requirement is installing it into the desktop-owned profile and restarting DSH Desktop:
# The desktop app uses a separate desktop profile; install it there too
dsh plugin --profile desktop add github:viplocco/dsh-delete-message#v0.2.3
# or from a local checkout: dsh plugin --profile desktop add link:<path>
After installing, fully restart DSH Desktop and hard-refresh the renderer. To confirm it loaded:
dsh --profile desktop --dump-config # should show a "# == dsh-delete-message" section
# in the renderer devtools console: "[delete-message] bundle script executing"
Why "web worked but desktop didn't": the plugin's host half used to read
session.events, which the current harness (dsh-session≥ 0.1.2-rc.1, bundled by DSH Desktop) renamed tosession.snapshotEvents(), so/statusthrewCannot read properties of undefined (reading 'find')on desktop. v0.2.2 routes event reads througheventsOf(), which preferssnapshotEvents(), tolerates the legacy.eventsarray, and returnsnot-foundinstead of crashing.
pnpm test # node --test
See docs/DESIGN.md for architecture, host contracts, and design trade-offs. Contact: viplocco@qq.com
MIT