xbzbing/dsh-git-panel 预览 preview

xbzbing/dsh-git-panel

DSH 插件:Web GUI 里的 IDE 风格 Git 面板——分支/提交历史总览、变更提交与 amend、文件浏览、代码与图片新旧差异对照、输入框分支标记 | DSH plugin: an IDE-style Git panel for the Web GUI — branches & history, commit/amend for local changes, a file browser, code & image before/after diffs, an input-bar branch marker

Project Overview项目介绍

dsh-git-panel is a DSH-native Web GUI plugin that adds an IDE-style Git panel to the conversation workspace. It concentrates branch listings, a commit history graph, unstaged-change commit and amend flows, and syntax-highlighted diff views into a permanent tab, and places a zsh-themed branch pill to the left of the input box so users can inspect repository state and record commits without leaving DSH. The plugin is installed with dsh plugin --profile web add @xbzbing/dsh-git-panel@latest or github:xbzbing/dsh-git-panel, targets DSH Web only, and has been verified on dsh@0.2.1-alpha.1.

The typical workflow begins by opening a DSH Web session inside a Git repository, where the Git tab appears next to Conversation and Trajectory. Clicking it opens the Git Overview or, when there are local changes, the Changes tab; users filter history by branch, search commits by message or hash, stage and discard files, write commit messages with an Amend checkbox, and inspect syntax-highlighted unified or side-by-side diffs with inline word-level emphasis. Non-Git directories fall back to a lazy file browser that supports Markdown and sandboxed HTML preview, while source and diff views expose Ctrl/⌘+F in-place search with hit highlighting and case toggling. The intended audience is DSH Web users who want to handle Git operations without switching terminals or external IDEs.

Architecture and limits: the host half registers a Cordis plus typert GitPanelService under the gitPanel namespace exposing snapshot, run, query, and version endpoints, invoking git exclusively through the host subprocess service with argv arrays, no shell string concatenation, the working directory locked to the repo root, and per-call timeouts plus output caps. The client half is a React bundle that registers conversation.view and conversation.input.left extensions, consumes the same snapshot per session, and reuses DSH's official syntax highlighter, Markdown renderer, and isolated sandbox preview; large binaries disable highlighting and long lines are truncated for performance. Updates require restarting dsh web, and the committed lib/ directory must be rebuilt and pushed for GitHub installs to load current entry points, with releases checked against GitHub. The project is released under the MIT License and follows DSH's UI language setting between Simplified Chinese and English.

dsh-git-panel 是 DSH Web GUI 的原生插件,在对话工作区里提供 IDE 风格的 Git 面板。它把分支列表、提交历史图、未提交变更的提交与 amend、语法高亮的差异对照集中到一个常驻标签页,并在输入框左侧放一个 zsh 风格的分支标记,让用户在对话过程中随手查看仓库状态与提交改动。插件以 dsh plugin --profile web add @xbzbing/dsh-git-panel@latest 或 github:xbzbing/dsh-git-panel 安装,仅支持 DSH Web,已在 dsh@0.2.1-alpha.1 上实测。

典型使用流程:在 DSH Web 中打开一个位于 Git 仓库的会话,工作区标签栏会出现 Git 标签,点击后默认进入 Git 总览或变更记录,可按分支过滤历史、按关键字搜索提交、暂存与丢弃文件、执行提交与 amend;非 Git 目录或无变更时进入文件浏览,源码视图与差异对照支持 Ctrl/⌘+F 就地查找。目标用户是希望在不离开 DSH 对话的前提下处理 Git 操作的 DSH Web 用户。

依赖与限制方面,host 端通过 Cordis 与 typert Remote 网关在 gitPanel 命名空间下注册 snapshot、run、query、version 四个端点,所有 git 命令以 argv 数组经宿主 subprocess 服务执行,cwd 锁仓库根并带超时与输出上限,插件不修改 git 配置;面板分 host 与 client 两半,代码更新后必须重启 dsh web 服务,仅刷新页面无效,lib/ 为构建产物需随源码提交。客户端 React 包注册 conversation.view 面板与 conversation.input.left 标记,使用 dsh 官方语法高亮、Markdown 渲染与隔离沙箱 HTML 预览,并自动跟随系统语言(中/英)。项目采用 MIT 许可证,二进制大文件关闭高亮、超长行截断以保证流畅,更新检查基于 GitHub release。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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:xbzbing/dsh-git-panel

把 xbzbing/dsh-git-panel 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-git-panel

English | 简体中文

dsh-git-panel

dsh-git-panel 是一个 DSH Web GUI 插件,在对话工作区里提供 IDE 风格的 Git 面板。它把分支列表、提交历史图、未提交变更的提交与 amend、语法高亮的差异对照集中到一个常驻标签页,并在输入框左侧放一个 zsh 风格的分支标记,让你在对话过程中随手查看仓库状态、提交改动,不必切到终端或另开 IDE。

