qtjg/dsh-plugin-git-context ↗★ 0

@qtjg/dsh-plugin-git-context

A DeepSeek Harness plugin that exposes bounded Git status, diff, and log context to the model. 适合需要让大模型读取Git仓库状态、进行代码评审的开发人员。

Package
@qtjg/dsh-plugin-git-context
Compatibility
Unverified
Harness peer range
>=0.1.0-rc.8
Cordis peer range
>=0.1.0-rc.8
Version
0.2.0
License
MIT
Last updated
Sep 14, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

Configuration

FieldDefaultDescription
cwdHarness process directoryDirectory passed to Git as its working directory.
maxBytes100000Maximum retained bytes for each ordinary Git output stream. The retained value is the stream tail when the limit is exceeded.
maxLogEntries20Maximum number of commits accepted by git_context log.
graceMs2000Process-tree termination grace period used by the subprocess service.
reviewProviderunsetRegistered ctx.llm provider route used by git_review. Required for review.
reviewModelunsetModel id passed to the configured LLM provider. Required for review.
reviewMaxTokens2000Maximum output tokens for one review call.
reviewMaxDiffBytes50000Maximum diff bytes sent to the review model.

The plugin validates positive integer limits at load time and rejects unsupported argument combinations before starting Git or an LLM call.

Usage

Ask the model for a repository view:

Use git_context with operation=status.
Use git_context with operation=diff and path=packages/core/tools/src/index.ts.
Use git_context with operation=log and limit=10.

Ask the model for an independent review:

Use git_review on the current unstaged changes.
Use git_review with path=src/index.ts and focus on security and data-loss risks.

git_review first obtains an unstaged diff through ctx.subprocess. If the diff is empty, it returns a clean result without making an LLM request. Otherwise it creates a Harness-native one-shot ctx.llm.stream call with a dedicated review system instruction and the diff delimited as untrusted data. The result includes the provider, model, review text, workspace, and whether the diff was truncated before the model call.