fix: Remove incorrect check and error (#411)

This commit is contained in:
Brace Sproul 2025-07-15 07:57:56 -07:00 • committed by GitHub
parent a1d9b88d69
commit 7935e02897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,6 @@ import { createLogger, LogLevel } from "../../../utils/logger.js";
import { getMessageContentString } from "@open-swe/shared/messages";
import { getMessageString } from "../../../utils/message/content.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks";
import { getCompletedPlanItems } from "../../../utils/current-task.js";
import { createConversationHistorySummaryToolFields } from "@open-swe/shared/open-swe/tools";
import { z } from "zod";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants";
@ -166,12 +165,6 @@ export async function summarizeHistory(
state: GraphState,
config: GraphConfig,
): Promise<GraphUpdate> {
const activePlanItems = getActivePlanItems(state.taskPlan);
const lastCompletedTask = getCompletedPlanItems(activePlanItems).pop();
if (!lastCompletedTask) {
throw new Error("Unable to find last completed task.");
}
const model = await loadModel(config, Task.SUMMARIZER);
const userRequest = getUserRequest(state.messages);