@helpai/elements 0.52.4 → 0.52.5
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 +22 -22
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +22 -22
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +22 -22
- package/elements.esm.js.map +3 -3
- package/elements.js +22 -22
- package/elements.js.map +3 -3
- package/index.mjs +14 -1
- package/package.json +1 -1
- package/web-component.mjs +14 -1
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.52.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.52.5" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -6035,6 +6035,18 @@ function MessageList({
|
|
|
6035
6035
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6036
6036
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6037
6037
|
}, [messages.value.length]);
|
|
6038
|
+
const prevLastIdRef = useRef5(null);
|
|
6039
|
+
useEffect7(() => {
|
|
6040
|
+
const el = ref.current;
|
|
6041
|
+
const last = messages.value.at(-1);
|
|
6042
|
+
const prevLastId = prevLastIdRef.current;
|
|
6043
|
+
prevLastIdRef.current = last?.id ?? null;
|
|
6044
|
+
if (!el) return;
|
|
6045
|
+
if (!hasHydratedRef.current) return;
|
|
6046
|
+
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6047
|
+
detachedRef.current = false;
|
|
6048
|
+
return pinBottomSoon(el, 3);
|
|
6049
|
+
}, [messages.value]);
|
|
6038
6050
|
useEffect7(() => {
|
|
6039
6051
|
const el = ref.current;
|
|
6040
6052
|
if (!el) return;
|
|
@@ -8235,6 +8247,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8235
8247
|
last.partsSig.value = [...last.partsSig.value];
|
|
8236
8248
|
if (!allToolPartsSettled(last)) return;
|
|
8237
8249
|
last.status = "streaming";
|
|
8250
|
+
messagesSig.value = [...messagesSig.value];
|
|
8238
8251
|
reducer.attach(last);
|
|
8239
8252
|
void streamAssistant(last, { continueExisting: true });
|
|
8240
8253
|
},
|
package/package.json
CHANGED
package/web-component.mjs
CHANGED
|
@@ -1790,7 +1790,7 @@ function createAuth(opts) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
1792
|
// src/core/version.ts
|
|
1793
|
-
var ELEMENTS_VERSION = true ? "0.52.
|
|
1793
|
+
var ELEMENTS_VERSION = true ? "0.52.5" : "0.0.0-dev";
|
|
1794
1794
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1795
1795
|
|
|
1796
1796
|
// src/stream/types.ts
|
|
@@ -5994,6 +5994,18 @@ function MessageList({
|
|
|
5994
5994
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
5995
5995
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
5996
5996
|
}, [messages.value.length]);
|
|
5997
|
+
const prevLastIdRef = useRef5(null);
|
|
5998
|
+
useEffect7(() => {
|
|
5999
|
+
const el = ref.current;
|
|
6000
|
+
const last = messages.value.at(-1);
|
|
6001
|
+
const prevLastId = prevLastIdRef.current;
|
|
6002
|
+
prevLastIdRef.current = last?.id ?? null;
|
|
6003
|
+
if (!el) return;
|
|
6004
|
+
if (!hasHydratedRef.current) return;
|
|
6005
|
+
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6006
|
+
detachedRef.current = false;
|
|
6007
|
+
return pinBottomSoon(el, 3);
|
|
6008
|
+
}, [messages.value]);
|
|
5997
6009
|
useEffect7(() => {
|
|
5998
6010
|
const el = ref.current;
|
|
5999
6011
|
if (!el) return;
|
|
@@ -8194,6 +8206,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8194
8206
|
last.partsSig.value = [...last.partsSig.value];
|
|
8195
8207
|
if (!allToolPartsSettled(last)) return;
|
|
8196
8208
|
last.status = "streaming";
|
|
8209
|
+
messagesSig.value = [...messagesSig.value];
|
|
8197
8210
|
reducer.attach(last);
|
|
8198
8211
|
void streamAssistant(last, { continueExisting: true });
|
|
8199
8212
|
},
|