본문으로 건너뛰기
K

dsh-workspace-git-badge (dsh-git-badge)

kevin-mcisaac/dsh-workspace-git-badge/dsh-git-badge

DSH용 Git 상태 배지입니다. 사이드바 workspace 행 배지와 입력창 행 칩에 현재 대화의 workspace Git 상태를 표시하고 SSE 이벤트로 최신 상태를 유지합니다.

설치

dsh plugin --profile web add github:kevin-mcisaac/dsh-workspace-git-badge

이 플러그인은 저장소의 dsh-git-badge 하위 디렉터리에 있습니다.

README

dsh-git-badge

Git status badges for DeepSeek Harness

tests

Why

Most agent workflow failures happen quietly: branches drift, uncommitted files are left behind, and approved PRs or failed builds sit unnoticed. This plugin brings repository awareness directly into your workflow:

  1. At-a-glance session status: branch, file counts and PR/CI state on the input box. When the session is working in a linked git worktree, the badge follows that tree rather than the main checkout.

Dark-mode input chip: the action glyph with the worktree branch feat/worktree-aware-chip and a passing PR#18, above a main checkout showing sync and file counts and a failing check

  1. Actionable session overview: pinpoints the session requiring attention. The session row status icon is extended to show what git actions are needed, e.g., push, merge. The row's hover card lists this icon, the action and the reason (↑ push — no upstream configured). The chip leads with the same icon, and a checkout with nothing to do shows an in sync disc — green when nothing is outstanding, amber when commits are not yet merged — so a session is never iconless.

Dark-mode sidebar session rows: a green tick in the leading cell for a merge-ready pull request, a red cross for failing CI, and an in-sync disc when there is nothing to do

Both are updated within seconds of any commit, checkout, stage or file edit — including inside a linked worktree for safe isolation of parallel dhs working session.

Install

Use the plugin market place or install manually:

dsh plugin --profile web add dsh-git-badge     # marketplace Install does this step

Then restart the web process and refresh the browser. That is the whole install: every surface rides an upstream slot, so there is nothing to patch and no second step.

Sidebar technical details

The status icon renders using the upstream sidebar.session.row.leading seat — a 16px cell in the row's leading cluster, rendered only while the session is idle. The hover-card provenance line rides upstream's own sidebar.session.row.hover seat as well.

Testing

See TESTING.md — clean-profile boot (customer simulation) and the gotchas list. cd dsh-git-badge && npm test runs the whole suite (parser, real temp repositories, resolution, SSE, the watcher, every gh degradation path and the rendered surfaces) with no DSH, no network and no restart.

Worktrees

A worktree isolates each session to ensure it does not step on another sessions work, e.g., change or delete the branch, modify the same file.

The challenge

A session can enter a worktree that is not its original workspace. Without the session's current directory, the badge would keep reporting the main checkout: the wrong branch, the wrong counts, the wrong pull request.

The solution

DSH records the session's working directory. The working_directory tool and the worktree tool commit the change, and the badge reads that projection on every request. Enter the worktree with the tool (or cd) and the badge follows it. No plugin registration and no file on disk are involved. A workspace-targeted row still reports the checkout the registry owns.

Requirements

  • Node.js ≥ 20, git on PATH
  • DSH 0.2.1 or newer with the web profile
  • gh on PATH, authenticated, for the PR/CI token and the row's merge/review actions — otherwise those are silently absent and everything else still works

License

MIT

관련 플러그인