dshbase

插件目录 / Developer / dsh-client-ui-git-branch

dsh-client-ui-git-branch

已验证 · 实测可装 dsh-mixxed

✓ 持续维护 2 位贡献者 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-16最近推送
跨平台平台

功能简介

定制的DeepSeek Harness git分支UI插件。

✅
我们的评价
可用 — 实测通过,早期项目

定制的DeepSeek Harness git分支UI插件。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-client-ui-git-branch

English | 锟斤拷锟斤拷

A dsh (DeepSeek Harness) out-of-tree plugin that adds a git branch selector to the chat
composer, immediately left of the model seat (conversation.input.right).

Install

  1. Install the plugin from npm (published as @dsh-mixxed/dsh-client-ui-git-branch):

    dsh plugin --profile web add @dsh-mixxed/dsh-client-ui-git-branch
    

    The package declares dsh.bundle (its bundled cordis.patch.yml), so dsh plugin add
    automatically appends it to the profile's dsh.profile.bundles layer stack and the plugin
    mounts on the next boot 锟斤拷 no manual cordis.patch.yml editing.

    Upgrading an install that predates the bundle declaration: remove the legacy ui-git-branch
    row from $DSH_HOME/profiles/<name>/cordis.patch.yml 锟斤拷 the bundle layer now supplies it, and
    leaving both would mount the id twice.

  2. Restart the profile (new plugins are discovered at boot) and refresh the browser page. In a
    session whose workspace is a git repository, the branch chip appears left of the model seat.

Building from source (development / offline)

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
npm pack          # produces dsh-mixxed-dsh-client-ui-git-branch-<version>.tgz
dsh plugin --profile web add ./dsh-mixxed-dsh-client-ui-git-branch-<version>.tgz

Features

  • Composer seat left of the model selection, same chip/menu chrome as the model seat
  • Shows only when git is installed and the session workspace is a git repository
  • Fuzzy branch search (substring or in-order subsequence), with a clear button
  • List shows at most 5 rows; more branches scroll inside the list (no page-level scrolling)
  • Current branch marked in a distinct color (brand blue + check icon)
  • Upstream tracking facts (VSCode-style): every branch shows its remote short name
    (origin/main) with colored ahead/behind commit counts (锟斤拷2 amber / 锟斤拷3 green) and a red
    gone marker when the upstream ref was deleted; local-only branches show nothing. The trigger
    chip carries the same badge when the current branch is out of sync
  • Local / Remote groups 锟斤拷 see Branch groups
  • New branch action: a dialog asks for the branch name, then creates the branch from HEAD and
    checks it out (git switch -c); invalid names are flagged live, collisions surface git's message
  • Branch switching with conflict detection: failures pop a transient toast carrying git's stderr
  • Full zh / en i18n and automatic multi-theme support through --dsw-* design tokens
  • Detached-HEAD safe (trigger falls back to HEAD); unborn-HEAD repos still list the current branch

Branch groups

The list is split under two sticky headings:

  • Local branches 锟斤拷 every local branch. Tracked branches keep their upstream mapping
    (master 锟斤拷 origin/master, with ahead/behind counts).
  • Remote branches 锟斤拷 only branches that exist remotely but have no local counterpart
    (origin/HEAD symrefs and bare remote refs are excluded).

Behavior:

  • The fuzzy search spans both groups at once; a group with no matches collapses away.
  • Clicking a remote branch creates a local tracking branch and switches to it
    (git switch --track origin/feature 锟斤拷 local feature tracking origin/feature); the branch
    then moves into the local group.
  • Clicking a local branch switches the work tree (git switch); a blocked switch 锟斤拷
    typically uncommitted changes that would be overwritten 锟斤拷 pops a toast with git's own message.

Verify

dsh --profile <name> --dump-config | Select-String ui-git-branch

The composed config shows the ui-git-branch row, and
$DSH_HOME/profiles/<name>/package.json lists @dsh-mixxed/dsh-client-ui-git-branch under
dsh.profile.bundles (auto-appended by dsh plugin add).

After the restart, the composer shows the branch chip; opening it reveals the grouped list, the
search box, and the New branch action.

Development

pnpm run typecheck   # strict tsc over src + tests
pnpm test            # vitest: host logic (fake runner) + real-git integration + jsdom component tests
pnpm run build       # esbuild dual output 锟斤拷 lib/index.js (node ESM) + lib/client.js (browser CJS closure)

Test profile used during development: git-branch-dev (independent of the user's web profile),
booted with dsh --profile git-branch-dev --port 3800.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-client-ui-git-branch」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:dsh-mixxed/dsh-client-ui-git-branch

Headless(CLI)profile:

dsh plugin --profile headless add github:dsh-mixxed/dsh-client-ui-git-branch

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。

适合谁

想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。

二次开发建议

工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7797 个插件 →