@helpai/elements 0.59.2 → 0.59.3
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/configurator.mjs +10 -10
- package/elements-web-component.esm.js +17 -17
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +17 -17
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +17 -17
- package/elements.esm.js.map +3 -3
- package/elements.js +17 -17
- package/elements.js.map +3 -3
- package/index.d.ts +7 -7
- package/index.mjs +14 -15
- package/package.json +1 -1
- package/schema.d.ts +34 -34
- package/schema.json +30 -34
- package/schema.mjs +10 -10
- package/web-component.mjs +14 -15
package/web-component.mjs
CHANGED
|
@@ -1012,7 +1012,7 @@ var DEFAULT_ATTACHMENTS = {
|
|
|
1012
1012
|
var DEFAULT_FEATURES = {
|
|
1013
1013
|
files: true,
|
|
1014
1014
|
voice: "local",
|
|
1015
|
-
|
|
1015
|
+
disableHumanInLoop: false
|
|
1016
1016
|
};
|
|
1017
1017
|
var DEFAULT_FORMS = { list: [], byTrigger: {} };
|
|
1018
1018
|
var DEFAULT_TRACKING = {
|
|
@@ -1049,7 +1049,6 @@ var DEFAULT_HAPTICS = {
|
|
|
1049
1049
|
events: void 0
|
|
1050
1050
|
};
|
|
1051
1051
|
var DEFAULT_MODULES = [{ label: "tabConversations", layout: "chat" }];
|
|
1052
|
-
var DEFAULT_HOME_MODULE = { showSearchBar: true };
|
|
1053
1052
|
|
|
1054
1053
|
// src/core/config/resolve.ts
|
|
1055
1054
|
function resolveOptions(rawOpts) {
|
|
@@ -1089,11 +1088,11 @@ function resolveOptions(rawOpts) {
|
|
|
1089
1088
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1090
1089
|
showSources: behavior.showSources ?? false,
|
|
1091
1090
|
scrollFade: behavior.scrollFade ?? true,
|
|
1092
|
-
enableMessageFeedback: behavior.
|
|
1091
|
+
enableMessageFeedback: !(behavior.disableMessageFeedback ?? false),
|
|
1093
1092
|
features: {
|
|
1094
1093
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1095
1094
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
1096
|
-
|
|
1095
|
+
disableHumanInLoop: opts.features?.disableHumanInLoop ?? false,
|
|
1097
1096
|
tools: opts.features?.tools
|
|
1098
1097
|
},
|
|
1099
1098
|
forms: resolveForms(opts.forms, locale),
|
|
@@ -1207,9 +1206,9 @@ function resolveModules(overrides) {
|
|
|
1207
1206
|
if (m.layout === "home") {
|
|
1208
1207
|
resolved.brandName = m.brandName;
|
|
1209
1208
|
resolved.greetingText = m.greetingText;
|
|
1210
|
-
resolved.
|
|
1211
|
-
resolved.
|
|
1212
|
-
resolved.
|
|
1209
|
+
resolved.hideGreeting = m.hideGreeting ?? false;
|
|
1210
|
+
resolved.hideSearchBar = m.hideSearchBar ?? false;
|
|
1211
|
+
resolved.hideRecentConversations = m.hideRecentConversations ?? false;
|
|
1213
1212
|
if (m.userAvatars && m.userAvatars.length > 0) resolved.userAvatars = m.userAvatars;
|
|
1214
1213
|
if (m.status) resolved.status = m.status;
|
|
1215
1214
|
resolved.contentBlockTitle = m.contentBlockTitle;
|
|
@@ -1419,7 +1418,7 @@ var BEHAVIOR_ATTRS = [
|
|
|
1419
1418
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1420
1419
|
["show-sources", "showSources", boolAttr],
|
|
1421
1420
|
["scroll-fade", "scrollFade", boolAttr],
|
|
1422
|
-
["
|
|
1421
|
+
["disable-message-feedback", "disableMessageFeedback", boolAttr]
|
|
1423
1422
|
];
|
|
1424
1423
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1425
1424
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1934,7 +1933,7 @@ function createAuth(opts) {
|
|
|
1934
1933
|
}
|
|
1935
1934
|
|
|
1936
1935
|
// src/core/version.ts
|
|
1937
|
-
var ELEMENTS_VERSION = true ? "0.59.
|
|
1936
|
+
var ELEMENTS_VERSION = true ? "0.59.3" : "0.0.0-dev";
|
|
1938
1937
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1939
1938
|
|
|
1940
1939
|
// src/stream/types.ts
|
|
@@ -7560,13 +7559,13 @@ function HomeRoot(props2) {
|
|
|
7560
7559
|
const [content, setContent] = useState12([]);
|
|
7561
7560
|
const tagsKey = config.contentTags?.join(",");
|
|
7562
7561
|
useEffect11(() => {
|
|
7563
|
-
if (
|
|
7562
|
+
if (config.hideRecentConversations) return;
|
|
7564
7563
|
let cancelled = false;
|
|
7565
7564
|
transport.listConversations({ limit: 1 }).then((res) => !cancelled && setRecent(res.conversations?.[0] ?? null)).catch((err) => !cancelled && log13.warn("listConversations (home) failed", { err }));
|
|
7566
7565
|
return () => {
|
|
7567
7566
|
cancelled = true;
|
|
7568
7567
|
};
|
|
7569
|
-
}, [transport, config.
|
|
7568
|
+
}, [transport, config.hideRecentConversations]);
|
|
7570
7569
|
useEffect11(() => {
|
|
7571
7570
|
if (!config.contentTags?.length) return;
|
|
7572
7571
|
let cancelled = false;
|
|
@@ -7594,13 +7593,13 @@ function HomeRoot(props2) {
|
|
|
7594
7593
|
/* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
|
|
7595
7594
|
] })
|
|
7596
7595
|
] }),
|
|
7597
|
-
config.
|
|
7596
|
+
!config.hideGreeting ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
7598
7597
|
/* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
7599
7598
|
greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
|
|
7600
7599
|
] }) : null
|
|
7601
7600
|
] }),
|
|
7602
7601
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7603
|
-
config.
|
|
7602
|
+
!config.hideSearchBar ? /* @__PURE__ */ jsx32(
|
|
7604
7603
|
HomeSearchButton,
|
|
7605
7604
|
{
|
|
7606
7605
|
placeholder: strings.homeSearchPlaceholder,
|
|
@@ -8753,12 +8752,12 @@ function App({ options, hostElement, bus }) {
|
|
|
8753
8752
|
);
|
|
8754
8753
|
const toolInteraction = useMemo3(
|
|
8755
8754
|
() => ({
|
|
8756
|
-
humanInLoop: options.features.
|
|
8755
|
+
humanInLoop: !options.features.disableHumanInLoop,
|
|
8757
8756
|
onResult: handleToolResult,
|
|
8758
8757
|
onDecision: handleToolDecision,
|
|
8759
8758
|
onEdit: handleToolEdit
|
|
8760
8759
|
}),
|
|
8761
|
-
[options.features.
|
|
8760
|
+
[options.features.disableHumanInLoop, handleToolResult, handleToolDecision, handleToolEdit]
|
|
8762
8761
|
);
|
|
8763
8762
|
const userMessageCount = () => messagesSig.value.reduce((n, m) => n + (m.role === "user" ? 1 : 0), 0);
|
|
8764
8763
|
const effectiveForms = options.forms.list.length > 0 ? options.forms : remoteForms ?? options.forms;
|