mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(clawsweeper): address review for gitcrawl-1599-fix-register-abortcontroller-for-agent-rpc-runs-so-chat-abort-wo (validation-1)
This commit is contained in:
@@ -269,13 +269,13 @@ function chatRunWatchdogResultIsTerminal(
|
||||
if (status !== "timeout" && status !== "timed_out") {
|
||||
return true;
|
||||
}
|
||||
return Boolean(
|
||||
return (
|
||||
result?.endedAt != null ||
|
||||
result?.error != null ||
|
||||
result?.stopReason != null ||
|
||||
result?.livenessState != null ||
|
||||
result?.yielded === true ||
|
||||
result?.pendingError === true,
|
||||
result?.error != null ||
|
||||
result?.stopReason != null ||
|
||||
result?.livenessState != null ||
|
||||
result?.yielded === true ||
|
||||
result?.pendingError === true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function createHost() {
|
||||
chatMessages: [],
|
||||
chatToolMessages: [],
|
||||
chatStream: null,
|
||||
chatRunId: null,
|
||||
chatRunId: null as string | null,
|
||||
chatRunLastActivityAt: null as number | null,
|
||||
chatRunWatchdogTimer: null as ReturnType<typeof globalThis.setTimeout> | number | null,
|
||||
chatRunWatchdogProbeInFlight: false,
|
||||
|
||||
@@ -2164,6 +2164,7 @@ describe("chat run watchdog", () => {
|
||||
toolStreamOrder: [],
|
||||
chatToolMessages: [],
|
||||
chatStreamSegments: [],
|
||||
updateComplete: Promise.resolve(),
|
||||
basePath: "",
|
||||
settings: {
|
||||
gatewayUrl: "ws://gateway.test/control",
|
||||
@@ -2212,7 +2213,7 @@ describe("chat run watchdog", () => {
|
||||
});
|
||||
expect(request).toHaveBeenCalledWith(
|
||||
"chat.history",
|
||||
expect.objectContaining({ sessionKey: "main", limit: 200 }),
|
||||
expect.objectContaining({ sessionKey: "main", limit: 100 }),
|
||||
);
|
||||
expect(request).toHaveBeenCalledWith(
|
||||
"chat.send",
|
||||
|
||||
Reference in New Issue
Block a user