Slides out a Monaco editor plus a lazy-loaded file-tree panel in the DSH Web conversation, so you can edit the local workspace inline without switching to an external editor.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-classic-coding
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:better-er/dsh-classic-coding
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
引言
为了在 AI 编程的高度发展的今天,保护古法编程这一非物质文化遗产,DSH·古法编程被开发出来,让你可以在 DeepSeek Harness 中继续体验大脑的思考能力。
功能
- 原生查看打底:文件默认完全交给 dsh 内置查看器,插件不参与自动认领,Markdown、图片、PDF 与代码预览都保持原样。
- 按需进入编辑:内置文档预览头部出现铅笔图标,点击把当前文件切换为 Monaco 编辑模式;编辑模式工具栏里的「查看」按钮切回内置预览。
- 复用内置文件树与 tab:不再自建文件树与覆盖层面板,编辑 tab 与内置 tab 一起分栏、浮出、跨会话切换保活。
- 编辑器:Monaco 经 CDN 动态加载,按扩展名自动选语言,随 DSH 明暗主题实时切换。
- 保存:Ctrl+S 或工具栏「保存」按钮写回原文件。写入走插件自己的保存端点,不经过 agent 沙箱与权限链。
演示视频
| 古法编程插件演示 · 42 秒 |
|---|
视频录制于旧版覆盖层面板时期,交互入口已改为 dsh 内置右侧栏 tab。
安装
从 GitHub 安装:源码在 src/,lib/ 不入仓库,安装时 npm 会触发 prepare 脚本现场构建。
dsh plugin --profile web add github:better-er/dsh-classic-coding
从 npm 安装:包内已含构建产物 lib/index.js 与 lib/client.js,安装时不再构建。
dsh plugin --profile web add dsh-classic-coding
两种方式装完都会自动挂载,重启 DSH web 后启用,无需手工编辑任何文件。
卸载
dsh plugin --profile web remove dsh-classic-coding
彻底移除,重启 DSH web 后不再加载。
要求与开发
- 标准形态:dsh 客户端插件,声明
dsh.client、导出./client。 - 自挂载 bundle:同时声明
dsh.bundle,用dsh plugin --profile web add从 GitHub 安装后自动识别为 profile layer 并挂载,无需手工写组合 entry。 - 读取复用内置:文件内容与目录列举交给
@deepseek-ai/dsh-api-workspace-files,正文经地址dsh-resource://file/session/<会话>/<路径>调remote.workspaceFiles.readBytes读取,文件树用内置files类型,插件不再自建 describe / listDir / readFile。 - 写入自带端点:内置服务不提供修改操作,故 Host 端经
mountRpcChannel向webServer自注册/classic-coding前缀路由,只保留writeFile一个端点,复用connection.requestRejection做 Host 校验与浏览器鉴权,并实现官方client-request/server-response信封。保存刻意走 Node 原生fs.writeFile,不经ctx.fs的 agent 沙箱。 - 构建产物:源码在
src/,用 tsdown 构建出lib/index.js、lib/index.d.ts与lib/client.js。lib/不入库,从 GitHub 安装时由prepare自动构建;本地开发跑pnpm install后pnpm build,类型检查用pnpm typecheck,产物冒烟用pnpm smoke。package.json声明dsh.client.platform: "web"、exports["./client"] → ./lib/client.js。 - UI 挂载点:
ctx.sidebarRightTabs.register注册 tab 类型code,不写patterns,因此不参与自动认领,只能由sidebarRight.openResource(address, { kind: 'code' })点名打开;sidebar.right.tab.document.actions提供内置预览头部的「编辑」图标,sidebar.right.pane.tab按类型 id 注册正文。不再占用sidebar.footer.action与shell.overlay。 - 样式:DSH 主题 CSS 变量
--dsw-alias-*,明暗主题自适应,data-ds-dark-theme属性变化时实时跟随切换 Monaco 主题。 - 编辑器加载:Monaco Editor 经 CDN 动态加载,React 组件从 loader 的 module table 获取,不引入任何额外 npm 依赖。
License
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 8978
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 8978
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 5292
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
ccch1mneyyy/dsh-TUI★ 4819
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 4290
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1478
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.