DSH has a rich plugin ecosystem, but in-depth customization for Git tools is relatively limited. During local development, developers usually need to view commit history, manage branches, and compare changes in a terminal or a standalone IDE. The dsh-ide-git plugin introduces an IDE-level Git tools window, integrating the branch tree, commit graph, change list, and commit details into a single panel. It supports JetBrains-style interactions and registers as a native Tab of dsh-better-sidebar, adapting to both right sidebar and bottom panel layouts.

This is a client-side plugin maintained by KannaKuron, designed to address the limited functionality of DSH’s native Git panel. It provides complete branch management, commit graph visualization, and line-by-line diff viewing capabilities, while also supporting sending code snippets or commit references directly to the current session for convenient AI collaboration.

Core Features

  • Branch Tree Management: Supports HEAD / local / remote / tags grouping, with ahead/behind badges, and displays upstream and worktree occupancy markers.
  • Commit Graph: Displays lane topology and branch/tag ref badges, supports loading more commits and filtering by text, hash, or author.
  • Changes and Details: Supports line-by-line diffs with red/green highlighting and line numbers; clicking a file shows the full changes.
  • Send to Conversation: Supports right-clicking commits, branches, files, and diff selections to send them to the current session, automatically generating a reference format.
  • Dual Layout Adaptation: Uses a stacked layout in the right sidebar (narrow and tall) and a three-column layout in the bottom panel (wide and flat); starting from v0.13.0, it can also be mounted to tabs in the main conversation area.
  • Git Operations: Supports staging changes, discarding, restoring, resetting, as well as Cherry-pick, creating tags, and fetching/pulling/pushing.
  • Safety and Undo: Deleting a branch or stash can be undone within 30 minutes; write operations for the same repository are executed serially in the host.

Installation and Enablement

Run the following command in the host terminal to install the plugin:

dsh plugin --profile web add dsh-ide-git

After installation, the plugin registers automatically. If dsh-better-sidebar is already installed, the panel appears as a native Tab in the sidebar; if the base plugin is not installed, the panel also automatically appears in the Guide page of DSH’s native right sidebar.

Typical Usage

  1. Send Reference: Right-click a commit or branch in the panel and choose “Send to Conversation” to insert the reference into the current session.
  2. Send Code Snippet: Select code lines in the diff window and right-click, then choose “Send Selected Lines to Conversation” to send a specific code segment to the chat.
  3. View Changes: Click a file line in the changes list or commit details to view the line-by-line diff.

Applicable Scenarios and Notes

  • Dependency Requirements: Requires host DSH version >= 0.1.6-alpha.2 and Node.js >= 18.
  • Icon Handling: Does not depend on the ui-primitives icon set and uses built-in SVGs.
  • Operational Safety: Write operations (such as deleting branches and resetting) are executed serially in the host to prevent concurrency conflicts.
  • Undo Mechanism: Delete operations have a 30-minute window during which they can be undone via a floating window or the top-bar entry.

This plugin provides DSH with a full-featured Git tools window, making it suitable for developers who frequently switch branches, review code, and collaborate with AI.

Catalog page: https://www.skillhub.cn/plugins/KannaKuron/dsh-ide-git
Source code: https://github.com/KannaKuron/dsh-ide-git