面板只读取当前会话工作目录所在的 Git 仓库,所有 git 命令都以 argv 数组经宿主的 subprocess 服务执行,不拼接 shell 字符串,工作目录锁定在仓库根,并带超时与输出上限。插件不改动 git 配置,写操作(提交、amend、暂存、丢弃)都有明确入口。

安装

# npm(默认)
dsh plugin --profile web add @xbzbing/dsh-git-panel@latest

# 或从 GitHub 仓库安装(仓库已提交构建产物,无需本地构建)
dsh plugin --profile web add github:xbzbing/dsh-git-panel

安装或更新后,重启 dsh web 服务再刷新页面,工作区标签栏(「对话」「轨迹」之后)就会出现 Git 面板。插件分 host 与 client 两半,宿主挂载和 client bundle 清单都在服务启动时定型,因此代码更新(安装、add 覆盖 lib)通常需要重启服务,仅刷新页面可能看不到变化。面板内的配置项(详情页的输入框标记开关、差异默认视图)走配置热写,改动即时生效、无需重启。

兼容性:已在 dsh@0.2.1-alpha.1 上实测,安装、Git 面板、输入框标记与 host RPC 均可正常使用。

功能

  • Git 总览:三栏布局。左栏是分支 / 标签列表,点击某个引用即按它过滤历史;中栏是提交历史图,支持按提交信息、commit 哈希、作者、日期搜索,悬停某条提交弹出卡片显示完整提交信息(comment);右栏是选中提交的变更文件树与提交信息,点击文件在弹出的 modal 里查看该文件在此提交中的差异。
  • 变更记录:面向本地工作区。左栏是统计条(文件数 / 增删行数 / 最近变更时间)、带复选框的未提交变更列表、以及含 Amend 复选框的提交框,支持逐文件暂存 / 取消暂存 / 丢弃与手动提交;右栏是选中文件的差异对照。
  • 文件浏览:直接打开工作区「Git」标签时,非 Git 目录默认进入文件浏览;Git 仓库中无未提交变更则进入「Git 总览」,有未提交变更则进入「变更记录」。非 Git 目录也能浏览,以当前工作目录为根。左栏目录树按需加载(点开才读取下一层,不显示 .git),按文件类型显示 dsh 官方图标,被 .gitignore 忽略的条目半透明呈现,宽度可拖动;右栏可预览代码、文本和图片,顶部可复制文件相对路径,过大文件或其他二进制文件显示提示。Markdown 默认显示源码,可点击「渲染」切换到 dsh 自带的 Markdown 视图;HTML 默认显示源码,可点击「渲染」在隔离沙箱(allow-scripts、无同源权限)中预览页面,不会自动执行。大文件的源码视图按行虚拟化(只渲染视口内的行),超大文件关闭语法高亮、超长行截断,保证流畅。
  • 代码内查找:文件浏览的源码视图与差异对照都支持 Ctrl/⌘+F 就地查找——高亮全部命中并保留语法着色,显示「当前 / 总数」,Enter / Shift+Enter 或 ‹ › 在命中间跳转,可切换区分大小写(默认不敏感),Esc 关闭。命中统计覆盖整份内容,视口外的命中同样计入并可跳转。
  • 语法高亮差异:总览弹窗、变更记录和文件浏览共用 dsh 官方语法高亮,按文件扩展名选择语言,语法资源按需加载;差异视图的改动词级强调保留原有交互。
  • 对照模式:差异支持「统一 / 对照 / 变更前 / 变更后」四种视图切换。统一视图为单栏行内对比(改动行前后紧邻,省横向空间),对照视图为左右并排;两种视图都带块间隐藏上下文的按需展开与改动行的词级高亮。默认视图可在插件详情页选择(统一 / 并排),也可在每个差异视图工具栏临时切换。
  • 显示输入框标记开关:插件详情页可切换输入框标记;关闭后输入框不再显示分支标记,改为在「Git」标签旁显示状态圆点(绿=已同步、橙色=有变更),两者互斥,保存后立即生效。同一处配置区还可设置差异对比的默认视图(统一 / 并排)。
  • 输入框 Git 标记:一个 zsh 主题风格的 <仓库名> (<分支>) 标记,仓库名青色,(分支) 在已同步时为绿色、有未提交变更时为橙色;悬停显示完整仓库路径,点击跳转面板(有未提交变更进入变更记录,否则进入 Git 总览);非 Git 目录不显示输入框标记,可通过工作区的「Git」标签进入文件浏览。
  • UI 跟随 DSH 系统语言设置,支持简体中文和英文。

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-update 下一个 Next dsh-extra-plan →