@axiom-lattice/react-sdk 8.2.0 → 8.3.0
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/{AgentDetailSideApp-PNN6EZAK.mjs → AgentDetailSideApp-YQS5GL7P.mjs} +11 -11
- package/dist/AgentGovernanceWorkbench-KYHOZTRY.mjs +24 -0
- package/dist/{LangfuseDashboard-LRYMXATJ.mjs → LangfuseDashboard-LSPULCS3.mjs} +2 -2
- package/dist/{MessageGraph-G4S25PLS.mjs → MessageGraph-WUWP2CE3.mjs} +7 -7
- package/dist/{ReactChart-UNBTHGFX.mjs → ReactChart-7WQQAQ73.mjs} +7 -7
- package/dist/SkillFlow-JD3N76HE.mjs +14 -0
- package/dist/{TasksSideApp-PKIA6WVE.mjs → TasksSideApp-IPFBRDSJ.mjs} +8 -8
- package/dist/ThreadMaintenancePanel-7I7GQXRA.mjs +12 -0
- package/dist/{TopologyRuntimeView-EQIYLMTF.mjs → TopologyRuntimeView-WFMC2GME.mjs} +8 -8
- package/dist/WorkflowAutomationView-CZIAN5D7.mjs +22 -0
- package/dist/{chunk-UAZQVVSC.mjs → chunk-26OKWQ4A.mjs} +7 -7
- package/dist/{chunk-O6LQDULL.mjs → chunk-32DXGO5I.mjs} +8 -8
- package/dist/{chunk-HJBIRTLF.mjs → chunk-3AO7CBZZ.mjs} +3 -3
- package/dist/{chunk-M5PVHJ2T.mjs → chunk-5RHFR3E7.mjs} +10 -10
- package/dist/{chunk-MDGPZ6PT.mjs → chunk-A5M2ER2U.mjs} +2825 -2302
- package/dist/chunk-A5M2ER2U.mjs.map +1 -0
- package/dist/{chunk-7IRISB5X.mjs → chunk-FAACGXSL.mjs} +2 -2
- package/dist/{chunk-MI623NH3.mjs → chunk-J53HT62X.mjs} +35 -16
- package/dist/{chunk-MI623NH3.mjs.map → chunk-J53HT62X.mjs.map} +1 -1
- package/dist/{chunk-ON5OXKYT.mjs → chunk-KX44YKCV.mjs} +3 -3
- package/dist/{chunk-THI4W7JV.mjs → chunk-QGHDHTJT.mjs} +3 -3
- package/dist/{chunk-ZZ23HKVT.mjs → chunk-SXIYLREM.mjs} +4 -4
- package/dist/{chunk-FXPJL27K.mjs → chunk-TZBEU4AN.mjs} +4 -4
- package/dist/{chunk-6KAXO3UV.mjs → chunk-VSNPATWP.mjs} +4 -4
- package/dist/{chunk-PT4E2OUU.mjs → chunk-WQ4VG47Y.mjs} +3 -3
- package/dist/{chunk-UHXZUMQE.mjs → chunk-XW7LPNDA.mjs} +3 -3
- package/dist/{embed-page-AgentDetailSideApp-RY4FAEAM.js → embed-page-AgentDetailSideApp-WDDE7BEH.js} +1 -1
- package/dist/{embed-page-AgentGovernanceWorkbench-UFDULZ5A.js → embed-page-AgentGovernanceWorkbench-7YPU3QB2.js} +1 -1
- package/dist/{embed-page-LangfuseDashboard-GNNJGAA2.js → embed-page-LangfuseDashboard-BEOJDMWF.js} +1 -1
- package/dist/{embed-page-MessageGraph-S7GCLNLR.js → embed-page-MessageGraph-LNNMCH6I.js} +1 -1
- package/dist/{embed-page-ReactChart-LWZPH244.js → embed-page-ReactChart-D7RZQB2H.js} +1 -1
- package/dist/{embed-page-SkillFlow-OVIGJFUH.js → embed-page-SkillFlow-3X24ILKU.js} +1 -1
- package/dist/{embed-page-TasksSideApp-AOS4MZAI.js → embed-page-TasksSideApp-KD4S22SL.js} +1 -1
- package/dist/{embed-page-ThreadMaintenancePanel-PXL2TJBO.js → embed-page-ThreadMaintenancePanel-V327PV5R.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-GRM34Z2Z.js → embed-page-TopologyRuntimeView-Z7MY6U5T.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-JV26AHRB.js → embed-page-WorkflowAutomationView-4MY4HG7R.js} +1 -1
- package/dist/embed-page-chunk-4XKCMM5C.js +211 -0
- package/dist/{embed-page-chunk-YCTDKWKW.js → embed-page-chunk-ASEIOK7X.js} +1 -1
- package/dist/{embed-page-chunk-6ZHR5GWS.js → embed-page-chunk-BSRASK7V.js} +6 -6
- package/dist/{embed-page-chunk-ABGWNVMG.js → embed-page-chunk-BZKAPY7M.js} +1 -1
- package/dist/embed-page-chunk-CFFDP526.js +6835 -0
- package/dist/{embed-page-chunk-5XP4FJW7.js → embed-page-chunk-EM6VGUZ2.js} +1 -1
- package/dist/{embed-page-chunk-3UK7XM33.js → embed-page-chunk-G5MXFDNZ.js} +1 -1
- package/dist/{embed-page-chunk-OQUMCCF5.js → embed-page-chunk-G5PDHDBZ.js} +1 -1
- package/dist/{embed-page-chunk-YM76GTXK.js → embed-page-chunk-HZZ5HNTF.js} +1 -1
- package/dist/{embed-page-chunk-ONXC5S22.js → embed-page-chunk-PMOGSY6W.js} +1 -1
- package/dist/{embed-page-en-G5J7KW6V.js → embed-page-en-JOTELYAL.js} +1 -1
- package/dist/{embed-page-zh-72QSTYRF.js → embed-page-zh-BPO6ZSJM.js} +1 -1
- package/dist/embed-page.js +1 -1
- package/dist/{en-4BUDQBEG.mjs → en-NBPWP767.mjs} +7 -2
- package/dist/{en-4BUDQBEG.mjs.map → en-NBPWP767.mjs.map} +1 -1
- package/dist/index.d.mts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +2291 -1733
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/web-app.js +12 -2
- package/dist/web-app.js.map +1 -1
- package/dist/web-app.mjs +2 -2
- package/dist/{zh-CRWCRGUL.mjs → zh-RL3CUJIQ.mjs} +7 -2
- package/dist/{zh-CRWCRGUL.mjs.map → zh-RL3CUJIQ.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/AgentGovernanceWorkbench-RHZHXKXL.mjs +0 -24
- package/dist/SkillFlow-ZZZGU7G5.mjs +0 -14
- package/dist/ThreadMaintenancePanel-HJQ24NMZ.mjs +0 -12
- package/dist/WorkflowAutomationView-WR4LQ7CY.mjs +0 -22
- package/dist/chunk-MDGPZ6PT.mjs.map +0 -1
- package/dist/embed-page-chunk-NNQHJZ5Q.js +0 -211
- package/dist/embed-page-chunk-SQSVDSG6.js +0 -6746
- /package/dist/{AgentDetailSideApp-PNN6EZAK.mjs.map → AgentDetailSideApp-YQS5GL7P.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-RHZHXKXL.mjs.map → AgentGovernanceWorkbench-KYHOZTRY.mjs.map} +0 -0
- /package/dist/{LangfuseDashboard-LRYMXATJ.mjs.map → LangfuseDashboard-LSPULCS3.mjs.map} +0 -0
- /package/dist/{MessageGraph-G4S25PLS.mjs.map → MessageGraph-WUWP2CE3.mjs.map} +0 -0
- /package/dist/{ReactChart-UNBTHGFX.mjs.map → ReactChart-7WQQAQ73.mjs.map} +0 -0
- /package/dist/{SkillFlow-ZZZGU7G5.mjs.map → SkillFlow-JD3N76HE.mjs.map} +0 -0
- /package/dist/{TasksSideApp-PKIA6WVE.mjs.map → TasksSideApp-IPFBRDSJ.mjs.map} +0 -0
- /package/dist/{ThreadMaintenancePanel-HJQ24NMZ.mjs.map → ThreadMaintenancePanel-7I7GQXRA.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-EQIYLMTF.mjs.map → TopologyRuntimeView-WFMC2GME.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-WR4LQ7CY.mjs.map → WorkflowAutomationView-CZIAN5D7.mjs.map} +0 -0
- /package/dist/{chunk-UAZQVVSC.mjs.map → chunk-26OKWQ4A.mjs.map} +0 -0
- /package/dist/{chunk-O6LQDULL.mjs.map → chunk-32DXGO5I.mjs.map} +0 -0
- /package/dist/{chunk-HJBIRTLF.mjs.map → chunk-3AO7CBZZ.mjs.map} +0 -0
- /package/dist/{chunk-M5PVHJ2T.mjs.map → chunk-5RHFR3E7.mjs.map} +0 -0
- /package/dist/{chunk-7IRISB5X.mjs.map → chunk-FAACGXSL.mjs.map} +0 -0
- /package/dist/{chunk-ON5OXKYT.mjs.map → chunk-KX44YKCV.mjs.map} +0 -0
- /package/dist/{chunk-THI4W7JV.mjs.map → chunk-QGHDHTJT.mjs.map} +0 -0
- /package/dist/{chunk-ZZ23HKVT.mjs.map → chunk-SXIYLREM.mjs.map} +0 -0
- /package/dist/{chunk-FXPJL27K.mjs.map → chunk-TZBEU4AN.mjs.map} +0 -0
- /package/dist/{chunk-6KAXO3UV.mjs.map → chunk-VSNPATWP.mjs.map} +0 -0
- /package/dist/{chunk-PT4E2OUU.mjs.map → chunk-WQ4VG47Y.mjs.map} +0 -0
- /package/dist/{chunk-UHXZUMQE.mjs.map → chunk-XW7LPNDA.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LatticeLocaleProvider,
|
|
4
4
|
LocaleBridgeContext,
|
|
5
5
|
readStoredLocale
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XW7LPNDA.mjs";
|
|
7
7
|
|
|
8
8
|
// src/i18n/LocaleLayerIfAbsent.tsx
|
|
9
9
|
import { useContext, useMemo } from "react";
|
|
@@ -40,4 +40,4 @@ function LocaleLayerIfAbsent({
|
|
|
40
40
|
export {
|
|
41
41
|
LocaleLayerIfAbsent
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-FAACGXSL.mjs.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
useAuth,
|
|
4
4
|
useClient,
|
|
5
5
|
useLatticeChatShellContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KX44YKCV.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useT
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XW7LPNDA.mjs";
|
|
10
10
|
|
|
11
11
|
// src/components/Chat/AssistantContext.tsx
|
|
12
12
|
import {
|
|
@@ -2318,6 +2318,25 @@ function convertThreadToConversationThread(thread, label) {
|
|
|
2318
2318
|
function getThreadMetadata(label) {
|
|
2319
2319
|
return label ? { label } : {};
|
|
2320
2320
|
}
|
|
2321
|
+
var ACTIVE_THREAD_STORAGE_PREFIX = "lattice_active_thread";
|
|
2322
|
+
function activeThreadStorageKey(assistantId, scopeKey) {
|
|
2323
|
+
return `${ACTIVE_THREAD_STORAGE_PREFIX}:${assistantId}:${scopeKey}`;
|
|
2324
|
+
}
|
|
2325
|
+
function readActiveThreadId(assistantId, scopeKey) {
|
|
2326
|
+
if (typeof window === "undefined") return null;
|
|
2327
|
+
try {
|
|
2328
|
+
return window.sessionStorage.getItem(activeThreadStorageKey(assistantId, scopeKey));
|
|
2329
|
+
} catch {
|
|
2330
|
+
return null;
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
function writeActiveThreadId(assistantId, scopeKey, threadId) {
|
|
2334
|
+
if (typeof window === "undefined") return;
|
|
2335
|
+
try {
|
|
2336
|
+
window.sessionStorage.setItem(activeThreadStorageKey(assistantId, scopeKey), threadId);
|
|
2337
|
+
} catch {
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2321
2340
|
function generateLabelFromMessage(message) {
|
|
2322
2341
|
const cleanMessage = message.replace(/```attachments[\s\S]*?```/g, "").trim();
|
|
2323
2342
|
if (!cleanMessage) {
|
|
@@ -2350,6 +2369,8 @@ var ConversationContextProvider = ({
|
|
|
2350
2369
|
useEffect6(() => {
|
|
2351
2370
|
clientRef.current = client;
|
|
2352
2371
|
}, [client]);
|
|
2372
|
+
const workspaceCtx = useContext3(WorkspaceContext);
|
|
2373
|
+
const scopeKey = `${workspaceCtx?.workspaceId ?? ""}:${workspaceCtx?.projectId ?? ""}`;
|
|
2353
2374
|
const loadThreads = useCallback5(async (force = false) => {
|
|
2354
2375
|
const currentClient = clientRef.current;
|
|
2355
2376
|
if (!assistantId || !currentClient.assistantId) {
|
|
@@ -2402,19 +2423,15 @@ var ConversationContextProvider = ({
|
|
|
2402
2423
|
}
|
|
2403
2424
|
} else {
|
|
2404
2425
|
setThreads(conversationThreads);
|
|
2426
|
+
const savedThreadId = readActiveThreadId(assistantId, scopeKey);
|
|
2405
2427
|
setThreadId((currentThreadId) => {
|
|
2406
|
-
if (
|
|
2407
|
-
|
|
2408
|
-
return latestThread.id;
|
|
2428
|
+
if (currentThreadId && conversationThreads.some((t) => t.id === currentThreadId)) {
|
|
2429
|
+
return currentThreadId;
|
|
2409
2430
|
}
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
);
|
|
2413
|
-
if (!threadExists) {
|
|
2414
|
-
const latestThread = conversationThreads[0];
|
|
2415
|
-
return latestThread.id;
|
|
2431
|
+
if (savedThreadId && conversationThreads.some((t) => t.id === savedThreadId)) {
|
|
2432
|
+
return savedThreadId;
|
|
2416
2433
|
}
|
|
2417
|
-
return
|
|
2434
|
+
return conversationThreads[0].id;
|
|
2418
2435
|
});
|
|
2419
2436
|
}
|
|
2420
2437
|
setThreadsAssistantId(assistantId);
|
|
@@ -2432,7 +2449,7 @@ var ConversationContextProvider = ({
|
|
|
2432
2449
|
isLoadingRef.current = false;
|
|
2433
2450
|
}
|
|
2434
2451
|
}
|
|
2435
|
-
}, [assistantId]);
|
|
2452
|
+
}, [assistantId, scopeKey]);
|
|
2436
2453
|
useEffect6(() => {
|
|
2437
2454
|
const currentClient = clientRef.current;
|
|
2438
2455
|
const prevAssistantId = prevAssistantIdRef.current;
|
|
@@ -2455,8 +2472,6 @@ var ConversationContextProvider = ({
|
|
|
2455
2472
|
prevAssistantIdRef.current = null;
|
|
2456
2473
|
}
|
|
2457
2474
|
}, [assistantId, loadThreads]);
|
|
2458
|
-
const workspaceCtx = useContext3(WorkspaceContext);
|
|
2459
|
-
const scopeKey = `${workspaceCtx?.workspaceId ?? ""}:${workspaceCtx?.projectId ?? ""}`;
|
|
2460
2475
|
const prevScopeKeyRef = useRef3(scopeKey);
|
|
2461
2476
|
useEffect6(() => {
|
|
2462
2477
|
const currentClient = clientRef.current;
|
|
@@ -2468,6 +2483,10 @@ var ConversationContextProvider = ({
|
|
|
2468
2483
|
loadedAssistantIdRef.current = null;
|
|
2469
2484
|
loadThreads();
|
|
2470
2485
|
}, [scopeKey, assistantId, loadThreads]);
|
|
2486
|
+
useEffect6(() => {
|
|
2487
|
+
if (!assistantId || !threadId) return;
|
|
2488
|
+
writeActiveThreadId(assistantId, scopeKey, threadId);
|
|
2489
|
+
}, [assistantId, scopeKey, threadId]);
|
|
2471
2490
|
const thread = useMemo3(() => {
|
|
2472
2491
|
if (!assistantId || !threadId) {
|
|
2473
2492
|
return null;
|
|
@@ -2815,4 +2834,4 @@ export {
|
|
|
2815
2834
|
ChatUIContextProvider,
|
|
2816
2835
|
useChatUIContext
|
|
2817
2836
|
};
|
|
2818
|
-
//# sourceMappingURL=chunk-
|
|
2837
|
+
//# sourceMappingURL=chunk-J53HT62X.mjs.map
|