dsh-git-decorations: Display Read-Only Git Status in the DSH Native File Tree

Preface

When browsing workspace files in DeepSeek Harness (DSH), the native file tree usually does not carry Git workspace status. To see distinguishable markers like “Modified”, “Untracked”, and “Staged” in the tree, one often needs to open a separate terminal to run git status, or interpret it together with icon-changing plugins. The positioning of dsh-git-decorations is to perform read-only status colors and badges on the DSH native file tree, separate from dsh-icons, installable and usable simultaneously. Below is an introduction to what it does, how to install it, and the boundaries and security constraints during use.

What is it

  • Name: dsh-git-decorations (Repository simonguo/dsh-git-decorations)
  • Maintainer: Simon Guo (simonguo)
  • Community Category: Fun Outfits (SkillHub Directory Page)
  • npm Description: Read-only Git status colors and badges in the native DSH file tree.
  • License: MIT (see repository package.json)
  • Current npm version: 0.1.0

The plugin does not modify file icon logic, nor does it take over click or right-click menus; it only colors paths and displays short markers based on Git status.

Core Features

Status and Display Rules

The mapping provided in the README is as follows (colors follow DSH theme semantic colors, not hardcoded VS Code specific values):

Status Marker Color
Modified M Theme warning color (usually yellow)
Untracked U Theme success color (usually green)
Staged Added A Theme success color
Renamed R Theme emphasis color
Deleted D Theme error color
Conflict ! Theme error color
Ignored None Theme secondary text color
Changes in directory ● Highest priority status color within the directory

Refresh Method

  • The session title bar provides a Git button for manual refresh; hovering shows the status.
  • Automatically refreshes every 8 seconds; refresh pauses when the page is hidden.
  • Switching sessions removes old decorations (managed by the session title bar component).

Version 1.0 Boundaries (Explicitly stated in README)

  • Relies on DSH native data-files-path and line structure (verified in 0.2.2-rc.1 environment).
  • Only reads status when there is an active session.
  • Untracked directories use Git’s normal mode to summarize, not enumerating every new file inside; ignored directories are also represented by the directory item.
  • Files that have been deleted and are no longer in the native file tree can only be reflected by the directory dot.
  • Clean repositories have no extra colors; non-Git repositories do not show decorations.
  • Git status refresh does not equal real-time refresh per file event.

Installation and Activation

Registration in DSH follows the Plugin Manager / CLI; simply running npm install will only download the package and will not automatically register it to DSH, nor is global npm installation required.

npm package: dsh-git-decorations.

Let the DSH assistant install and enable it via Plugin Manager:

{"action":"install_bundle","target":"dsh-git-decorations"}

Or use DSH CLI (replace web with the actual Profile name):

dsh plugin --profile web add dsh-git-decorations

From Source or Release

The repository README also provides: cloning the source code and pointing install_bundle to an absolute path, or installing the GitHub Release pre-built package. After installing via local link, the directory must be kept; closing the plugin restores default display. Market listing application can be found at awesome-dsh-plugin #14287, subject to review and merge.

Typical Usage

After installation and activation, simply open the file tree in a DSH session bound to a Git workspace:

  1. After modifying, adding, or staging files, the corresponding line should appear with the marker and theme color from the table above.
  2. If the tree hasn’t updated, manually refresh by clicking the Git button in the session title bar, or wait for the automatic refresh (interval 8 seconds).
  3. If dsh-icons is installed simultaneously, the two sets of capabilities do not interfere and can be used in parallel.

In non-repository directories or clean repositories, extra decorations should not appear, which can be used to confirm that the plugin only works within a Git context.

Performance and Security

The constraints in the README can serve as review points before installation (the plugin runs under current dsh process permissions; it is recommended to review the source code and MIT license before installing):

  • Only calls git rev-parse and git status via execFile with parameters; does not concatenate shell commands.
  • Does not execute add/commit/reset, does not read file contents, and does not scan history.
  • The service only accepts existing session IDs of authenticated owners; directories are determined by the host session, and the client cannot pass arbitrary paths.
  • Single Git command timeout 8 seconds, output limit 4 MiB; returns at most 10,000 changed items.
  • Host cache 5 seconds, merges concurrent requests; does not rebuild styles if client results are unchanged.
  • When the workspace root is not a Git repository, it probes at most 32 direct non-hidden subdirectories and does not recursively search for a repository.
  • No MutationObserver, full DOM scanning, or file tree replacement; CSS only generates rules for changed paths.

Development side requires Node.js 22+, local Git, and no third-party dependencies; test commands are node --test tests/*.test.js and node --check client.js.

Applicable Scenarios and Notes

Suitable for: Developers who want to quickly align the “paths seen in the tree” with git status in a DSH Web session, without binding icon plugins and status decorations to the same installation chain.

Notes:

  • Status is pulled periodically, not IDE-level real-time file watching; large change sets are constrained by the 10,000 items and 4 MiB output limit.
  • Version 1.0 is strongly related to the DSH native file tree structure; when upgrading DSH, pay attention to the version notes in the README.
  • Platforms like SkillHub are community directories and have no official affiliation with DeepSeek / Hypothesis; GitHub stars are subject to what is displayed on the page (directory activity is 0).

Conclusion

dsh-git-decorations overlays read-only Git decorations on the native file tree, packaged and used separately from icon plugins, with clear refresh strategies and permission boundaries described in the README. To learn more or submit an Issue, visit the SkillHub plugin page and the GitHub repository.

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

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

Xiaoye