diff --git a/apps/open-swe/src/graphs/planner/utils/followup.ts b/apps/open-swe/src/graphs/planner/utils/followup.ts index cec5937d..213e3085 100644 --- a/apps/open-swe/src/graphs/planner/utils/followup.ts +++ b/apps/open-swe/src/graphs/planner/utils/followup.ts @@ -24,11 +24,19 @@ const formatPreviousPlans = (tasks: TaskPlan): string => { return ` User request: ${task.request} - + Overall task summary:\n\n${task.summary || "No overall task summary found"}\n - - Individual tasks you generated to complete this request: - ${activePlanItems.map((planItem) => `${planItem.plan}`).join("\n")} + + Individual tasks & their summaries you generated to complete this request: +${activePlanItems + .map( + (planItem) => ` + + Plan: ${planItem.plan} + Summary: ${planItem.summary || "No summary found for this task."} + `, + ) + .join("\n ")} `; }) .join("\n"); diff --git a/apps/open-swe/src/graphs/programmer/nodes/generate-conclusion.ts b/apps/open-swe/src/graphs/programmer/nodes/generate-conclusion.ts index 0ec63188..dcca2e3d 100644 --- a/apps/open-swe/src/graphs/programmer/nodes/generate-conclusion.ts +++ b/apps/open-swe/src/graphs/programmer/nodes/generate-conclusion.ts @@ -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],