fix(web-probe): avoid analyzer-only helper in observer

This commit is contained in:
Codex
2026-06-20 17:44:15 +00:00
parent 28191b96b0
commit f520f6fe77
@@ -369,7 +369,13 @@ async function sendPrompt(text) {
if (chatStatus < 200 || chatStatus >= 300) {
throw new Error("sendPrompt observed POST /v1/agent/chat HTTP " + chatStatus + " " + chatResponse.statusText());
}
return { beforeUrl, afterUrl: currentPageUrl(), textHash: sha256Text(text), textBytes: Buffer.byteLength(text), chatSubmit: { status: chatStatus, statusText: chatResponse.statusText(), urlPath: urlPath(chatResponse.url()) }, pageId };
let chatUrlPath = "/v1/agent/chat";
try {
chatUrlPath = new URL(chatResponse.url()).pathname;
} catch {
chatUrlPath = "/v1/agent/chat";
}
return { beforeUrl, afterUrl: currentPageUrl(), textHash: sha256Text(text), textBytes: Buffer.byteLength(text), chatSubmit: { status: chatStatus, statusText: chatResponse.statusText(), urlPath: chatUrlPath }, pageId };
}
async function selectProvider(provider) {