dsh-git-branch
开发工具 活跃维护

dsh-git-branch

Rock-ql/dsh-git-branch

轻量级编辑器插件,内嵌Git分支管理胶囊组件,支持本地及远程分支列表展示,提供确认式检出操作,无需跳转终端即可快速切换项目分支,简化日常开发分支操作流程。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
60 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Rock-ql/dsh-git-branch
git clone https://github.com/Rock-ql/dsh-git-branch.git
git clone git@github.com:Rock-ql/dsh-git-branch.git
README.md main

dsh-git-branch

中文 · English

中文

面向 DeepSeek Harness(DSH)Desktop 的对话栏 Git 分支插件:在 composer 左侧显示当前会话工作区的分支,点击后展开本地 / 远程列表,确认后切换。

非 git 仓库不渲染。不给模型注册任何 git 工具,不自动 fetch / pull / push。

功能

  • 对话栏胶囊:当前分支、游离 HEAD、dirty 圆点、相对上游的 ↑ / ↓
  • 点击展开本地与远程分支,支持过滤、键盘上下 / Enter / Esc
  • 切换本地分支;远程无本地跟踪时 checkout -t
  • 从当前 HEAD 新建分支并切过去
  • 可选 Fetch(需确认)
  • 切换失败(含未提交改动冲突)展示 git 原始错误,不 --force

安装

dsh plugin --profile desktop add github:Rock-ql/dsh-git-branch

安装后重启 DSH Desktop。本地 checkout 可用路径安装:

dsh plugin --profile desktop add /Users/rockcoder/Documents/project/dsh-git-branch

Web profile 把 desktop 换成对应 profile 名即可;插件声明的仍是官方 platform: "web" 客户端(Desktop 复用同一套 loopback Web carrier)。

开发

pnpm install
pnpm check

更完整的产品 / 架构说明见 PLAN.md。


English

A DeepSeek Harness Desktop plugin: a git-branch pill in the composer that shows the current session workspace branch, lists local and remote refs, and checks out after an in-panel confirm.

Hidden when the cwd is not a git repo. No model-facing git tools. No automatic fetch / pull / push.

Features

  • Composer pill: current branch, detached HEAD, dirty dot, ahead / behind
  • Click for local + remote lists, filter, keyboard navigation
  • Local checkout; remote-without-local uses checkout -t
  • Create a branch from current HEAD and switch to it
  • Optional confirmed Fetch
  • Checkout conflicts surface git's own error — never --force

Install

dsh plugin --profile desktop add github:Rock-ql/dsh-git-branch

Restart DSH Desktop after installation. From a local checkout:

dsh plugin --profile desktop add /Users/rockcoder/Documents/project/dsh-git-branch

Development

pnpm install
pnpm check

See PLAN.md for the full design.

License

MIT