Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(debug): add wait for active thread id

Steven Enamakel4af8b18bb457
diff --git a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
index ada86b3da8..fd3a241f43 100644
--- a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
+++ b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
@@ -146,6 +146,13 @@ export default async function queuedImageAttachmentRoundtrip({
"the first model request",
30_000,
);
+ await page.waitForFunction(
+ (id) =>
+ window.__OPENHUMAN_STORE__?.getState?.().thread?.activeThreadIds?.[id] ===
+ true,
+ threadId,
+ { timeout: 10_000 },
+ );
// The queued turn will use this fast script; the already-running request has
// retained its delayed script.