# dsh-focus-mode **Repository Path**: hnwlc/dsh-focus-mode ## Basic Information - **Project Name**: dsh-focus-mode - **Description**: dsh插件,隐藏tool call/think等块 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-25 - **Last Updated**: 2026-09-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dsh-focus-mode(专注模式) DSH Web 插件:在会话标题栏加一个**单图标开关**(无文字、无彩色线条眼睛),一键隐藏会话流里的执行细节—— tool call 卡、工具结果、bash/命令卡、Think 思考块,只留下 Agent 的对话输出。 纯 client 插件,**零修改官方源码**:只注入官方 slot + 一段按官方稳定 `data-*` 锚点写的 CSS。 ## 安装 ```sh dsh plugin --profile web add link:/path/to/dsh-focus-mode # 或发布后 dsh plugin --profile web add ``` 重启 `dsh web`,会话标题栏右侧出现 👁 开关;点一下进入「专注模式」后细节隐藏。 ## 隐藏范围(官方稳定锚点) | 内容 | 锚点 | 动作 | |---|---|---| | 工具调用卡 | `[data-chat-flow-kind="tool-call"]` | 隐藏 | | 工具结果 | `[data-chat-flow-kind="tool-result"]` | 隐藏 | | 命令卡(bash 等) | `[data-chat-flow-kind="command"]` | 隐藏 | | 思考块 Think | `[data-variant="think"]` | 隐藏 | | Agent 对话输出 | `[data-chat-flow-kind="assistant"]` | 保留 | | 用户消息 | `[data-chat-flow-kind="user"]` | 保留 | 锚点核对自官方 `dsh-client-ui-conversation`(ChatNodeSeat / ReasoningRow)。 ## 行为 - 开关状态持久化(localStorage `dsh.focus-mode`),刷新保持 - 纯 CSS 切换,即时生效、零回流代价 - 卸载插件后样式随 fiber 移除,官方渲染完整还原 ## 开发 ```sh pnpm install pnpm build # tsc host + tsdown client(lib/index.js + lib/client.js) pnpm typecheck ``` ## License MIT