fix: Save overall task summary in gh issue (#287)

* fix: Save overall task summary in gh issue

* cr

* drop unused util
This commit is contained in:
Brace Sproul 2025-06-20 13:44:21 -07:00 • committed by GitHub
parent 095c7fb58a
commit c348d88309
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 4 deletions

View file

@ -24,11 +24,19 @@ const formatPreviousPlans = (tasks: TaskPlan): string => {
return `<previous-task index="${task.taskIndex}">
User request: ${task.request}
Overall task summary:\n</task-summary>\n${task.summary || "No overall task summary found"}\n</task-summary>
Individual tasks you generated to complete this request:
${activePlanItems.map((planItem) => `<plan-item index="${planItem.index}">${planItem.plan}</plan-item>`).join("\n")}
Individual tasks & their summaries you generated to complete this request:
${activePlanItems
.map(
(planItem) => `
<plan-item index="${planItem.index}">
Plan: ${planItem.plan}
Summary: ${planItem.summary || "No summary found for this task."}
</plan-item>`,
)
.join("\n ")}
</previous-task>`;
})
.join("\n");

View file

@ -14,6 +14,7 @@ import {
getActivePlanItems,
getActiveTask,
} from "@open-swe/shared/open-swe/tasks";
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
const logger = createLogger(LogLevel.INFO, "GenerateConclusionNode");
@ -68,6 +69,15 @@ Given all of this, please respond with the concise conclusion. Do not include an
activeTaskId,
getMessageContentString(response.content),
);
// Update the github issue to include the new overall task summary.
await addTaskPlanToIssue(
{
githubIssueId: state.githubIssueId,
targetRepository: state.targetRepository,
},
config,
updatedTaskPlan,
);
return {
messages: [response],