Update job summary with progress comment content

Modified reportProgress() to write the same content to core.summary
with overwrite: true. This replaces the verbose log accumulation with
the concise progress updates that stakeholders see in comments.

The job summary now stays in sync with the progress comment,
providing a clean overview of the agent's work rather than
accumulated logs throughout execution.

Fixes #17
This commit is contained in:
pullfrog
2026-01-12 09:07:13 +00:00
parent 5fa8c3603d
commit 074a860a95
2 changed files with 1245 additions and 1245 deletions
+1229 -1245
View File
File diff suppressed because one or more lines are too long
+16
View File
@@ -1,3 +1,4 @@
import * as core from "@actions/core";
import { type } from "arktype";
import type { Payload } from "../external.ts";
import { agentsManifest } from "../external.ts";
@@ -234,6 +235,11 @@ export async function reportProgress(
progressCommentWasUpdated = true;
// update job summary with the same content as the progress comment
if (process.env.GITHUB_ACTIONS) {
await core.summary.addRaw(bodyWithFooter).write({ overwrite: true });
}
return {
commentId: result.data.id,
url: result.data.html_url,
@@ -281,6 +287,11 @@ export async function reportProgress(
body: bodyWithPlanLink,
});
// update job summary with the same content as the progress comment
if (process.env.GITHUB_ACTIONS) {
await core.summary.addRaw(bodyWithPlanLink).write({ overwrite: true });
}
return {
commentId: updateResult.data.id,
url: updateResult.data.html_url,
@@ -289,6 +300,11 @@ export async function reportProgress(
};
}
// update job summary with the same content as the progress comment
if (process.env.GITHUB_ACTIONS) {
await core.summary.addRaw(initialBody).write({ overwrite: true });
}
return {
commentId: result.data.id,
url: result.data.html_url,