mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 06:59:06 +00:00
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:
parent
095c7fb58a
commit
c348d88309
2 changed files with 22 additions and 4 deletions
|
|
@ -27,8 +27,16 @@ const formatPreviousPlans = (tasks: TaskPlan): string => {
|
||||||
|
|
||||||
Overall task summary:\n</task-summary>\n${task.summary || "No overall task summary found"}\n</task-summary>
|
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:
|
Individual tasks & their summaries you generated to complete this request:
|
||||||
${activePlanItems.map((planItem) => `<plan-item index="${planItem.index}">${planItem.plan}</plan-item>`).join("\n")}
|
${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>`;
|
</previous-task>`;
|
||||||
})
|
})
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import {
|
||||||
getActivePlanItems,
|
getActivePlanItems,
|
||||||
getActiveTask,
|
getActiveTask,
|
||||||
} from "@open-swe/shared/open-swe/tasks";
|
} from "@open-swe/shared/open-swe/tasks";
|
||||||
|
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
|
||||||
|
|
||||||
const logger = createLogger(LogLevel.INFO, "GenerateConclusionNode");
|
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,
|
activeTaskId,
|
||||||
getMessageContentString(response.content),
|
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 {
|
return {
|
||||||
messages: [response],
|
messages: [response],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue