You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c9c4e74
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: plugins/opencode/scripts/lib/prompts.mjs
+53-30Lines changed: 53 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,24 @@ import {
16
16
getPrDiff,
17
17
}from"./git.mjs";
18
18
19
-
// Inline-diff thresholds. When a review exceeds either, we fall back to a
20
-
// "self-collect" context that omits the full diff and asks OpenCode to
21
-
// inspect the change itself via read-only git commands. See issue #40 and
22
-
// openai/codex-plugin-cc#179.
19
+
// Inline-diff thresholds. When a review exceeds either, we keep the prompt
20
+
// bounded by including a diff excerpt instead of the full diff. The review
21
+
// agent is intentionally shell-disabled, so the prompt must contain the
22
+
// evidence the model is allowed to use.
23
23
constDEFAULT_INLINE_DIFF_MAX_FILES=5;
24
24
constDEFAULT_INLINE_DIFF_MAX_BYTES=256*1024;
25
25
26
-
functionbuildCollectionGuidance(includeDiff){
27
-
returnincludeDiff
26
+
functionbuildCollectionGuidance(diffIsComplete){
27
+
returndiffIsComplete
28
28
? "Use the repository context below as primary evidence."
29
-
: "The repository context below is a lightweight summary. The full diff is intentionally omitted — inspect the target yourself with read-only git commands (git diff, git log, git show) before finalizing findings.";
29
+
: "The repository context below contains a bounded diff excerpt, not the complete diff. Only report findings supported by the provided excerpt, metadata, status, and changed-file list; explicitly say when omitted diff content prevents a conclusion.";
0 commit comments