Separate short review context from full supervisor orientation

This commit is contained in:
wassname
2026-09-09 10:35:39 +08:00
parent e19028e330
commit a7385d4b76
6 changed files with 79 additions and 23 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ it("runs a forked Pi supervisor and receives its exact instruction in another Pi
let body = "";
for await (const chunk of request) body += chunk;
const input = JSON.parse(body);
const latest = input.messages.at(-1);
const latest = input.messages.filter((message: any) => !JSON.stringify(message.content).includes("Full active plan:")).at(-1);
const steer = latest.role === "user" && JSON.stringify(latest.content).includes("The worker stopped.");
if (steer) supervisorTools = input.tools.map((tool: any) => tool.function.name);
response.writeHead(200, { "content-type": "text/event-stream" });