renat3u/dsh-web-archive 预览 preview

renat3u/dsh-web-archive

Plugin插件 Native原生 ⭐ 7 Sessions & Context会话与上下文

折叠对话当中众多的“无用消息”,例如Think、Bash等

Project Overview项目介绍

This is a native plugin built exclusively for the DeepSeek Harness (DSH) Web client. Its core function is to condense non-body content in chat sessions, including all tool output cards, Think reasoning blocks, and in-progress invocation records into an inline summary card. The plugin groups adjacent Think blocks and tool cards into a single card that matches the original DSH tool card style, keeps it in the original content position, and leaves the main message text completely intact. It runs purely on the browser side, does not modify any DSH core source code, and requires zero external runtime dependencies after installation.

After installation, all redundant non-body content is automatically folded into a small card labeled “Deep Sleeping... (N)”, where N is the number of content blocks that have been folded. Users can click the card any time to toggle between the collapsed and expanded states to view the underlying content. If a line inside a collapsed block is selected to trigger detail linkage, the plugin automatically expands that block so users can access the content they need. It also automatically adapts to both DSH light and dark themes by using DSH’s native CSS variables, with fallback values added for cross-version compatibility.

The plugin is mounted as a bundle layer to the DSH Web profile, and can be installed in two ways: adding via local file path using the DSH CLI, or manually creating a symlink and updating the profile’s package.json manifest. After installation, you need to restart the DSH Web client and refresh your browser page for the plugin to activate properly. It relies on stable DOM data attributes output by the DSH Web client’s ChatView renderer; if DSH core updates these attributes in a future release, you only need to update the selectors in the plugin source code to restore compatibility. Pre-built bundle artifacts are included in the repository, so you only need to re-run the local esbuild build if you modify the source.

这是一款专为 DeepSeek Harness(DSH)Web 客户端开发的原生插件,功能是折叠会话中正文以外的额外显示内容,包括各类工具调用卡片、Think 推理块,以及运行中的调用记录。它将相邻的 Think 块和工具卡片组合成一个内联小卡片,保持和原工具卡片一致的样式,保留在原位置,不会破坏正文原本的排版结构。插件纯浏览器端运行,不修改 DSH 任何核心源码,也没有任何运行时依赖。

用户安装后,会话中的冗余内容会自动被折叠成「Deep Sleeping... (N)」样式的卡片,其中 N 代表被折叠的内容块数量,点击卡片即可切换展开/收起状态。折叠态下如果对应行被选中触发详情联动,插件会自动展开该块,避免用户看不到正在查看的目标内容。它会自动适配 DSH 的明暗主题,使用 DSH 的原生 CSS 变量,同时也做了兜底值处理,保证样式兼容性。

插件通过 bundle 层方式挂载到 DSH Web 配置文件,可以通过本地路径添加或手动软链加配置登记两种方式安装,安装后需要重启 DSH Web 端并刷新页面生效。它依赖 DSH Web 客户端 ChatView 渲染的稳定 DOM data 属性,官方后续如果修改这些属性,只需要更新插件内的选择器即可兼容。构建依赖本地的 esbuild,预构建产物已随包提供,修改源码后重新构建即可。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:renat3u/dsh-web-archive

把 renat3u/dsh-web-archive 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-web-archive

Deep Sleeping... — DeepSeek Harness (dsh) Web 模式的客户端插件。

把会话里正文之外的所有 display(工具卡片 read / bash / web_search / grep / edit 等,以及消息内的 Think 推理块,含运行中的调用)折叠成内联的小卡片, 无 emoji、与 Read/Think/Bash 卡片同款样式、放在它们原来的位置:

  • 每条消息的 think 组 + 其后紧跟的工具组合成一块(落单的 think 组 / 工具组各自成块),工具组区域随块折叠、不留空白;
  • 正文消息保持 文本a - [折叠块] - 文本b - 文本c 的原始结构。
Deep Sleeping... (3)            ← 折叠态,点击展开
Deep Sleeping... (3) · 收起     ← 展开态,所有卡片原地显示

前端不再出现一长串 Read / Think / Bash 卡片;正文消息完全不受影响。

特性

  • 零核心改动:纯浏览器端插件,不修改 dsh 任何源码、不注册 slot key, 不会与内置工具卡片的 conversation.chat.toolview 注册冲突。
  • 零运行时依赖:bundle 完全自包含,不 require 任何模块表条目。
  • Think 也折叠:消息内的推理块(data-variant="think")与工具卡片 一并合并。
  • 实时跟随:MutationObserver + rAF 合并,流式新卡片、卡片结算、切换 会话都自动重放折叠状态。
  • 选择联动:折叠态下若有行被选中(详情联动),自动展开该簇,避免 看不到正在查看的卡片。
  • 主题适配:颜色走 dsh 的 --dsw-* CSS 变量(带兜底值),明暗主题 都可用。

工作原理

ChatView 渲染时对每个工具调用行写入稳定 data 属性:

元素 属性
会话流容器 [data-chat-flow]
工具调用行(含运行中) [data-chat-call-id] / data-chat-anchor-key="call:…"
Think 推理块行 [data-variant="think"] 且无 data-tool
run_code 子派发行 位于 [data-subcalls] 内(不折叠,跟随父卡片)
正文消息 data-chat-anchor-key="node:…"(不折叠,且会断开簇)

插件只做两件事:

  1. 把 [data-chat-flow] 里的非正文行——顶层 [data-chat-call-id] 工具卡片行 + [data-variant="think"] 且无 data-tool 的推理块行—— display:none(React 的 vdom diff 不会覆盖 CSSOM 上的手动样式);
  2. 把每个回合合成一块:某条消息的 think 组与紧跟其后的工具组(跳过 装饰元素)合并,在 think 消息的原位插入一张与工具卡片同款样式的 小卡片(Deep Sleeping... (N),N = think 行数 + 工具卡片数),工具组 元素随块折叠;点击切换展开/收起。落单的 think 组 / 工具组各自成块。 正文消息保持 文本a - [折叠块] - 文本b - 文本c 的原始结构。

注入的 chip 在 React 管理的 flow 子树内,但只做前置插入与 display 切换, MutationObserver + rAF 合并重放,React 重渲染/切换会话/流式新卡片都会自动 跟上(自愈);卸载时全部还原。

安装

插件以 bundle 层 方式挂载进 dsh web profile(package.json 里的 dsh.bundle.patch 声明 + 包内 cordis.patch.yml 的 insert 行), dsh.client 声明(platform: "web")让 client-modules 服务自动注入浏览器 bundle。

命令形式:官方约定源码 checkout 场景统一用 pnpm dsh <args...> 运行 TypeScript 入口并透传参数(见下文「运行与构建」);npm 全局安装后可直接 dsh <args...>。下文命令按 dsh … 泛称书写。

方式一:本地路径

pnpm dsh plugin --profile web add file:/path/to/dsh-web-archive

dsh plugin add 会 pnpm 安装依赖,并把声明了 dsh.bundle 的包自动加进 profile 的 dsh.profile.bundles 层列表。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-browser 下一个 Next seo-toolkit →