Dayi-Z/gitcompass0

gitcompass

A GitHub-connected visual git panel for DeepSeek Harness — guided flow (branch → commit → push → PR → review → merge), commit graph with PR/CI badges, one-click GitHub login, and structured git tools for the agent.

AI 분석

核心用途是为用户和智能体提供直观、规范的 Git 协作面板。适合在 DSH 中进行代码开发、版本控制和 GitHub 协作的用户。智能体可直接调用其提供的结构化工具进行代码提交与推送。

패키지
gitcompass
버전
1.6.3
라이선스
MIT
최근 업데이트
2026. 8. 29.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Dayi-Z/gitcompass

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