Skip to main content
G

dsh-idea-shell

gyl521/dsh-idea-shell

An IDE-style shell with a file tree, editable file preview, Markdown rendering, Git status, and session tabs.

Install

dsh plugin --profile web add github:gyl521/dsh-idea-shell

README

dsh-idea-shell

给 DeepSeek Harness Web UI 用的 IDEA 风格三栏工作台:左侧工作区文件树,中间是可查看/可编辑的文件区,对话固定在底部。

An IDEA-style three-pane shell for the DeepSeek Harness web UI: workspace tree on the left, an editable file/Markdown editor in the center, and the conversation docked along the bottom.

功能

  • 中间文件区:语法高亮只读视图 + 纯文本编辑;行号、Tab/Shift-Tab 缩进、列表回车续行、Ctrl+S 保存。
  • Markdown:预览 / 编辑 / 分栏三种模式;标题、表格、任务列表、引用、围栏代码、相对链接、图片语法等自包含渲染,不依赖外部 Markdown 库。
  • 字号跟随对话:文件区文字使用 --dsh-content-font-size,和聊天正文一致;可再整体微调。
  • 会话标签:对话栏顶部列出最近会话,点击直接切换。
  • 版本控制页:资源管理器内的 Git 状态(分支、ahead/behind、暂存/更改/未跟踪/冲突),12 秒轮询刷新。
  • 护眼滤镜:输入框下方的「护眼」按钮,状态保存在本地。
  • 保存:通过插件自带的 Host 路由写回当前工作区文件,不会写到工作区之外。

兼容性(重要)

  • 需要 DSH >= 0.2.2-rc.5(在 DSH Desktop 0.2.2-rc.5 上开发与测试)。
  • 本插件占用 root 槽位,会替换默认布局,因此安装包自带的补丁会禁用内置的 ui-layout。不要同时启用其它占用 root/整壳替换的布局插件。
  • 与 dsh-better-sidebar 这类会改写侧边栏/布局的插件可能冲突;如同时使用,请先只启用本插件确认可用。
  • 文本文件上限约 200 万字符 / 60 页;图片、PDF、Office 文件仍交给 DSH 自带的右侧预览。

安装

DSH Desktop

  1. 打开 插件 → 添加插件。
  2. 填入包名 dsh-idea-shell 并安装。
  3. 按提示重启/刷新 DeepSeek Harness。

dsh web / 非桌面 profile

dsh plugin --profile <你的 profile> add dsh-idea-shell

桌面端 profile 由 Electron 应用独占管理,请用应用内的插件页安装,不要直接改 profiles/desktop。

使用

  • 左侧树选择文件;.md 文件默认进入预览,可切到编辑/分栏。
  • Ctrl+S 保存,未保存时关闭/切换文件会提示。
  • 对话里点文件引用,预览会直接打开到中间文件区。
  • 顶部会话标签可切换最近会话;资源管理器的「版本控制」页签查看 Git 状态。

权限与安全

  • Host 侧只注册 /idea-shell/api/* 路由:读取/写入限制在当前会话工作区内,写请求要求同源;Git 页只执行 git status / rev-parse 等只读命令。
  • 没有外部网络请求,没有构建脚本,没有原生依赖。

开发

纯 JavaScript,无编译步骤:

  • index.js:Host 半部分(写文件、Git 状态路由)。
  • client.js:Web 客户端(布局、文件树、编辑器、Markdown、Git 页、护眼)。
  • cordis.patch.yml:禁用 ui-layout 并插入本插件。

License

MIT

Related plugins