dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
VSCode 风格的代码变更查看器,把 DeepSeek Harness 变成「编辑器 + 对话助手」的工作台。 A VSCode-style code-change viewer that turns DeepSeek Harness into an IDE-like workbench.
Code UI 是一个 DeepSeek Harness 的 Cordis 动态插件,把界面改造成 VSCode 式三栏工作台:
| 位置 | 内容 |
|---|---|
| 最左侧 | 可点击切换、弹出/隐藏的 资源管理器(当前工作区的文件夹/文件树) |
| 中间 | 标签式代码编辑器:显示智能体编辑过的文件差异,绿色 = 新增行,红色 = 删除行,灰色/黑色 = 未变更行 |
| 右侧 | 对话窗口(右移,就像 VSCode 靠右的对话助手),左边界可拖动调整宽度 |
× 关闭单个文件;被智能体修改的文件自动加入标签页。设置 → Code UI 提供三个开关(显示资源管理器 / 显示代码变更面板 / 对话右移·代码居中)。设置 → 插件 列表中,可停用 / 更新 / 删除。在 DeepSeek Harness 中使用 cordis_define 新建插件:
kind: "new",idPrefix: "codeui"(Host 会分配最终 id,如 codeui-1)。code.host 填入 host.js 的内容,code.client 填入 client.js 的内容。运行后:左下角出现 📁 按钮切换资源管理器;开始会话后中间自动打开代码变更面板,对话窗口移动到最右。
codeui/
├── package.json # npm 元数据
├── index.js # 包清单(说明 host/client 两半的对应关系)
├── host.js # Host 半边:文件系统 RPC(listDir / readFile / workspaceRoot)
├── client.js # Client 半边:资源管理器、标签式 diff 编辑器、对话右移、设置页
├── LICENSE # MIT
└── README.md
host.js 与 client.js 都是纯 JavaScript 的 Cordis "function body" 源码(顶层 return { ... } 即函数体),零依赖、无 import/require/JSX/TypeScript。
| 关注点 | 位置 | 依赖的接口 |
|---|---|---|
| 目录列举 / 读文件 / 工作区根 | host.js |
fs 服务、sandboxPolicy.workspaceRoot、harness.handle |
| diff 数据来源 | client.js |
会话日志中 edit/write 的调用参数(content / old_string / new_string),按回合重建完整文件内容后对比 |
| 资源管理器 | client.js |
shell.overlay(左侧抽屉)+ sidebar.footer.action(切换按钮)+ useWorkspaces |
| 代码变更面板 | client.js |
details 槽(右列,ctx.layout.openDetails() 自动打开)+ useSession |
| 对话右移 / 宽度可调 | client.js |
CSS order 重排 + 保留框架自带拖拽手柄 |
| 设置页 | client.js |
settings.section 槽(id: 'codeui') |
sidebar 槽:该槽内含设置面板与插件列表,替换会破坏「在设置里管理插件」的能力。资源管理器因此用 shell.overlay 做成加法式左侧抽屉。:not([data-details-collapsed]) 限定,仅在「代码面板已打开(有会话)」时生效;无会话时对话保持在中间,避免空白列。REORDER_CSS 使用了当前构建 ui-layout 的带哈希类名(pI_x6G_*),这是布局重排的唯一耦合点,已隔离在 REORDER_CSS 常量中并可通过设置一键关闭。若要脱离动态插件机制、作为常驻 Web 插件打包:把 host.js/client.js 的两个函数体分别接入 Host 与 Client 的 apply(ctx),并按 dsh.client 的扫描/打包规则注册模块。核心逻辑(diff 重建、资源管理器、CSS 重排)无需改动。
Code UI is a Cordis dynamic plugin for DeepSeek Harness that reshapes the UI into a VSCode-style three-column workbench:
| Area | Content |
|---|---|
| Far left | Toggleable file explorer (folder/file tree of the current workspace) |
| Middle | Tabbed code editor: shows diffs of the files the agent edited — green = added, red = deleted, gray/black = unchanged |
| Right | Chat panel (moved to the right, like VSCode's right-side assistant), with a draggable left edge |
× to close. Files the agent edits are added automatically.Settings → Code UI offers three toggles (show explorer / show diff panel / move chat right).Settings → Plugins where it can be stopped, updated, or removed.In DeepSeek Harness, use cordis_define to create the plugin:
kind: "new" with idPrefix: "codeui" (the Host allocates the final id, e.g. codeui-1).host.js into code.host and the contents of client.js into code.client.After activation: the 📁 button at the bottom-left toggles the explorer; starting a session opens the code panel in the middle and moves the chat to the right.
codeui/
├── package.json # npm metadata
├── index.js # package manifest (maps host/client halves)
├── host.js # Host half: filesystem RPC (listDir / readFile / workspaceRoot)
├── client.js # Client half: explorer, tabbed diff editor, chat reorder, settings
├── LICENSE # MIT
└── README.md
host.js and client.js are plain-JavaScript Cordis "function body" sources (the top-level return { ... } is the function body), with zero dependencies and no import/require/JSX/TypeScript.
| Concern | Where | Interfaces used |
|---|---|---|
| Directory listing / file read / workspace root | host.js |
fs service, sandboxPolicy.workspaceRoot, harness.handle |
| Diff data | client.js |
edit/write call arguments from the session log (content / old_string / new_string), replayed per turn to reconstruct full file contents |
| File explorer | client.js |
shell.overlay (left drawer) + sidebar.footer.action (toggle) + useWorkspaces |
| Code-diff panel | client.js |
details slot (right column, auto-opened via ctx.layout.openDetails()) + useSession |
| Chat right / resizable | client.js |
CSS order reorder + the frame's built-in drag handle |
| Settings page | client.js |
settings.section slot (id: 'codeui') |
sidebar slot is deliberately NOT replaced: it hosts the Settings panel and the plugin list; replacing it would break plugin management. The explorer is therefore an additive left drawer via shell.overlay.:not([data-details-collapsed]), so it applies only when the code panel is open (a session exists); without a session the chat stays centered.REORDER_CSS targets the current build's hashed ui-layout classes (pI_x6G_*) — the single coupling point of the reorder, isolated in the REORDER_CSS constant and disableable from Settings.To ship as a permanent web plugin instead of a dynamic one, wire the two function bodies into Host and Client apply(ctx) and register the module following the dsh.client scan/bundling rules. The core logic (diff reconstruction, explorer, CSS reorder) needs no changes.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。