Julyves / dsh-git-ui

목록에 있음

DeepSeek Harness (dsh) plugin: Git status pill in the session header — branch, dirty counts, ahead/behind, recent commits & changed files.

main도구세션 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:Julyves/dsh-git-ui

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 ca738c8동기화 2026. 8. 17.

dsh-git-ui

npm version npm license npm downloads

A DeepSeek Harness (dsh) plugin that visualizes Git status in the Web UI: current branch, HEAD, dirty-state counts (staged / modified / untracked), ahead/behind, recent commits, and changed files — right in the session header, no terminal needed.

Read this in 简体中文.

Features

  • Branch pill in the session header (right-aligned, per-session): shows the current branch at a glance, with dirty-state and ahead/behind indicators:

    Branch pill in the session header
    StatePill
    Clean⎇ main
    Dirty⎇ main · +2 −1 ?3 (staged / modified / untracked)
    Ahead / behind⎇ main ↑1 ↓2
    Detached HEAD⎇ (detached) · a1b2c3d
    Unborn (no commits)⎇ main · 无提交
    Not a git repoDimmed 无 Git 仓库
    Git unavailable / errorDimmed Git 不可用 (reason in tooltip)
  • Detail popover (click the pill): repository root, count grid (staged / modified / untracked / ahead / behind), recent commits (hash · subject · author · relative time), changed-file list with status chips, manual refresh button, and last-checked time:

    Git status detail popup
  • Git center (management panel from the popup): IDE-style changes view — stage / unstage / discard per file or all, and commit with a message (selected files or everything staged). Every operation refreshes the status instantly:

    Git center changes view
  • Always-fresh data, zero interaction: automatic fetch on session open, silent polling (host-configured interval, default 30s, no overlapping requests), immediate refresh when an agent turn completes (best-effort — the working tree most likely changed right then), resync after reconnect, and a manual refresh button.

  • Deterministic degradation: non-git directories, missing cwd, missing git, timeouts, and oversized repositories show stable fallback states — never crashes, never spams:

    Clean vs dirty vs non-repository states
  • Pure read-only UI: no new model tools, no session events, no impact on agent behavior.

Installation

Requires a running DeepSeek Harness (dsh) with the web profile.

# Install from the npm registry.
dsh plugin --profile web add dsh-git-ui

Restart dsh web. Open a session in a git repository and the branch pill appears in the session header.

To verify the install:

cat ~/.dsh/profiles/web/package.json   # dsh.profile.bundles should list dsh-git-ui

To remove:

dsh plugin --profile web remove dsh-git-ui

Local development install (links this repo into the profile instead): dsh plugin --profile web add ./. Local tarball / link installs (file:...tgz, github:...) symlink the package outside the profile tree, so its @deepseek-ai/* peer dependencies (provided by the host installation) are not reachable by Node's resolution. Keep the dev peer symlinks in this repo's node_modules/@deepseek-ai/* (see Development) whenever installing locally.

Usage

  1. Open a session whose working directory is inside a git repository.
  2. Read the branch pill in the header at any time — no action needed.
  3. Click the pill to inspect repository root, counts, recent commits, and changed files; use 刷新 (refresh) for an immediate re-check.

Each session shows the Git status of its own working directory. Non-repository sessions show a dimmed placeholder instead of the pill.

Configuration (optional)

All defaults work out of the box. Advanced users may override the plugin config in the profile's cordis.patch.yml (a later layer wins; the row replaces the whole config):

- id: git-ui
  config:
    defaultRefreshIntervalMs: 60000   # polling interval (ms); 0 disables polling
    maxChanges: 200                   # max changed-file entries in a snapshot
    timeoutMs: 3000                   # per git-command timeout (ms)
    maxStatusBytes: 8388608           # status-output cap before truncation

Requirements

  • Node.js ^22.19.0 || >=24.0.0
  • dsh >= 0.1.0-rc (developer preview)
  • git on the host machine (the plugin shells out to git)

Known Limitations

  • Shows the Git state of the session's working directory only (no remote URL / push-branch names yet).
  • Polling-based refresh (default 30s); file-watcher event push is a planned extension.
  • Changed-file list is capped (maxChanges); when status output overflows the in-memory cap (default 4 MiB) it is recovered from a private spill file so counts stay exact — only if the spill cap (64 MiB) also overflows does the snapshot fall back to approximate (truncated: true).
  • Browser never sends paths — only a sessionId; the host resolves the authoritative cwd and runs read-only git commands.

Development

pnpm install
# Link the host-provided peers into the repo so a local profile install
# (`dsh plugin --profile web add ./`) resolves them: pnpm symlinks the
# package into the profile, and Node follows the realpath back into this
# repo, so `node_modules/@deepseek-ai/*` must point at the host fallback.
mkdir -p node_modules/@deepseek-ai
for p in "$HOME"/.dsh/profiles/node_modules/@deepseek-ai/*; do
  ln -sfn "$p" "node_modules/@deepseek-ai/$(basename "$p")"
done
pnpm run typecheck
pnpm test
pnpm run build        # host (esbuild ESM, never minified) + client (ModuleLoader factory closure)
dsh plugin --profile web add ./   # local install; restart dsh web to verify

License

MIT

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨
문서감지됨

저장소 정보

언어
TypeScript
라이선스
MIT
최신 릴리스
v0.0.2
마지막 업데이트
2026. 8. 17. AM 6:57

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.