Skip to content

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

test(debug): add assertion for initial chat response in roundtrip script

Steven Enamakel9ba3cc517c5c
diff --git a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
index 6ca4277759..86caf7ba92 100644
--- a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
+++ b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
@@ -150,6 +150,13 @@ export default async function queuedImageAttachmentRoundtrip({
"the first model request",
30_000,
);
+ const firstAck = await waitUntil(
+ () => rpcResponses.find((call) => call.method === "openhuman.channel_web_chat" && call.params?.message === "Hold this turn while I queue an image."),
+ "first channel_web_chat response",
+ );
+ if (typeof firstAck.result !== "string") {
+ throw new Error(`first chat response was not a legacy started request id: ${JSON.stringify(firstAck)}`);
+ }
await page.waitForFunction(
(id) =>
window.__OPENHUMAN_STORE__?.getState?.().thread?.activeThreadIds?.[id] ===