opencode-magi 0.0.0-dev-20260714072606 → 0.0.0-dev-20260714075857
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MagiError } from "@/magi";
|
|
2
2
|
import { Prompt } from "@/prompts";
|
|
3
|
-
import { filterEmpty, marker, omitNullish, retry, Worker } from "@/utils";
|
|
3
|
+
import { filterEmpty, marker, omitNullish, retry, toTitleCase, Worker, } from "@/utils";
|
|
4
4
|
export async function review() {
|
|
5
5
|
this.context.abort.throwIfAborted();
|
|
6
6
|
await this.updateEvent(`Reviewing.`);
|
|
@@ -102,6 +102,27 @@ export async function review() {
|
|
|
102
102
|
if (!prompt.validate(parsed))
|
|
103
103
|
throw new Error(`Invalid output for reviewer ${id}.`);
|
|
104
104
|
validateInlineCommentTargets(status, parsed, inlineCommentTargets);
|
|
105
|
+
const findings = parsed.findings ?? parsed.newFindings ?? [];
|
|
106
|
+
await this.updateEvent(filterEmpty([
|
|
107
|
+
`Finished ${label} with reviewer ${id}.`,
|
|
108
|
+
`Verdict: ${toTitleCase(parsed.verdict.toLocaleLowerCase())}.`,
|
|
109
|
+
parsed.comment ? `Comment:\n${parsed.comment}` : undefined,
|
|
110
|
+
findings.length
|
|
111
|
+
? `Findings:\n${findings
|
|
112
|
+
.map(({ body, line, path, startLine }) => `- ${path}:${startLine != null ? `${startLine}-` : ""}${line}: ${body}`)
|
|
113
|
+
.join("\n")}`
|
|
114
|
+
: undefined,
|
|
115
|
+
parsed.followUps?.length
|
|
116
|
+
? `FollowUps:\n${parsed.followUps
|
|
117
|
+
.map(({ body, commentId }) => `- Comment ${commentId}: ${body}`)
|
|
118
|
+
.join("\n")}`
|
|
119
|
+
: undefined,
|
|
120
|
+
parsed.resolves?.length
|
|
121
|
+
? `Resolved threads:\n${parsed.resolves
|
|
122
|
+
.map(({ commentId, threadId }) => `- Comment ${commentId} in thread ${threadId}`)
|
|
123
|
+
.join("\n")}`
|
|
124
|
+
: undefined,
|
|
125
|
+
]).join("\n\n"));
|
|
105
126
|
return parsed;
|
|
106
127
|
}, {
|
|
107
128
|
error: (_, count) => this.updateEvent(`Attempt ${count} failed to ${label} with reviewer ${id}. Retrying...`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260714075857",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|