gameswu/dsh-plugin-vscode-sidebar 预览 preview

gameswu/dsh-plugin-vscode-sidebar

VSCode 风格的 DSH Web 侧边栏插件(fork 自 dsh-plugin-vscode-sidebar v0.12.1)。

catalog descriptioncatalog 简介 / catalog description:提供vscode风格和功能的侧栏

Project Overview项目介绍

This is a DSH-native plugin that adds a VSCode-style workflow sidebar to the official DSH web right sidebar. It bundles multiple development tools: a file browser with vscode-icons, a full-featured Monaco editor, a Git source control panel, an xterm.js-powered terminal, an embedded sandbox browser, and a subagent task manager. Since v0.5.0, all old self-drawn floating panels from the initial release have been removed, so all user-facing content runs directly within the official DSH sidebar infrastructure. To install the plugin, run the DSH plugin CLI command pointing to the GitHub repository or a local clone, then restart the DSH web interface after installation completes.

Starting from v0.6.0, the plugin changed its core behavior to hand over all default file read-only previews to the official DSH implementation. It no longer registers custom document preview renderers or occupies the default file address space used by DSH core. All file editing is triggered only by explicit user actions: the "Edit in sidebar" option on tab and file right-click menus, or the pencil button next to file entries in the product list. This design avoids conflicts with DSH's default preview and reduces the chance of unintended editing by users. Unsaved editing drafts are automatically saved when the plugin is unloaded or the tab is closed, so no work is lost when switching between tabs.

The plugin requires DSH version 0.1.5-rc.1 or newer to work correctly. All interface text automatically switches between Chinese and English to match the DSH system language setting. All plugin settings are exposed through DSH's official plugin settings page, and any changes you make take effect immediately without needing a restart. The plugin is open source and distributed under the permissive MIT license. Uninstallation can be done via a single DSH plugin CLI command that removes the plugin bundle completely from your DSH profile. When installing from GitHub, you may need to allow the package to run its build script in your pnpm workspace configuration to complete installation.

这是一个专为 DSH 开发的原生插件,为 DSH 的官方右侧侧边栏添加了 VSCode 风格的开发工作台,集成了文件浏览器、Monaco 编辑器、Git 源代码管理、终端、内嵌浏览器和子任务管理等常用开发工具。自 v0.5.0 起,插件完全迁移到 DSH 官方右侧栏 API,移除了旧版自绘浮动面板,所有功能页面都依托官方侧边栏承载运行。

自 v0.6.0 起,插件遵循约定将文件只读预览完全交还给 DSH 官方实现,不再注册自定义文档渲染器,也不再占用默认文件地址。文件编辑仅通过显式动作触发,比如标签页右键菜单、资源管理器文件右键菜单的「在侧栏编辑」选项,或是产物列表旁的铅笔按钮,避免了和官方预览的冲突,也减少了误编辑情况。

插件要求 DSH 版本不低于 0.1.5-rc.1 才可运行,界面文案会跟随 DSH 的系统语言设置自动切换中英双语。可通过 dsh plugin CLI 命令完成安装,所有设置都接入 DSH 官方插件配置页,修改后即时生效,项目以 MIT 许可开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:gameswu/dsh-plugin-vscode-sidebar

把 gameswu/dsh-plugin-vscode-sidebar 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-vscode-sidebar

VSCode 风格的 DSH Web 侧边栏插件(fork 自 dsh-plugin-vscode-sidebar v0.12.1)。

自 v0.5.0 起,插件完整迁移到 DSH 0.1.5-rc.1 的官方右侧栏(ctx.sidebarRightTabs / ctx.documentPreviews / conversation.session.header.utilities):旧的自绘 portal 工作台(浮动面板、分栏、底部面板)已删除,所有页面都是官方右侧栏中的页面类型或资源类型。

自 v0.6.0 起,只读预览交还给官方:普通文件打开(聊天/工具的文件链接、官方 Files 页、资源管理器单击、 产物列表)一律落在官方只读预览(ui-sidebar-documentpreview)的 text 标签页里;插件不再以 extension 档位占用 dsh-resource://file/**,也不再注册任何 documentPreviews 渲染器。 编辑改为显式动作:标签页右键菜单的「在侧栏编辑」、资源管理器文件右键菜单的同一项、产物列表芯片 旁的铅笔按钮,以及已弃用门面的 openFile / openTab({type:'editor'})。

