@helpai/elements 0.54.0 → 0.54.2
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 +20 -20
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +20 -20
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +20 -20
- package/elements.esm.js.map +3 -3
- package/elements.js +20 -20
- package/elements.js.map +3 -3
- package/index.d.ts +2 -2
- package/index.mjs +14 -5
- package/package.json +1 -1
- package/schema.d.ts +1 -1
- package/web-component.mjs +14 -5
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-C0db2AMV.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -82,7 +82,7 @@ type StringsOverride = LocaleStrings | Partial<Record<string, LocaleStrings>>;
|
|
|
82
82
|
* reconciled with the server's copy on each `connect()`.
|
|
83
83
|
*
|
|
84
84
|
* Everything EXCEPT `visitorId` is namespaced as
|
|
85
|
-
* `${brand.cssPrefix}.${widgetId}.${
|
|
85
|
+
* `${brand.cssPrefix}.${widgetId}.${aiAgentDeploymentId}.${field}` (the deployment id
|
|
86
86
|
* is dropped when absent) so two widgets — or two AI agent deployments — keep
|
|
87
87
|
* their state cleanly separated; pointing a widget at a different
|
|
88
88
|
* `aiAgentDeploymentId` starts from fresh conversation / prefs / panel state.
|
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.54.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.54.2" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -1489,8 +1489,8 @@ function fillRandom(view) {
|
|
|
1489
1489
|
|
|
1490
1490
|
// src/core/persistence.ts
|
|
1491
1491
|
var log2 = logger.scope("persistence");
|
|
1492
|
-
function createPersistence(widgetId, storage = defaultStorage,
|
|
1493
|
-
const scope =
|
|
1492
|
+
function createPersistence(widgetId, storage = defaultStorage, aiAgentDeploymentId) {
|
|
1493
|
+
const scope = aiAgentDeploymentId ? `${widgetId}.${aiAgentDeploymentId}` : widgetId;
|
|
1494
1494
|
const KEY_STORAGE_VERSION = `${BRAND.cssPrefix}.storageVersion`;
|
|
1495
1495
|
const activeVersion = storage.get(KEY_STORAGE_VERSION) ?? void 0;
|
|
1496
1496
|
const version2 = activeVersion ? `.v${activeVersion}` : "";
|
|
@@ -5838,6 +5838,15 @@ function MessageBubble({
|
|
|
5838
5838
|
const reasoningVisible = useComputed5(
|
|
5839
5839
|
() => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
|
|
5840
5840
|
);
|
|
5841
|
+
const lastOutputIdx = useComputed5(() => {
|
|
5842
|
+
const list = message.partsSig.value;
|
|
5843
|
+
let idx = -1;
|
|
5844
|
+
for (let i = 0; i < list.length; i++) {
|
|
5845
|
+
const kind = list[i]?.kind;
|
|
5846
|
+
if (kind === "text" || kind === "file" || kind === "source") idx = i;
|
|
5847
|
+
}
|
|
5848
|
+
return idx;
|
|
5849
|
+
});
|
|
5841
5850
|
const streaming = message.role === "assistant" && message.status === "streaming";
|
|
5842
5851
|
const bufferedHold = responseMode === "buffered" && streaming;
|
|
5843
5852
|
const working = streaming && !hasAnswerText.value;
|
|
@@ -5846,7 +5855,7 @@ function MessageBubble({
|
|
|
5846
5855
|
const stamp = formatStamp(message.createdAt);
|
|
5847
5856
|
return /* @__PURE__ */ jsx18("div", { class: `${p17}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
5848
5857
|
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
5849
|
-
bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx18(
|
|
5858
|
+
bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx18(
|
|
5850
5859
|
PartView,
|
|
5851
5860
|
{
|
|
5852
5861
|
part,
|
|
@@ -5855,7 +5864,7 @@ function MessageBubble({
|
|
|
5855
5864
|
showReasoning,
|
|
5856
5865
|
showToolCalls,
|
|
5857
5866
|
showSources,
|
|
5858
|
-
interactive,
|
|
5867
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
5859
5868
|
superseded,
|
|
5860
5869
|
tool
|
|
5861
5870
|
},
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-C0db2AMV.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
package/web-component.mjs
CHANGED
|
@@ -1523,8 +1523,8 @@ function fillRandom(view) {
|
|
|
1523
1523
|
|
|
1524
1524
|
// src/core/persistence.ts
|
|
1525
1525
|
var log2 = logger.scope("persistence");
|
|
1526
|
-
function createPersistence(widgetId, storage = defaultStorage,
|
|
1527
|
-
const scope =
|
|
1526
|
+
function createPersistence(widgetId, storage = defaultStorage, aiAgentDeploymentId) {
|
|
1527
|
+
const scope = aiAgentDeploymentId ? `${widgetId}.${aiAgentDeploymentId}` : widgetId;
|
|
1528
1528
|
const KEY_STORAGE_VERSION = `${BRAND.cssPrefix}.storageVersion`;
|
|
1529
1529
|
const activeVersion = storage.get(KEY_STORAGE_VERSION) ?? void 0;
|
|
1530
1530
|
const version = activeVersion ? `.v${activeVersion}` : "";
|
|
@@ -1880,7 +1880,7 @@ function createAuth(opts) {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
|
|
1882
1882
|
// src/core/version.ts
|
|
1883
|
-
var ELEMENTS_VERSION = true ? "0.54.
|
|
1883
|
+
var ELEMENTS_VERSION = true ? "0.54.2" : "0.0.0-dev";
|
|
1884
1884
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1885
1885
|
|
|
1886
1886
|
// src/stream/types.ts
|
|
@@ -5797,6 +5797,15 @@ function MessageBubble({
|
|
|
5797
5797
|
const reasoningVisible = useComputed5(
|
|
5798
5798
|
() => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
|
|
5799
5799
|
);
|
|
5800
|
+
const lastOutputIdx = useComputed5(() => {
|
|
5801
|
+
const list = message.partsSig.value;
|
|
5802
|
+
let idx = -1;
|
|
5803
|
+
for (let i = 0; i < list.length; i++) {
|
|
5804
|
+
const kind = list[i]?.kind;
|
|
5805
|
+
if (kind === "text" || kind === "file" || kind === "source") idx = i;
|
|
5806
|
+
}
|
|
5807
|
+
return idx;
|
|
5808
|
+
});
|
|
5800
5809
|
const streaming = message.role === "assistant" && message.status === "streaming";
|
|
5801
5810
|
const bufferedHold = responseMode === "buffered" && streaming;
|
|
5802
5811
|
const working = streaming && !hasAnswerText.value;
|
|
@@ -5805,7 +5814,7 @@ function MessageBubble({
|
|
|
5805
5814
|
const stamp = formatStamp(message.createdAt);
|
|
5806
5815
|
return /* @__PURE__ */ jsx18("div", { class: `${p17}-bubble-row`, "data-role": message.role, "data-testid": tid(TID.messageBubble, message.id), children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
5807
5816
|
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
5808
|
-
bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part) => /* @__PURE__ */ jsx18(
|
|
5817
|
+
bufferedHold ? /* @__PURE__ */ jsx18(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx18(
|
|
5809
5818
|
PartView,
|
|
5810
5819
|
{
|
|
5811
5820
|
part,
|
|
@@ -5814,7 +5823,7 @@ function MessageBubble({
|
|
|
5814
5823
|
showReasoning,
|
|
5815
5824
|
showToolCalls,
|
|
5816
5825
|
showSources,
|
|
5817
|
-
interactive,
|
|
5826
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
5818
5827
|
superseded,
|
|
5819
5828
|
tool
|
|
5820
5829
|
},
|