Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

agents-call: keep the file at its 1,000-line limit after the long-result reader

milind-sonidefb4366d025
diff --git a/server/drivers/agents-call.ts b/server/drivers/agents-call.ts
index 859dac8bf8..87023d7de2 100644
--- a/server/drivers/agents-call.ts
+++ b/server/drivers/agents-call.ts
@@ -14,8 +14,7 @@ import { catalogProfileFromEnv, fullInputSchema, SHARED_COMPUTER_TOOL_NAMES } fr
import { harnessClientFromEnv } from "./agents-client.ts";
import type { HarnessClient, Json } from "./agents-client.ts";
import { memorySavedText, memorySearchText, threadReadText, threadsListText } from "./memory-search-text.ts";
-import { apiAnswer, boundedAgentResult } from "./agents-result.ts";
-import { assignmentResultLines, isAssignmentResultRead, readAssignmentResult, resultPartLines } from "./agents-assignment-result.ts";
+import { apiAnswer, boundedAgentResult } from "./agents-result.ts"; import { assignmentResultLines, isAssignmentResultRead, readAssignmentResult, resultPartLines } from "./agents-assignment-result.ts";
import { argumentNames, outOfBounds } from "./agents-schema.ts";
import { dropBlankArguments } from "./agents-blank-arguments.ts";
import { callResearchTool, RESEARCH_TOOL_NAMES } from "./agents-research-tools.ts";
@@ -99,8 +98,7 @@ function renderAssignmentStatus(r: Json, id: string): string {
if (question && (a.status === "needs_input" || a.outcome === "needs_input")) {
lines.push(`It is parked on a question for the person: ${JSON.stringify(question)}. Nothing moves until the person answers it in that thread; tell them and do not keep checking.`);
}
- const part = jsonRecord(raw.resultPart) ? raw.resultPart : undefined;
- if (part) return [lines[0], ...resultPartLines(part, id)].join("\n");
+ if (jsonRecord(raw.resultPart)) return [lines[0], ...resultPartLines(raw.resultPart, id)].join("\n");
lines.push(...assignmentResultLines(a, id));
const children = Array.isArray(r.children) ? r.children.filter(jsonRecord) : [];
if (children.length) lines.push("Its own hand-offs:", ...children.map((child) => `- ${assignmentLine(child)}`));