zhangxiang1993621
dsh-context-panel
对话上下文面板:在布局左/右区域展示当前对话用到的技能、规则、文件
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
Introduction
dsh-context-panel — 对话上下文面板(DeepSeek Harness 插件)
在布局的左/右区域(由 dsh-layout 渲染)展示当前对话上下文里用到的内容:
- 技能:会话里被
skill工具调用的技能名 - 规则:工作区里的规则文件
AGENTS.md/CLAUDE.md/.cursorrules - 文件:会话里被
read/edit/write/grep/glob工具触及的文件路径
架构
| 半 | 文件 | 作用 |
|---|---|---|
| host | lib/index.js | inject ['webServer','fs','workspaceRegistry'],注册 /context-panel?action=rules 路由(扫描规则文件) |
| client | lib/client.js | 注册进 dsh-layout 声明的 layout.left / layout.right(id context-panel),展示技能/规则/文件 |
| 声明 | package.json | dsh.bundle.patch(挂载 host 行)+ dsh.client.inject ["slots"] + exports["./client"] |
依赖
- 依赖
dsh-layout声明并渲染子槽位layout.left/layout.right(作为左侧或右侧区域的一个 pane)。若dsh-layout未安装,该面板不会出现。
API(host 半)
| 方法 | 端点 | 说明 |
|---|---|---|
| GET | /context-panel?action=rules&cwd=<工作区根路径> | 扫描规则文件 { path, name }[](限深 3 层 / 100 条) |
安装
# 在 deepseek-harness 仓库目录(开发期用 link:,改源码刷新即生效)
node --import tsx/esm apps/cli/src/bin.ts plugin --profile web add link:D:/agent-workspace/dsh-context-panel
开发备注
- 客户端 bundle 无构建链:手工维护
__ModuleLoader__协议,仅 external 平台模块(react 等)。 - 槽位:注册进
layout.left/layout.right(dsh-layout声明的子槽位,list 槽,id=context-panel)。 - 技能 / 文件从当前会话快照的工具调用参数里提取(
skill/read/edit/write/grep/glob);规则通过 host 半路由扫描。