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仓库状态、进行代码评审的开发人员。

パッケージ
@qtjg/dsh-plugin-git-context
互換性
未検証
Harness ピア範囲
>=0.1.0-rc.8
Cordis ピア範囲
>=0.1.0-rc.8
バージョン
0.2.0
ライセンス
MIT
最終更新
2026/09/14

インストール

検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗

ドキュメント

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.