dsh-source-control
Manifest validThe vscode-like source code management page in dsh
dsh-source-control
A DeepSeek Harness (dsh) plugin that adds a Source Control page to the DSH Web GUI's built-in right Sidebar: the commit graph, the working-tree changes list, and a commit box. Its controls come from DSH's own components, so it looks and behaves like the rest of the Harness. The repository is bound automatically to the current session's workspace; no manual repo selection is needed.
Features
Repositories
Lists the repositories inside the current session's workspace, expanding their worktrees and submodules. Each row carries a kind-specific icon plus the checked-out branch and its ahead/behind counts against the upstream. The context menu offers refresh, fetch, push, and copy path; a linked worktree additionally offers Remove worktree.
Changes
The working-tree change list, grouped into Staged Changes and Changes.
- A file row shows its file-type icon, name, and the status character in the rightmost column (shared with a folder's change count). Clicking a file row opens it; an untracked new file opens as a plain file.
- Hovering reveals discard and stage (or unstage) buttons; the context menu offers the same actions, plus open and copy path.
- The file tree starts at the earliest forking common directory: a chain of directories with a single subdirectory each collapses into one row instead of expanding from the repository root.
- The commit box stays pinned at the top and only the change list scrolls. A group header's context menu stages, unstages, or discards everything in it.
Commit box
- The commit message accepts Enter to commit, Shift+Enter for a newline, and Escape to clear the draft.
- Amend last commit turns the commit into
--amend. - The commit button shows how many files are staged.
- The message can be generated by AI (see below).
Graph
The commit lane graph; its section header collapses on click. The divider above that header is the drag handle — dragging up grows the graph (120–720px, saved persistently).
- Each row is the lanes, then the commit subject with the author beside it (ellipsis-truncated when space runs short), then right-aligned ref markers.
- Ref markers: icon-and-name pills for the current and other local branches, circular badges for remotes, tags, and stashes, with names in the tooltip and the context menu. Remote HEAD is never listed, and neither are branches checked out in another worktree.
- Node shape names the kind: two concentric rings for the current branch, a ring with a core for merges, a filled dot otherwise. Lane lines stop at the node's outer edge instead of running through it.
- The uncommitted row is drawn dashed with no node, and triggers neither the hover card nor the context menu.
- When paging, a parent outside the loaded window still holds its lane and keeps its line running to the row bottom, so loading more never changes the lanes or colours already on screen.
- Hovering a row floats a card with the author, the time, the full commit message, the changed-file and line counts, the ref markers, and the short hash with a copy button.
- Clicking a commit expands its changed-file region in place, directly below that row, showing per-file +/− and status; clicking a file opens its diff, and clicking the row again collapses it.
Commit context menu
Open on GitHub (shown only when a GitHub remote exists), Check out to (a submenu listing the branches on that commit, shown only at a branch tip), Check out (detached), Create branch, Delete branch, Create tag, Delete tag, Cherry-pick, Revert, Reset current branch to here, Merge into current branch, Rebase current branch onto here, Copy hash, Copy commit message, Create archive.
- Delete branch lists the local and remote branches containing that commit — a branch is identified only by its tip, so a mid-history commit would otherwise have no branch to delete.
- Delete tag is hidden when the commit has no tags.
- Deleting the current branch is still offered; clicking it explains why it cannot be deleted instead of being greyed out.
- Rows with a submenu carry a trailing chevron.
Diff page
Opens a file's diff in the Sidebar, with line-number gutters, hunk headers, and syntax highlighting.
- Side-by-side by default, switchable to a unified view.
- Word wrap on by default, switchable off.
- Only the lines around each change are shown (git hunks), not the whole file.
Confirmation for destructive actions
These actions ask for confirmation first, with a red confirm button: discard changes, delete a local or remote branch, delete a tag, drop a stash, reset the current branch, remove a worktree, and delete a remote configuration. Merge and rebase confirm too.
Unstaging is not destructive and asks nothing. Discarding an untracked file is worded as a delete — the file is genuinely removed rather than reverted.
Repository configuration
The settings panel offers:
| Section | Contents |
|---|---|
| General | Commit ordering (topological / date / author date), date format, and display toggles for the commit box and the graph |
| User Details | User identity (name and email), writable globally or per repository |
| Remote Configuration | Add, edit, and delete remotes |
| Issue Linking | Issue link rules |
| Pull Request Creation | Pull-request creation settings |
| Repository | Export the repository-level configuration |
| AI commit message | The dedicated provider and model, plus custom rules appended to the end of the system prompt |
AI commit message
Pick a provider and model (falling back to the current session model when unset) and optionally add custom rules; generation sends the working-tree diff to the chosen model and streams the result into the commit box.
With Amend last commit checked, the diff becomes "the previous commit's changes plus this one's", and the prompt says so.
Entry points
No third-party sidebar plugin is required; both entries open the same page:
| Entry | Behaviour |
|---|---|
| Guide entry capsule | Open the right Sidebar's + control, then pick the Source Control capsule |
| Session header icon | Opens the page, or focuses the open one |
Switching to another sidebar page or workspace and coming back leaves the page as it was — it neither reloads nor loses its expanded state.
Install
dsh plugin --profile web add dsh-source-control
# restart `dsh web`; the right Sidebar's `+` → guide page shows Source Control, and the session header gains an icon
License
This project's own code is MIT. See LICENSE.
Comments
Loading…