Back to home@necokeine

dsh-git

No description

Stars
0
Language
TypeScript
Created
Aug 21, 2026
Updated
Aug 21, 2026
GitHub repo

Introduction

dsh-git

Git status, commit, and push plugin for the DeepSeek Harness web interface. It adds a sidebar footer action for the current session's project directory, showing the branch, upstream, changed files, and line summary in a panel with Commit, Commit & push, and Push actions.

English | 中文

Features

  • Session-aware status — follows the project directory of the session currently open in the web interface.
  • Working-tree detail — shows the branch, upstream, ahead/behind counts, changed files, insertions, and deletions returned by the plugin's read-only status route.
  • Commit and push — asks the current session agent to commit with the supplied message, commit and push, or push existing local commits.
  • AI-authored commit message — pressing Commit with a blank message asks the current session's agent to stage and commit the workspace with a concise generated message.
  • Safe refreshes — keeps the last ready snapshot visible during refresh and discards an in-flight status read after the active project changes.

Installation

The plugin targets the DeepSeek Harness web interface (dsh web). Its Node half mounts a read-only status route and accepts only directories owned by live sessions; Git mutations follow the current session agent's normal tool and permission flow.

Install it into a profile with dsh plugin:

dsh plugin --profile web add @necokeine/dsh-git

Restart dsh web and refresh the page. The package declares a bundle patch that disables the built-in ui-git row and mounts this package under its own Loader entry id, so only one Git footer action runs.

Remove it with:

dsh plugin --profile web remove @necokeine/dsh-git

Other install forms also work:

  • Local checkoutdsh plugin --profile web add ./path/to/dsh-git or link:./path/to/dsh-git.
  • Tarball — run pnpm pack, then install the generated .tgz; the package contains prebuilt lib/ artifacts.
  • Gitdsh plugin --profile web add github:necokeine/dsh-git#<sha>; source installs must be allowed to run the package build under the profile's pnpm build policy.

Development

pnpm install
pnpm test
pnpm typecheck
pnpm build
pnpm lint
pnpm pack

The Node entry mounts /dsh-git/status, validates its JSON request, and rejects any directory not owned by a live session before running read-only Git commands. The browser entry registers the sidebar.footer.action component and locale dictionaries, creates GitController, fetches status through that route, and delegates commit/push requests to the current session agent. Standalone browser tests use small local runtime and icon stubs because the published Harness runtime client is distributed as a browser-loader bundle. tests/apply.harness.spec.ts retains the real SlotRegistry/locale integration coverage for runs inside a Harness checkout and is excluded from the standalone Vitest config.

Repository layout

src/
  index.ts                   # live-session-scoped, read-only Git status route
  invariant.ts               # package invariant companion
  client/
    index.ts                 # browser registration and Git mutation delegation
    git-api.ts               # browser-facing plugin status transport
    git-controller.ts        # status and panel state
    GitAction.tsx            # footer trigger and panel
    git-action.module.css
    locales.ts               # Chinese and English dictionaries
tests/                       # controller, component, and registration specs
cordis.patch.yml             # disables the built-in ui-git row and mounts this package
tsdown.config.ts             # independent Node and browser bundle build

Model Experience

The footer action contributes no prompt section or tool schema. Commit, commit-and-push, and push actions send a normal user message through the current session's prompt pipeline, where standard user-message logging records it.

Known Limitations

  • A session without a project directory shows no Git state.
  • Commit and push are performed by the current session agent and follow that session's normal tool permissions and authentication environment.
  • Binary and untracked files do not contribute to the line summary.
  • A branch without an upstream has no ahead count, so the standalone Push action remains disabled until an upstream is configured.

License

MIT