mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-06 20:32:12 +00:00
fix: Remove incorrect check and error (#411)
This commit is contained in:
parent
a1d9b88d69
commit
7935e02897
1 changed files with 0 additions and 7 deletions
|
|
@ -17,7 +17,6 @@ import { createLogger, LogLevel } from "../../../utils/logger.js";
|
||||||
import { getMessageContentString } from "@open-swe/shared/messages";
|
import { getMessageContentString } from "@open-swe/shared/messages";
|
||||||
import { getMessageString } from "../../../utils/message/content.js";
|
import { getMessageString } from "../../../utils/message/content.js";
|
||||||
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks";
|
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 { createConversationHistorySummaryToolFields } from "@open-swe/shared/open-swe/tools";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants";
|
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants";
|
||||||
|
|
@ -166,12 +165,6 @@ export async function summarizeHistory(
|
||||||
state: GraphState,
|
state: GraphState,
|
||||||
config: GraphConfig,
|
config: GraphConfig,
|
||||||
): Promise<GraphUpdate> {
|
): 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 model = await loadModel(config, Task.SUMMARIZER);
|
||||||
|
|
||||||
const userRequest = getUserRequest(state.messages);
|
const userRequest = getUserRequest(state.messages);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue