@athenaintel/react 0.4.6 → 0.6.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/README.md +51 -0
- package/dist/index.cjs +926 -472
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +322 -43
- package/dist/index.js +927 -473
- package/dist/index.js.map +1 -1
- package/dist/styles.css +35 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4561,6 +4561,16 @@ const ChainOfThoughtByIndicesProvider = ({ startIndex, endIndex, children }) =>
|
|
|
4561
4561
|
});
|
|
4562
4562
|
return jsxRuntime.jsx(AuiProvider, { value: aui, children });
|
|
4563
4563
|
};
|
|
4564
|
+
const ThreadListItemByIndexProvider = ({ index: index2, archived, children }) => {
|
|
4565
|
+
const aui = useAui({
|
|
4566
|
+
threadListItem: Derived({
|
|
4567
|
+
source: "threads",
|
|
4568
|
+
query: { type: "index", index: index2, archived },
|
|
4569
|
+
get: (aui2) => aui2.threads().item({ index: index2, archived })
|
|
4570
|
+
})
|
|
4571
|
+
});
|
|
4572
|
+
return jsxRuntime.jsx(AuiProvider, { value: aui, children });
|
|
4573
|
+
};
|
|
4564
4574
|
const RuntimeAdapter = resource((runtime) => tapResource(RuntimeAdapterResource(runtime)));
|
|
4565
4575
|
attachTransformScopes(RuntimeAdapter, (scopes, parent) => {
|
|
4566
4576
|
const result = baseRuntimeAdapterTransformScopes(scopes, parent);
|
|
@@ -7640,7 +7650,7 @@ const toAppendMessage = (messages, message) => {
|
|
|
7640
7650
|
startRun: message.startRun
|
|
7641
7651
|
};
|
|
7642
7652
|
};
|
|
7643
|
-
const getThreadState
|
|
7653
|
+
const getThreadState = (runtime, threadListItemState) => {
|
|
7644
7654
|
const lastMessage = runtime.messages.at(-1);
|
|
7645
7655
|
return Object.freeze({
|
|
7646
7656
|
threadId: threadListItemState.id,
|
|
@@ -7663,7 +7673,7 @@ class ThreadRuntimeImpl {
|
|
|
7663
7673
|
__publicField(this, "_eventSubscriptionSubjects", /* @__PURE__ */ new Map());
|
|
7664
7674
|
const stateBinding = new ShallowMemoizeSubject({
|
|
7665
7675
|
path: threadBinding.path,
|
|
7666
|
-
getState: () => getThreadState
|
|
7676
|
+
getState: () => getThreadState(threadBinding.getState(), threadListItemBinding.getState()),
|
|
7667
7677
|
subscribe: (callback) => {
|
|
7668
7678
|
const sub1 = threadBinding.subscribe(callback);
|
|
7669
7679
|
const sub2 = threadListItemBinding.subscribe(callback);
|
|
@@ -8930,6 +8940,24 @@ const MessagePrimitiveParts$1 = ({ components, unstable_showEmptyOnNonTextEnd =
|
|
|
8930
8940
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [partsElements, jsxRuntime.jsx(ConditionalEmpty, { components, enabled: unstable_showEmptyOnNonTextEnd })] });
|
|
8931
8941
|
};
|
|
8932
8942
|
MessagePrimitiveParts$1.displayName = "MessagePrimitive.Parts";
|
|
8943
|
+
const ThreadListPrimitiveItemByIndex = React.memo(({ index: index2, archived = false, components }) => {
|
|
8944
|
+
const ThreadListItemComponent = components.ThreadListItem;
|
|
8945
|
+
return jsxRuntime.jsx(ThreadListItemByIndexProvider, { index: index2, archived, children: jsxRuntime.jsx(ThreadListItemComponent, {}) });
|
|
8946
|
+
}, (prev, next) => prev.index === next.index && prev.archived === next.archived && prev.components.ThreadListItem === next.components.ThreadListItem);
|
|
8947
|
+
ThreadListPrimitiveItemByIndex.displayName = "ThreadListPrimitive.ItemByIndex";
|
|
8948
|
+
const ThreadListPrimitiveItems = ({ archived = false, components }) => {
|
|
8949
|
+
const contentLength = useAuiState((s) => archived ? s.threads.archivedThreadIds.length : s.threads.threadIds.length);
|
|
8950
|
+
const listElements = React.useMemo(() => {
|
|
8951
|
+
return Array.from({ length: contentLength }, (_, index2) => jsxRuntime.jsx(ThreadListPrimitiveItemByIndex, { index: index2, archived, components }, index2));
|
|
8952
|
+
}, [contentLength, archived, components]);
|
|
8953
|
+
return listElements;
|
|
8954
|
+
};
|
|
8955
|
+
ThreadListPrimitiveItems.displayName = "ThreadListPrimitive.Items";
|
|
8956
|
+
const ThreadListItemPrimitiveTitle = ({ fallback }) => {
|
|
8957
|
+
const title = useAuiState((s) => s.threadListItem.title);
|
|
8958
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: title || fallback });
|
|
8959
|
+
};
|
|
8960
|
+
ThreadListItemPrimitiveTitle.displayName = "ThreadListItemPrimitive.Title";
|
|
8933
8961
|
const useComposerSend$1 = () => {
|
|
8934
8962
|
const aui = useAui();
|
|
8935
8963
|
const disabled = useAuiState((s) => s.thread.isRunning || !s.composer.isEditing || s.composer.isEmpty);
|
|
@@ -16362,6 +16390,37 @@ const useThreadScrollToBottom = ({ behavior } = {}) => {
|
|
|
16362
16390
|
return handleScrollToBottom;
|
|
16363
16391
|
};
|
|
16364
16392
|
const ThreadPrimitiveScrollToBottom = createActionButton("ThreadPrimitive.ScrollToBottom", useThreadScrollToBottom, ["behavior"]);
|
|
16393
|
+
const ThreadListPrimitiveNew = React.forwardRef(({ onClick, disabled, ...props }, forwardedRef) => {
|
|
16394
|
+
const isMain = useAuiState((s) => s.threads.newThreadId === s.threads.mainThreadId);
|
|
16395
|
+
const aui = useAui();
|
|
16396
|
+
return jsxRuntime.jsx(Primitive$1.button, { type: "button", ...isMain ? { "data-active": "true", "aria-current": "true" } : null, ...props, ref: forwardedRef, disabled, onClick: composeEventHandlers(onClick, () => {
|
|
16397
|
+
aui.threads().switchToNewThread();
|
|
16398
|
+
}) });
|
|
16399
|
+
});
|
|
16400
|
+
ThreadListPrimitiveNew.displayName = "ThreadListPrimitive.New";
|
|
16401
|
+
const ThreadListPrimitiveRoot = React.forwardRef((props, ref) => {
|
|
16402
|
+
return jsxRuntime.jsx(Primitive$1.div, { ...props, ref });
|
|
16403
|
+
});
|
|
16404
|
+
ThreadListPrimitiveRoot.displayName = "ThreadListPrimitive.Root";
|
|
16405
|
+
const ThreadListItemPrimitiveRoot = React.forwardRef((props, ref) => {
|
|
16406
|
+
const isMain = useAuiState((s) => s.threads.mainThreadId === s.threadListItem.id);
|
|
16407
|
+
return jsxRuntime.jsx(Primitive$1.div, { ...isMain ? { "data-active": "true", "aria-current": "true" } : null, ...props, ref });
|
|
16408
|
+
});
|
|
16409
|
+
ThreadListItemPrimitiveRoot.displayName = "ThreadListItemPrimitive.Root";
|
|
16410
|
+
const useThreadListItemArchive = () => {
|
|
16411
|
+
const aui = useAui();
|
|
16412
|
+
return React.useCallback(() => {
|
|
16413
|
+
aui.threadListItem().archive();
|
|
16414
|
+
}, [aui]);
|
|
16415
|
+
};
|
|
16416
|
+
const ThreadListItemPrimitiveArchive = createActionButton("ThreadListItemPrimitive.Archive", useThreadListItemArchive);
|
|
16417
|
+
const useThreadListItemTrigger = () => {
|
|
16418
|
+
const aui = useAui();
|
|
16419
|
+
return React.useCallback(() => {
|
|
16420
|
+
aui.threadListItem().switchTo();
|
|
16421
|
+
}, [aui]);
|
|
16422
|
+
};
|
|
16423
|
+
const ThreadListItemPrimitiveTrigger = createActionButton("ThreadListItemPrimitive.Trigger", useThreadListItemTrigger);
|
|
16365
16424
|
const useScrollLock = (animatedElementRef, animationDuration) => {
|
|
16366
16425
|
const scrollContainerRef = React.useRef(null);
|
|
16367
16426
|
const cleanupRef = React.useRef(null);
|
|
@@ -16435,45 +16494,16 @@ function useParentAuth() {
|
|
|
16435
16494
|
const [authToken, setAuthToken] = React.useState(null);
|
|
16436
16495
|
const readySignalSent = React.useRef(false);
|
|
16437
16496
|
React.useEffect(() => {
|
|
16438
|
-
const isInIframe = window.parent !== window;
|
|
16439
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16440
|
-
console.log("[AthenaAuth] useParentAuth mounted", {
|
|
16441
|
-
isInIframe,
|
|
16442
|
-
currentOrigin: window.location.origin,
|
|
16443
|
-
currentUrl: window.location.href
|
|
16444
|
-
});
|
|
16445
|
-
}
|
|
16446
16497
|
const handler = (event) => {
|
|
16447
|
-
|
|
16448
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16449
|
-
console.log("[AthenaAuth] Received PostMessage", {
|
|
16450
|
-
type: (_a2 = event.data) == null ? void 0 : _a2.type,
|
|
16451
|
-
origin: event.origin,
|
|
16452
|
-
isTrusted: isTrustedOrigin(event.origin)
|
|
16453
|
-
});
|
|
16454
|
-
}
|
|
16455
|
-
if (!isTrustedOrigin(event.origin)) {
|
|
16456
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16457
|
-
console.warn("[AthenaAuth] Rejected PostMessage — untrusted origin:", event.origin);
|
|
16458
|
-
}
|
|
16459
|
-
return;
|
|
16460
|
-
}
|
|
16498
|
+
if (!isTrustedOrigin(event.origin)) return;
|
|
16461
16499
|
if (event.data && typeof event.data === "object" && event.data.type === "athena-auth" && typeof event.data.token === "string") {
|
|
16462
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16463
|
-
console.log("[AthenaAuth] PropelAuth token received via PostMessage, length:", event.data.token.length);
|
|
16464
|
-
}
|
|
16465
16500
|
setAuthToken(event.data.token);
|
|
16466
16501
|
}
|
|
16467
16502
|
};
|
|
16468
16503
|
window.addEventListener("message", handler);
|
|
16469
|
-
if (!readySignalSent.current &&
|
|
16470
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16471
|
-
console.log("[AthenaAuth] Sending athena-auth-ready signal to parent");
|
|
16472
|
-
}
|
|
16504
|
+
if (!readySignalSent.current && window.parent !== window) {
|
|
16473
16505
|
window.parent.postMessage({ type: "athena-auth-ready" }, "*");
|
|
16474
16506
|
readySignalSent.current = true;
|
|
16475
|
-
} else if (!isInIframe && process.env.NODE_ENV !== "production") {
|
|
16476
|
-
console.log("[AthenaAuth] Not in iframe — skipping parent auth (standalone mode)");
|
|
16477
16507
|
}
|
|
16478
16508
|
return () => window.removeEventListener("message", handler);
|
|
16479
16509
|
}, []);
|
|
@@ -20766,6 +20796,7 @@ const createConverter = (optimisticMessageCache) => (state, connectionMetadata)
|
|
|
20766
20796
|
const useAthenaRuntime = (config2) => {
|
|
20767
20797
|
const {
|
|
20768
20798
|
apiUrl = DEFAULT_API_URL,
|
|
20799
|
+
resumeApiUrl,
|
|
20769
20800
|
backendUrl = DEFAULT_BACKEND_URL,
|
|
20770
20801
|
apiKey,
|
|
20771
20802
|
token,
|
|
@@ -20776,9 +20807,9 @@ const useAthenaRuntime = (config2) => {
|
|
|
20776
20807
|
workbench = [],
|
|
20777
20808
|
knowledgeBase = [],
|
|
20778
20809
|
systemPrompt,
|
|
20779
|
-
threadId: threadIdProp
|
|
20780
|
-
initialMessages
|
|
20810
|
+
threadId: threadIdProp
|
|
20781
20811
|
} = config2;
|
|
20812
|
+
const resolvedResumeApiUrl = resumeApiUrl ?? apiUrl.replace(/\/api\/chat$/, "/api/resume");
|
|
20782
20813
|
const generatedIdRef = React.useRef(null);
|
|
20783
20814
|
if (generatedIdRef.current === null) {
|
|
20784
20815
|
generatedIdRef.current = crypto.randomUUID();
|
|
@@ -20794,28 +20825,18 @@ const useAthenaRuntime = (config2) => {
|
|
|
20794
20825
|
tokenRef.current = token;
|
|
20795
20826
|
const apiKeyRef = React.useRef(apiKey);
|
|
20796
20827
|
apiKeyRef.current = apiKey;
|
|
20828
|
+
const isExistingThread = !!threadIdProp;
|
|
20797
20829
|
const runtime = useAssistantTransportRuntime({
|
|
20798
|
-
initialState: { messages:
|
|
20830
|
+
initialState: { messages: [] },
|
|
20799
20831
|
converter,
|
|
20800
20832
|
api: apiUrl,
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
apiKeyPrefix: apiKeyRef.current ? apiKeyRef.current.substring(0, 10) + "..." : void 0,
|
|
20809
|
-
apiUrl
|
|
20810
|
-
});
|
|
20811
|
-
}
|
|
20812
|
-
return {
|
|
20813
|
-
// Prefer parent-injected PropelAuth token over hardcoded API key
|
|
20814
|
-
...authHeaders,
|
|
20815
|
-
"Accept-Encoding": "identity",
|
|
20816
|
-
Accept: "text/event-stream"
|
|
20817
|
-
};
|
|
20818
|
-
},
|
|
20833
|
+
resumeApi: resolvedResumeApiUrl,
|
|
20834
|
+
headers: async () => ({
|
|
20835
|
+
// Prefer parent-injected PropelAuth token over hardcoded API key
|
|
20836
|
+
...tokenRef.current ? { Authorization: `Bearer ${tokenRef.current}` } : apiKeyRef.current ? { "X-API-KEY": apiKeyRef.current } : {},
|
|
20837
|
+
"Accept-Encoding": "identity",
|
|
20838
|
+
Accept: "text/event-stream"
|
|
20839
|
+
}),
|
|
20819
20840
|
onResponse: () => {
|
|
20820
20841
|
if (process.env.NODE_ENV !== "production") {
|
|
20821
20842
|
console.log("[AthenaSDK] Stream connected");
|
|
@@ -20915,6 +20936,16 @@ const useAthenaRuntime = (config2) => {
|
|
|
20915
20936
|
}
|
|
20916
20937
|
}
|
|
20917
20938
|
});
|
|
20939
|
+
const hasResumedRef = React.useRef(false);
|
|
20940
|
+
React.useEffect(() => {
|
|
20941
|
+
if (isExistingThread && !hasResumedRef.current) {
|
|
20942
|
+
hasResumedRef.current = true;
|
|
20943
|
+
try {
|
|
20944
|
+
runtime.thread.unstable_resumeRun({ parentId: null });
|
|
20945
|
+
} catch {
|
|
20946
|
+
}
|
|
20947
|
+
}
|
|
20948
|
+
}, [isExistingThread, runtime]);
|
|
20918
20949
|
return runtime;
|
|
20919
20950
|
};
|
|
20920
20951
|
function r(e) {
|
|
@@ -24148,20 +24179,6 @@ function useAthenaConfig() {
|
|
|
24148
24179
|
}
|
|
24149
24180
|
return ctx;
|
|
24150
24181
|
}
|
|
24151
|
-
const ThreadListContext = React.createContext(null);
|
|
24152
|
-
function useThreadListStore() {
|
|
24153
|
-
const store = React.useContext(ThreadListContext);
|
|
24154
|
-
if (!store) {
|
|
24155
|
-
throw new Error(
|
|
24156
|
-
"[AthenaSDK] useThreadList must be used within an <AthenaProvider> that has thread management enabled."
|
|
24157
|
-
);
|
|
24158
|
-
}
|
|
24159
|
-
return store;
|
|
24160
|
-
}
|
|
24161
|
-
const ThreadLoadingContext = React.createContext(false);
|
|
24162
|
-
function useThreadLoading() {
|
|
24163
|
-
return React.useContext(ThreadLoadingContext);
|
|
24164
|
-
}
|
|
24165
24182
|
function getAuthHeaders(auth) {
|
|
24166
24183
|
if (auth.token) {
|
|
24167
24184
|
return { Authorization: `Bearer ${auth.token}` };
|
|
@@ -24186,36 +24203,6 @@ async function listThreads(backendUrl, auth, opts = {}) {
|
|
|
24186
24203
|
}
|
|
24187
24204
|
return res.json();
|
|
24188
24205
|
}
|
|
24189
|
-
function deserializeMessage(msg) {
|
|
24190
|
-
if (msg && typeof msg === "object" && "lc" in msg && "kwargs" in msg && msg.type === "constructor") {
|
|
24191
|
-
const kwargs = msg.kwargs;
|
|
24192
|
-
if (Array.isArray(kwargs.tool_calls)) {
|
|
24193
|
-
kwargs.tool_calls = kwargs.tool_calls.map((tc) => {
|
|
24194
|
-
if (tc && typeof tc === "object" && "lc" in tc && "kwargs" in tc) {
|
|
24195
|
-
return tc.kwargs;
|
|
24196
|
-
}
|
|
24197
|
-
return tc;
|
|
24198
|
-
});
|
|
24199
|
-
}
|
|
24200
|
-
return kwargs;
|
|
24201
|
-
}
|
|
24202
|
-
return msg;
|
|
24203
|
-
}
|
|
24204
|
-
async function getThreadState(backendUrl, auth, threadId) {
|
|
24205
|
-
const base2 = getAgoraBaseUrl(backendUrl);
|
|
24206
|
-
const res = await fetch(`${base2}/api/unstable/threads/${threadId}`, {
|
|
24207
|
-
method: "GET",
|
|
24208
|
-
headers: { ...getAuthHeaders(auth) }
|
|
24209
|
-
});
|
|
24210
|
-
if (!res.ok) {
|
|
24211
|
-
throw new Error(`[AthenaSDK] Failed to get thread state: ${res.status}`);
|
|
24212
|
-
}
|
|
24213
|
-
const data = await res.json();
|
|
24214
|
-
if (Array.isArray(data.messages)) {
|
|
24215
|
-
data.messages = data.messages.map(deserializeMessage);
|
|
24216
|
-
}
|
|
24217
|
-
return data;
|
|
24218
|
-
}
|
|
24219
24206
|
async function archiveThread(backendUrl, auth, threadId) {
|
|
24220
24207
|
const base2 = getAgoraBaseUrl(backendUrl);
|
|
24221
24208
|
const res = await fetch(`${base2}/api/conversations/threads/archive`, {
|
|
@@ -24227,55 +24214,241 @@ async function archiveThread(backendUrl, auth, threadId) {
|
|
|
24227
24214
|
throw new Error(`[AthenaSDK] Failed to archive thread: ${res.status}`);
|
|
24228
24215
|
}
|
|
24229
24216
|
}
|
|
24230
|
-
|
|
24231
|
-
|
|
24232
|
-
|
|
24233
|
-
|
|
24234
|
-
|
|
24235
|
-
|
|
24236
|
-
|
|
24237
|
-
|
|
24238
|
-
|
|
24217
|
+
const AthenaThreadIdContext = React.createContext(void 0);
|
|
24218
|
+
function useAthenaThreadId() {
|
|
24219
|
+
return React.useContext(AthenaThreadIdContext);
|
|
24220
|
+
}
|
|
24221
|
+
function useAthenaThreadListAdapter(config2) {
|
|
24222
|
+
const configRef = React.useRef(config2);
|
|
24223
|
+
React.useEffect(() => {
|
|
24224
|
+
configRef.current = config2;
|
|
24225
|
+
}, [config2]);
|
|
24226
|
+
const auth = React.useMemo(
|
|
24227
|
+
() => ({ apiKey: config2.apiKey, token: config2.token }),
|
|
24228
|
+
[config2.apiKey, config2.token]
|
|
24229
|
+
);
|
|
24230
|
+
const unstable_Provider = React.useCallback(
|
|
24231
|
+
function AthenaThreadProvider({ children }) {
|
|
24232
|
+
const aui = useAui();
|
|
24233
|
+
const remoteId = aui.threadListItem().getState().remoteId;
|
|
24234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AthenaThreadIdContext.Provider, { value: remoteId, children });
|
|
24235
|
+
},
|
|
24236
|
+
[]
|
|
24237
|
+
);
|
|
24238
|
+
return React.useMemo(() => ({
|
|
24239
|
+
async list() {
|
|
24239
24240
|
try {
|
|
24240
|
-
const { threads } = await listThreads(
|
|
24241
|
-
|
|
24242
|
-
|
|
24243
|
-
|
|
24244
|
-
|
|
24245
|
-
|
|
24246
|
-
|
|
24241
|
+
const { threads } = await listThreads(configRef.current.backendUrl, auth);
|
|
24242
|
+
return {
|
|
24243
|
+
threads: threads.map((t) => ({
|
|
24244
|
+
status: "regular",
|
|
24245
|
+
remoteId: t.thread_id,
|
|
24246
|
+
title: t.title || void 0
|
|
24247
|
+
}))
|
|
24248
|
+
};
|
|
24249
|
+
} catch (err) {
|
|
24250
|
+
console.error("[AthenaSDK] adapter.list() failed:", err);
|
|
24251
|
+
return { threads: [] };
|
|
24247
24252
|
}
|
|
24248
24253
|
},
|
|
24249
|
-
|
|
24250
|
-
|
|
24251
|
-
console.log("[AthenaThreads] switchThread called", { threadId, prev: get2().activeThreadId });
|
|
24252
|
-
}
|
|
24253
|
-
set2({ activeThreadId: threadId });
|
|
24254
|
+
async initialize(threadId) {
|
|
24255
|
+
return { remoteId: threadId, externalId: void 0 };
|
|
24254
24256
|
},
|
|
24255
|
-
|
|
24256
|
-
const localThreadId = `thread_${crypto.randomUUID()}`;
|
|
24257
|
-
set2({ activeThreadId: localThreadId });
|
|
24258
|
-
return localThreadId;
|
|
24257
|
+
async rename(_remoteId, _newTitle) {
|
|
24259
24258
|
},
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24259
|
+
async archive(remoteId) {
|
|
24260
|
+
await archiveThread(configRef.current.backendUrl, auth, remoteId);
|
|
24261
|
+
},
|
|
24262
|
+
async unarchive(_remoteId) {
|
|
24263
|
+
},
|
|
24264
|
+
async delete(remoteId) {
|
|
24265
|
+
await archiveThread(configRef.current.backendUrl, auth, remoteId);
|
|
24266
|
+
},
|
|
24267
|
+
async generateTitle(_remoteId, _messages) {
|
|
24268
|
+
return new Response("").body;
|
|
24269
|
+
},
|
|
24270
|
+
async fetch(remoteId) {
|
|
24271
|
+
return {
|
|
24272
|
+
status: "regular",
|
|
24273
|
+
remoteId
|
|
24274
|
+
};
|
|
24275
|
+
},
|
|
24276
|
+
unstable_Provider
|
|
24277
|
+
}), [auth, unstable_Provider]);
|
|
24278
|
+
}
|
|
24279
|
+
const THEME_TO_CSS = {
|
|
24280
|
+
primary: "--primary",
|
|
24281
|
+
primaryForeground: "--primary-foreground",
|
|
24282
|
+
background: "--background",
|
|
24283
|
+
foreground: "--foreground",
|
|
24284
|
+
muted: "--muted",
|
|
24285
|
+
mutedForeground: "--muted-foreground",
|
|
24286
|
+
accent: "--accent",
|
|
24287
|
+
accentForeground: "--accent-foreground",
|
|
24288
|
+
secondary: "--secondary",
|
|
24289
|
+
secondaryForeground: "--secondary-foreground",
|
|
24290
|
+
card: "--card",
|
|
24291
|
+
cardForeground: "--card-foreground",
|
|
24292
|
+
popover: "--popover",
|
|
24293
|
+
popoverForeground: "--popover-foreground",
|
|
24294
|
+
destructive: "--destructive",
|
|
24295
|
+
border: "--border",
|
|
24296
|
+
input: "--input",
|
|
24297
|
+
ring: "--ring",
|
|
24298
|
+
radius: "--radius",
|
|
24299
|
+
// Extended SDK-specific variables
|
|
24300
|
+
sidebarBackground: "--sidebar-background",
|
|
24301
|
+
sidebarBorder: "--sidebar-border",
|
|
24302
|
+
userBubble: "--user-bubble",
|
|
24303
|
+
userBubbleForeground: "--user-bubble-foreground",
|
|
24304
|
+
assistantForeground: "--assistant-foreground",
|
|
24305
|
+
composerBorder: "--composer-border",
|
|
24306
|
+
composerRadius: "--composer-radius"
|
|
24307
|
+
};
|
|
24308
|
+
function themeToStyleVars(theme) {
|
|
24309
|
+
const vars = {};
|
|
24310
|
+
for (const [key, value] of Object.entries(theme)) {
|
|
24311
|
+
if (value != null && THEME_TO_CSS[key]) {
|
|
24312
|
+
vars[THEME_TO_CSS[key]] = value;
|
|
24313
|
+
}
|
|
24314
|
+
}
|
|
24315
|
+
return vars;
|
|
24316
|
+
}
|
|
24317
|
+
const themes = {
|
|
24318
|
+
/** Default light theme. Neutral grays with blue accent. */
|
|
24319
|
+
light: {
|
|
24320
|
+
background: "oklch(0.99 0 0)",
|
|
24321
|
+
foreground: "oklch(0.13 0 0)",
|
|
24322
|
+
primary: "oklch(0.55 0.2 250)",
|
|
24323
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24324
|
+
secondary: "oklch(0.96 0.005 250)",
|
|
24325
|
+
secondaryForeground: "oklch(0.13 0 0)",
|
|
24326
|
+
muted: "oklch(0.96 0.005 250)",
|
|
24327
|
+
mutedForeground: "oklch(0.5 0.02 250)",
|
|
24328
|
+
accent: "oklch(0.94 0.01 250)",
|
|
24329
|
+
accentForeground: "oklch(0.13 0 0)",
|
|
24330
|
+
card: "oklch(0.99 0 0)",
|
|
24331
|
+
cardForeground: "oklch(0.13 0 0)",
|
|
24332
|
+
popover: "oklch(0.99 0 0)",
|
|
24333
|
+
popoverForeground: "oklch(0.13 0 0)",
|
|
24334
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24335
|
+
border: "oklch(0.91 0.005 250)",
|
|
24336
|
+
input: "oklch(0.91 0.005 250)",
|
|
24337
|
+
ring: "oklch(0.55 0.2 250)",
|
|
24338
|
+
radius: "0.625rem"
|
|
24339
|
+
},
|
|
24340
|
+
/** Dark theme. Deep gray background with lighter text. */
|
|
24341
|
+
dark: {
|
|
24342
|
+
background: "oklch(0.15 0 0)",
|
|
24343
|
+
foreground: "oklch(0.95 0 0)",
|
|
24344
|
+
primary: "oklch(0.7 0.15 250)",
|
|
24345
|
+
primaryForeground: "oklch(0.13 0 0)",
|
|
24346
|
+
secondary: "oklch(0.22 0 0)",
|
|
24347
|
+
secondaryForeground: "oklch(0.95 0 0)",
|
|
24348
|
+
muted: "oklch(0.22 0 0)",
|
|
24349
|
+
mutedForeground: "oklch(0.65 0 0)",
|
|
24350
|
+
accent: "oklch(0.25 0 0)",
|
|
24351
|
+
accentForeground: "oklch(0.95 0 0)",
|
|
24352
|
+
card: "oklch(0.18 0 0)",
|
|
24353
|
+
cardForeground: "oklch(0.95 0 0)",
|
|
24354
|
+
popover: "oklch(0.18 0 0)",
|
|
24355
|
+
popoverForeground: "oklch(0.95 0 0)",
|
|
24356
|
+
destructive: "oklch(0.65 0.2 25)",
|
|
24357
|
+
border: "oklch(1 0 0 / 10%)",
|
|
24358
|
+
input: "oklch(1 0 0 / 15%)",
|
|
24359
|
+
ring: "oklch(0.7 0.15 250)",
|
|
24360
|
+
radius: "0.625rem"
|
|
24361
|
+
},
|
|
24362
|
+
/** Midnight theme. Deep navy with soft blue tones. */
|
|
24363
|
+
midnight: {
|
|
24364
|
+
background: "oklch(0.16 0.02 260)",
|
|
24365
|
+
foreground: "oklch(0.92 0.01 250)",
|
|
24366
|
+
primary: "oklch(0.68 0.16 250)",
|
|
24367
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
24368
|
+
secondary: "oklch(0.22 0.02 260)",
|
|
24369
|
+
secondaryForeground: "oklch(0.92 0.01 250)",
|
|
24370
|
+
muted: "oklch(0.22 0.02 260)",
|
|
24371
|
+
mutedForeground: "oklch(0.6 0.04 250)",
|
|
24372
|
+
accent: "oklch(0.26 0.03 260)",
|
|
24373
|
+
accentForeground: "oklch(0.92 0.01 250)",
|
|
24374
|
+
card: "oklch(0.19 0.02 260)",
|
|
24375
|
+
cardForeground: "oklch(0.92 0.01 250)",
|
|
24376
|
+
popover: "oklch(0.19 0.02 260)",
|
|
24377
|
+
popoverForeground: "oklch(0.92 0.01 250)",
|
|
24378
|
+
destructive: "oklch(0.65 0.2 25)",
|
|
24379
|
+
border: "oklch(0.3 0.03 260)",
|
|
24380
|
+
input: "oklch(0.3 0.03 260)",
|
|
24381
|
+
ring: "oklch(0.68 0.16 250)",
|
|
24382
|
+
radius: "0.625rem"
|
|
24383
|
+
},
|
|
24384
|
+
/** Warm earthy theme. Brown and sand tones. */
|
|
24385
|
+
warm: {
|
|
24386
|
+
background: "oklch(0.98 0.005 80)",
|
|
24387
|
+
foreground: "oklch(0.2 0.02 50)",
|
|
24388
|
+
primary: "oklch(0.55 0.12 50)",
|
|
24389
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
24390
|
+
secondary: "oklch(0.94 0.01 80)",
|
|
24391
|
+
secondaryForeground: "oklch(0.2 0.02 50)",
|
|
24392
|
+
muted: "oklch(0.95 0.01 80)",
|
|
24393
|
+
mutedForeground: "oklch(0.5 0.03 50)",
|
|
24394
|
+
accent: "oklch(0.92 0.015 80)",
|
|
24395
|
+
accentForeground: "oklch(0.2 0.02 50)",
|
|
24396
|
+
card: "oklch(0.98 0.005 80)",
|
|
24397
|
+
cardForeground: "oklch(0.2 0.02 50)",
|
|
24398
|
+
popover: "oklch(0.98 0.005 80)",
|
|
24399
|
+
popoverForeground: "oklch(0.2 0.02 50)",
|
|
24400
|
+
destructive: "oklch(0.55 0.2 25)",
|
|
24401
|
+
border: "oklch(0.9 0.01 80)",
|
|
24402
|
+
input: "oklch(0.9 0.01 80)",
|
|
24403
|
+
ring: "oklch(0.55 0.12 50)",
|
|
24404
|
+
radius: "0.75rem"
|
|
24405
|
+
},
|
|
24406
|
+
/** Purple creative theme. Vibrant purple accent. */
|
|
24407
|
+
purple: {
|
|
24408
|
+
background: "oklch(0.99 0.003 310)",
|
|
24409
|
+
foreground: "oklch(0.15 0.02 310)",
|
|
24410
|
+
primary: "oklch(0.55 0.22 310)",
|
|
24411
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24412
|
+
secondary: "oklch(0.96 0.01 310)",
|
|
24413
|
+
secondaryForeground: "oklch(0.15 0.02 310)",
|
|
24414
|
+
muted: "oklch(0.96 0.01 310)",
|
|
24415
|
+
mutedForeground: "oklch(0.5 0.04 310)",
|
|
24416
|
+
accent: "oklch(0.94 0.015 310)",
|
|
24417
|
+
accentForeground: "oklch(0.15 0.02 310)",
|
|
24418
|
+
card: "oklch(0.99 0.003 310)",
|
|
24419
|
+
cardForeground: "oklch(0.15 0.02 310)",
|
|
24420
|
+
popover: "oklch(0.99 0.003 310)",
|
|
24421
|
+
popoverForeground: "oklch(0.15 0.02 310)",
|
|
24422
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24423
|
+
border: "oklch(0.92 0.005 310)",
|
|
24424
|
+
input: "oklch(0.92 0.005 310)",
|
|
24425
|
+
ring: "oklch(0.55 0.22 310)",
|
|
24426
|
+
radius: "0.75rem"
|
|
24427
|
+
},
|
|
24428
|
+
/** Green nature theme. Fresh green tones. */
|
|
24429
|
+
green: {
|
|
24430
|
+
background: "oklch(0.99 0.003 150)",
|
|
24431
|
+
foreground: "oklch(0.15 0.02 150)",
|
|
24432
|
+
primary: "oklch(0.55 0.18 155)",
|
|
24433
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24434
|
+
secondary: "oklch(0.96 0.01 150)",
|
|
24435
|
+
secondaryForeground: "oklch(0.15 0.02 150)",
|
|
24436
|
+
muted: "oklch(0.96 0.01 150)",
|
|
24437
|
+
mutedForeground: "oklch(0.5 0.03 150)",
|
|
24438
|
+
accent: "oklch(0.94 0.015 150)",
|
|
24439
|
+
accentForeground: "oklch(0.15 0.02 150)",
|
|
24440
|
+
card: "oklch(0.99 0.003 150)",
|
|
24441
|
+
cardForeground: "oklch(0.15 0.02 150)",
|
|
24442
|
+
popover: "oklch(0.99 0.003 150)",
|
|
24443
|
+
popoverForeground: "oklch(0.15 0.02 150)",
|
|
24444
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24445
|
+
border: "oklch(0.92 0.008 150)",
|
|
24446
|
+
input: "oklch(0.92 0.008 150)",
|
|
24447
|
+
ring: "oklch(0.55 0.18 155)",
|
|
24448
|
+
radius: "0.625rem"
|
|
24449
|
+
}
|
|
24450
|
+
};
|
|
24451
|
+
function AthenaStandalone({
|
|
24279
24452
|
children,
|
|
24280
24453
|
apiUrl,
|
|
24281
24454
|
backendUrl,
|
|
@@ -24289,8 +24462,7 @@ function AthenaRuntimeInner({
|
|
|
24289
24462
|
workbench,
|
|
24290
24463
|
knowledgeBase,
|
|
24291
24464
|
systemPrompt,
|
|
24292
|
-
threadId
|
|
24293
|
-
initialMessages
|
|
24465
|
+
threadId
|
|
24294
24466
|
}) {
|
|
24295
24467
|
const auiTools = React.useMemo(() => Tools({ toolkit: frontendTools }), [frontendTools]);
|
|
24296
24468
|
const aui = useAui({ tools: auiTools });
|
|
@@ -24306,8 +24478,7 @@ function AthenaRuntimeInner({
|
|
|
24306
24478
|
workbench,
|
|
24307
24479
|
knowledgeBase,
|
|
24308
24480
|
systemPrompt,
|
|
24309
|
-
threadId
|
|
24310
|
-
initialMessages
|
|
24481
|
+
threadId
|
|
24311
24482
|
});
|
|
24312
24483
|
const athenaConfig = React.useMemo(
|
|
24313
24484
|
() => ({ backendUrl, apiKey, token }),
|
|
@@ -24315,16 +24486,71 @@ function AthenaRuntimeInner({
|
|
|
24315
24486
|
);
|
|
24316
24487
|
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children }) }) });
|
|
24317
24488
|
}
|
|
24318
|
-
function
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
|
|
24326
|
-
|
|
24489
|
+
function useAthenaRuntimeHook(config2) {
|
|
24490
|
+
const remoteId = useAthenaThreadId();
|
|
24491
|
+
return useAthenaRuntime({
|
|
24492
|
+
apiUrl: config2.apiUrl,
|
|
24493
|
+
backendUrl: config2.backendUrl,
|
|
24494
|
+
apiKey: config2.apiKey,
|
|
24495
|
+
token: config2.token,
|
|
24496
|
+
model: config2.model,
|
|
24497
|
+
agent: config2.agent,
|
|
24498
|
+
tools: config2.tools,
|
|
24499
|
+
frontendToolIds: config2.frontendToolIds,
|
|
24500
|
+
workbench: config2.workbench,
|
|
24501
|
+
knowledgeBase: config2.knowledgeBase,
|
|
24502
|
+
systemPrompt: config2.systemPrompt,
|
|
24503
|
+
threadId: remoteId
|
|
24504
|
+
});
|
|
24505
|
+
}
|
|
24506
|
+
function AthenaWithThreadList({
|
|
24507
|
+
children,
|
|
24508
|
+
apiUrl,
|
|
24509
|
+
backendUrl,
|
|
24510
|
+
apiKey,
|
|
24511
|
+
token,
|
|
24512
|
+
model,
|
|
24513
|
+
agent: agent2,
|
|
24514
|
+
tools,
|
|
24515
|
+
frontendToolIds,
|
|
24516
|
+
frontendTools,
|
|
24517
|
+
workbench,
|
|
24518
|
+
knowledgeBase,
|
|
24519
|
+
systemPrompt
|
|
24520
|
+
}) {
|
|
24521
|
+
const adapter = useAthenaThreadListAdapter({
|
|
24522
|
+
backendUrl,
|
|
24523
|
+
apiKey,
|
|
24524
|
+
token
|
|
24525
|
+
});
|
|
24526
|
+
const runtimeConfig = React.useMemo(() => ({
|
|
24527
|
+
apiUrl,
|
|
24528
|
+
backendUrl,
|
|
24529
|
+
apiKey,
|
|
24530
|
+
token,
|
|
24531
|
+
model,
|
|
24532
|
+
agent: agent2,
|
|
24533
|
+
tools,
|
|
24534
|
+
frontendToolIds,
|
|
24535
|
+
workbench,
|
|
24536
|
+
knowledgeBase,
|
|
24537
|
+
systemPrompt
|
|
24538
|
+
}), [apiUrl, backendUrl, apiKey, token, model, agent2, tools, frontendToolIds, workbench, knowledgeBase, systemPrompt]);
|
|
24539
|
+
const runtimeHook = React.useCallback(
|
|
24540
|
+
() => useAthenaRuntimeHook(runtimeConfig),
|
|
24541
|
+
[runtimeConfig]
|
|
24542
|
+
);
|
|
24543
|
+
const runtime = useRemoteThreadListRuntime({
|
|
24544
|
+
runtimeHook,
|
|
24545
|
+
adapter
|
|
24546
|
+
});
|
|
24547
|
+
const auiTools = React.useMemo(() => Tools({ toolkit: frontendTools }), [frontendTools]);
|
|
24548
|
+
const aui = useAui({ tools: auiTools });
|
|
24549
|
+
const athenaConfig = React.useMemo(
|
|
24550
|
+
() => ({ backendUrl, apiKey, token }),
|
|
24551
|
+
[backendUrl, apiKey, token]
|
|
24327
24552
|
);
|
|
24553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children }) }) });
|
|
24328
24554
|
}
|
|
24329
24555
|
function AthenaProvider({
|
|
24330
24556
|
children,
|
|
@@ -24340,100 +24566,57 @@ function AthenaProvider({
|
|
|
24340
24566
|
knowledgeBase,
|
|
24341
24567
|
systemPrompt,
|
|
24342
24568
|
threadId: threadIdProp,
|
|
24343
|
-
enableThreadList = false
|
|
24569
|
+
enableThreadList = false,
|
|
24570
|
+
theme
|
|
24344
24571
|
}) {
|
|
24345
24572
|
const frontendToolNames = React.useMemo(() => Object.keys(frontendTools), [frontendTools]);
|
|
24573
|
+
const themeStyleVars = React.useMemo(() => theme ? themeToStyleVars(theme) : void 0, [theme]);
|
|
24346
24574
|
const parentAuthToken = useParentAuth();
|
|
24347
24575
|
const effectiveToken = tokenProp ?? parentAuthToken;
|
|
24348
24576
|
const effectiveBackendUrl = backendUrl ?? DEFAULT_BACKEND_URL;
|
|
24349
|
-
|
|
24350
|
-
|
|
24351
|
-
|
|
24352
|
-
|
|
24353
|
-
|
|
24354
|
-
|
|
24355
|
-
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
}
|
|
24368
|
-
const activeThreadId = useActiveThreadFromStore(
|
|
24369
|
-
enableThreadList ? threadListStoreRef.current : null
|
|
24370
|
-
);
|
|
24371
|
-
const [displayedThreadId, setDisplayedThreadId] = React.useState(null);
|
|
24372
|
-
const [loadedMessages, setLoadedMessages] = React.useState(void 0);
|
|
24373
|
-
const [isLoadingThread, setIsLoadingThread] = React.useState(false);
|
|
24374
|
-
React.useEffect(() => {
|
|
24375
|
-
var _a2;
|
|
24376
|
-
if (!enableThreadList) return;
|
|
24377
|
-
if (activeThreadId === displayedThreadId) return;
|
|
24378
|
-
const threads = ((_a2 = threadListStoreRef.current) == null ? void 0 : _a2.getState().threads) ?? [];
|
|
24379
|
-
const isExistingThread = threads.some((t) => t.thread_id === activeThreadId);
|
|
24380
|
-
if (!isExistingThread) {
|
|
24381
|
-
setLoadedMessages(void 0);
|
|
24382
|
-
setDisplayedThreadId(activeThreadId);
|
|
24383
|
-
setIsLoadingThread(false);
|
|
24384
|
-
return;
|
|
24385
|
-
}
|
|
24386
|
-
let cancelled = false;
|
|
24387
|
-
setIsLoadingThread(true);
|
|
24388
|
-
getThreadState(effectiveBackendUrl, { apiKey, token: effectiveToken }, activeThreadId).then((state) => {
|
|
24389
|
-
var _a3;
|
|
24390
|
-
if (cancelled) return;
|
|
24391
|
-
if (process.env.NODE_ENV !== "production") {
|
|
24392
|
-
console.log("[AthenaThreads] Loaded thread state", {
|
|
24393
|
-
threadId: activeThreadId,
|
|
24394
|
-
messageCount: ((_a3 = state.messages) == null ? void 0 : _a3.length) ?? 0
|
|
24395
|
-
});
|
|
24577
|
+
let inner;
|
|
24578
|
+
if (enableThreadList) {
|
|
24579
|
+
inner = /* @__PURE__ */ jsxRuntime.jsx(
|
|
24580
|
+
AthenaWithThreadList,
|
|
24581
|
+
{
|
|
24582
|
+
apiUrl,
|
|
24583
|
+
backendUrl: effectiveBackendUrl,
|
|
24584
|
+
apiKey,
|
|
24585
|
+
token: effectiveToken,
|
|
24586
|
+
model,
|
|
24587
|
+
agent: agent2,
|
|
24588
|
+
tools,
|
|
24589
|
+
frontendToolIds: frontendToolNames,
|
|
24590
|
+
frontendTools,
|
|
24591
|
+
workbench,
|
|
24592
|
+
knowledgeBase,
|
|
24593
|
+
systemPrompt,
|
|
24594
|
+
children
|
|
24396
24595
|
}
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
|
|
24403
|
-
|
|
24596
|
+
);
|
|
24597
|
+
} else {
|
|
24598
|
+
inner = /* @__PURE__ */ jsxRuntime.jsx(
|
|
24599
|
+
AthenaStandalone,
|
|
24600
|
+
{
|
|
24601
|
+
apiUrl,
|
|
24602
|
+
backendUrl: effectiveBackendUrl,
|
|
24603
|
+
apiKey,
|
|
24604
|
+
token: effectiveToken,
|
|
24605
|
+
model,
|
|
24606
|
+
agent: agent2,
|
|
24607
|
+
tools,
|
|
24608
|
+
frontendToolIds: frontendToolNames,
|
|
24609
|
+
frontendTools,
|
|
24610
|
+
workbench,
|
|
24611
|
+
knowledgeBase,
|
|
24612
|
+
systemPrompt,
|
|
24613
|
+
threadId: threadIdProp,
|
|
24614
|
+
children
|
|
24404
24615
|
}
|
|
24405
|
-
|
|
24406
|
-
|
|
24407
|
-
|
|
24408
|
-
});
|
|
24409
|
-
return () => {
|
|
24410
|
-
cancelled = true;
|
|
24411
|
-
};
|
|
24412
|
-
}, [activeThreadId, displayedThreadId, enableThreadList, effectiveBackendUrl, apiKey, effectiveToken]);
|
|
24413
|
-
const resolvedThreadId = threadIdProp ?? displayedThreadId ?? void 0;
|
|
24414
|
-
const inner = /* @__PURE__ */ jsxRuntime.jsx(ThreadLoadingContext.Provider, { value: isLoadingThread, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24415
|
-
AthenaRuntimeInner,
|
|
24416
|
-
{
|
|
24417
|
-
apiUrl,
|
|
24418
|
-
backendUrl: effectiveBackendUrl,
|
|
24419
|
-
apiKey,
|
|
24420
|
-
token: effectiveToken,
|
|
24421
|
-
model,
|
|
24422
|
-
agent: agent2,
|
|
24423
|
-
tools,
|
|
24424
|
-
frontendToolIds: frontendToolNames,
|
|
24425
|
-
frontendTools,
|
|
24426
|
-
workbench,
|
|
24427
|
-
knowledgeBase,
|
|
24428
|
-
systemPrompt,
|
|
24429
|
-
threadId: resolvedThreadId,
|
|
24430
|
-
initialMessages: loadedMessages,
|
|
24431
|
-
children
|
|
24432
|
-
},
|
|
24433
|
-
resolvedThreadId ?? "__new__"
|
|
24434
|
-
) });
|
|
24435
|
-
if (enableThreadList && threadListStoreRef.current) {
|
|
24436
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ThreadListContext.Provider, { value: threadListStoreRef.current, children: inner });
|
|
24616
|
+
);
|
|
24617
|
+
}
|
|
24618
|
+
if (themeStyleVars) {
|
|
24619
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "athena-themed", style: themeStyleVars, children: inner });
|
|
24437
24620
|
}
|
|
24438
24621
|
return inner;
|
|
24439
24622
|
}
|
|
@@ -57228,10 +57411,10 @@ const HorizontalRule$1 = HorizontalRule.extend({
|
|
|
57228
57411
|
};
|
|
57229
57412
|
}
|
|
57230
57413
|
});
|
|
57231
|
-
const Image = Node3.create({
|
|
57414
|
+
const Image$1 = Node3.create({
|
|
57232
57415
|
name: "image"
|
|
57233
57416
|
});
|
|
57234
|
-
const Image$1 = Image.extend({
|
|
57417
|
+
const Image$1$1 = Image$1.extend({
|
|
57235
57418
|
/**
|
|
57236
57419
|
* @return {{markdown: MarkdownNodeSpec}}
|
|
57237
57420
|
*/
|
|
@@ -57515,10 +57698,10 @@ const Italic$1 = Italic.extend({
|
|
|
57515
57698
|
};
|
|
57516
57699
|
}
|
|
57517
57700
|
});
|
|
57518
|
-
const Link = Mark2.create({
|
|
57701
|
+
const Link$1 = Mark2.create({
|
|
57519
57702
|
name: "link"
|
|
57520
57703
|
});
|
|
57521
|
-
const Link$1 = Link.extend({
|
|
57704
|
+
const Link$1$1 = Link$1.extend({
|
|
57522
57705
|
/**
|
|
57523
57706
|
* @return {{markdown: MarkdownMarkSpec}}
|
|
57524
57707
|
*/
|
|
@@ -57555,7 +57738,7 @@ const Strike$1 = Strike.extend({
|
|
|
57555
57738
|
};
|
|
57556
57739
|
}
|
|
57557
57740
|
});
|
|
57558
|
-
const markdownExtensions = [Blockquote$1, BulletList$1, CodeBlock$1, HardBreak$1, Heading$1, HorizontalRule$1, HTMLNode, Image$1, ListItem$1, OrderedList$1, Paragraph$1, Table$1, TaskItem$1, TaskList$1, Text$1, Bold$1, Code$1$1, HTMLMark, Italic$1, Link$1, Strike$1];
|
|
57741
|
+
const markdownExtensions = [Blockquote$1, BulletList$1, CodeBlock$1, HardBreak$1, Heading$1, HorizontalRule$1, HTMLNode, Image$1$1, ListItem$1, OrderedList$1, Paragraph$1, Table$1, TaskItem$1, TaskList$1, Text$1, Bold$1, Code$1$1, HTMLMark, Italic$1, Link$1$1, Strike$1];
|
|
57559
57742
|
function getMarkdownSpec(extension) {
|
|
57560
57743
|
var _extension$storage, _markdownExtensions$f;
|
|
57561
57744
|
const markdownSpec = (_extension$storage = extension.storage) === null || _extension$storage === void 0 ? void 0 : _extension$storage.markdown;
|
|
@@ -60368,41 +60551,41 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
60368
60551
|
* This source code is licensed under the ISC license.
|
|
60369
60552
|
* See the LICENSE file in the root directory of this source tree.
|
|
60370
60553
|
*/
|
|
60371
|
-
const __iconNode$
|
|
60554
|
+
const __iconNode$J = [
|
|
60372
60555
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
60373
60556
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
60374
60557
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
60375
60558
|
];
|
|
60376
|
-
const Archive = createLucideIcon("archive", __iconNode$
|
|
60559
|
+
const Archive = createLucideIcon("archive", __iconNode$J);
|
|
60377
60560
|
/**
|
|
60378
60561
|
* @license lucide-react v0.575.0 - ISC
|
|
60379
60562
|
*
|
|
60380
60563
|
* This source code is licensed under the ISC license.
|
|
60381
60564
|
* See the LICENSE file in the root directory of this source tree.
|
|
60382
60565
|
*/
|
|
60383
|
-
const __iconNode$
|
|
60566
|
+
const __iconNode$I = [
|
|
60384
60567
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
60385
60568
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
60386
60569
|
];
|
|
60387
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
60570
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$I);
|
|
60388
60571
|
/**
|
|
60389
60572
|
* @license lucide-react v0.575.0 - ISC
|
|
60390
60573
|
*
|
|
60391
60574
|
* This source code is licensed under the ISC license.
|
|
60392
60575
|
* See the LICENSE file in the root directory of this source tree.
|
|
60393
60576
|
*/
|
|
60394
|
-
const __iconNode$
|
|
60577
|
+
const __iconNode$H = [
|
|
60395
60578
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
60396
60579
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
60397
60580
|
];
|
|
60398
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
60581
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$H);
|
|
60399
60582
|
/**
|
|
60400
60583
|
* @license lucide-react v0.575.0 - ISC
|
|
60401
60584
|
*
|
|
60402
60585
|
* This source code is licensed under the ISC license.
|
|
60403
60586
|
* See the LICENSE file in the root directory of this source tree.
|
|
60404
60587
|
*/
|
|
60405
|
-
const __iconNode$
|
|
60588
|
+
const __iconNode$G = [
|
|
60406
60589
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
60407
60590
|
[
|
|
60408
60591
|
"path",
|
|
@@ -60412,14 +60595,14 @@ const __iconNode$B = [
|
|
|
60412
60595
|
}
|
|
60413
60596
|
]
|
|
60414
60597
|
];
|
|
60415
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
60598
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$G);
|
|
60416
60599
|
/**
|
|
60417
60600
|
* @license lucide-react v0.575.0 - ISC
|
|
60418
60601
|
*
|
|
60419
60602
|
* This source code is licensed under the ISC license.
|
|
60420
60603
|
* See the LICENSE file in the root directory of this source tree.
|
|
60421
60604
|
*/
|
|
60422
|
-
const __iconNode$
|
|
60605
|
+
const __iconNode$F = [
|
|
60423
60606
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
60424
60607
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
60425
60608
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -60429,148 +60612,148 @@ const __iconNode$A = [
|
|
|
60429
60612
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
60430
60613
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
60431
60614
|
];
|
|
60432
|
-
const Brain = createLucideIcon("brain", __iconNode$
|
|
60615
|
+
const Brain = createLucideIcon("brain", __iconNode$F);
|
|
60433
60616
|
/**
|
|
60434
60617
|
* @license lucide-react v0.575.0 - ISC
|
|
60435
60618
|
*
|
|
60436
60619
|
* This source code is licensed under the ISC license.
|
|
60437
60620
|
* See the LICENSE file in the root directory of this source tree.
|
|
60438
60621
|
*/
|
|
60439
|
-
const __iconNode$
|
|
60622
|
+
const __iconNode$E = [
|
|
60440
60623
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
60441
60624
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
60442
60625
|
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
60443
60626
|
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
60444
60627
|
];
|
|
60445
|
-
const ChartColumn = createLucideIcon("chart-column", __iconNode$
|
|
60628
|
+
const ChartColumn = createLucideIcon("chart-column", __iconNode$E);
|
|
60446
60629
|
/**
|
|
60447
60630
|
* @license lucide-react v0.575.0 - ISC
|
|
60448
60631
|
*
|
|
60449
60632
|
* This source code is licensed under the ISC license.
|
|
60450
60633
|
* See the LICENSE file in the root directory of this source tree.
|
|
60451
60634
|
*/
|
|
60452
|
-
const __iconNode$
|
|
60453
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
60635
|
+
const __iconNode$D = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
60636
|
+
const Check = createLucideIcon("check", __iconNode$D);
|
|
60454
60637
|
/**
|
|
60455
60638
|
* @license lucide-react v0.575.0 - ISC
|
|
60456
60639
|
*
|
|
60457
60640
|
* This source code is licensed under the ISC license.
|
|
60458
60641
|
* See the LICENSE file in the root directory of this source tree.
|
|
60459
60642
|
*/
|
|
60460
|
-
const __iconNode$
|
|
60461
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
60643
|
+
const __iconNode$C = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
60644
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$C);
|
|
60462
60645
|
/**
|
|
60463
60646
|
* @license lucide-react v0.575.0 - ISC
|
|
60464
60647
|
*
|
|
60465
60648
|
* This source code is licensed under the ISC license.
|
|
60466
60649
|
* See the LICENSE file in the root directory of this source tree.
|
|
60467
60650
|
*/
|
|
60468
|
-
const __iconNode$
|
|
60651
|
+
const __iconNode$B = [
|
|
60469
60652
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60470
60653
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
60471
60654
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
60472
60655
|
];
|
|
60473
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
60656
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$B);
|
|
60474
60657
|
/**
|
|
60475
60658
|
* @license lucide-react v0.575.0 - ISC
|
|
60476
60659
|
*
|
|
60477
60660
|
* This source code is licensed under the ISC license.
|
|
60478
60661
|
* See the LICENSE file in the root directory of this source tree.
|
|
60479
60662
|
*/
|
|
60480
|
-
const __iconNode$
|
|
60663
|
+
const __iconNode$A = [
|
|
60481
60664
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60482
60665
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
60483
60666
|
];
|
|
60484
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
60667
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$A);
|
|
60485
60668
|
/**
|
|
60486
60669
|
* @license lucide-react v0.575.0 - ISC
|
|
60487
60670
|
*
|
|
60488
60671
|
* This source code is licensed under the ISC license.
|
|
60489
60672
|
* See the LICENSE file in the root directory of this source tree.
|
|
60490
60673
|
*/
|
|
60491
|
-
const __iconNode$
|
|
60674
|
+
const __iconNode$z = [
|
|
60492
60675
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60493
60676
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
60494
60677
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
60495
60678
|
];
|
|
60496
|
-
const CircleX = createLucideIcon("circle-x", __iconNode$
|
|
60679
|
+
const CircleX = createLucideIcon("circle-x", __iconNode$z);
|
|
60497
60680
|
/**
|
|
60498
60681
|
* @license lucide-react v0.575.0 - ISC
|
|
60499
60682
|
*
|
|
60500
60683
|
* This source code is licensed under the ISC license.
|
|
60501
60684
|
* See the LICENSE file in the root directory of this source tree.
|
|
60502
60685
|
*/
|
|
60503
|
-
const __iconNode$
|
|
60686
|
+
const __iconNode$y = [
|
|
60504
60687
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
60505
60688
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
60506
60689
|
];
|
|
60507
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
60690
|
+
const Code = createLucideIcon("code", __iconNode$y);
|
|
60508
60691
|
/**
|
|
60509
60692
|
* @license lucide-react v0.575.0 - ISC
|
|
60510
60693
|
*
|
|
60511
60694
|
* This source code is licensed under the ISC license.
|
|
60512
60695
|
* See the LICENSE file in the root directory of this source tree.
|
|
60513
60696
|
*/
|
|
60514
|
-
const __iconNode$
|
|
60697
|
+
const __iconNode$x = [
|
|
60515
60698
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
60516
60699
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
60517
60700
|
];
|
|
60518
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
60701
|
+
const Copy = createLucideIcon("copy", __iconNode$x);
|
|
60519
60702
|
/**
|
|
60520
60703
|
* @license lucide-react v0.575.0 - ISC
|
|
60521
60704
|
*
|
|
60522
60705
|
* This source code is licensed under the ISC license.
|
|
60523
60706
|
* See the LICENSE file in the root directory of this source tree.
|
|
60524
60707
|
*/
|
|
60525
|
-
const __iconNode$
|
|
60708
|
+
const __iconNode$w = [
|
|
60526
60709
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
60527
60710
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
60528
60711
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
60529
60712
|
];
|
|
60530
|
-
const Database = createLucideIcon("database", __iconNode$
|
|
60713
|
+
const Database = createLucideIcon("database", __iconNode$w);
|
|
60531
60714
|
/**
|
|
60532
60715
|
* @license lucide-react v0.575.0 - ISC
|
|
60533
60716
|
*
|
|
60534
60717
|
* This source code is licensed under the ISC license.
|
|
60535
60718
|
* See the LICENSE file in the root directory of this source tree.
|
|
60536
60719
|
*/
|
|
60537
|
-
const __iconNode$
|
|
60720
|
+
const __iconNode$v = [
|
|
60538
60721
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
60539
60722
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
60540
60723
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
60541
60724
|
];
|
|
60542
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
60725
|
+
const Download = createLucideIcon("download", __iconNode$v);
|
|
60543
60726
|
/**
|
|
60544
60727
|
* @license lucide-react v0.575.0 - ISC
|
|
60545
60728
|
*
|
|
60546
60729
|
* This source code is licensed under the ISC license.
|
|
60547
60730
|
* See the LICENSE file in the root directory of this source tree.
|
|
60548
60731
|
*/
|
|
60549
|
-
const __iconNode$
|
|
60732
|
+
const __iconNode$u = [
|
|
60550
60733
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
60551
60734
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
60552
60735
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
60553
60736
|
];
|
|
60554
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$
|
|
60737
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$u);
|
|
60555
60738
|
/**
|
|
60556
60739
|
* @license lucide-react v0.575.0 - ISC
|
|
60557
60740
|
*
|
|
60558
60741
|
* This source code is licensed under the ISC license.
|
|
60559
60742
|
* See the LICENSE file in the root directory of this source tree.
|
|
60560
60743
|
*/
|
|
60561
|
-
const __iconNode$
|
|
60744
|
+
const __iconNode$t = [
|
|
60562
60745
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
60563
60746
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
60564
60747
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
60565
60748
|
];
|
|
60566
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
60749
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$t);
|
|
60567
60750
|
/**
|
|
60568
60751
|
* @license lucide-react v0.575.0 - ISC
|
|
60569
60752
|
*
|
|
60570
60753
|
* This source code is licensed under the ISC license.
|
|
60571
60754
|
* See the LICENSE file in the root directory of this source tree.
|
|
60572
60755
|
*/
|
|
60573
|
-
const __iconNode$
|
|
60756
|
+
const __iconNode$s = [
|
|
60574
60757
|
[
|
|
60575
60758
|
"path",
|
|
60576
60759
|
{
|
|
@@ -60582,14 +60765,14 @@ const __iconNode$n = [
|
|
|
60582
60765
|
["path", { d: "M9 15h6", key: "cctwl0" }],
|
|
60583
60766
|
["path", { d: "M12 18v-6", key: "17g6i2" }]
|
|
60584
60767
|
];
|
|
60585
|
-
const FilePlus = createLucideIcon("file-plus", __iconNode$
|
|
60768
|
+
const FilePlus = createLucideIcon("file-plus", __iconNode$s);
|
|
60586
60769
|
/**
|
|
60587
60770
|
* @license lucide-react v0.575.0 - ISC
|
|
60588
60771
|
*
|
|
60589
60772
|
* This source code is licensed under the ISC license.
|
|
60590
60773
|
* See the LICENSE file in the root directory of this source tree.
|
|
60591
60774
|
*/
|
|
60592
|
-
const __iconNode$
|
|
60775
|
+
const __iconNode$r = [
|
|
60593
60776
|
[
|
|
60594
60777
|
"path",
|
|
60595
60778
|
{
|
|
@@ -60603,14 +60786,14 @@ const __iconNode$m = [
|
|
|
60603
60786
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
60604
60787
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
60605
60788
|
];
|
|
60606
|
-
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$
|
|
60789
|
+
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$r);
|
|
60607
60790
|
/**
|
|
60608
60791
|
* @license lucide-react v0.575.0 - ISC
|
|
60609
60792
|
*
|
|
60610
60793
|
* This source code is licensed under the ISC license.
|
|
60611
60794
|
* See the LICENSE file in the root directory of this source tree.
|
|
60612
60795
|
*/
|
|
60613
|
-
const __iconNode$
|
|
60796
|
+
const __iconNode$q = [
|
|
60614
60797
|
[
|
|
60615
60798
|
"path",
|
|
60616
60799
|
{
|
|
@@ -60623,14 +60806,14 @@ const __iconNode$l = [
|
|
|
60623
60806
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
60624
60807
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
60625
60808
|
];
|
|
60626
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
60809
|
+
const FileText = createLucideIcon("file-text", __iconNode$q);
|
|
60627
60810
|
/**
|
|
60628
60811
|
* @license lucide-react v0.575.0 - ISC
|
|
60629
60812
|
*
|
|
60630
60813
|
* This source code is licensed under the ISC license.
|
|
60631
60814
|
* See the LICENSE file in the root directory of this source tree.
|
|
60632
60815
|
*/
|
|
60633
|
-
const __iconNode$
|
|
60816
|
+
const __iconNode$p = [
|
|
60634
60817
|
[
|
|
60635
60818
|
"path",
|
|
60636
60819
|
{
|
|
@@ -60640,26 +60823,54 @@ const __iconNode$k = [
|
|
|
60640
60823
|
],
|
|
60641
60824
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
60642
60825
|
];
|
|
60643
|
-
const File$1 = createLucideIcon("file", __iconNode$
|
|
60826
|
+
const File$1 = createLucideIcon("file", __iconNode$p);
|
|
60644
60827
|
/**
|
|
60645
60828
|
* @license lucide-react v0.575.0 - ISC
|
|
60646
60829
|
*
|
|
60647
60830
|
* This source code is licensed under the ISC license.
|
|
60648
60831
|
* See the LICENSE file in the root directory of this source tree.
|
|
60649
60832
|
*/
|
|
60650
|
-
const __iconNode$
|
|
60833
|
+
const __iconNode$o = [
|
|
60834
|
+
[
|
|
60835
|
+
"path",
|
|
60836
|
+
{
|
|
60837
|
+
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
60838
|
+
key: "usdka0"
|
|
60839
|
+
}
|
|
60840
|
+
]
|
|
60841
|
+
];
|
|
60842
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$o);
|
|
60843
|
+
/**
|
|
60844
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60845
|
+
*
|
|
60846
|
+
* This source code is licensed under the ISC license.
|
|
60847
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60848
|
+
*/
|
|
60849
|
+
const __iconNode$n = [
|
|
60651
60850
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60652
60851
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
60653
60852
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
60654
60853
|
];
|
|
60655
|
-
const Globe = createLucideIcon("globe", __iconNode$
|
|
60854
|
+
const Globe = createLucideIcon("globe", __iconNode$n);
|
|
60656
60855
|
/**
|
|
60657
60856
|
* @license lucide-react v0.575.0 - ISC
|
|
60658
60857
|
*
|
|
60659
60858
|
* This source code is licensed under the ISC license.
|
|
60660
60859
|
* See the LICENSE file in the root directory of this source tree.
|
|
60661
60860
|
*/
|
|
60662
|
-
const __iconNode$
|
|
60861
|
+
const __iconNode$m = [
|
|
60862
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
60863
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
60864
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
60865
|
+
];
|
|
60866
|
+
const Image = createLucideIcon("image", __iconNode$m);
|
|
60867
|
+
/**
|
|
60868
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60869
|
+
*
|
|
60870
|
+
* This source code is licensed under the ISC license.
|
|
60871
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60872
|
+
*/
|
|
60873
|
+
const __iconNode$l = [
|
|
60663
60874
|
[
|
|
60664
60875
|
"path",
|
|
60665
60876
|
{
|
|
@@ -60682,35 +60893,46 @@ const __iconNode$i = [
|
|
|
60682
60893
|
}
|
|
60683
60894
|
]
|
|
60684
60895
|
];
|
|
60685
|
-
const Layers = createLucideIcon("layers", __iconNode$
|
|
60896
|
+
const Layers = createLucideIcon("layers", __iconNode$l);
|
|
60686
60897
|
/**
|
|
60687
60898
|
* @license lucide-react v0.575.0 - ISC
|
|
60688
60899
|
*
|
|
60689
60900
|
* This source code is licensed under the ISC license.
|
|
60690
60901
|
* See the LICENSE file in the root directory of this source tree.
|
|
60691
60902
|
*/
|
|
60692
|
-
const __iconNode$
|
|
60903
|
+
const __iconNode$k = [
|
|
60693
60904
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
60694
60905
|
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
60695
60906
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
60696
60907
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
60697
60908
|
];
|
|
60698
|
-
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$
|
|
60909
|
+
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$k);
|
|
60699
60910
|
/**
|
|
60700
60911
|
* @license lucide-react v0.575.0 - ISC
|
|
60701
60912
|
*
|
|
60702
60913
|
* This source code is licensed under the ISC license.
|
|
60703
60914
|
* See the LICENSE file in the root directory of this source tree.
|
|
60704
60915
|
*/
|
|
60705
|
-
const __iconNode$
|
|
60706
|
-
|
|
60916
|
+
const __iconNode$j = [
|
|
60917
|
+
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
60918
|
+
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
60919
|
+
];
|
|
60920
|
+
const Link = createLucideIcon("link", __iconNode$j);
|
|
60707
60921
|
/**
|
|
60708
60922
|
* @license lucide-react v0.575.0 - ISC
|
|
60709
60923
|
*
|
|
60710
60924
|
* This source code is licensed under the ISC license.
|
|
60711
60925
|
* See the LICENSE file in the root directory of this source tree.
|
|
60712
60926
|
*/
|
|
60713
|
-
const __iconNode$
|
|
60927
|
+
const __iconNode$i = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
60928
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$i);
|
|
60929
|
+
/**
|
|
60930
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60931
|
+
*
|
|
60932
|
+
* This source code is licensed under the ISC license.
|
|
60933
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60934
|
+
*/
|
|
60935
|
+
const __iconNode$h = [
|
|
60714
60936
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
60715
60937
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
60716
60938
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -60720,38 +60942,38 @@ const __iconNode$f = [
|
|
|
60720
60942
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
60721
60943
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
60722
60944
|
];
|
|
60723
|
-
const Loader = createLucideIcon("loader", __iconNode$
|
|
60945
|
+
const Loader = createLucideIcon("loader", __iconNode$h);
|
|
60724
60946
|
/**
|
|
60725
60947
|
* @license lucide-react v0.575.0 - ISC
|
|
60726
60948
|
*
|
|
60727
60949
|
* This source code is licensed under the ISC license.
|
|
60728
60950
|
* See the LICENSE file in the root directory of this source tree.
|
|
60729
60951
|
*/
|
|
60730
|
-
const __iconNode$
|
|
60952
|
+
const __iconNode$g = [
|
|
60731
60953
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
60732
60954
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
60733
60955
|
];
|
|
60734
|
-
const Mail = createLucideIcon("mail", __iconNode$
|
|
60956
|
+
const Mail = createLucideIcon("mail", __iconNode$g);
|
|
60735
60957
|
/**
|
|
60736
60958
|
* @license lucide-react v0.575.0 - ISC
|
|
60737
60959
|
*
|
|
60738
60960
|
* This source code is licensed under the ISC license.
|
|
60739
60961
|
* See the LICENSE file in the root directory of this source tree.
|
|
60740
60962
|
*/
|
|
60741
|
-
const __iconNode$
|
|
60963
|
+
const __iconNode$f = [
|
|
60742
60964
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
60743
60965
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
60744
60966
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
60745
60967
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
60746
60968
|
];
|
|
60747
|
-
const Maximize2 = createLucideIcon("maximize-2", __iconNode$
|
|
60969
|
+
const Maximize2 = createLucideIcon("maximize-2", __iconNode$f);
|
|
60748
60970
|
/**
|
|
60749
60971
|
* @license lucide-react v0.575.0 - ISC
|
|
60750
60972
|
*
|
|
60751
60973
|
* This source code is licensed under the ISC license.
|
|
60752
60974
|
* See the LICENSE file in the root directory of this source tree.
|
|
60753
60975
|
*/
|
|
60754
|
-
const __iconNode$
|
|
60976
|
+
const __iconNode$e = [
|
|
60755
60977
|
[
|
|
60756
60978
|
"path",
|
|
60757
60979
|
{
|
|
@@ -60760,39 +60982,39 @@ const __iconNode$c = [
|
|
|
60760
60982
|
}
|
|
60761
60983
|
]
|
|
60762
60984
|
];
|
|
60763
|
-
const MessageSquare = createLucideIcon("message-square", __iconNode$
|
|
60985
|
+
const MessageSquare = createLucideIcon("message-square", __iconNode$e);
|
|
60764
60986
|
/**
|
|
60765
60987
|
* @license lucide-react v0.575.0 - ISC
|
|
60766
60988
|
*
|
|
60767
60989
|
* This source code is licensed under the ISC license.
|
|
60768
60990
|
* See the LICENSE file in the root directory of this source tree.
|
|
60769
60991
|
*/
|
|
60770
|
-
const __iconNode$
|
|
60992
|
+
const __iconNode$d = [
|
|
60771
60993
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
60772
60994
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
60773
60995
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
60774
60996
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
60775
60997
|
];
|
|
60776
|
-
const Minimize2 = createLucideIcon("minimize-2", __iconNode$
|
|
60998
|
+
const Minimize2 = createLucideIcon("minimize-2", __iconNode$d);
|
|
60777
60999
|
/**
|
|
60778
61000
|
* @license lucide-react v0.575.0 - ISC
|
|
60779
61001
|
*
|
|
60780
61002
|
* This source code is licensed under the ISC license.
|
|
60781
61003
|
* See the LICENSE file in the root directory of this source tree.
|
|
60782
61004
|
*/
|
|
60783
|
-
const __iconNode$
|
|
61005
|
+
const __iconNode$c = [
|
|
60784
61006
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
60785
61007
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
60786
61008
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
60787
61009
|
];
|
|
60788
|
-
const Monitor = createLucideIcon("monitor", __iconNode$
|
|
61010
|
+
const Monitor = createLucideIcon("monitor", __iconNode$c);
|
|
60789
61011
|
/**
|
|
60790
61012
|
* @license lucide-react v0.575.0 - ISC
|
|
60791
61013
|
*
|
|
60792
61014
|
* This source code is licensed under the ISC license.
|
|
60793
61015
|
* See the LICENSE file in the root directory of this source tree.
|
|
60794
61016
|
*/
|
|
60795
|
-
const __iconNode$
|
|
61017
|
+
const __iconNode$b = [
|
|
60796
61018
|
["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
|
|
60797
61019
|
["path", { d: "M2 6h4", key: "aawbzj" }],
|
|
60798
61020
|
["path", { d: "M2 10h4", key: "l0bgd4" }],
|
|
@@ -60806,14 +61028,14 @@ const __iconNode$9 = [
|
|
|
60806
61028
|
}
|
|
60807
61029
|
]
|
|
60808
61030
|
];
|
|
60809
|
-
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$
|
|
61031
|
+
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$b);
|
|
60810
61032
|
/**
|
|
60811
61033
|
* @license lucide-react v0.575.0 - ISC
|
|
60812
61034
|
*
|
|
60813
61035
|
* This source code is licensed under the ISC license.
|
|
60814
61036
|
* See the LICENSE file in the root directory of this source tree.
|
|
60815
61037
|
*/
|
|
60816
|
-
const __iconNode$
|
|
61038
|
+
const __iconNode$a = [
|
|
60817
61039
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
60818
61040
|
[
|
|
60819
61041
|
"path",
|
|
@@ -60823,61 +61045,61 @@ const __iconNode$8 = [
|
|
|
60823
61045
|
}
|
|
60824
61046
|
]
|
|
60825
61047
|
];
|
|
60826
|
-
const PenLine = createLucideIcon("pen-line", __iconNode$
|
|
61048
|
+
const PenLine = createLucideIcon("pen-line", __iconNode$a);
|
|
60827
61049
|
/**
|
|
60828
61050
|
* @license lucide-react v0.575.0 - ISC
|
|
60829
61051
|
*
|
|
60830
61052
|
* This source code is licensed under the ISC license.
|
|
60831
61053
|
* See the LICENSE file in the root directory of this source tree.
|
|
60832
61054
|
*/
|
|
60833
|
-
const __iconNode$
|
|
61055
|
+
const __iconNode$9 = [
|
|
60834
61056
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
60835
61057
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
60836
61058
|
];
|
|
60837
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
61059
|
+
const Plus = createLucideIcon("plus", __iconNode$9);
|
|
60838
61060
|
/**
|
|
60839
61061
|
* @license lucide-react v0.575.0 - ISC
|
|
60840
61062
|
*
|
|
60841
61063
|
* This source code is licensed under the ISC license.
|
|
60842
61064
|
* See the LICENSE file in the root directory of this source tree.
|
|
60843
61065
|
*/
|
|
60844
|
-
const __iconNode$
|
|
61066
|
+
const __iconNode$8 = [
|
|
60845
61067
|
["path", { d: "M2 3h20", key: "91anmk" }],
|
|
60846
61068
|
["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
|
|
60847
61069
|
["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
|
|
60848
61070
|
];
|
|
60849
|
-
const Presentation = createLucideIcon("presentation", __iconNode$
|
|
61071
|
+
const Presentation = createLucideIcon("presentation", __iconNode$8);
|
|
60850
61072
|
/**
|
|
60851
61073
|
* @license lucide-react v0.575.0 - ISC
|
|
60852
61074
|
*
|
|
60853
61075
|
* This source code is licensed under the ISC license.
|
|
60854
61076
|
* See the LICENSE file in the root directory of this source tree.
|
|
60855
61077
|
*/
|
|
60856
|
-
const __iconNode$
|
|
61078
|
+
const __iconNode$7 = [
|
|
60857
61079
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
60858
61080
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
60859
61081
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
60860
61082
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
60861
61083
|
];
|
|
60862
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
61084
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
|
|
60863
61085
|
/**
|
|
60864
61086
|
* @license lucide-react v0.575.0 - ISC
|
|
60865
61087
|
*
|
|
60866
61088
|
* This source code is licensed under the ISC license.
|
|
60867
61089
|
* See the LICENSE file in the root directory of this source tree.
|
|
60868
61090
|
*/
|
|
60869
|
-
const __iconNode$
|
|
61091
|
+
const __iconNode$6 = [
|
|
60870
61092
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
60871
61093
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
60872
61094
|
];
|
|
60873
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
61095
|
+
const Search = createLucideIcon("search", __iconNode$6);
|
|
60874
61096
|
/**
|
|
60875
61097
|
* @license lucide-react v0.575.0 - ISC
|
|
60876
61098
|
*
|
|
60877
61099
|
* This source code is licensed under the ISC license.
|
|
60878
61100
|
* See the LICENSE file in the root directory of this source tree.
|
|
60879
61101
|
*/
|
|
60880
|
-
const __iconNode$
|
|
61102
|
+
const __iconNode$5 = [
|
|
60881
61103
|
[
|
|
60882
61104
|
"path",
|
|
60883
61105
|
{
|
|
@@ -60887,17 +61109,46 @@ const __iconNode$3 = [
|
|
|
60887
61109
|
],
|
|
60888
61110
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
60889
61111
|
];
|
|
60890
|
-
const Settings = createLucideIcon("settings", __iconNode$
|
|
61112
|
+
const Settings = createLucideIcon("settings", __iconNode$5);
|
|
60891
61113
|
/**
|
|
60892
61114
|
* @license lucide-react v0.575.0 - ISC
|
|
60893
61115
|
*
|
|
60894
61116
|
* This source code is licensed under the ISC license.
|
|
60895
61117
|
* See the LICENSE file in the root directory of this source tree.
|
|
60896
61118
|
*/
|
|
60897
|
-
const __iconNode$
|
|
61119
|
+
const __iconNode$4 = [
|
|
60898
61120
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
60899
61121
|
];
|
|
60900
|
-
const Square = createLucideIcon("square", __iconNode$
|
|
61122
|
+
const Square = createLucideIcon("square", __iconNode$4);
|
|
61123
|
+
/**
|
|
61124
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61125
|
+
*
|
|
61126
|
+
* This source code is licensed under the ISC license.
|
|
61127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61128
|
+
*/
|
|
61129
|
+
const __iconNode$3 = [
|
|
61130
|
+
["path", { d: "M12 19h8", key: "baeox8" }],
|
|
61131
|
+
["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
|
|
61132
|
+
];
|
|
61133
|
+
const Terminal = createLucideIcon("terminal", __iconNode$3);
|
|
61134
|
+
/**
|
|
61135
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61136
|
+
*
|
|
61137
|
+
* This source code is licensed under the ISC license.
|
|
61138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61139
|
+
*/
|
|
61140
|
+
const __iconNode$2 = [
|
|
61141
|
+
[
|
|
61142
|
+
"path",
|
|
61143
|
+
{
|
|
61144
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
61145
|
+
key: "wmoenq"
|
|
61146
|
+
}
|
|
61147
|
+
],
|
|
61148
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
61149
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
61150
|
+
];
|
|
61151
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
60901
61152
|
/**
|
|
60902
61153
|
* @license lucide-react v0.575.0 - ISC
|
|
60903
61154
|
*
|
|
@@ -61020,6 +61271,8 @@ const TOOL_META = {
|
|
|
61020
61271
|
// Workflows
|
|
61021
61272
|
create_new_aop: { displayName: "Creating workflow", icon: Brain },
|
|
61022
61273
|
execute_aop: { displayName: "Running workflow", icon: Brain },
|
|
61274
|
+
// Drive / Assets
|
|
61275
|
+
open_asset_in_workspace: { displayName: "Opening asset", icon: FolderOpen },
|
|
61023
61276
|
// Preferences
|
|
61024
61277
|
save_preference_as_memory: { displayName: "Saving preference", icon: Settings }
|
|
61025
61278
|
};
|
|
@@ -61070,6 +61323,14 @@ function extractAssetId$1(result) {
|
|
|
61070
61323
|
}
|
|
61071
61324
|
return null;
|
|
61072
61325
|
}
|
|
61326
|
+
function extractAssetIdFromArgs(argsText) {
|
|
61327
|
+
if (!argsText) return null;
|
|
61328
|
+
const parsed = tryParseJson$2(argsText);
|
|
61329
|
+
if (!parsed) return null;
|
|
61330
|
+
const id = parsed.asset_id ?? parsed.assetId;
|
|
61331
|
+
if (typeof id === "string" && id.startsWith("asset_")) return id;
|
|
61332
|
+
return null;
|
|
61333
|
+
}
|
|
61073
61334
|
function toolMetaToAssetType(toolName) {
|
|
61074
61335
|
const lower = toolName.toLowerCase();
|
|
61075
61336
|
if (lower.includes("presentation") || lower.includes("pptx") || lower.includes("slide") || lower.includes("powerpoint"))
|
|
@@ -61078,13 +61339,16 @@ function toolMetaToAssetType(toolName) {
|
|
|
61078
61339
|
return "spreadsheet";
|
|
61079
61340
|
if (lower.includes("document") || lower.includes("doc") || lower.includes("markdown"))
|
|
61080
61341
|
return "document";
|
|
61342
|
+
if (lower.includes("notebook"))
|
|
61343
|
+
return "notebook";
|
|
61081
61344
|
return "unknown";
|
|
61082
61345
|
}
|
|
61083
61346
|
const CREATE_ASSET_TOOLS = [
|
|
61084
61347
|
"create_powerpoint_deck",
|
|
61085
61348
|
"create_document_from_markdown",
|
|
61086
61349
|
"create_new_document",
|
|
61087
|
-
"create_new_sheet"
|
|
61350
|
+
"create_new_sheet",
|
|
61351
|
+
"create_new_notebook"
|
|
61088
61352
|
];
|
|
61089
61353
|
function isAssetTool(toolName, result) {
|
|
61090
61354
|
return CREATE_ASSET_TOOLS.includes(toolName.toLowerCase()) || extractAssetId$1(result) !== null;
|
|
@@ -61433,6 +61697,22 @@ function AssetToolCard({
|
|
|
61433
61697
|
] })
|
|
61434
61698
|
] });
|
|
61435
61699
|
}
|
|
61700
|
+
function AssetOpenLink({ assetId, toolName }) {
|
|
61701
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
61702
|
+
const assetType = toolMetaToAssetType(toolName);
|
|
61703
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
61704
|
+
"button",
|
|
61705
|
+
{
|
|
61706
|
+
onClick: (e) => {
|
|
61707
|
+
e.stopPropagation();
|
|
61708
|
+
openAsset(assetId, { type: assetType });
|
|
61709
|
+
},
|
|
61710
|
+
className: "flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground/50 transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
61711
|
+
title: "Open asset",
|
|
61712
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Link, { className: "size-3" })
|
|
61713
|
+
}
|
|
61714
|
+
);
|
|
61715
|
+
}
|
|
61436
61716
|
const ToolFallbackImpl = ({
|
|
61437
61717
|
toolName,
|
|
61438
61718
|
argsText,
|
|
@@ -61451,12 +61731,19 @@ const ToolFallbackImpl = ({
|
|
|
61451
61731
|
}
|
|
61452
61732
|
);
|
|
61453
61733
|
}
|
|
61734
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
|
|
61735
|
+
const resultAssetId = extractAssetId$1(result);
|
|
61736
|
+
const argsAssetId = extractAssetIdFromArgs(argsText);
|
|
61737
|
+
const fallbackAssetId = resultAssetId ?? argsAssetId;
|
|
61454
61738
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
61455
61739
|
ToolFallbackRoot,
|
|
61456
61740
|
{
|
|
61457
61741
|
className: cn(isCancelled && "border-muted-foreground/30 bg-muted/30"),
|
|
61458
61742
|
children: [
|
|
61459
|
-
/* @__PURE__ */ jsxRuntime.
|
|
61743
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
61744
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(ToolFallbackTrigger, { toolName, argsText, result, status }) }),
|
|
61745
|
+
fallbackAssetId && isComplete && !isCancelled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 pr-2", children: /* @__PURE__ */ jsxRuntime.jsx(AssetOpenLink, { assetId: fallbackAssetId, toolName }) })
|
|
61746
|
+
] }),
|
|
61460
61747
|
/* @__PURE__ */ jsxRuntime.jsxs(ToolFallbackContent, { children: [
|
|
61461
61748
|
/* @__PURE__ */ jsxRuntime.jsx(ToolFallbackError, { status }),
|
|
61462
61749
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -62186,6 +62473,190 @@ const CreateEmailDraftToolUI = React.memo(
|
|
|
62186
62473
|
CreateEmailDraftToolUIImpl
|
|
62187
62474
|
);
|
|
62188
62475
|
CreateEmailDraftToolUI.displayName = "CreateEmailDraftToolUI";
|
|
62476
|
+
const CreateNotebookToolUIImpl = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
62477
|
+
CreateAssetToolUIImpl,
|
|
62478
|
+
{
|
|
62479
|
+
icon: BookOpen,
|
|
62480
|
+
assetType: "notebook",
|
|
62481
|
+
runningLabel: "Creating notebook...",
|
|
62482
|
+
doneLabel: "Created notebook",
|
|
62483
|
+
...props
|
|
62484
|
+
}
|
|
62485
|
+
);
|
|
62486
|
+
const CreateNotebookToolUI = React.memo(
|
|
62487
|
+
CreateNotebookToolUIImpl
|
|
62488
|
+
);
|
|
62489
|
+
CreateNotebookToolUI.displayName = "CreateNotebookToolUI";
|
|
62490
|
+
function parsePythonResult(result) {
|
|
62491
|
+
const data = normalizeResult(result);
|
|
62492
|
+
if (!data) return { stdout: null, stderr: null, value: null, error: null, exception: null, imagePng: null, createdAssets: [] };
|
|
62493
|
+
const inner = typeof data.result === "object" && data.result !== null ? data.result : data;
|
|
62494
|
+
const stdout = inner.stdout ?? null;
|
|
62495
|
+
const stderr = inner.stderr ?? null;
|
|
62496
|
+
const value = inner.value ?? null;
|
|
62497
|
+
const error2 = inner.error ?? null;
|
|
62498
|
+
let exception = null;
|
|
62499
|
+
if (inner.exception && typeof inner.exception === "object") {
|
|
62500
|
+
const exc = inner.exception;
|
|
62501
|
+
exception = {
|
|
62502
|
+
name: exc.name ?? "Error",
|
|
62503
|
+
value: exc.value ?? "",
|
|
62504
|
+
traceback: exc.traceback ?? ""
|
|
62505
|
+
};
|
|
62506
|
+
}
|
|
62507
|
+
let imagePng = null;
|
|
62508
|
+
if (inner.data && typeof inner.data === "object") {
|
|
62509
|
+
imagePng = inner.data.png ?? null;
|
|
62510
|
+
}
|
|
62511
|
+
const createdAssets = Array.isArray(data.created_assets) ? data.created_assets : [];
|
|
62512
|
+
return { stdout, stderr, value, error: error2, exception, imagePng, createdAssets };
|
|
62513
|
+
}
|
|
62514
|
+
const RunPythonCodeToolUIImpl = ({
|
|
62515
|
+
toolName,
|
|
62516
|
+
args,
|
|
62517
|
+
result,
|
|
62518
|
+
status
|
|
62519
|
+
}) => {
|
|
62520
|
+
var _a2;
|
|
62521
|
+
const typedArgs = args;
|
|
62522
|
+
const code2 = (typedArgs == null ? void 0 : typedArgs.code) ?? "";
|
|
62523
|
+
const summary = (typedArgs == null ? void 0 : typedArgs.summary) ?? null;
|
|
62524
|
+
const lines = code2 ? code2.split("\n").length : 0;
|
|
62525
|
+
const isRunning = (status == null ? void 0 : status.type) === "running";
|
|
62526
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete";
|
|
62527
|
+
const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
|
|
62528
|
+
const parsed = React.useMemo(() => isComplete ? parsePythonResult(result) : null, [result, isComplete]);
|
|
62529
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
62530
|
+
const hasOutput = parsed && (parsed.stdout || parsed.stderr || parsed.value);
|
|
62531
|
+
const hasError = parsed && (parsed.error || parsed.exception);
|
|
62532
|
+
const hasImage = parsed == null ? void 0 : parsed.imagePng;
|
|
62533
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
62534
|
+
ToolCard,
|
|
62535
|
+
{
|
|
62536
|
+
icon: Code,
|
|
62537
|
+
status: (status == null ? void 0 : status.type) ?? "complete",
|
|
62538
|
+
title: isRunning ? "Running code..." : summary || `Executed ${lines} ${lines !== 1 ? "lines" : "line"}`,
|
|
62539
|
+
toolName,
|
|
62540
|
+
error: errorMsg,
|
|
62541
|
+
children: [
|
|
62542
|
+
code2 && /* @__PURE__ */ jsxRuntime.jsx(ExpandableSection, { label: "Show code", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-foreground/80", children: code2 }) }),
|
|
62543
|
+
isComplete && hasOutput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40 px-4 py-2.5", children: [
|
|
62544
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
62545
|
+
/* @__PURE__ */ jsxRuntime.jsx(Terminal, { className: "size-3 text-muted-foreground" }),
|
|
62546
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Output" })
|
|
62547
|
+
] }),
|
|
62548
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted/30 p-2 text-[11px] leading-relaxed font-mono text-foreground/80", children: [parsed.value, parsed.stdout, parsed.stderr].filter(Boolean).join("\n") })
|
|
62549
|
+
] }),
|
|
62550
|
+
isComplete && hasError && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40 bg-red-50/50 px-4 py-2.5", children: [
|
|
62551
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
62552
|
+
/* @__PURE__ */ jsxRuntime.jsx(TriangleAlert, { className: "size-3 text-red-500" }),
|
|
62553
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-red-600", children: parsed.exception ? `${parsed.exception.name}: ${parsed.exception.value}` : "Error" })
|
|
62554
|
+
] }),
|
|
62555
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md bg-red-50 p-2 text-[11px] leading-relaxed font-mono text-red-600/80", children: ((_a2 = parsed.exception) == null ? void 0 : _a2.traceback) ?? parsed.error })
|
|
62556
|
+
] }),
|
|
62557
|
+
isComplete && hasImage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40 px-4 py-2.5", children: [
|
|
62558
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
62559
|
+
/* @__PURE__ */ jsxRuntime.jsx(Image, { className: "size-3 text-muted-foreground" }),
|
|
62560
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Generated image" })
|
|
62561
|
+
] }),
|
|
62562
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62563
|
+
"img",
|
|
62564
|
+
{
|
|
62565
|
+
src: `data:image/png;base64,${parsed.imagePng}`,
|
|
62566
|
+
alt: "Python output",
|
|
62567
|
+
className: "max-w-full rounded-md border border-border/40"
|
|
62568
|
+
}
|
|
62569
|
+
)
|
|
62570
|
+
] }),
|
|
62571
|
+
isComplete && parsed && parsed.createdAssets.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40 px-4 py-2", children: [
|
|
62572
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Created assets" }),
|
|
62573
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-1.5", children: parsed.createdAssets.map((a) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
62574
|
+
"button",
|
|
62575
|
+
{
|
|
62576
|
+
onClick: () => openAsset(a.asset_id),
|
|
62577
|
+
className: "flex items-center gap-1 rounded-md border border-border/60 px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
62578
|
+
children: [
|
|
62579
|
+
/* @__PURE__ */ jsxRuntime.jsx(ExternalLink, { className: "size-2.5" }),
|
|
62580
|
+
truncate(a.asset_id, 20)
|
|
62581
|
+
]
|
|
62582
|
+
},
|
|
62583
|
+
a.asset_id
|
|
62584
|
+
)) })
|
|
62585
|
+
] })
|
|
62586
|
+
]
|
|
62587
|
+
}
|
|
62588
|
+
);
|
|
62589
|
+
};
|
|
62590
|
+
const RunPythonCodeToolUI = React.memo(
|
|
62591
|
+
RunPythonCodeToolUIImpl
|
|
62592
|
+
);
|
|
62593
|
+
RunPythonCodeToolUI.displayName = "RunPythonCodeToolUI";
|
|
62594
|
+
const OpenAssetToolUIImpl = ({
|
|
62595
|
+
toolName,
|
|
62596
|
+
args,
|
|
62597
|
+
result,
|
|
62598
|
+
status
|
|
62599
|
+
}) => {
|
|
62600
|
+
const typedArgs = args;
|
|
62601
|
+
const argsAssetId = (typedArgs == null ? void 0 : typedArgs.asset_id) ?? (typedArgs == null ? void 0 : typedArgs.assetId) ?? "";
|
|
62602
|
+
const resultAssetId = extractAssetId(result);
|
|
62603
|
+
const assetId = resultAssetId ?? (argsAssetId.startsWith("asset_") ? argsAssetId : null);
|
|
62604
|
+
const isRunning = (status == null ? void 0 : status.type) === "running";
|
|
62605
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
|
|
62606
|
+
const isCancelled = (status == null ? void 0 : status.type) === "incomplete" && status.reason === "cancelled";
|
|
62607
|
+
const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
|
|
62608
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
62609
|
+
const wasCompleteAtMount = React.useRef(isComplete);
|
|
62610
|
+
React.useEffect(() => {
|
|
62611
|
+
if (isComplete && !isCancelled && assetId && !wasCompleteAtMount.current) {
|
|
62612
|
+
const store = useAssetPanelStore.getState();
|
|
62613
|
+
if (store.markAutoOpened(assetId)) {
|
|
62614
|
+
store.openAsset(assetId);
|
|
62615
|
+
}
|
|
62616
|
+
}
|
|
62617
|
+
}, [isComplete, isCancelled, assetId]);
|
|
62618
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
62619
|
+
ToolCard,
|
|
62620
|
+
{
|
|
62621
|
+
icon: FolderOpen,
|
|
62622
|
+
status: (status == null ? void 0 : status.type) ?? "complete",
|
|
62623
|
+
title: isRunning ? "Opening asset..." : "Asset opened",
|
|
62624
|
+
subtitle: assetId ? truncate(assetId, 30) : void 0,
|
|
62625
|
+
toolName,
|
|
62626
|
+
error: errorMsg,
|
|
62627
|
+
children: assetId && isComplete && !isCancelled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/40 px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
62628
|
+
"button",
|
|
62629
|
+
{
|
|
62630
|
+
onClick: () => openAsset(assetId),
|
|
62631
|
+
className: "flex items-center gap-1.5 rounded-md border border-border/60 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
62632
|
+
children: [
|
|
62633
|
+
/* @__PURE__ */ jsxRuntime.jsx(ExternalLink, { className: "size-3" }),
|
|
62634
|
+
"Open asset"
|
|
62635
|
+
]
|
|
62636
|
+
}
|
|
62637
|
+
) })
|
|
62638
|
+
}
|
|
62639
|
+
);
|
|
62640
|
+
};
|
|
62641
|
+
const OpenAssetToolUI = React.memo(
|
|
62642
|
+
OpenAssetToolUIImpl
|
|
62643
|
+
);
|
|
62644
|
+
OpenAssetToolUI.displayName = "OpenAssetToolUI";
|
|
62645
|
+
function createAssetToolUI(config2) {
|
|
62646
|
+
const Component = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
62647
|
+
CreateAssetToolUIImpl,
|
|
62648
|
+
{
|
|
62649
|
+
icon: config2.icon,
|
|
62650
|
+
assetType: config2.assetType,
|
|
62651
|
+
runningLabel: config2.runningLabel,
|
|
62652
|
+
doneLabel: config2.doneLabel,
|
|
62653
|
+
...props
|
|
62654
|
+
}
|
|
62655
|
+
);
|
|
62656
|
+
const Memoized = React.memo(Component);
|
|
62657
|
+
Memoized.displayName = `CreateAssetToolUI(${config2.assetType})`;
|
|
62658
|
+
return Memoized;
|
|
62659
|
+
}
|
|
62189
62660
|
const TOOL_UI_REGISTRY = {
|
|
62190
62661
|
search: WebSearchToolUI,
|
|
62191
62662
|
browse: BrowseToolUI,
|
|
@@ -62196,7 +62667,10 @@ const TOOL_UI_REGISTRY = {
|
|
|
62196
62667
|
create_new_document: CreateDocumentToolUI,
|
|
62197
62668
|
create_document_from_markdown: CreateDocumentToolUI,
|
|
62198
62669
|
create_new_sheet: CreateSheetToolUI,
|
|
62199
|
-
create_powerpoint_deck: CreatePresentationToolUI
|
|
62670
|
+
create_powerpoint_deck: CreatePresentationToolUI,
|
|
62671
|
+
create_new_notebook: CreateNotebookToolUI,
|
|
62672
|
+
run_python_code: RunPythonCodeToolUI,
|
|
62673
|
+
open_asset_in_workspace: OpenAssetToolUI
|
|
62200
62674
|
};
|
|
62201
62675
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
62202
62676
|
const cx = clsx;
|
|
@@ -62317,7 +62791,6 @@ const AthenaChat = ({
|
|
|
62317
62791
|
toolUIs,
|
|
62318
62792
|
mentionTools
|
|
62319
62793
|
}) => {
|
|
62320
|
-
const isLoadingThread = useThreadLoading();
|
|
62321
62794
|
const tools = mentionTools ?? EMPTY_MENTION_TOOLS;
|
|
62322
62795
|
const mergedToolUIs = React.useMemo(() => ({
|
|
62323
62796
|
append_markdown_to_athena_document: AppendDocumentToolUI,
|
|
@@ -62329,43 +62802,40 @@ const AthenaChat = ({
|
|
|
62329
62802
|
() => () => /* @__PURE__ */ jsxRuntime.jsx(AssistantMessage, { toolUIs: mergedToolUIs }),
|
|
62330
62803
|
[mergedToolUIs]
|
|
62331
62804
|
);
|
|
62332
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
62805
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
62333
62806
|
ThreadPrimitiveRoot,
|
|
62334
62807
|
{
|
|
62335
62808
|
className: `aui-root aui-thread-root @container flex h-full flex-col bg-background ${className ?? ""}`,
|
|
62336
62809
|
style: { ["--thread-max-width"]: maxWidth, position: "relative" },
|
|
62337
|
-
children:
|
|
62338
|
-
|
|
62339
|
-
|
|
62340
|
-
|
|
62341
|
-
|
|
62342
|
-
|
|
62343
|
-
className: "aui-thread-
|
|
62344
|
-
|
|
62345
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62346
|
-
|
|
62347
|
-
|
|
62348
|
-
|
|
62349
|
-
|
|
62350
|
-
|
|
62351
|
-
|
|
62352
|
-
|
|
62353
|
-
UserMessage,
|
|
62354
|
-
AssistantMessage: AssistantMessageComponent
|
|
62355
|
-
}
|
|
62810
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
62811
|
+
ThreadPrimitiveViewport,
|
|
62812
|
+
{
|
|
62813
|
+
turnAnchor: "top",
|
|
62814
|
+
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",
|
|
62815
|
+
children: [
|
|
62816
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuiIf, { condition: (s) => s.thread.isEmpty, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-thread-welcome-center flex w-full grow flex-col items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-thread-welcome-message flex size-full flex-col justify-center px-4", children: [
|
|
62817
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both font-semibold text-2xl duration-200", children: welcomeMessage }),
|
|
62818
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-muted-foreground text-xl delay-75 duration-200", children: welcomeSubtext })
|
|
62819
|
+
] }) }) }) }),
|
|
62820
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62821
|
+
ThreadPrimitiveMessages,
|
|
62822
|
+
{
|
|
62823
|
+
components: {
|
|
62824
|
+
UserMessage,
|
|
62825
|
+
AssistantMessage: AssistantMessageComponent
|
|
62356
62826
|
}
|
|
62357
|
-
|
|
62358
|
-
|
|
62359
|
-
|
|
62360
|
-
|
|
62361
|
-
|
|
62362
|
-
|
|
62363
|
-
|
|
62827
|
+
}
|
|
62828
|
+
),
|
|
62829
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ThreadPrimitiveViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl bg-background pb-4 md:pb-6", children: [
|
|
62830
|
+
/* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToBottom, {}),
|
|
62831
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ComposerPrimitiveRoot, { className: "aui-composer-root relative flex w-full flex-col rounded-2xl border border-input bg-background px-1 pt-2 outline-none transition-shadow focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20", children: [
|
|
62832
|
+
/* @__PURE__ */ jsxRuntime.jsx(TiptapComposer, { tools }),
|
|
62833
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerAction, {})
|
|
62364
62834
|
] })
|
|
62365
|
-
]
|
|
62366
|
-
|
|
62367
|
-
|
|
62368
|
-
|
|
62835
|
+
] })
|
|
62836
|
+
]
|
|
62837
|
+
}
|
|
62838
|
+
)
|
|
62369
62839
|
}
|
|
62370
62840
|
);
|
|
62371
62841
|
};
|
|
@@ -62473,57 +62943,6 @@ const AssistantActionBar = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
62473
62943
|
]
|
|
62474
62944
|
}
|
|
62475
62945
|
);
|
|
62476
|
-
const ThreadLoadingOverlay = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
62477
|
-
"div",
|
|
62478
|
-
{
|
|
62479
|
-
className: "aui-thread-loading-overlay",
|
|
62480
|
-
style: {
|
|
62481
|
-
position: "absolute",
|
|
62482
|
-
inset: 0,
|
|
62483
|
-
zIndex: 50,
|
|
62484
|
-
display: "flex",
|
|
62485
|
-
flexDirection: "column",
|
|
62486
|
-
alignItems: "center",
|
|
62487
|
-
justifyContent: "center",
|
|
62488
|
-
gap: 12,
|
|
62489
|
-
background: "color-mix(in srgb, var(--background, #fff) 80%, transparent)",
|
|
62490
|
-
backdropFilter: "blur(4px)",
|
|
62491
|
-
WebkitBackdropFilter: "blur(4px)",
|
|
62492
|
-
animation: "aui-overlay-in 0.2s ease-out"
|
|
62493
|
-
},
|
|
62494
|
-
children: [
|
|
62495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62496
|
-
"div",
|
|
62497
|
-
{
|
|
62498
|
-
style: {
|
|
62499
|
-
width: 28,
|
|
62500
|
-
height: 28,
|
|
62501
|
-
border: "2.5px solid var(--border, #e5e5e5)",
|
|
62502
|
-
borderTopColor: "var(--primary, #2563eb)",
|
|
62503
|
-
borderRadius: "50%",
|
|
62504
|
-
animation: "aui-spin 0.7s linear infinite"
|
|
62505
|
-
}
|
|
62506
|
-
}
|
|
62507
|
-
),
|
|
62508
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62509
|
-
"span",
|
|
62510
|
-
{
|
|
62511
|
-
style: {
|
|
62512
|
-
fontSize: 13,
|
|
62513
|
-
fontWeight: 500,
|
|
62514
|
-
color: "var(--muted-foreground, #888)",
|
|
62515
|
-
letterSpacing: "0.01em"
|
|
62516
|
-
},
|
|
62517
|
-
children: "Loading conversation…"
|
|
62518
|
-
}
|
|
62519
|
-
),
|
|
62520
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
62521
|
-
@keyframes aui-spin { to { transform: rotate(360deg); } }
|
|
62522
|
-
@keyframes aui-overlay-in { from { opacity: 0; } to { opacity: 1; } }
|
|
62523
|
-
` })
|
|
62524
|
-
]
|
|
62525
|
-
}
|
|
62526
|
-
);
|
|
62527
62946
|
const UserMessage = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
62528
62947
|
MessagePrimitiveRoot,
|
|
62529
62948
|
{
|
|
@@ -62602,6 +63021,7 @@ const ASSET_TYPE_CONFIG = {
|
|
|
62602
63021
|
presentation: { icon: Presentation, label: "Presentation" },
|
|
62603
63022
|
spreadsheet: { icon: FileSpreadsheet, label: "Spreadsheet" },
|
|
62604
63023
|
document: { icon: FileText, label: "Document" },
|
|
63024
|
+
notebook: { icon: BookOpen, label: "Notebook" },
|
|
62605
63025
|
unknown: { icon: File$1, label: "Asset" }
|
|
62606
63026
|
};
|
|
62607
63027
|
const AssetIframe = React.memo(
|
|
@@ -62838,66 +63258,29 @@ const AthenaLayout = ({
|
|
|
62838
63258
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(AssetPanel, {}) })
|
|
62839
63259
|
] });
|
|
62840
63260
|
};
|
|
62841
|
-
function useThreadList() {
|
|
62842
|
-
const store = useThreadListStore();
|
|
62843
|
-
return useStore$1(store);
|
|
62844
|
-
}
|
|
62845
|
-
function useActiveThreadId() {
|
|
62846
|
-
const store = useThreadListStore();
|
|
62847
|
-
return useStore$1(store, (s) => s.activeThreadId);
|
|
62848
|
-
}
|
|
62849
63261
|
function ThreadList({ className }) {
|
|
62850
|
-
|
|
62851
|
-
|
|
62852
|
-
|
|
62853
|
-
|
|
62854
|
-
|
|
62855
|
-
|
|
62856
|
-
|
|
62857
|
-
archiveThread: archiveThread2
|
|
62858
|
-
} = useThreadList();
|
|
62859
|
-
React.useEffect(() => {
|
|
62860
|
-
fetchThreads();
|
|
62861
|
-
}, [fetchThreads]);
|
|
62862
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
62863
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
62864
|
-
"button",
|
|
63262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ThreadListPrimitiveRoot, { className: cn("flex flex-col gap-1", className), children: [
|
|
63263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ThreadListPrimitiveNew, { className: "flex items-center gap-2 rounded-lg border border-border/60 px-3 py-2 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", children: [
|
|
63264
|
+
/* @__PURE__ */ jsxRuntime.jsx(Plus, { className: "size-4" }),
|
|
63265
|
+
"New Chat"
|
|
63266
|
+
] }),
|
|
63267
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63268
|
+
ThreadListPrimitiveItems,
|
|
62865
63269
|
{
|
|
62866
|
-
|
|
62867
|
-
|
|
62868
|
-
|
|
62869
|
-
/* @__PURE__ */ jsxRuntime.jsx(Plus, { className: "size-4" }),
|
|
62870
|
-
"New Chat"
|
|
62871
|
-
]
|
|
63270
|
+
components: {
|
|
63271
|
+
ThreadListItem
|
|
63272
|
+
}
|
|
62872
63273
|
}
|
|
62873
|
-
)
|
|
62874
|
-
|
|
62875
|
-
|
|
62876
|
-
|
|
62877
|
-
|
|
62878
|
-
|
|
62879
|
-
|
|
62880
|
-
|
|
62881
|
-
|
|
62882
|
-
|
|
62883
|
-
/* @__PURE__ */ jsxRuntime.jsx(MessageSquare, { className: "size-3.5 shrink-0" }),
|
|
62884
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: thread.title || "Untitled" }),
|
|
62885
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
62886
|
-
"button",
|
|
62887
|
-
{
|
|
62888
|
-
onClick: (e) => {
|
|
62889
|
-
e.stopPropagation();
|
|
62890
|
-
archiveThread2(thread.thread_id);
|
|
62891
|
-
},
|
|
62892
|
-
className: "hidden size-5 items-center justify-center rounded text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground group-hover:flex",
|
|
62893
|
-
title: "Archive",
|
|
62894
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Archive, { className: "size-3" })
|
|
62895
|
-
}
|
|
62896
|
-
)
|
|
62897
|
-
]
|
|
62898
|
-
},
|
|
62899
|
-
thread.thread_id
|
|
62900
|
-
)) })
|
|
63274
|
+
) })
|
|
63275
|
+
] });
|
|
63276
|
+
}
|
|
63277
|
+
function ThreadListItem() {
|
|
63278
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ThreadListItemPrimitiveRoot, { className: "group", children: [
|
|
63279
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ThreadListItemPrimitiveTrigger, { className: "flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm transition-colors cursor-pointer text-muted-foreground hover:bg-muted/30 hover:text-foreground data-[active]:bg-muted/50 data-[active]:text-foreground", children: [
|
|
63280
|
+
/* @__PURE__ */ jsxRuntime.jsx(MessageSquare, { className: "size-3.5 shrink-0" }),
|
|
63281
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: /* @__PURE__ */ jsxRuntime.jsx(ThreadListItemPrimitiveTitle, { fallback: "Untitled" }) })
|
|
63282
|
+
] }),
|
|
63283
|
+
/* @__PURE__ */ jsxRuntime.jsx(ThreadListItemPrimitiveArchive, { className: "hidden size-5 items-center justify-center rounded text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground group-hover:flex", children: /* @__PURE__ */ jsxRuntime.jsx(Archive, { className: "size-3" }) })
|
|
62901
63284
|
] });
|
|
62902
63285
|
}
|
|
62903
63286
|
function useAppendToComposer() {
|
|
@@ -62935,6 +63318,74 @@ function useComposerAttachment() {
|
|
|
62935
63318
|
}, [aui]);
|
|
62936
63319
|
return { addFile, addContent, clear };
|
|
62937
63320
|
}
|
|
63321
|
+
const Toolkits = {
|
|
63322
|
+
/** Web search and page browsing. */
|
|
63323
|
+
WEB_SEARCH: "web_search_browse_toolkit",
|
|
63324
|
+
/** SQL query execution. */
|
|
63325
|
+
SQL: "sql_toolkit",
|
|
63326
|
+
/** Athena Code development environment. */
|
|
63327
|
+
ATHENA_CODE: "athena_code_toolkit",
|
|
63328
|
+
/** Document comments and collaboration. */
|
|
63329
|
+
COMMENTS: "comments_toolkit",
|
|
63330
|
+
/** Visual canvas creation. */
|
|
63331
|
+
CANVAS: "canvas_toolkit",
|
|
63332
|
+
/** PostgreSQL database management. */
|
|
63333
|
+
DATABASE: "database_toolkit",
|
|
63334
|
+
/** Asset collections management. */
|
|
63335
|
+
COLLECTIONS: "collections_toolkit",
|
|
63336
|
+
/** Charts, dashboards, and figures. */
|
|
63337
|
+
VISUALIZATIONS: "visualizations_toolkit",
|
|
63338
|
+
/** Custom UI creation. */
|
|
63339
|
+
USER_INTERFACE: "user_interface_toolkit",
|
|
63340
|
+
/** Agent Operating Procedures. */
|
|
63341
|
+
AOP: "aop_toolkit",
|
|
63342
|
+
/** Ephemeral compute environments. */
|
|
63343
|
+
COMPUTER_ASSET: "computer_asset_toolkit",
|
|
63344
|
+
/** Web browser automation. */
|
|
63345
|
+
BROWSER: "browser_toolkit",
|
|
63346
|
+
/** Virtual machine management. */
|
|
63347
|
+
VM: "vm_toolkit",
|
|
63348
|
+
/** Jupyter notebook execution. */
|
|
63349
|
+
NOTEBOOK: "notebook_toolkit",
|
|
63350
|
+
/** Presentation slide editing. */
|
|
63351
|
+
PRESENTATION: "presentation_toolkit",
|
|
63352
|
+
/** PowerPoint presentation creation from templates. */
|
|
63353
|
+
POWERPOINT: "powerpoint_deck_toolkit",
|
|
63354
|
+
/** Workspace file management (Spaces). */
|
|
63355
|
+
DRIVE: "olympus_drive_toolkit",
|
|
63356
|
+
/** Python code execution. */
|
|
63357
|
+
PYTHON: "python_toolkit",
|
|
63358
|
+
/** Multi-account email and calendar (Gmail + Outlook). */
|
|
63359
|
+
EMAIL: "unified_email_toolkit",
|
|
63360
|
+
/** Legacy email and calendar operations. */
|
|
63361
|
+
EMAIL_CALENDAR: "email_calendar_toolkit",
|
|
63362
|
+
/** Spreadsheet operations. */
|
|
63363
|
+
SPREADSHEET: "spreadsheet_toolkit",
|
|
63364
|
+
/** Athena document editing. */
|
|
63365
|
+
DOCUMENT: "document_toolkit",
|
|
63366
|
+
/** Word document backend operations. */
|
|
63367
|
+
WORD_DOCUMENT: "word_document_be_toolkit",
|
|
63368
|
+
/** Go-To-Market management. */
|
|
63369
|
+
GTM: "gtm_toolkit",
|
|
63370
|
+
/** Marketing campaign management. */
|
|
63371
|
+
MARKETING: "marketing_toolkit",
|
|
63372
|
+
/** FDE implementations and workflows. */
|
|
63373
|
+
FDE: "fde_toolkit",
|
|
63374
|
+
/** Code repository search via Greptile. */
|
|
63375
|
+
GREPTILE: "greptile_toolkit",
|
|
63376
|
+
/** SharePoint / Google Drive / workspace file access. */
|
|
63377
|
+
EXTERNAL_DRIVE: "external_drive_toolkit",
|
|
63378
|
+
/** Reusable playbooks and prompts. */
|
|
63379
|
+
PLAYBOOK: "playbook_toolkit",
|
|
63380
|
+
/** Local Chrome browser control via tunnel. */
|
|
63381
|
+
DEVICE_TUNNEL: "device_tunnel_toolkit",
|
|
63382
|
+
/** Project management. */
|
|
63383
|
+
PROJECTS: "projects_toolkit",
|
|
63384
|
+
/** Task Studio script execution. */
|
|
63385
|
+
TASK_STUDIO: "task_studio_toolkit",
|
|
63386
|
+
/** User memory and preferences. */
|
|
63387
|
+
PREFERENCES: "preferences_toolkit"
|
|
63388
|
+
};
|
|
62938
63389
|
exports.AppendDocumentToolUI = AppendDocumentToolUI;
|
|
62939
63390
|
exports.AssetPanel = AssetPanel;
|
|
62940
63391
|
exports.AthenaChat = AthenaChat;
|
|
@@ -62947,11 +63398,14 @@ exports.CollapsibleContent = CollapsibleContent;
|
|
|
62947
63398
|
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
62948
63399
|
exports.CreateDocumentToolUI = CreateDocumentToolUI;
|
|
62949
63400
|
exports.CreateEmailDraftToolUI = CreateEmailDraftToolUI;
|
|
63401
|
+
exports.CreateNotebookToolUI = CreateNotebookToolUI;
|
|
62950
63402
|
exports.CreatePresentationToolUI = CreatePresentationToolUI;
|
|
62951
63403
|
exports.CreateSheetToolUI = CreateSheetToolUI;
|
|
62952
63404
|
exports.DEFAULT_BACKEND_URL = DEFAULT_BACKEND_URL;
|
|
62953
63405
|
exports.EmailSearchToolUI = EmailSearchToolUI;
|
|
63406
|
+
exports.OpenAssetToolUI = OpenAssetToolUI;
|
|
62954
63407
|
exports.ReadAssetToolUI = ReadAssetToolUI;
|
|
63408
|
+
exports.RunPythonCodeToolUI = RunPythonCodeToolUI;
|
|
62955
63409
|
exports.TOOL_UI_REGISTRY = TOOL_UI_REGISTRY;
|
|
62956
63410
|
exports.ThreadList = ThreadList;
|
|
62957
63411
|
exports.TiptapComposer = TiptapComposer;
|
|
@@ -62963,6 +63417,7 @@ exports.ToolFallbackError = ToolFallbackError;
|
|
|
62963
63417
|
exports.ToolFallbackResult = ToolFallbackResult;
|
|
62964
63418
|
exports.ToolFallbackRoot = ToolFallbackRoot;
|
|
62965
63419
|
exports.ToolFallbackTrigger = ToolFallbackTrigger;
|
|
63420
|
+
exports.Toolkits = Toolkits;
|
|
62966
63421
|
exports.Tooltip = Tooltip;
|
|
62967
63422
|
exports.TooltipContent = TooltipContent;
|
|
62968
63423
|
exports.TooltipIconButton = TooltipIconButton;
|
|
@@ -62972,11 +63427,12 @@ exports.WebSearchToolUI = WebSearchToolUI;
|
|
|
62972
63427
|
exports.buttonVariants = buttonVariants;
|
|
62973
63428
|
exports.clearAutoOpenedAssets = clearAutoOpenedAssets;
|
|
62974
63429
|
exports.cn = cn;
|
|
62975
|
-
exports.
|
|
63430
|
+
exports.createAssetToolUI = createAssetToolUI;
|
|
62976
63431
|
exports.getAssetInfo = getAssetInfo;
|
|
62977
63432
|
exports.resetAssetAutoOpen = resetAssetAutoOpen;
|
|
63433
|
+
exports.themeToStyleVars = themeToStyleVars;
|
|
63434
|
+
exports.themes = themes;
|
|
62978
63435
|
exports.tryParseJson = tryParseJson$1;
|
|
62979
|
-
exports.useActiveThreadId = useActiveThreadId;
|
|
62980
63436
|
exports.useAppendToComposer = useAppendToComposer;
|
|
62981
63437
|
exports.useAssetEmbed = useAssetEmbed;
|
|
62982
63438
|
exports.useAssetPanelStore = useAssetPanelStore;
|
|
@@ -62985,6 +63441,4 @@ exports.useAthenaRuntime = useAthenaRuntime;
|
|
|
62985
63441
|
exports.useComposerAttachment = useComposerAttachment;
|
|
62986
63442
|
exports.useMentionSuggestions = useMentionSuggestions;
|
|
62987
63443
|
exports.useParentAuth = useParentAuth;
|
|
62988
|
-
exports.useThreadList = useThreadList;
|
|
62989
|
-
exports.useThreadLoading = useThreadLoading;
|
|
62990
63444
|
//# sourceMappingURL=index.cjs.map
|