@helpai/elements 0.61.0 → 0.61.1
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/elements-web-component.esm.js +2 -2
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +2 -2
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +2 -2
- package/elements.esm.js.map +3 -3
- package/elements.js +2 -2
- package/elements.js.map +3 -3
- package/index.mjs +8 -6
- package/package.json +1 -1
- package/web-component.mjs +8 -6
package/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var BRAND = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/core/version.ts
|
|
32
|
-
var ELEMENTS_VERSION = true ? "0.61.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.61.1" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -2238,7 +2238,7 @@ function messageToWireParts(m) {
|
|
|
2238
2238
|
var log6 = logger.scope("transport");
|
|
2239
2239
|
var MAX_RESUME_ATTEMPTS = 3;
|
|
2240
2240
|
var RESUME_BACKOFF_MS = 400;
|
|
2241
|
-
var POST_FINISH_DRAIN_MS =
|
|
2241
|
+
var POST_FINISH_DRAIN_MS = 2e4;
|
|
2242
2242
|
var CONTENT_CACHE_TTL_MS = 6e4;
|
|
2243
2243
|
var CONVERSATIONS_CACHE_TTL_MS = 1e4;
|
|
2244
2244
|
var MAX_REQUEST_RETRIES = 3;
|
|
@@ -2753,6 +2753,10 @@ var AgentTransport = class {
|
|
|
2753
2753
|
async *drain(source, seenIds, ctrl) {
|
|
2754
2754
|
let terminal = false;
|
|
2755
2755
|
let watchdog;
|
|
2756
|
+
const armWatchdog = () => {
|
|
2757
|
+
if (watchdog) clearTimeout(watchdog);
|
|
2758
|
+
watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS);
|
|
2759
|
+
};
|
|
2756
2760
|
try {
|
|
2757
2761
|
for await (const evt of source) {
|
|
2758
2762
|
if (ctrl.signal.aborted) return true;
|
|
@@ -2761,10 +2765,8 @@ var AgentTransport = class {
|
|
|
2761
2765
|
seenIds.add(evt.eventId);
|
|
2762
2766
|
}
|
|
2763
2767
|
yield evt;
|
|
2764
|
-
if (evt.chunk.type === "finish" || evt.chunk.type === "error")
|
|
2765
|
-
|
|
2766
|
-
watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
|
|
2767
|
-
}
|
|
2768
|
+
if (evt.chunk.type === "finish" || evt.chunk.type === "error") terminal = true;
|
|
2769
|
+
if (terminal) armWatchdog();
|
|
2768
2770
|
}
|
|
2769
2771
|
} catch (err) {
|
|
2770
2772
|
if (ctrl.signal.aborted) return true;
|
package/package.json
CHANGED
package/web-component.mjs
CHANGED
|
@@ -1930,7 +1930,7 @@ function createAuth(opts) {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
|
|
1932
1932
|
// src/core/version.ts
|
|
1933
|
-
var ELEMENTS_VERSION = true ? "0.61.
|
|
1933
|
+
var ELEMENTS_VERSION = true ? "0.61.1" : "0.0.0-dev";
|
|
1934
1934
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1935
1935
|
|
|
1936
1936
|
// src/stream/types.ts
|
|
@@ -2197,7 +2197,7 @@ function messageToWireParts(m) {
|
|
|
2197
2197
|
var log5 = logger.scope("transport");
|
|
2198
2198
|
var MAX_RESUME_ATTEMPTS = 3;
|
|
2199
2199
|
var RESUME_BACKOFF_MS = 400;
|
|
2200
|
-
var POST_FINISH_DRAIN_MS =
|
|
2200
|
+
var POST_FINISH_DRAIN_MS = 2e4;
|
|
2201
2201
|
var CONTENT_CACHE_TTL_MS = 6e4;
|
|
2202
2202
|
var CONVERSATIONS_CACHE_TTL_MS = 1e4;
|
|
2203
2203
|
var MAX_REQUEST_RETRIES = 3;
|
|
@@ -2712,6 +2712,10 @@ var AgentTransport = class {
|
|
|
2712
2712
|
async *drain(source, seenIds, ctrl) {
|
|
2713
2713
|
let terminal = false;
|
|
2714
2714
|
let watchdog;
|
|
2715
|
+
const armWatchdog = () => {
|
|
2716
|
+
if (watchdog) clearTimeout(watchdog);
|
|
2717
|
+
watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS);
|
|
2718
|
+
};
|
|
2715
2719
|
try {
|
|
2716
2720
|
for await (const evt of source) {
|
|
2717
2721
|
if (ctrl.signal.aborted) return true;
|
|
@@ -2720,10 +2724,8 @@ var AgentTransport = class {
|
|
|
2720
2724
|
seenIds.add(evt.eventId);
|
|
2721
2725
|
}
|
|
2722
2726
|
yield evt;
|
|
2723
|
-
if (evt.chunk.type === "finish" || evt.chunk.type === "error")
|
|
2724
|
-
|
|
2725
|
-
watchdog ?? (watchdog = setTimeout(() => ctrl.abort(), POST_FINISH_DRAIN_MS));
|
|
2726
|
-
}
|
|
2727
|
+
if (evt.chunk.type === "finish" || evt.chunk.type === "error") terminal = true;
|
|
2728
|
+
if (terminal) armWatchdog();
|
|
2727
2729
|
}
|
|
2728
2730
|
} catch (err) {
|
|
2729
2731
|
if (ctrl.signal.aborted) return true;
|