mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +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
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue