dsh-git-scm
v0.4.1
Published
Git source control in the right sidebar: review changes, stage and commit, switch branches, push and pull.
Maintainers
Readme
dsh-git-scm
A Git source-control panel for the DeepSeek Harness Web UI, modelled on VS Code's Source Control view and GitLens' repository tree. It reads the checkout of the current Session's working directory and opens as a page in the right sidebar.
Requirements
- DSH
>=0.2.0 <0.3.0— the package'sengines.dshrange. Installation and profile startup refuse an unsupported DSH. - Git on
PATH— required for all Git operations; the Worktrees section needsgit worktreesupport. - GitHub CLI (
gh) — optional. Needed to publish a branch to GitHub; sign in once withgh auth login. A custom remote URL works without it. - A configured default model — optional. Needed for generated or improved commit messages; the rest of the panel works without one.
- A DSH version that supports moving a Session between checkouts — required for switching worktrees; older versions list them but report switching unavailable.
Install
The examples use the web profile; replace web with your profile name if you
launch another one (the Desktop app runs the desktop profile).
# Install or update to the latest release
dsh plugin --profile web add dsh-git-scm
# Pin a release
dsh plugin --profile web add dsh-git-scm@<version>dsh plugin installs the package into the profile and records it as a bundle.
Restart DSH after installing so the plugin loads.
Confirm it is installed before opening the panel:
dsh --profile web --dump-config | grep dsh-git-scmUninstall, then restart DSH:
dsh plugin --profile web remove dsh-git-scmFeatures
Repository and branches
- Header: repository glyph, branch chip, Refresh, and a Zed-style sync split
control. The branch chip opens a searchable branch switcher (local and remote,
dirty
*/ staged+markers, ahead/behind counts) and publishes the branch when it has no upstream. A sync row below it shows the upstream, ahead/behind, the last fetch time, the list/tree toggle, and the bulk change menu. - Worktree switcher: the repository glyph at the top-left opens a checkout menu (current one checked, main/linked paths as hints) with New Worktree and Prune missing worktrees, so the Session can move between checkouts without opening the Worktrees section.
- Branches: upstream, last commit date, VS Code-style tracking tones (green
↑nunpushed, amber↓nunpulled,▲+unpublished), and a marked current branch. Expanding a branch pages its commits and files; a branch behind its upstream offers a hover pull control that fast-forwards it without checking it out. - Remotes: each remote expands into its remote-tracking branches, commits, and changed files. The header carries the last fetch time.
- Stashes and tags: the stash stack (with its patch) and the tag list.
- Pending operation banner: names an in-progress cherry pick, revert, merge, or rebase and offers one control to abort it.
- Not a Git repository yet: an empty state with Initialize repository
(
git init -b main), Publish to Git (init, stage, first commit, publish dialog), and Refresh.
Changes
- Staged and working-tree changes: modified, added, deleted, renamed, copied, conflicting, and untracked files; an untracked directory is listed as its files. File names stay on one line: the directory suffix yields first, then the name ends with an ellipsis.
- Flat list or directory tree: the header toggles the view; trees start expanded, compact single-child chains, show a directory's changed-file count on hover, and apply stage/unstage/discard to every file underneath.
- Selection and bulk actions:
Ctrl/Cmd-click andShift-click select across a section; a selection's commands replace the bulk stage-all control. A bulk menu beside the sync row offers stage/unstage/discard all, stash all (with untracked), commit all, and undo the last commit. - Customizable sections: a panel chooser shows, hides, and reorders the Git Repositories sections; the layout is stored for the profile.
- Context menus on changes, branches, remote branches, commits, commit files,
remotes, stashes, and tags: show diff/history, stage/unstage, discard, stash
paths, add to
.gitignore, copy path or absolute path, reveal in the file manager, check out a branch or commit, create/rename/delete a branch, delete a remote branch, copy a SHA or message, cherry-pick, revert, apply/pop/drop a stash, and delete a tag. - Open file hands the file to the app's code view: the first open splits the right Sidebar and later opens replace the same preview tab.
Commit
- Message field: starts one line tall and grows to six lines. The split
button states what a click does — Commit, Commit Tracked (stages
tracked working changes first, leaves untracked files out), Amend, or
Amend Tracked — and its chevron menu carries the amend toggle, commit all,
and undo last commit.
⌘Enter/Ctrl+Entercommits. - Model-written messages: the sparkle control generates a message from the current changes (staged first) or improves the draft; the commit menu offers the same action. Hold or right-click the sparkle to set language (app, Chinese, English) and style (automatic, Conventional Commits, single-line, detailed body); the rules persist for the profile.
Sync and publishing
- Sync split control: the primary action follows the branch state — Publish, Pull ↓n ↑n, Push ↑n, or Fetch — and the chevron opens Fetch, Fetch From, Pull, Pull (Rebase), Push, Push To, and Force Push. Fetch From / Push To pick one remote; Force Push confirms first and uses a lease.
- Publish a branch: a branch with no upstream becomes Publish Branch /
Publish; the dialog creates a private or public GitHub repository through
the authenticated
ghCLI, or uses a custom remote URL. The branch then tracks its new upstream. - Fetch feedback: fetching reports whether references moved ("no new commits" vs "N references updated").
Worktrees
- Worktrees section: the main checkout, linked checkouts, and registrations whose directory is gone (marked missing with Git's reason); locked ones say so.
- Switch, create, remove, prune: switching moves the Session's working
directory and re-reads the panel there. New Worktree creates a branch at the
current HEAD in
<repository>/.agents/worktrees/<slug>or checks out an existing local branch, then offers the same move. Removal asks first and offers Force Remove after a second confirmation when the checkout is dirty; prune clears missing registrations. - Header badge: a linked checkout shows a compact folder badge whose tooltip names its path.
Comparison, history, and review
- Docked comparison: clicking a change, a commit's file, or a stash opens its diff in a pane docked below the list by default, or on the right. The divider resizes it (the pane's own left edge resizes the right dock) and the size is remembered. The title row folds the body to one strip and unfolds it again.
- Responsive dock: when the panel narrows below 580px, a right-docked comparison folds below the list while one already docked below keeps its open state; a fullscreen Sidebar docks it right and unfolded.
- Diff tools: old/new line numbers, collapsed unchanged runs, unified and
side-by-side views, expand to nearly the whole panel, word wrap (persisted),
and in-pane search with match highlighting, a counter, and next/previous
stepping (
⌘F/Ctrl+F). Redundant Git header lines are hidden. - File history: a change row's context menu opens that file's commit history in the same pane; a commit shows its diff for that file with one control back.
- Commit review: a commit's context menu opens a filterable file list with
per-file
+n/−ncounts and commit totals; picking a file shows its diff, with one control back.
Usage
- Open the panel from the branch-glyph button in the Conversation header, or pick Source Control on the sidebar guide page; the tab chip follows the UI language.
- Review changes by clicking a file (the diff opens in the comparison pane)
or right-clicking for stage, discard, history, and copy commands. Multi-select
with
Ctrl/Cmd-click andShift-click. - Commit from the message field: type a message or use the sparkle control,
then click the split button (Commit, Commit Tracked, Amend, or Amend Tracked)
or press
⌘Enter/Ctrl+Enter. - Sync and publish from the split control: its primary segment shows Publish, Pull, Push, or Fetch; the chevron opens the full command list.
- Switch worktrees from the repository glyph at the top-left: the menu marks the current checkout and offers New Worktree and Prune.
Known limitations
- One repository per Session: there is no repository picker; worktree switching moves the Session's working directory.
- No merge, rebase, blame, or history graph; conflicts can be staged once resolved outside the panel.
- Branch lists are capped at 500 local and 500 remote branches.
- The comparison pane has its own view (line numbers, unified and side-by-side modes, search); the app's own Changes view remains available from its sidebar entry.
- Open file replaces the preview tab it opened; it reuses another tab only when that tab already shows the file. Closing the preview makes the next open split a fresh pane.
- Authentication for push and pull is Git's own (credential helpers, SSH agent); the panel never handles tokens.
