dsh-sidebar-git: DeepSeek Harness Right Sidebar Git Tab

When developing agents in DeepSeek Harness, frequently checking repository changes, committing code, or switching branches often requires jumping to a terminal or external tools, interrupting the development flow. dsh-sidebar-git is a Git plugin natively integrated into the right sidebar. It follows the repository of the current session, providing features such as change viewing, staging/committing, branch switching, and remote synchronization, allowing Git operations without leaving the session page.

Core Features

  • Native Sidebar Tab: Registered as the sidebar-git type, placed alongside chat and terminal. It does not rely on third-party UI libraries and uses the DSH built-in component library for rendering.
  • Session-Bound: By default, it automatically resolves the current session’s working directory (cwd) and supports manual rebinding. When the session is not inside a repository, it provides an empty state form for binding.
  • Change Viewing: Displays staged, unstaged, and untracked files in groups. Supports inline diff expansion with colored addition/deletion lines and file statistics.
  • Commit & Push: A bottom card-style commit box supports amending the last commit. Push and pull operations only support the --ff-only mode.
  • Branch & Stash Management: Supports branch switching, creation, deletion, and push/pull operations. Stash supports push, pop, apply, and drop.
  • Tiered Dangerous Operations: For destructive operations (like deleting branches), a prepare -> confirm mechanism is adopted to prevent accidental triggers.
  • Real-time Status Feedback: Polls the /overview interface to aggregate branch status and file changes in real-time.

Installation & Activation

The installation script automatically handles symlinks, dependency mounting, and cleanup of old scripts. No need to use dsh plugin add.

node tools/install-into-profile.mjs

To temporarily disable without uninstalling, edit the profile’s cordis.patch.yml and add disabled: true.

- id: sidebar-git
  name: dsh-sidebar-git
  disabled: true

Typical Usage

  • View Changes: Open the Git tab to see the current list of file changes. Click on a row to expand and view the specific diff content.
  • Manual Path Binding: If the current session is not in any repository directory, the page will display an empty state. Simply fill in the repository path in the input box and confirm to bind.
  • Switch Branches: Click the branch chip at the top of the branch tab to switch, or click the create button to create and switch to a new branch.
  • Commit Code: Fill in the information in the commit card at the bottom. After committing, you can click to push to the remote or pull code from the remote.

Security & Boundaries

  • The plugin does not provide an arbitrary Git command input box, nor does it perform shell concatenation or parameter template injection.
  • It explicitly does not perform reset --hard, clean, push --force (non-lease), cherry-pick, rebase, or provide merge conflict resolution UI.
  • Credentials are entirely delegated to the user’s own git credential helper; the plugin does not read, store, or transmit any credentials.
  • The pull operation is fixed to --ff-only. If a merge or rebase is needed, terminal guidance will be provided.
  • regarding concurrency design, both the Agent and this plugin can modify the workspace; the real-time status is taken as the source of truth.

Conclusion

dsh-sidebar-git provides a lightweight solution for completing basic Git workflows within the DSH environment. It strikes a balance between convenience and security through strict operation tiering and parameter validation.

Plugin Directory Page
GitHub Repository

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye