qtjg/dsh-plugin-git-context ↗★ 0
@qtjg/dsh-plugin-git-context
Git状态、差异与提交历史上下文插件 适合需要让大模型读取Git仓库状态、进行代码评审的开发人员。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗Configuration
| Field | Default | Description |
|---|---|---|
cwd | Harness process directory | Directory passed to Git as its working directory. |
maxBytes | 100000 | Maximum retained bytes for each ordinary Git output stream. The retained value is the stream tail when the limit is exceeded. |
maxLogEntries | 20 | Maximum number of commits accepted by git_context log. |
graceMs | 2000 | Process-tree termination grace period used by the subprocess service. |
reviewProvider | unset | Registered ctx.llm provider route used by git_review. Required for review. |
reviewModel | unset | Model id passed to the configured LLM provider. Required for review. |
reviewMaxTokens | 2000 | Maximum output tokens for one review call. |
reviewMaxDiffBytes | 50000 | Maximum 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.