功能

  • 文件浏览器(页面类型 vscode-explorer):懒加载目录树 + vscode-icons 图标;新建文件/文件夹、重命名、删除(删除需确认);目录列举优先走官方 remote.workspaceFiles,不可用时回退到插件自身的 host 路由(两条路径都支持 git 忽略灰显与状态徽章)
  • 编辑器(资源类型 vscode-editor,只认插件自有地址 dsh-resource://vscode-sidebar-edit/**,仅在显式编辑动作中打开):Monaco 编辑、全语言语法高亮、Ctrl+S;标签页右键菜单贡献「在侧栏编辑 / Edit in sidebar editor」,资源管理器文件菜单与产物列表铅笔按钮同样入口;tab 标题显示未保存标记,卸载/关闭时自动保存未保存的草稿(草稿按 (sessionId, contentId) 保存在插件服务里,contentId 就是该文件的编辑地址,因此切换 tab 不丢失)
  • 只读查看由官方 ui-sidebar-documentpreview 负责(Markdown / 代码 / HTML / 图片 / PDF 等):插件不注册任何 ctx.documentPreviews 渲染器,也不与它争抢文件地址
  • 源代码管理(页面类型 git):状态徽章、+a −d 行数、行内 diff、提交、分支切换(含 ahead/behind)、历史轨迹图;子目录仓库探测;差异(资源类型 diff,插件自有协议 vscode-sidebar-diff)按变更地址去重,同一处变更永远聚焦同一个 tab
  • 终端(页面类型 terminal):xterm.js + node-pty 真实 shell;PTY/WebSocket 归属插件服务并以 (sessionId, contentId) 为键,关闭/卸载页面不会杀掉 shell,重新打开会回放缓冲;可选为模型注入 terminal_* 工具
  • 内嵌浏览器(页面类型 browser):沙箱 iframe;聊天区外链可直接在右侧栏打开
  • 任务管理(页面类型 tasks):subagent 拓扑 + 后台任务卡片 + 代理终端流式输出;运行中置顶、历史折叠
  • 会话标题栏启动器:conversation.session.header.utilities 中的一排按钮,一键打开上述任意页面
  • 全部设置接入官方插件配置页(Settings → Plugins),修改后即时生效

界面文案跟随 DSH 语言(zh/en)实时切换。

行为约定(v0.6.0 起)

  • 没有底部面板:旧 portal 的底部工作台已整体退役,终端/任务都以官方页面形式出现;需要第二个终端时请用官方右侧栏的分栏能力。
  • 默认打开 = 官方只读预览:聊天里的文件提及、工具行、官方 Files 页、资源管理器单击、产物列表芯片都走官方 openResource 的普通文件地址(dsh-resource://file/**),由官方 text 预览渲染;插件在 extension 档位只认自己的 dsh-resource://vscode-sidebar-edit/**。
  • 编辑 = 显式动作:编辑器地址由文件地址包装而来(base64url 负载),因此同一文件的 contentId 稳定:重复编辑聚焦同一个标签页,脏草稿按 (sessionId, contentId) 存活于插件服务,切换标签页/重新打开都不丢。行号通过导航参数 params.line 传递,不进入地址(同一文件在不同行打开仍是同一个 tab)。
  • 自动保存 + 脏标记:官方 tab 记录没有关闭否决,因此编辑器在卸载时保存脏草稿;未保存状态显示在 chip 标题上。
  • tab / 布局仅存在于内存:官方 ui-sidebar-right 0.1.5-rc.1 不持久化 tab 记录,刷新页面后不恢复任何 tab(包括编辑器、差异、终端、浏览器);这是官方侧边栏的既定行为,不是本插件的回归。
  • 旧服务已弃用:ctx.vscodeSidebar 仍保留为兼容门面——老插件继续用 registerTab / registerFileViewer 注册,门面会把它们转发到官方 sidebarRightTabs / documentPreviews 并渲染原组件;openTab / openFile / closeTab / activateTab 转发到官方导航(其中 openFile 与 type:'editor' 的 openTab 语义是编辑,因此打开编辑地址;查看请直接用官方 openResource),而 updateTab 与依赖布局的字段(createTab / dedupeKey / available / badge / onOpen / onClose)不再生效,新插件请直接使用官方 API。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-weather 下一个 Next dsh-browser-control →