@axiom-lattice/react-sdk 2.1.106 → 2.1.108
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/index.js +57 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2468,7 +2468,7 @@ function AgentThreadProvider({
|
|
|
2468
2468
|
stopStreamingRef.current();
|
|
2469
2469
|
stopStreamingRef.current = null;
|
|
2470
2470
|
}
|
|
2471
|
-
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
2471
|
+
setState((prev) => ({ ...prev, messages: [], isLoading: true, error: null }));
|
|
2472
2472
|
try {
|
|
2473
2473
|
const agentState = await client.getAgentState(threadId);
|
|
2474
2474
|
const currentCreatedAt = agentState?.createdAt;
|
|
@@ -14781,6 +14781,9 @@ var ClarifyFeedback = ({
|
|
|
14781
14781
|
if (currentQuestion.type === "file_upload") {
|
|
14782
14782
|
return !!(answer?.filePath && answer.filePath.trim() !== "");
|
|
14783
14783
|
}
|
|
14784
|
+
if (currentQuestion.type === "input") {
|
|
14785
|
+
return !!(answer?.otherText && answer.otherText.trim() !== "");
|
|
14786
|
+
}
|
|
14784
14787
|
const hasSelection = answer?.selectedOptions?.length > 0;
|
|
14785
14788
|
const hasOtherText = answer?.otherText?.trim() !== "";
|
|
14786
14789
|
return hasSelection || hasOtherText;
|
|
@@ -14943,16 +14946,58 @@ var ClarifyFeedback = ({
|
|
|
14943
14946
|
]
|
|
14944
14947
|
}
|
|
14945
14948
|
)
|
|
14946
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
14947
|
-
import_antd33.
|
|
14949
|
+
] }) : currentQuestion.type === "input" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
14950
|
+
import_antd33.Input,
|
|
14948
14951
|
{
|
|
14949
|
-
|
|
14950
|
-
|
|
14952
|
+
placeholder: "Enter your answer...",
|
|
14953
|
+
value: currentAnswer.otherText,
|
|
14954
|
+
onChange: (e) => handleOtherTextChange(e.target.value),
|
|
14951
14955
|
disabled: !interactive || submitted,
|
|
14952
|
-
style: {
|
|
14953
|
-
children: currentQuestion.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_antd33.Checkbox, { value: option, style: { fontSize: 14 }, children: option }, option))
|
|
14956
|
+
style: { fontSize: 14 }
|
|
14954
14957
|
}
|
|
14955
|
-
)
|
|
14958
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
14959
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
14960
|
+
import_antd33.Checkbox.Group,
|
|
14961
|
+
{
|
|
14962
|
+
value: currentAnswer.selectedOptions,
|
|
14963
|
+
onChange: (values) => handleOptionChange(values),
|
|
14964
|
+
disabled: !interactive || submitted,
|
|
14965
|
+
style: { display: "flex", flexDirection: "column", gap: 4 },
|
|
14966
|
+
children: currentQuestion.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_antd33.Checkbox, { value: option, style: { fontSize: 14 }, children: option }, option))
|
|
14967
|
+
}
|
|
14968
|
+
),
|
|
14969
|
+
currentQuestion.allowOther && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { style: { marginTop: 8 }, children: [
|
|
14970
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
14971
|
+
import_antd33.Checkbox,
|
|
14972
|
+
{
|
|
14973
|
+
checked: currentAnswer.selectedOptions.includes("__other__"),
|
|
14974
|
+
onChange: (e) => {
|
|
14975
|
+
const current = currentAnswer.selectedOptions || [];
|
|
14976
|
+
if (e.target.checked) {
|
|
14977
|
+
handleOptionChange([...current, "__other__"]);
|
|
14978
|
+
} else {
|
|
14979
|
+
handleOptionChange(current.filter((o) => o !== "__other__"));
|
|
14980
|
+
handleOtherTextChange("");
|
|
14981
|
+
}
|
|
14982
|
+
},
|
|
14983
|
+
disabled: !interactive || submitted,
|
|
14984
|
+
style: { fontSize: 14 },
|
|
14985
|
+
children: "Other (please specify)"
|
|
14986
|
+
}
|
|
14987
|
+
),
|
|
14988
|
+
currentAnswer.selectedOptions.includes("__other__") && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
14989
|
+
import_antd33.Input,
|
|
14990
|
+
{
|
|
14991
|
+
size: "small",
|
|
14992
|
+
placeholder: "Enter your answer...",
|
|
14993
|
+
value: currentAnswer.otherText,
|
|
14994
|
+
onChange: (e) => handleOtherTextChange(e.target.value),
|
|
14995
|
+
disabled: !interactive || submitted,
|
|
14996
|
+
style: { fontSize: 14, marginTop: 8, marginLeft: 24, width: "calc(100% - 24px)" }
|
|
14997
|
+
}
|
|
14998
|
+
)
|
|
14999
|
+
] })
|
|
15000
|
+
] }) }),
|
|
14956
15001
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
14957
15002
|
import_antd33.Space,
|
|
14958
15003
|
{
|
|
@@ -15319,7 +15364,7 @@ var ToolCard = ({
|
|
|
15319
15364
|
size: "small",
|
|
15320
15365
|
className: styles.card,
|
|
15321
15366
|
bordered: false,
|
|
15322
|
-
|
|
15367
|
+
styles: { body: { padding: "16px" } },
|
|
15323
15368
|
children: [
|
|
15324
15369
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: styles.header, children: [
|
|
15325
15370
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd35.Space, { align: "center", children: [
|
|
@@ -32639,7 +32684,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
32639
32684
|
bindingsLoadIdRef.current = requestId;
|
|
32640
32685
|
setBindingsLoading(true);
|
|
32641
32686
|
try {
|
|
32642
|
-
const res = await get(`/api/channel-bindings?channelInstallationId=${installationId}`);
|
|
32687
|
+
const res = await get(`/api/channel-bindings?channelInstallationId=${installationId}&agentId=${assistantId}`);
|
|
32643
32688
|
if (bindingsLoadIdRef.current !== requestId) return;
|
|
32644
32689
|
if (res.success) {
|
|
32645
32690
|
setBindings(res.data?.records ?? []);
|
|
@@ -34435,11 +34480,8 @@ var WorkspaceResourceManager = ({
|
|
|
34435
34480
|
}
|
|
34436
34481
|
}, [fetchedCustomMenuItems]);
|
|
34437
34482
|
const menuItems = (0, import_react115.useMemo)(() => {
|
|
34438
|
-
const
|
|
34439
|
-
|
|
34440
|
-
return [...workspaceMenu].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
34441
|
-
}
|
|
34442
|
-
const merged = fetchedCustomMenuItems.length > 0 ? mergeMenuItems(DEFAULT_WORKSPACE_MENU_ITEMS, fetchedCustomMenuItems) : [...DEFAULT_WORKSPACE_MENU_ITEMS];
|
|
34483
|
+
const base = config.workspaceMenuItems?.length ? config.workspaceMenuItems : DEFAULT_WORKSPACE_MENU_ITEMS;
|
|
34484
|
+
const merged = fetchedCustomMenuItems.length > 0 ? mergeMenuItems([...base], fetchedCustomMenuItems) : [...base];
|
|
34443
34485
|
return merged;
|
|
34444
34486
|
}, [config.workspaceMenuItems, fetchedCustomMenuItems]);
|
|
34445
34487
|
const getContextMenuItems = (0, import_react115.useCallback)(
|