gitcompass
开发工具 活跃维护

gitcompass

Dayi-Z/gitcompass

轻量级 GitHub 连接的 Git 可视操作面板,支持分支快速切换、文件级审批卡片管理,集成 PR 与 issue 专属工作区,无需频繁跳转页面即可完成代码协作全流程操作。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
859 KB
仓库大小
23 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Dayi-Z/gitcompass
git clone https://github.com/Dayi-Z/gitcompass.git
git clone git@github.com:Dayi-Z/gitcompass.git
README.md master

gitcompass

English | 中文

A GitHub-connected visual git panel for DeepSeek Harness — guided GitHub-Flow steps, commit graph with PR/CI badges, one-click GitHub login, and structured git tools for the agent.

Features

  • Guided Flow Strip (top bar): Visual step indicator through the GitHub-Flow stages: Branch → Commit → Push → PR → Review → Merge.
  • Branch Management: View local/remote branches, switch, create, delete, rename, merge, fetch, checkout remote.
  • Changes View: File status (staged/unstaged/untracked), stage/unstage, commit, diff viewer (click any file to see changes), stash/pop, push, pull, fetch.
  • Commit Graph (GitLens-style lane visualization): 3-column layout (lane / SHA / subject), PR badges, cherry-pick to current, revert commit.
  • PR Management: List PRs, view detail (checks, reviews, comments), create PR, squash merge, review (Approve / Request Changes / Comment), add comment.
  • Issues: List issues, view detail, create new issue, add comment.
  • GitHub Integration: Device-flow OAuth login, PAT input, gh CLI reuse, encrypted token storage (DPAPI on Windows).
  • Structured Git Tools (model-side): git_status, git_diff, git_branches, git_commit, git_push, github_pr_list/read/create/merge/comment/review, github_issue_list/read/create/comment.
  • Agent Activity Monitor: a live SSE feed of every agent tool call (start/completion/failure); a repo observer polls workspace state to surface bash git operations performed outside the plugin's tools (new commits / branch switches / working-tree changes).
  • In-Panel Approvals: write operations pop an approval card inside the panel where you can Approve or Reject directly; races the native DSH modal — first decision wins. Panel decisions are one-shot and memory-only; without an open panel the flow falls back to the native approval channel.
  • i18n: Auto-follows DSH Web locale (Chinese / English).
  • Theme: Light/dark follows DSH Web GUI.

Install

dsh plugin --profile web add dsh-git-panel

Or for local development:

dsh plugin --profile web add link:/path/to/gitcompass

Restart dsh web, open a session bound to a git repository, and the "Compass" panel appears in the right-side column.

Architecture

src/
  index.ts           # Cordis plugin entry: register routes + tools + system prompt
  tools.ts           # Model-side structured git/GitHub tools (approval race for writes)
  core/types.ts      # Shared TypeScript types
  host/
    git-service.ts   # Workspace-bounded git operations
    routes.ts        # /gitu/* HTTP routes (incl. SSE stream /gitu/events, approval endpoint)
    event-bus.ts     # In-memory event bus + pre-approvals + panel approval broker + repo observer
    github-service.ts # GitHub REST wrapper (token never leaves host)
    github-auth.ts   # Device flow, DPAPI token storage, gh CLI sync
  client/
    index.ts         # Browser entry: mounts the panel column
    Panel.tsx        # Main panel: Branches / Changes / Graph / PRs / Issues / GitHub / Agent
    api.ts           # Typed fetch wrapper over /gitu/* routes
    events.ts        # SSE subscription hook (useGitEvents)
    i18n.ts          # Bilingual dictionary (zh/en)
    graph.ts         # Commit DAG lane layout algorithm

Development

pnpm install
pnpm run build

Build output: lib/ (host) and client/ (browser bundle).

License

MIT