@tangle-network/agent-app 3.0.14 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/assistant/index.js
CHANGED
|
@@ -333,8 +333,8 @@ function defaultReconnectDelayMs(attempt, rand = Math.random) {
|
|
|
333
333
|
async function streamChatTurn(opts) {
|
|
334
334
|
const res = await settleTurnResponse(await opts.start(), (phase) => opts.callbacks.onPhase?.(phase));
|
|
335
335
|
if (!res.ok || !res.body) {
|
|
336
|
-
const
|
|
337
|
-
throw new Error(
|
|
336
|
+
const { error: e } = await res.json().catch(() => ({}));
|
|
337
|
+
throw Object.assign(new Error((typeof e === "string" ? e : e?.message) ?? `HTTP ${res.status}`), { code: typeof e === "object" ? e?.code : void 0 });
|
|
338
338
|
}
|
|
339
339
|
let turnId = res.headers.get("x-turn-id")?.trim() || null;
|
|
340
340
|
const withTurnId = {
|
|
@@ -8832,4 +8832,4 @@ export {
|
|
|
8832
8832
|
AgentProfileChoices,
|
|
8833
8833
|
ComposerProfilePill
|
|
8834
8834
|
};
|
|
8835
|
-
//# sourceMappingURL=chunk-
|
|
8835
|
+
//# sourceMappingURL=chunk-EYPYU4PZ.js.map
|