@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.js
CHANGED
|
@@ -4543,6 +4543,16 @@ const ChainOfThoughtByIndicesProvider = ({ startIndex, endIndex, children }) =>
|
|
|
4543
4543
|
});
|
|
4544
4544
|
return jsx(AuiProvider, { value: aui, children });
|
|
4545
4545
|
};
|
|
4546
|
+
const ThreadListItemByIndexProvider = ({ index: index2, archived, children }) => {
|
|
4547
|
+
const aui = useAui({
|
|
4548
|
+
threadListItem: Derived({
|
|
4549
|
+
source: "threads",
|
|
4550
|
+
query: { type: "index", index: index2, archived },
|
|
4551
|
+
get: (aui2) => aui2.threads().item({ index: index2, archived })
|
|
4552
|
+
})
|
|
4553
|
+
});
|
|
4554
|
+
return jsx(AuiProvider, { value: aui, children });
|
|
4555
|
+
};
|
|
4546
4556
|
const RuntimeAdapter = resource((runtime) => tapResource(RuntimeAdapterResource(runtime)));
|
|
4547
4557
|
attachTransformScopes(RuntimeAdapter, (scopes, parent) => {
|
|
4548
4558
|
const result = baseRuntimeAdapterTransformScopes(scopes, parent);
|
|
@@ -7622,7 +7632,7 @@ const toAppendMessage = (messages, message) => {
|
|
|
7622
7632
|
startRun: message.startRun
|
|
7623
7633
|
};
|
|
7624
7634
|
};
|
|
7625
|
-
const getThreadState
|
|
7635
|
+
const getThreadState = (runtime, threadListItemState) => {
|
|
7626
7636
|
const lastMessage = runtime.messages.at(-1);
|
|
7627
7637
|
return Object.freeze({
|
|
7628
7638
|
threadId: threadListItemState.id,
|
|
@@ -7645,7 +7655,7 @@ class ThreadRuntimeImpl {
|
|
|
7645
7655
|
__publicField(this, "_eventSubscriptionSubjects", /* @__PURE__ */ new Map());
|
|
7646
7656
|
const stateBinding = new ShallowMemoizeSubject({
|
|
7647
7657
|
path: threadBinding.path,
|
|
7648
|
-
getState: () => getThreadState
|
|
7658
|
+
getState: () => getThreadState(threadBinding.getState(), threadListItemBinding.getState()),
|
|
7649
7659
|
subscribe: (callback) => {
|
|
7650
7660
|
const sub1 = threadBinding.subscribe(callback);
|
|
7651
7661
|
const sub2 = threadListItemBinding.subscribe(callback);
|
|
@@ -8912,6 +8922,24 @@ const MessagePrimitiveParts$1 = ({ components, unstable_showEmptyOnNonTextEnd =
|
|
|
8912
8922
|
return jsxs(Fragment$2, { children: [partsElements, jsx(ConditionalEmpty, { components, enabled: unstable_showEmptyOnNonTextEnd })] });
|
|
8913
8923
|
};
|
|
8914
8924
|
MessagePrimitiveParts$1.displayName = "MessagePrimitive.Parts";
|
|
8925
|
+
const ThreadListPrimitiveItemByIndex = memo(({ index: index2, archived = false, components }) => {
|
|
8926
|
+
const ThreadListItemComponent = components.ThreadListItem;
|
|
8927
|
+
return jsx(ThreadListItemByIndexProvider, { index: index2, archived, children: jsx(ThreadListItemComponent, {}) });
|
|
8928
|
+
}, (prev, next) => prev.index === next.index && prev.archived === next.archived && prev.components.ThreadListItem === next.components.ThreadListItem);
|
|
8929
|
+
ThreadListPrimitiveItemByIndex.displayName = "ThreadListPrimitive.ItemByIndex";
|
|
8930
|
+
const ThreadListPrimitiveItems = ({ archived = false, components }) => {
|
|
8931
|
+
const contentLength = useAuiState((s) => archived ? s.threads.archivedThreadIds.length : s.threads.threadIds.length);
|
|
8932
|
+
const listElements = useMemo(() => {
|
|
8933
|
+
return Array.from({ length: contentLength }, (_, index2) => jsx(ThreadListPrimitiveItemByIndex, { index: index2, archived, components }, index2));
|
|
8934
|
+
}, [contentLength, archived, components]);
|
|
8935
|
+
return listElements;
|
|
8936
|
+
};
|
|
8937
|
+
ThreadListPrimitiveItems.displayName = "ThreadListPrimitive.Items";
|
|
8938
|
+
const ThreadListItemPrimitiveTitle = ({ fallback }) => {
|
|
8939
|
+
const title = useAuiState((s) => s.threadListItem.title);
|
|
8940
|
+
return jsx(Fragment$2, { children: title || fallback });
|
|
8941
|
+
};
|
|
8942
|
+
ThreadListItemPrimitiveTitle.displayName = "ThreadListItemPrimitive.Title";
|
|
8915
8943
|
const useComposerSend$1 = () => {
|
|
8916
8944
|
const aui = useAui();
|
|
8917
8945
|
const disabled = useAuiState((s) => s.thread.isRunning || !s.composer.isEditing || s.composer.isEmpty);
|
|
@@ -16344,6 +16372,37 @@ const useThreadScrollToBottom = ({ behavior } = {}) => {
|
|
|
16344
16372
|
return handleScrollToBottom;
|
|
16345
16373
|
};
|
|
16346
16374
|
const ThreadPrimitiveScrollToBottom = createActionButton("ThreadPrimitive.ScrollToBottom", useThreadScrollToBottom, ["behavior"]);
|
|
16375
|
+
const ThreadListPrimitiveNew = forwardRef(({ onClick, disabled, ...props }, forwardedRef) => {
|
|
16376
|
+
const isMain = useAuiState((s) => s.threads.newThreadId === s.threads.mainThreadId);
|
|
16377
|
+
const aui = useAui();
|
|
16378
|
+
return jsx(Primitive$1.button, { type: "button", ...isMain ? { "data-active": "true", "aria-current": "true" } : null, ...props, ref: forwardedRef, disabled, onClick: composeEventHandlers(onClick, () => {
|
|
16379
|
+
aui.threads().switchToNewThread();
|
|
16380
|
+
}) });
|
|
16381
|
+
});
|
|
16382
|
+
ThreadListPrimitiveNew.displayName = "ThreadListPrimitive.New";
|
|
16383
|
+
const ThreadListPrimitiveRoot = forwardRef((props, ref) => {
|
|
16384
|
+
return jsx(Primitive$1.div, { ...props, ref });
|
|
16385
|
+
});
|
|
16386
|
+
ThreadListPrimitiveRoot.displayName = "ThreadListPrimitive.Root";
|
|
16387
|
+
const ThreadListItemPrimitiveRoot = forwardRef((props, ref) => {
|
|
16388
|
+
const isMain = useAuiState((s) => s.threads.mainThreadId === s.threadListItem.id);
|
|
16389
|
+
return jsx(Primitive$1.div, { ...isMain ? { "data-active": "true", "aria-current": "true" } : null, ...props, ref });
|
|
16390
|
+
});
|
|
16391
|
+
ThreadListItemPrimitiveRoot.displayName = "ThreadListItemPrimitive.Root";
|
|
16392
|
+
const useThreadListItemArchive = () => {
|
|
16393
|
+
const aui = useAui();
|
|
16394
|
+
return useCallback(() => {
|
|
16395
|
+
aui.threadListItem().archive();
|
|
16396
|
+
}, [aui]);
|
|
16397
|
+
};
|
|
16398
|
+
const ThreadListItemPrimitiveArchive = createActionButton("ThreadListItemPrimitive.Archive", useThreadListItemArchive);
|
|
16399
|
+
const useThreadListItemTrigger = () => {
|
|
16400
|
+
const aui = useAui();
|
|
16401
|
+
return useCallback(() => {
|
|
16402
|
+
aui.threadListItem().switchTo();
|
|
16403
|
+
}, [aui]);
|
|
16404
|
+
};
|
|
16405
|
+
const ThreadListItemPrimitiveTrigger = createActionButton("ThreadListItemPrimitive.Trigger", useThreadListItemTrigger);
|
|
16347
16406
|
const useScrollLock = (animatedElementRef, animationDuration) => {
|
|
16348
16407
|
const scrollContainerRef = useRef(null);
|
|
16349
16408
|
const cleanupRef = useRef(null);
|
|
@@ -16417,45 +16476,16 @@ function useParentAuth() {
|
|
|
16417
16476
|
const [authToken, setAuthToken] = useState(null);
|
|
16418
16477
|
const readySignalSent = useRef(false);
|
|
16419
16478
|
useEffect(() => {
|
|
16420
|
-
const isInIframe = window.parent !== window;
|
|
16421
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16422
|
-
console.log("[AthenaAuth] useParentAuth mounted", {
|
|
16423
|
-
isInIframe,
|
|
16424
|
-
currentOrigin: window.location.origin,
|
|
16425
|
-
currentUrl: window.location.href
|
|
16426
|
-
});
|
|
16427
|
-
}
|
|
16428
16479
|
const handler = (event) => {
|
|
16429
|
-
|
|
16430
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16431
|
-
console.log("[AthenaAuth] Received PostMessage", {
|
|
16432
|
-
type: (_a2 = event.data) == null ? void 0 : _a2.type,
|
|
16433
|
-
origin: event.origin,
|
|
16434
|
-
isTrusted: isTrustedOrigin(event.origin)
|
|
16435
|
-
});
|
|
16436
|
-
}
|
|
16437
|
-
if (!isTrustedOrigin(event.origin)) {
|
|
16438
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16439
|
-
console.warn("[AthenaAuth] Rejected PostMessage — untrusted origin:", event.origin);
|
|
16440
|
-
}
|
|
16441
|
-
return;
|
|
16442
|
-
}
|
|
16480
|
+
if (!isTrustedOrigin(event.origin)) return;
|
|
16443
16481
|
if (event.data && typeof event.data === "object" && event.data.type === "athena-auth" && typeof event.data.token === "string") {
|
|
16444
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16445
|
-
console.log("[AthenaAuth] PropelAuth token received via PostMessage, length:", event.data.token.length);
|
|
16446
|
-
}
|
|
16447
16482
|
setAuthToken(event.data.token);
|
|
16448
16483
|
}
|
|
16449
16484
|
};
|
|
16450
16485
|
window.addEventListener("message", handler);
|
|
16451
|
-
if (!readySignalSent.current &&
|
|
16452
|
-
if (process.env.NODE_ENV !== "production") {
|
|
16453
|
-
console.log("[AthenaAuth] Sending athena-auth-ready signal to parent");
|
|
16454
|
-
}
|
|
16486
|
+
if (!readySignalSent.current && window.parent !== window) {
|
|
16455
16487
|
window.parent.postMessage({ type: "athena-auth-ready" }, "*");
|
|
16456
16488
|
readySignalSent.current = true;
|
|
16457
|
-
} else if (!isInIframe && process.env.NODE_ENV !== "production") {
|
|
16458
|
-
console.log("[AthenaAuth] Not in iframe — skipping parent auth (standalone mode)");
|
|
16459
16489
|
}
|
|
16460
16490
|
return () => window.removeEventListener("message", handler);
|
|
16461
16491
|
}, []);
|
|
@@ -20748,6 +20778,7 @@ const createConverter = (optimisticMessageCache) => (state, connectionMetadata)
|
|
|
20748
20778
|
const useAthenaRuntime = (config2) => {
|
|
20749
20779
|
const {
|
|
20750
20780
|
apiUrl = DEFAULT_API_URL,
|
|
20781
|
+
resumeApiUrl,
|
|
20751
20782
|
backendUrl = DEFAULT_BACKEND_URL,
|
|
20752
20783
|
apiKey,
|
|
20753
20784
|
token,
|
|
@@ -20758,9 +20789,9 @@ const useAthenaRuntime = (config2) => {
|
|
|
20758
20789
|
workbench = [],
|
|
20759
20790
|
knowledgeBase = [],
|
|
20760
20791
|
systemPrompt,
|
|
20761
|
-
threadId: threadIdProp
|
|
20762
|
-
initialMessages
|
|
20792
|
+
threadId: threadIdProp
|
|
20763
20793
|
} = config2;
|
|
20794
|
+
const resolvedResumeApiUrl = resumeApiUrl ?? apiUrl.replace(/\/api\/chat$/, "/api/resume");
|
|
20764
20795
|
const generatedIdRef = useRef(null);
|
|
20765
20796
|
if (generatedIdRef.current === null) {
|
|
20766
20797
|
generatedIdRef.current = crypto.randomUUID();
|
|
@@ -20776,28 +20807,18 @@ const useAthenaRuntime = (config2) => {
|
|
|
20776
20807
|
tokenRef.current = token;
|
|
20777
20808
|
const apiKeyRef = useRef(apiKey);
|
|
20778
20809
|
apiKeyRef.current = apiKey;
|
|
20810
|
+
const isExistingThread = !!threadIdProp;
|
|
20779
20811
|
const runtime = useAssistantTransportRuntime({
|
|
20780
|
-
initialState: { messages:
|
|
20812
|
+
initialState: { messages: [] },
|
|
20781
20813
|
converter,
|
|
20782
20814
|
api: apiUrl,
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
apiKeyPrefix: apiKeyRef.current ? apiKeyRef.current.substring(0, 10) + "..." : void 0,
|
|
20791
|
-
apiUrl
|
|
20792
|
-
});
|
|
20793
|
-
}
|
|
20794
|
-
return {
|
|
20795
|
-
// Prefer parent-injected PropelAuth token over hardcoded API key
|
|
20796
|
-
...authHeaders,
|
|
20797
|
-
"Accept-Encoding": "identity",
|
|
20798
|
-
Accept: "text/event-stream"
|
|
20799
|
-
};
|
|
20800
|
-
},
|
|
20815
|
+
resumeApi: resolvedResumeApiUrl,
|
|
20816
|
+
headers: async () => ({
|
|
20817
|
+
// Prefer parent-injected PropelAuth token over hardcoded API key
|
|
20818
|
+
...tokenRef.current ? { Authorization: `Bearer ${tokenRef.current}` } : apiKeyRef.current ? { "X-API-KEY": apiKeyRef.current } : {},
|
|
20819
|
+
"Accept-Encoding": "identity",
|
|
20820
|
+
Accept: "text/event-stream"
|
|
20821
|
+
}),
|
|
20801
20822
|
onResponse: () => {
|
|
20802
20823
|
if (process.env.NODE_ENV !== "production") {
|
|
20803
20824
|
console.log("[AthenaSDK] Stream connected");
|
|
@@ -20897,6 +20918,16 @@ const useAthenaRuntime = (config2) => {
|
|
|
20897
20918
|
}
|
|
20898
20919
|
}
|
|
20899
20920
|
});
|
|
20921
|
+
const hasResumedRef = useRef(false);
|
|
20922
|
+
useEffect(() => {
|
|
20923
|
+
if (isExistingThread && !hasResumedRef.current) {
|
|
20924
|
+
hasResumedRef.current = true;
|
|
20925
|
+
try {
|
|
20926
|
+
runtime.thread.unstable_resumeRun({ parentId: null });
|
|
20927
|
+
} catch {
|
|
20928
|
+
}
|
|
20929
|
+
}
|
|
20930
|
+
}, [isExistingThread, runtime]);
|
|
20900
20931
|
return runtime;
|
|
20901
20932
|
};
|
|
20902
20933
|
function r(e) {
|
|
@@ -24130,20 +24161,6 @@ function useAthenaConfig() {
|
|
|
24130
24161
|
}
|
|
24131
24162
|
return ctx;
|
|
24132
24163
|
}
|
|
24133
|
-
const ThreadListContext = createContext(null);
|
|
24134
|
-
function useThreadListStore() {
|
|
24135
|
-
const store = useContext(ThreadListContext);
|
|
24136
|
-
if (!store) {
|
|
24137
|
-
throw new Error(
|
|
24138
|
-
"[AthenaSDK] useThreadList must be used within an <AthenaProvider> that has thread management enabled."
|
|
24139
|
-
);
|
|
24140
|
-
}
|
|
24141
|
-
return store;
|
|
24142
|
-
}
|
|
24143
|
-
const ThreadLoadingContext = createContext(false);
|
|
24144
|
-
function useThreadLoading() {
|
|
24145
|
-
return useContext(ThreadLoadingContext);
|
|
24146
|
-
}
|
|
24147
24164
|
function getAuthHeaders(auth) {
|
|
24148
24165
|
if (auth.token) {
|
|
24149
24166
|
return { Authorization: `Bearer ${auth.token}` };
|
|
@@ -24168,36 +24185,6 @@ async function listThreads(backendUrl, auth, opts = {}) {
|
|
|
24168
24185
|
}
|
|
24169
24186
|
return res.json();
|
|
24170
24187
|
}
|
|
24171
|
-
function deserializeMessage(msg) {
|
|
24172
|
-
if (msg && typeof msg === "object" && "lc" in msg && "kwargs" in msg && msg.type === "constructor") {
|
|
24173
|
-
const kwargs = msg.kwargs;
|
|
24174
|
-
if (Array.isArray(kwargs.tool_calls)) {
|
|
24175
|
-
kwargs.tool_calls = kwargs.tool_calls.map((tc) => {
|
|
24176
|
-
if (tc && typeof tc === "object" && "lc" in tc && "kwargs" in tc) {
|
|
24177
|
-
return tc.kwargs;
|
|
24178
|
-
}
|
|
24179
|
-
return tc;
|
|
24180
|
-
});
|
|
24181
|
-
}
|
|
24182
|
-
return kwargs;
|
|
24183
|
-
}
|
|
24184
|
-
return msg;
|
|
24185
|
-
}
|
|
24186
|
-
async function getThreadState(backendUrl, auth, threadId) {
|
|
24187
|
-
const base2 = getAgoraBaseUrl(backendUrl);
|
|
24188
|
-
const res = await fetch(`${base2}/api/unstable/threads/${threadId}`, {
|
|
24189
|
-
method: "GET",
|
|
24190
|
-
headers: { ...getAuthHeaders(auth) }
|
|
24191
|
-
});
|
|
24192
|
-
if (!res.ok) {
|
|
24193
|
-
throw new Error(`[AthenaSDK] Failed to get thread state: ${res.status}`);
|
|
24194
|
-
}
|
|
24195
|
-
const data = await res.json();
|
|
24196
|
-
if (Array.isArray(data.messages)) {
|
|
24197
|
-
data.messages = data.messages.map(deserializeMessage);
|
|
24198
|
-
}
|
|
24199
|
-
return data;
|
|
24200
|
-
}
|
|
24201
24188
|
async function archiveThread(backendUrl, auth, threadId) {
|
|
24202
24189
|
const base2 = getAgoraBaseUrl(backendUrl);
|
|
24203
24190
|
const res = await fetch(`${base2}/api/conversations/threads/archive`, {
|
|
@@ -24209,55 +24196,241 @@ async function archiveThread(backendUrl, auth, threadId) {
|
|
|
24209
24196
|
throw new Error(`[AthenaSDK] Failed to archive thread: ${res.status}`);
|
|
24210
24197
|
}
|
|
24211
24198
|
}
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24220
|
-
|
|
24199
|
+
const AthenaThreadIdContext = createContext(void 0);
|
|
24200
|
+
function useAthenaThreadId() {
|
|
24201
|
+
return useContext(AthenaThreadIdContext);
|
|
24202
|
+
}
|
|
24203
|
+
function useAthenaThreadListAdapter(config2) {
|
|
24204
|
+
const configRef = useRef(config2);
|
|
24205
|
+
useEffect(() => {
|
|
24206
|
+
configRef.current = config2;
|
|
24207
|
+
}, [config2]);
|
|
24208
|
+
const auth = useMemo(
|
|
24209
|
+
() => ({ apiKey: config2.apiKey, token: config2.token }),
|
|
24210
|
+
[config2.apiKey, config2.token]
|
|
24211
|
+
);
|
|
24212
|
+
const unstable_Provider = useCallback(
|
|
24213
|
+
function AthenaThreadProvider({ children }) {
|
|
24214
|
+
const aui = useAui();
|
|
24215
|
+
const remoteId = aui.threadListItem().getState().remoteId;
|
|
24216
|
+
return /* @__PURE__ */ jsx(AthenaThreadIdContext.Provider, { value: remoteId, children });
|
|
24217
|
+
},
|
|
24218
|
+
[]
|
|
24219
|
+
);
|
|
24220
|
+
return useMemo(() => ({
|
|
24221
|
+
async list() {
|
|
24221
24222
|
try {
|
|
24222
|
-
const { threads } = await listThreads(
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
|
|
24226
|
-
|
|
24227
|
-
|
|
24228
|
-
|
|
24223
|
+
const { threads } = await listThreads(configRef.current.backendUrl, auth);
|
|
24224
|
+
return {
|
|
24225
|
+
threads: threads.map((t) => ({
|
|
24226
|
+
status: "regular",
|
|
24227
|
+
remoteId: t.thread_id,
|
|
24228
|
+
title: t.title || void 0
|
|
24229
|
+
}))
|
|
24230
|
+
};
|
|
24231
|
+
} catch (err) {
|
|
24232
|
+
console.error("[AthenaSDK] adapter.list() failed:", err);
|
|
24233
|
+
return { threads: [] };
|
|
24229
24234
|
}
|
|
24230
24235
|
},
|
|
24231
|
-
|
|
24232
|
-
|
|
24233
|
-
console.log("[AthenaThreads] switchThread called", { threadId, prev: get2().activeThreadId });
|
|
24234
|
-
}
|
|
24235
|
-
set2({ activeThreadId: threadId });
|
|
24236
|
+
async initialize(threadId) {
|
|
24237
|
+
return { remoteId: threadId, externalId: void 0 };
|
|
24236
24238
|
},
|
|
24237
|
-
|
|
24238
|
-
const localThreadId = `thread_${crypto.randomUUID()}`;
|
|
24239
|
-
set2({ activeThreadId: localThreadId });
|
|
24240
|
-
return localThreadId;
|
|
24239
|
+
async rename(_remoteId, _newTitle) {
|
|
24241
24240
|
},
|
|
24242
|
-
|
|
24243
|
-
|
|
24244
|
-
|
|
24245
|
-
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24241
|
+
async archive(remoteId) {
|
|
24242
|
+
await archiveThread(configRef.current.backendUrl, auth, remoteId);
|
|
24243
|
+
},
|
|
24244
|
+
async unarchive(_remoteId) {
|
|
24245
|
+
},
|
|
24246
|
+
async delete(remoteId) {
|
|
24247
|
+
await archiveThread(configRef.current.backendUrl, auth, remoteId);
|
|
24248
|
+
},
|
|
24249
|
+
async generateTitle(_remoteId, _messages) {
|
|
24250
|
+
return new Response("").body;
|
|
24251
|
+
},
|
|
24252
|
+
async fetch(remoteId) {
|
|
24253
|
+
return {
|
|
24254
|
+
status: "regular",
|
|
24255
|
+
remoteId
|
|
24256
|
+
};
|
|
24257
|
+
},
|
|
24258
|
+
unstable_Provider
|
|
24259
|
+
}), [auth, unstable_Provider]);
|
|
24260
|
+
}
|
|
24261
|
+
const THEME_TO_CSS = {
|
|
24262
|
+
primary: "--primary",
|
|
24263
|
+
primaryForeground: "--primary-foreground",
|
|
24264
|
+
background: "--background",
|
|
24265
|
+
foreground: "--foreground",
|
|
24266
|
+
muted: "--muted",
|
|
24267
|
+
mutedForeground: "--muted-foreground",
|
|
24268
|
+
accent: "--accent",
|
|
24269
|
+
accentForeground: "--accent-foreground",
|
|
24270
|
+
secondary: "--secondary",
|
|
24271
|
+
secondaryForeground: "--secondary-foreground",
|
|
24272
|
+
card: "--card",
|
|
24273
|
+
cardForeground: "--card-foreground",
|
|
24274
|
+
popover: "--popover",
|
|
24275
|
+
popoverForeground: "--popover-foreground",
|
|
24276
|
+
destructive: "--destructive",
|
|
24277
|
+
border: "--border",
|
|
24278
|
+
input: "--input",
|
|
24279
|
+
ring: "--ring",
|
|
24280
|
+
radius: "--radius",
|
|
24281
|
+
// Extended SDK-specific variables
|
|
24282
|
+
sidebarBackground: "--sidebar-background",
|
|
24283
|
+
sidebarBorder: "--sidebar-border",
|
|
24284
|
+
userBubble: "--user-bubble",
|
|
24285
|
+
userBubbleForeground: "--user-bubble-foreground",
|
|
24286
|
+
assistantForeground: "--assistant-foreground",
|
|
24287
|
+
composerBorder: "--composer-border",
|
|
24288
|
+
composerRadius: "--composer-radius"
|
|
24289
|
+
};
|
|
24290
|
+
function themeToStyleVars(theme) {
|
|
24291
|
+
const vars = {};
|
|
24292
|
+
for (const [key, value] of Object.entries(theme)) {
|
|
24293
|
+
if (value != null && THEME_TO_CSS[key]) {
|
|
24294
|
+
vars[THEME_TO_CSS[key]] = value;
|
|
24295
|
+
}
|
|
24296
|
+
}
|
|
24297
|
+
return vars;
|
|
24298
|
+
}
|
|
24299
|
+
const themes = {
|
|
24300
|
+
/** Default light theme. Neutral grays with blue accent. */
|
|
24301
|
+
light: {
|
|
24302
|
+
background: "oklch(0.99 0 0)",
|
|
24303
|
+
foreground: "oklch(0.13 0 0)",
|
|
24304
|
+
primary: "oklch(0.55 0.2 250)",
|
|
24305
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24306
|
+
secondary: "oklch(0.96 0.005 250)",
|
|
24307
|
+
secondaryForeground: "oklch(0.13 0 0)",
|
|
24308
|
+
muted: "oklch(0.96 0.005 250)",
|
|
24309
|
+
mutedForeground: "oklch(0.5 0.02 250)",
|
|
24310
|
+
accent: "oklch(0.94 0.01 250)",
|
|
24311
|
+
accentForeground: "oklch(0.13 0 0)",
|
|
24312
|
+
card: "oklch(0.99 0 0)",
|
|
24313
|
+
cardForeground: "oklch(0.13 0 0)",
|
|
24314
|
+
popover: "oklch(0.99 0 0)",
|
|
24315
|
+
popoverForeground: "oklch(0.13 0 0)",
|
|
24316
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24317
|
+
border: "oklch(0.91 0.005 250)",
|
|
24318
|
+
input: "oklch(0.91 0.005 250)",
|
|
24319
|
+
ring: "oklch(0.55 0.2 250)",
|
|
24320
|
+
radius: "0.625rem"
|
|
24321
|
+
},
|
|
24322
|
+
/** Dark theme. Deep gray background with lighter text. */
|
|
24323
|
+
dark: {
|
|
24324
|
+
background: "oklch(0.15 0 0)",
|
|
24325
|
+
foreground: "oklch(0.95 0 0)",
|
|
24326
|
+
primary: "oklch(0.7 0.15 250)",
|
|
24327
|
+
primaryForeground: "oklch(0.13 0 0)",
|
|
24328
|
+
secondary: "oklch(0.22 0 0)",
|
|
24329
|
+
secondaryForeground: "oklch(0.95 0 0)",
|
|
24330
|
+
muted: "oklch(0.22 0 0)",
|
|
24331
|
+
mutedForeground: "oklch(0.65 0 0)",
|
|
24332
|
+
accent: "oklch(0.25 0 0)",
|
|
24333
|
+
accentForeground: "oklch(0.95 0 0)",
|
|
24334
|
+
card: "oklch(0.18 0 0)",
|
|
24335
|
+
cardForeground: "oklch(0.95 0 0)",
|
|
24336
|
+
popover: "oklch(0.18 0 0)",
|
|
24337
|
+
popoverForeground: "oklch(0.95 0 0)",
|
|
24338
|
+
destructive: "oklch(0.65 0.2 25)",
|
|
24339
|
+
border: "oklch(1 0 0 / 10%)",
|
|
24340
|
+
input: "oklch(1 0 0 / 15%)",
|
|
24341
|
+
ring: "oklch(0.7 0.15 250)",
|
|
24342
|
+
radius: "0.625rem"
|
|
24343
|
+
},
|
|
24344
|
+
/** Midnight theme. Deep navy with soft blue tones. */
|
|
24345
|
+
midnight: {
|
|
24346
|
+
background: "oklch(0.16 0.02 260)",
|
|
24347
|
+
foreground: "oklch(0.92 0.01 250)",
|
|
24348
|
+
primary: "oklch(0.68 0.16 250)",
|
|
24349
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
24350
|
+
secondary: "oklch(0.22 0.02 260)",
|
|
24351
|
+
secondaryForeground: "oklch(0.92 0.01 250)",
|
|
24352
|
+
muted: "oklch(0.22 0.02 260)",
|
|
24353
|
+
mutedForeground: "oklch(0.6 0.04 250)",
|
|
24354
|
+
accent: "oklch(0.26 0.03 260)",
|
|
24355
|
+
accentForeground: "oklch(0.92 0.01 250)",
|
|
24356
|
+
card: "oklch(0.19 0.02 260)",
|
|
24357
|
+
cardForeground: "oklch(0.92 0.01 250)",
|
|
24358
|
+
popover: "oklch(0.19 0.02 260)",
|
|
24359
|
+
popoverForeground: "oklch(0.92 0.01 250)",
|
|
24360
|
+
destructive: "oklch(0.65 0.2 25)",
|
|
24361
|
+
border: "oklch(0.3 0.03 260)",
|
|
24362
|
+
input: "oklch(0.3 0.03 260)",
|
|
24363
|
+
ring: "oklch(0.68 0.16 250)",
|
|
24364
|
+
radius: "0.625rem"
|
|
24365
|
+
},
|
|
24366
|
+
/** Warm earthy theme. Brown and sand tones. */
|
|
24367
|
+
warm: {
|
|
24368
|
+
background: "oklch(0.98 0.005 80)",
|
|
24369
|
+
foreground: "oklch(0.2 0.02 50)",
|
|
24370
|
+
primary: "oklch(0.55 0.12 50)",
|
|
24371
|
+
primaryForeground: "oklch(0.98 0 0)",
|
|
24372
|
+
secondary: "oklch(0.94 0.01 80)",
|
|
24373
|
+
secondaryForeground: "oklch(0.2 0.02 50)",
|
|
24374
|
+
muted: "oklch(0.95 0.01 80)",
|
|
24375
|
+
mutedForeground: "oklch(0.5 0.03 50)",
|
|
24376
|
+
accent: "oklch(0.92 0.015 80)",
|
|
24377
|
+
accentForeground: "oklch(0.2 0.02 50)",
|
|
24378
|
+
card: "oklch(0.98 0.005 80)",
|
|
24379
|
+
cardForeground: "oklch(0.2 0.02 50)",
|
|
24380
|
+
popover: "oklch(0.98 0.005 80)",
|
|
24381
|
+
popoverForeground: "oklch(0.2 0.02 50)",
|
|
24382
|
+
destructive: "oklch(0.55 0.2 25)",
|
|
24383
|
+
border: "oklch(0.9 0.01 80)",
|
|
24384
|
+
input: "oklch(0.9 0.01 80)",
|
|
24385
|
+
ring: "oklch(0.55 0.12 50)",
|
|
24386
|
+
radius: "0.75rem"
|
|
24387
|
+
},
|
|
24388
|
+
/** Purple creative theme. Vibrant purple accent. */
|
|
24389
|
+
purple: {
|
|
24390
|
+
background: "oklch(0.99 0.003 310)",
|
|
24391
|
+
foreground: "oklch(0.15 0.02 310)",
|
|
24392
|
+
primary: "oklch(0.55 0.22 310)",
|
|
24393
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24394
|
+
secondary: "oklch(0.96 0.01 310)",
|
|
24395
|
+
secondaryForeground: "oklch(0.15 0.02 310)",
|
|
24396
|
+
muted: "oklch(0.96 0.01 310)",
|
|
24397
|
+
mutedForeground: "oklch(0.5 0.04 310)",
|
|
24398
|
+
accent: "oklch(0.94 0.015 310)",
|
|
24399
|
+
accentForeground: "oklch(0.15 0.02 310)",
|
|
24400
|
+
card: "oklch(0.99 0.003 310)",
|
|
24401
|
+
cardForeground: "oklch(0.15 0.02 310)",
|
|
24402
|
+
popover: "oklch(0.99 0.003 310)",
|
|
24403
|
+
popoverForeground: "oklch(0.15 0.02 310)",
|
|
24404
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24405
|
+
border: "oklch(0.92 0.005 310)",
|
|
24406
|
+
input: "oklch(0.92 0.005 310)",
|
|
24407
|
+
ring: "oklch(0.55 0.22 310)",
|
|
24408
|
+
radius: "0.75rem"
|
|
24409
|
+
},
|
|
24410
|
+
/** Green nature theme. Fresh green tones. */
|
|
24411
|
+
green: {
|
|
24412
|
+
background: "oklch(0.99 0.003 150)",
|
|
24413
|
+
foreground: "oklch(0.15 0.02 150)",
|
|
24414
|
+
primary: "oklch(0.55 0.18 155)",
|
|
24415
|
+
primaryForeground: "oklch(1 0 0)",
|
|
24416
|
+
secondary: "oklch(0.96 0.01 150)",
|
|
24417
|
+
secondaryForeground: "oklch(0.15 0.02 150)",
|
|
24418
|
+
muted: "oklch(0.96 0.01 150)",
|
|
24419
|
+
mutedForeground: "oklch(0.5 0.03 150)",
|
|
24420
|
+
accent: "oklch(0.94 0.015 150)",
|
|
24421
|
+
accentForeground: "oklch(0.15 0.02 150)",
|
|
24422
|
+
card: "oklch(0.99 0.003 150)",
|
|
24423
|
+
cardForeground: "oklch(0.15 0.02 150)",
|
|
24424
|
+
popover: "oklch(0.99 0.003 150)",
|
|
24425
|
+
popoverForeground: "oklch(0.15 0.02 150)",
|
|
24426
|
+
destructive: "oklch(0.55 0.22 27)",
|
|
24427
|
+
border: "oklch(0.92 0.008 150)",
|
|
24428
|
+
input: "oklch(0.92 0.008 150)",
|
|
24429
|
+
ring: "oklch(0.55 0.18 155)",
|
|
24430
|
+
radius: "0.625rem"
|
|
24431
|
+
}
|
|
24432
|
+
};
|
|
24433
|
+
function AthenaStandalone({
|
|
24261
24434
|
children,
|
|
24262
24435
|
apiUrl,
|
|
24263
24436
|
backendUrl,
|
|
@@ -24271,8 +24444,7 @@ function AthenaRuntimeInner({
|
|
|
24271
24444
|
workbench,
|
|
24272
24445
|
knowledgeBase,
|
|
24273
24446
|
systemPrompt,
|
|
24274
|
-
threadId
|
|
24275
|
-
initialMessages
|
|
24447
|
+
threadId
|
|
24276
24448
|
}) {
|
|
24277
24449
|
const auiTools = useMemo(() => Tools({ toolkit: frontendTools }), [frontendTools]);
|
|
24278
24450
|
const aui = useAui({ tools: auiTools });
|
|
@@ -24288,8 +24460,7 @@ function AthenaRuntimeInner({
|
|
|
24288
24460
|
workbench,
|
|
24289
24461
|
knowledgeBase,
|
|
24290
24462
|
systemPrompt,
|
|
24291
|
-
threadId
|
|
24292
|
-
initialMessages
|
|
24463
|
+
threadId
|
|
24293
24464
|
});
|
|
24294
24465
|
const athenaConfig = useMemo(
|
|
24295
24466
|
() => ({ backendUrl, apiKey, token }),
|
|
@@ -24297,16 +24468,71 @@ function AthenaRuntimeInner({
|
|
|
24297
24468
|
);
|
|
24298
24469
|
return /* @__PURE__ */ jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsx(TooltipProvider, { children }) }) });
|
|
24299
24470
|
}
|
|
24300
|
-
function
|
|
24301
|
-
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24306
|
-
|
|
24307
|
-
|
|
24308
|
-
|
|
24471
|
+
function useAthenaRuntimeHook(config2) {
|
|
24472
|
+
const remoteId = useAthenaThreadId();
|
|
24473
|
+
return useAthenaRuntime({
|
|
24474
|
+
apiUrl: config2.apiUrl,
|
|
24475
|
+
backendUrl: config2.backendUrl,
|
|
24476
|
+
apiKey: config2.apiKey,
|
|
24477
|
+
token: config2.token,
|
|
24478
|
+
model: config2.model,
|
|
24479
|
+
agent: config2.agent,
|
|
24480
|
+
tools: config2.tools,
|
|
24481
|
+
frontendToolIds: config2.frontendToolIds,
|
|
24482
|
+
workbench: config2.workbench,
|
|
24483
|
+
knowledgeBase: config2.knowledgeBase,
|
|
24484
|
+
systemPrompt: config2.systemPrompt,
|
|
24485
|
+
threadId: remoteId
|
|
24486
|
+
});
|
|
24487
|
+
}
|
|
24488
|
+
function AthenaWithThreadList({
|
|
24489
|
+
children,
|
|
24490
|
+
apiUrl,
|
|
24491
|
+
backendUrl,
|
|
24492
|
+
apiKey,
|
|
24493
|
+
token,
|
|
24494
|
+
model,
|
|
24495
|
+
agent: agent2,
|
|
24496
|
+
tools,
|
|
24497
|
+
frontendToolIds,
|
|
24498
|
+
frontendTools,
|
|
24499
|
+
workbench,
|
|
24500
|
+
knowledgeBase,
|
|
24501
|
+
systemPrompt
|
|
24502
|
+
}) {
|
|
24503
|
+
const adapter = useAthenaThreadListAdapter({
|
|
24504
|
+
backendUrl,
|
|
24505
|
+
apiKey,
|
|
24506
|
+
token
|
|
24507
|
+
});
|
|
24508
|
+
const runtimeConfig = useMemo(() => ({
|
|
24509
|
+
apiUrl,
|
|
24510
|
+
backendUrl,
|
|
24511
|
+
apiKey,
|
|
24512
|
+
token,
|
|
24513
|
+
model,
|
|
24514
|
+
agent: agent2,
|
|
24515
|
+
tools,
|
|
24516
|
+
frontendToolIds,
|
|
24517
|
+
workbench,
|
|
24518
|
+
knowledgeBase,
|
|
24519
|
+
systemPrompt
|
|
24520
|
+
}), [apiUrl, backendUrl, apiKey, token, model, agent2, tools, frontendToolIds, workbench, knowledgeBase, systemPrompt]);
|
|
24521
|
+
const runtimeHook = useCallback(
|
|
24522
|
+
() => useAthenaRuntimeHook(runtimeConfig),
|
|
24523
|
+
[runtimeConfig]
|
|
24524
|
+
);
|
|
24525
|
+
const runtime = useRemoteThreadListRuntime({
|
|
24526
|
+
runtimeHook,
|
|
24527
|
+
adapter
|
|
24528
|
+
});
|
|
24529
|
+
const auiTools = useMemo(() => Tools({ toolkit: frontendTools }), [frontendTools]);
|
|
24530
|
+
const aui = useAui({ tools: auiTools });
|
|
24531
|
+
const athenaConfig = useMemo(
|
|
24532
|
+
() => ({ backendUrl, apiKey, token }),
|
|
24533
|
+
[backendUrl, apiKey, token]
|
|
24309
24534
|
);
|
|
24535
|
+
return /* @__PURE__ */ jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsx(TooltipProvider, { children }) }) });
|
|
24310
24536
|
}
|
|
24311
24537
|
function AthenaProvider({
|
|
24312
24538
|
children,
|
|
@@ -24322,100 +24548,57 @@ function AthenaProvider({
|
|
|
24322
24548
|
knowledgeBase,
|
|
24323
24549
|
systemPrompt,
|
|
24324
24550
|
threadId: threadIdProp,
|
|
24325
|
-
enableThreadList = false
|
|
24551
|
+
enableThreadList = false,
|
|
24552
|
+
theme
|
|
24326
24553
|
}) {
|
|
24327
24554
|
const frontendToolNames = useMemo(() => Object.keys(frontendTools), [frontendTools]);
|
|
24555
|
+
const themeStyleVars = useMemo(() => theme ? themeToStyleVars(theme) : void 0, [theme]);
|
|
24328
24556
|
const parentAuthToken = useParentAuth();
|
|
24329
24557
|
const effectiveToken = tokenProp ?? parentAuthToken;
|
|
24330
24558
|
const effectiveBackendUrl = backendUrl ?? DEFAULT_BACKEND_URL;
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
|
|
24337
|
-
|
|
24338
|
-
|
|
24339
|
-
|
|
24340
|
-
|
|
24341
|
-
|
|
24342
|
-
|
|
24343
|
-
|
|
24344
|
-
|
|
24345
|
-
|
|
24346
|
-
|
|
24347
|
-
|
|
24348
|
-
|
|
24349
|
-
}
|
|
24350
|
-
const activeThreadId = useActiveThreadFromStore(
|
|
24351
|
-
enableThreadList ? threadListStoreRef.current : null
|
|
24352
|
-
);
|
|
24353
|
-
const [displayedThreadId, setDisplayedThreadId] = useState(null);
|
|
24354
|
-
const [loadedMessages, setLoadedMessages] = useState(void 0);
|
|
24355
|
-
const [isLoadingThread, setIsLoadingThread] = useState(false);
|
|
24356
|
-
useEffect(() => {
|
|
24357
|
-
var _a2;
|
|
24358
|
-
if (!enableThreadList) return;
|
|
24359
|
-
if (activeThreadId === displayedThreadId) return;
|
|
24360
|
-
const threads = ((_a2 = threadListStoreRef.current) == null ? void 0 : _a2.getState().threads) ?? [];
|
|
24361
|
-
const isExistingThread = threads.some((t) => t.thread_id === activeThreadId);
|
|
24362
|
-
if (!isExistingThread) {
|
|
24363
|
-
setLoadedMessages(void 0);
|
|
24364
|
-
setDisplayedThreadId(activeThreadId);
|
|
24365
|
-
setIsLoadingThread(false);
|
|
24366
|
-
return;
|
|
24367
|
-
}
|
|
24368
|
-
let cancelled = false;
|
|
24369
|
-
setIsLoadingThread(true);
|
|
24370
|
-
getThreadState(effectiveBackendUrl, { apiKey, token: effectiveToken }, activeThreadId).then((state) => {
|
|
24371
|
-
var _a3;
|
|
24372
|
-
if (cancelled) return;
|
|
24373
|
-
if (process.env.NODE_ENV !== "production") {
|
|
24374
|
-
console.log("[AthenaThreads] Loaded thread state", {
|
|
24375
|
-
threadId: activeThreadId,
|
|
24376
|
-
messageCount: ((_a3 = state.messages) == null ? void 0 : _a3.length) ?? 0
|
|
24377
|
-
});
|
|
24559
|
+
let inner;
|
|
24560
|
+
if (enableThreadList) {
|
|
24561
|
+
inner = /* @__PURE__ */ jsx(
|
|
24562
|
+
AthenaWithThreadList,
|
|
24563
|
+
{
|
|
24564
|
+
apiUrl,
|
|
24565
|
+
backendUrl: effectiveBackendUrl,
|
|
24566
|
+
apiKey,
|
|
24567
|
+
token: effectiveToken,
|
|
24568
|
+
model,
|
|
24569
|
+
agent: agent2,
|
|
24570
|
+
tools,
|
|
24571
|
+
frontendToolIds: frontendToolNames,
|
|
24572
|
+
frontendTools,
|
|
24573
|
+
workbench,
|
|
24574
|
+
knowledgeBase,
|
|
24575
|
+
systemPrompt,
|
|
24576
|
+
children
|
|
24378
24577
|
}
|
|
24379
|
-
|
|
24380
|
-
|
|
24381
|
-
|
|
24382
|
-
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24578
|
+
);
|
|
24579
|
+
} else {
|
|
24580
|
+
inner = /* @__PURE__ */ jsx(
|
|
24581
|
+
AthenaStandalone,
|
|
24582
|
+
{
|
|
24583
|
+
apiUrl,
|
|
24584
|
+
backendUrl: effectiveBackendUrl,
|
|
24585
|
+
apiKey,
|
|
24586
|
+
token: effectiveToken,
|
|
24587
|
+
model,
|
|
24588
|
+
agent: agent2,
|
|
24589
|
+
tools,
|
|
24590
|
+
frontendToolIds: frontendToolNames,
|
|
24591
|
+
frontendTools,
|
|
24592
|
+
workbench,
|
|
24593
|
+
knowledgeBase,
|
|
24594
|
+
systemPrompt,
|
|
24595
|
+
threadId: threadIdProp,
|
|
24596
|
+
children
|
|
24386
24597
|
}
|
|
24387
|
-
|
|
24388
|
-
|
|
24389
|
-
|
|
24390
|
-
});
|
|
24391
|
-
return () => {
|
|
24392
|
-
cancelled = true;
|
|
24393
|
-
};
|
|
24394
|
-
}, [activeThreadId, displayedThreadId, enableThreadList, effectiveBackendUrl, apiKey, effectiveToken]);
|
|
24395
|
-
const resolvedThreadId = threadIdProp ?? displayedThreadId ?? void 0;
|
|
24396
|
-
const inner = /* @__PURE__ */ jsx(ThreadLoadingContext.Provider, { value: isLoadingThread, children: /* @__PURE__ */ jsx(
|
|
24397
|
-
AthenaRuntimeInner,
|
|
24398
|
-
{
|
|
24399
|
-
apiUrl,
|
|
24400
|
-
backendUrl: effectiveBackendUrl,
|
|
24401
|
-
apiKey,
|
|
24402
|
-
token: effectiveToken,
|
|
24403
|
-
model,
|
|
24404
|
-
agent: agent2,
|
|
24405
|
-
tools,
|
|
24406
|
-
frontendToolIds: frontendToolNames,
|
|
24407
|
-
frontendTools,
|
|
24408
|
-
workbench,
|
|
24409
|
-
knowledgeBase,
|
|
24410
|
-
systemPrompt,
|
|
24411
|
-
threadId: resolvedThreadId,
|
|
24412
|
-
initialMessages: loadedMessages,
|
|
24413
|
-
children
|
|
24414
|
-
},
|
|
24415
|
-
resolvedThreadId ?? "__new__"
|
|
24416
|
-
) });
|
|
24417
|
-
if (enableThreadList && threadListStoreRef.current) {
|
|
24418
|
-
return /* @__PURE__ */ jsx(ThreadListContext.Provider, { value: threadListStoreRef.current, children: inner });
|
|
24598
|
+
);
|
|
24599
|
+
}
|
|
24600
|
+
if (themeStyleVars) {
|
|
24601
|
+
return /* @__PURE__ */ jsx("div", { className: "athena-themed", style: themeStyleVars, children: inner });
|
|
24419
24602
|
}
|
|
24420
24603
|
return inner;
|
|
24421
24604
|
}
|
|
@@ -57210,10 +57393,10 @@ const HorizontalRule$1 = HorizontalRule.extend({
|
|
|
57210
57393
|
};
|
|
57211
57394
|
}
|
|
57212
57395
|
});
|
|
57213
|
-
const Image = Node3.create({
|
|
57396
|
+
const Image$1 = Node3.create({
|
|
57214
57397
|
name: "image"
|
|
57215
57398
|
});
|
|
57216
|
-
const Image$1 = Image.extend({
|
|
57399
|
+
const Image$1$1 = Image$1.extend({
|
|
57217
57400
|
/**
|
|
57218
57401
|
* @return {{markdown: MarkdownNodeSpec}}
|
|
57219
57402
|
*/
|
|
@@ -57497,10 +57680,10 @@ const Italic$1 = Italic.extend({
|
|
|
57497
57680
|
};
|
|
57498
57681
|
}
|
|
57499
57682
|
});
|
|
57500
|
-
const Link = Mark2.create({
|
|
57683
|
+
const Link$1 = Mark2.create({
|
|
57501
57684
|
name: "link"
|
|
57502
57685
|
});
|
|
57503
|
-
const Link$1 = Link.extend({
|
|
57686
|
+
const Link$1$1 = Link$1.extend({
|
|
57504
57687
|
/**
|
|
57505
57688
|
* @return {{markdown: MarkdownMarkSpec}}
|
|
57506
57689
|
*/
|
|
@@ -57537,7 +57720,7 @@ const Strike$1 = Strike.extend({
|
|
|
57537
57720
|
};
|
|
57538
57721
|
}
|
|
57539
57722
|
});
|
|
57540
|
-
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];
|
|
57723
|
+
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];
|
|
57541
57724
|
function getMarkdownSpec(extension) {
|
|
57542
57725
|
var _extension$storage, _markdownExtensions$f;
|
|
57543
57726
|
const markdownSpec = (_extension$storage = extension.storage) === null || _extension$storage === void 0 ? void 0 : _extension$storage.markdown;
|
|
@@ -60350,41 +60533,41 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
60350
60533
|
* This source code is licensed under the ISC license.
|
|
60351
60534
|
* See the LICENSE file in the root directory of this source tree.
|
|
60352
60535
|
*/
|
|
60353
|
-
const __iconNode$
|
|
60536
|
+
const __iconNode$J = [
|
|
60354
60537
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
60355
60538
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
60356
60539
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
60357
60540
|
];
|
|
60358
|
-
const Archive = createLucideIcon("archive", __iconNode$
|
|
60541
|
+
const Archive = createLucideIcon("archive", __iconNode$J);
|
|
60359
60542
|
/**
|
|
60360
60543
|
* @license lucide-react v0.575.0 - ISC
|
|
60361
60544
|
*
|
|
60362
60545
|
* This source code is licensed under the ISC license.
|
|
60363
60546
|
* See the LICENSE file in the root directory of this source tree.
|
|
60364
60547
|
*/
|
|
60365
|
-
const __iconNode$
|
|
60548
|
+
const __iconNode$I = [
|
|
60366
60549
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
60367
60550
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
60368
60551
|
];
|
|
60369
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
60552
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$I);
|
|
60370
60553
|
/**
|
|
60371
60554
|
* @license lucide-react v0.575.0 - ISC
|
|
60372
60555
|
*
|
|
60373
60556
|
* This source code is licensed under the ISC license.
|
|
60374
60557
|
* See the LICENSE file in the root directory of this source tree.
|
|
60375
60558
|
*/
|
|
60376
|
-
const __iconNode$
|
|
60559
|
+
const __iconNode$H = [
|
|
60377
60560
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
60378
60561
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
60379
60562
|
];
|
|
60380
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
60563
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$H);
|
|
60381
60564
|
/**
|
|
60382
60565
|
* @license lucide-react v0.575.0 - ISC
|
|
60383
60566
|
*
|
|
60384
60567
|
* This source code is licensed under the ISC license.
|
|
60385
60568
|
* See the LICENSE file in the root directory of this source tree.
|
|
60386
60569
|
*/
|
|
60387
|
-
const __iconNode$
|
|
60570
|
+
const __iconNode$G = [
|
|
60388
60571
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
60389
60572
|
[
|
|
60390
60573
|
"path",
|
|
@@ -60394,14 +60577,14 @@ const __iconNode$B = [
|
|
|
60394
60577
|
}
|
|
60395
60578
|
]
|
|
60396
60579
|
];
|
|
60397
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
60580
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$G);
|
|
60398
60581
|
/**
|
|
60399
60582
|
* @license lucide-react v0.575.0 - ISC
|
|
60400
60583
|
*
|
|
60401
60584
|
* This source code is licensed under the ISC license.
|
|
60402
60585
|
* See the LICENSE file in the root directory of this source tree.
|
|
60403
60586
|
*/
|
|
60404
|
-
const __iconNode$
|
|
60587
|
+
const __iconNode$F = [
|
|
60405
60588
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
60406
60589
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
60407
60590
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -60411,148 +60594,148 @@ const __iconNode$A = [
|
|
|
60411
60594
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
60412
60595
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
60413
60596
|
];
|
|
60414
|
-
const Brain = createLucideIcon("brain", __iconNode$
|
|
60597
|
+
const Brain = createLucideIcon("brain", __iconNode$F);
|
|
60415
60598
|
/**
|
|
60416
60599
|
* @license lucide-react v0.575.0 - ISC
|
|
60417
60600
|
*
|
|
60418
60601
|
* This source code is licensed under the ISC license.
|
|
60419
60602
|
* See the LICENSE file in the root directory of this source tree.
|
|
60420
60603
|
*/
|
|
60421
|
-
const __iconNode$
|
|
60604
|
+
const __iconNode$E = [
|
|
60422
60605
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
60423
60606
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
60424
60607
|
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
60425
60608
|
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
60426
60609
|
];
|
|
60427
|
-
const ChartColumn = createLucideIcon("chart-column", __iconNode$
|
|
60610
|
+
const ChartColumn = createLucideIcon("chart-column", __iconNode$E);
|
|
60428
60611
|
/**
|
|
60429
60612
|
* @license lucide-react v0.575.0 - ISC
|
|
60430
60613
|
*
|
|
60431
60614
|
* This source code is licensed under the ISC license.
|
|
60432
60615
|
* See the LICENSE file in the root directory of this source tree.
|
|
60433
60616
|
*/
|
|
60434
|
-
const __iconNode$
|
|
60435
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
60617
|
+
const __iconNode$D = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
60618
|
+
const Check = createLucideIcon("check", __iconNode$D);
|
|
60436
60619
|
/**
|
|
60437
60620
|
* @license lucide-react v0.575.0 - ISC
|
|
60438
60621
|
*
|
|
60439
60622
|
* This source code is licensed under the ISC license.
|
|
60440
60623
|
* See the LICENSE file in the root directory of this source tree.
|
|
60441
60624
|
*/
|
|
60442
|
-
const __iconNode$
|
|
60443
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
60625
|
+
const __iconNode$C = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
60626
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$C);
|
|
60444
60627
|
/**
|
|
60445
60628
|
* @license lucide-react v0.575.0 - ISC
|
|
60446
60629
|
*
|
|
60447
60630
|
* This source code is licensed under the ISC license.
|
|
60448
60631
|
* See the LICENSE file in the root directory of this source tree.
|
|
60449
60632
|
*/
|
|
60450
|
-
const __iconNode$
|
|
60633
|
+
const __iconNode$B = [
|
|
60451
60634
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60452
60635
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
60453
60636
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
60454
60637
|
];
|
|
60455
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
60638
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$B);
|
|
60456
60639
|
/**
|
|
60457
60640
|
* @license lucide-react v0.575.0 - ISC
|
|
60458
60641
|
*
|
|
60459
60642
|
* This source code is licensed under the ISC license.
|
|
60460
60643
|
* See the LICENSE file in the root directory of this source tree.
|
|
60461
60644
|
*/
|
|
60462
|
-
const __iconNode$
|
|
60645
|
+
const __iconNode$A = [
|
|
60463
60646
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60464
60647
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
60465
60648
|
];
|
|
60466
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
60649
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$A);
|
|
60467
60650
|
/**
|
|
60468
60651
|
* @license lucide-react v0.575.0 - ISC
|
|
60469
60652
|
*
|
|
60470
60653
|
* This source code is licensed under the ISC license.
|
|
60471
60654
|
* See the LICENSE file in the root directory of this source tree.
|
|
60472
60655
|
*/
|
|
60473
|
-
const __iconNode$
|
|
60656
|
+
const __iconNode$z = [
|
|
60474
60657
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60475
60658
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
60476
60659
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
60477
60660
|
];
|
|
60478
|
-
const CircleX = createLucideIcon("circle-x", __iconNode$
|
|
60661
|
+
const CircleX = createLucideIcon("circle-x", __iconNode$z);
|
|
60479
60662
|
/**
|
|
60480
60663
|
* @license lucide-react v0.575.0 - ISC
|
|
60481
60664
|
*
|
|
60482
60665
|
* This source code is licensed under the ISC license.
|
|
60483
60666
|
* See the LICENSE file in the root directory of this source tree.
|
|
60484
60667
|
*/
|
|
60485
|
-
const __iconNode$
|
|
60668
|
+
const __iconNode$y = [
|
|
60486
60669
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
60487
60670
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
60488
60671
|
];
|
|
60489
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
60672
|
+
const Code = createLucideIcon("code", __iconNode$y);
|
|
60490
60673
|
/**
|
|
60491
60674
|
* @license lucide-react v0.575.0 - ISC
|
|
60492
60675
|
*
|
|
60493
60676
|
* This source code is licensed under the ISC license.
|
|
60494
60677
|
* See the LICENSE file in the root directory of this source tree.
|
|
60495
60678
|
*/
|
|
60496
|
-
const __iconNode$
|
|
60679
|
+
const __iconNode$x = [
|
|
60497
60680
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
60498
60681
|
["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" }]
|
|
60499
60682
|
];
|
|
60500
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
60683
|
+
const Copy = createLucideIcon("copy", __iconNode$x);
|
|
60501
60684
|
/**
|
|
60502
60685
|
* @license lucide-react v0.575.0 - ISC
|
|
60503
60686
|
*
|
|
60504
60687
|
* This source code is licensed under the ISC license.
|
|
60505
60688
|
* See the LICENSE file in the root directory of this source tree.
|
|
60506
60689
|
*/
|
|
60507
|
-
const __iconNode$
|
|
60690
|
+
const __iconNode$w = [
|
|
60508
60691
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
60509
60692
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
60510
60693
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
60511
60694
|
];
|
|
60512
|
-
const Database = createLucideIcon("database", __iconNode$
|
|
60695
|
+
const Database = createLucideIcon("database", __iconNode$w);
|
|
60513
60696
|
/**
|
|
60514
60697
|
* @license lucide-react v0.575.0 - ISC
|
|
60515
60698
|
*
|
|
60516
60699
|
* This source code is licensed under the ISC license.
|
|
60517
60700
|
* See the LICENSE file in the root directory of this source tree.
|
|
60518
60701
|
*/
|
|
60519
|
-
const __iconNode$
|
|
60702
|
+
const __iconNode$v = [
|
|
60520
60703
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
60521
60704
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
60522
60705
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
60523
60706
|
];
|
|
60524
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
60707
|
+
const Download = createLucideIcon("download", __iconNode$v);
|
|
60525
60708
|
/**
|
|
60526
60709
|
* @license lucide-react v0.575.0 - ISC
|
|
60527
60710
|
*
|
|
60528
60711
|
* This source code is licensed under the ISC license.
|
|
60529
60712
|
* See the LICENSE file in the root directory of this source tree.
|
|
60530
60713
|
*/
|
|
60531
|
-
const __iconNode$
|
|
60714
|
+
const __iconNode$u = [
|
|
60532
60715
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
60533
60716
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
60534
60717
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
60535
60718
|
];
|
|
60536
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$
|
|
60719
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$u);
|
|
60537
60720
|
/**
|
|
60538
60721
|
* @license lucide-react v0.575.0 - ISC
|
|
60539
60722
|
*
|
|
60540
60723
|
* This source code is licensed under the ISC license.
|
|
60541
60724
|
* See the LICENSE file in the root directory of this source tree.
|
|
60542
60725
|
*/
|
|
60543
|
-
const __iconNode$
|
|
60726
|
+
const __iconNode$t = [
|
|
60544
60727
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
60545
60728
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
60546
60729
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
60547
60730
|
];
|
|
60548
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
60731
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$t);
|
|
60549
60732
|
/**
|
|
60550
60733
|
* @license lucide-react v0.575.0 - ISC
|
|
60551
60734
|
*
|
|
60552
60735
|
* This source code is licensed under the ISC license.
|
|
60553
60736
|
* See the LICENSE file in the root directory of this source tree.
|
|
60554
60737
|
*/
|
|
60555
|
-
const __iconNode$
|
|
60738
|
+
const __iconNode$s = [
|
|
60556
60739
|
[
|
|
60557
60740
|
"path",
|
|
60558
60741
|
{
|
|
@@ -60564,14 +60747,14 @@ const __iconNode$n = [
|
|
|
60564
60747
|
["path", { d: "M9 15h6", key: "cctwl0" }],
|
|
60565
60748
|
["path", { d: "M12 18v-6", key: "17g6i2" }]
|
|
60566
60749
|
];
|
|
60567
|
-
const FilePlus = createLucideIcon("file-plus", __iconNode$
|
|
60750
|
+
const FilePlus = createLucideIcon("file-plus", __iconNode$s);
|
|
60568
60751
|
/**
|
|
60569
60752
|
* @license lucide-react v0.575.0 - ISC
|
|
60570
60753
|
*
|
|
60571
60754
|
* This source code is licensed under the ISC license.
|
|
60572
60755
|
* See the LICENSE file in the root directory of this source tree.
|
|
60573
60756
|
*/
|
|
60574
|
-
const __iconNode$
|
|
60757
|
+
const __iconNode$r = [
|
|
60575
60758
|
[
|
|
60576
60759
|
"path",
|
|
60577
60760
|
{
|
|
@@ -60585,14 +60768,14 @@ const __iconNode$m = [
|
|
|
60585
60768
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
60586
60769
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
60587
60770
|
];
|
|
60588
|
-
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$
|
|
60771
|
+
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$r);
|
|
60589
60772
|
/**
|
|
60590
60773
|
* @license lucide-react v0.575.0 - ISC
|
|
60591
60774
|
*
|
|
60592
60775
|
* This source code is licensed under the ISC license.
|
|
60593
60776
|
* See the LICENSE file in the root directory of this source tree.
|
|
60594
60777
|
*/
|
|
60595
|
-
const __iconNode$
|
|
60778
|
+
const __iconNode$q = [
|
|
60596
60779
|
[
|
|
60597
60780
|
"path",
|
|
60598
60781
|
{
|
|
@@ -60605,14 +60788,14 @@ const __iconNode$l = [
|
|
|
60605
60788
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
60606
60789
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
60607
60790
|
];
|
|
60608
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
60791
|
+
const FileText = createLucideIcon("file-text", __iconNode$q);
|
|
60609
60792
|
/**
|
|
60610
60793
|
* @license lucide-react v0.575.0 - ISC
|
|
60611
60794
|
*
|
|
60612
60795
|
* This source code is licensed under the ISC license.
|
|
60613
60796
|
* See the LICENSE file in the root directory of this source tree.
|
|
60614
60797
|
*/
|
|
60615
|
-
const __iconNode$
|
|
60798
|
+
const __iconNode$p = [
|
|
60616
60799
|
[
|
|
60617
60800
|
"path",
|
|
60618
60801
|
{
|
|
@@ -60622,26 +60805,54 @@ const __iconNode$k = [
|
|
|
60622
60805
|
],
|
|
60623
60806
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
60624
60807
|
];
|
|
60625
|
-
const File$1 = createLucideIcon("file", __iconNode$
|
|
60808
|
+
const File$1 = createLucideIcon("file", __iconNode$p);
|
|
60626
60809
|
/**
|
|
60627
60810
|
* @license lucide-react v0.575.0 - ISC
|
|
60628
60811
|
*
|
|
60629
60812
|
* This source code is licensed under the ISC license.
|
|
60630
60813
|
* See the LICENSE file in the root directory of this source tree.
|
|
60631
60814
|
*/
|
|
60632
|
-
const __iconNode$
|
|
60815
|
+
const __iconNode$o = [
|
|
60816
|
+
[
|
|
60817
|
+
"path",
|
|
60818
|
+
{
|
|
60819
|
+
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",
|
|
60820
|
+
key: "usdka0"
|
|
60821
|
+
}
|
|
60822
|
+
]
|
|
60823
|
+
];
|
|
60824
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$o);
|
|
60825
|
+
/**
|
|
60826
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60827
|
+
*
|
|
60828
|
+
* This source code is licensed under the ISC license.
|
|
60829
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60830
|
+
*/
|
|
60831
|
+
const __iconNode$n = [
|
|
60633
60832
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60634
60833
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
60635
60834
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
60636
60835
|
];
|
|
60637
|
-
const Globe = createLucideIcon("globe", __iconNode$
|
|
60836
|
+
const Globe = createLucideIcon("globe", __iconNode$n);
|
|
60638
60837
|
/**
|
|
60639
60838
|
* @license lucide-react v0.575.0 - ISC
|
|
60640
60839
|
*
|
|
60641
60840
|
* This source code is licensed under the ISC license.
|
|
60642
60841
|
* See the LICENSE file in the root directory of this source tree.
|
|
60643
60842
|
*/
|
|
60644
|
-
const __iconNode$
|
|
60843
|
+
const __iconNode$m = [
|
|
60844
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
60845
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
60846
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
60847
|
+
];
|
|
60848
|
+
const Image = createLucideIcon("image", __iconNode$m);
|
|
60849
|
+
/**
|
|
60850
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60851
|
+
*
|
|
60852
|
+
* This source code is licensed under the ISC license.
|
|
60853
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60854
|
+
*/
|
|
60855
|
+
const __iconNode$l = [
|
|
60645
60856
|
[
|
|
60646
60857
|
"path",
|
|
60647
60858
|
{
|
|
@@ -60664,35 +60875,46 @@ const __iconNode$i = [
|
|
|
60664
60875
|
}
|
|
60665
60876
|
]
|
|
60666
60877
|
];
|
|
60667
|
-
const Layers = createLucideIcon("layers", __iconNode$
|
|
60878
|
+
const Layers = createLucideIcon("layers", __iconNode$l);
|
|
60668
60879
|
/**
|
|
60669
60880
|
* @license lucide-react v0.575.0 - ISC
|
|
60670
60881
|
*
|
|
60671
60882
|
* This source code is licensed under the ISC license.
|
|
60672
60883
|
* See the LICENSE file in the root directory of this source tree.
|
|
60673
60884
|
*/
|
|
60674
|
-
const __iconNode$
|
|
60885
|
+
const __iconNode$k = [
|
|
60675
60886
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
60676
60887
|
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
60677
60888
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
60678
60889
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
60679
60890
|
];
|
|
60680
|
-
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$
|
|
60891
|
+
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$k);
|
|
60681
60892
|
/**
|
|
60682
60893
|
* @license lucide-react v0.575.0 - ISC
|
|
60683
60894
|
*
|
|
60684
60895
|
* This source code is licensed under the ISC license.
|
|
60685
60896
|
* See the LICENSE file in the root directory of this source tree.
|
|
60686
60897
|
*/
|
|
60687
|
-
const __iconNode$
|
|
60688
|
-
|
|
60898
|
+
const __iconNode$j = [
|
|
60899
|
+
["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" }],
|
|
60900
|
+
["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" }]
|
|
60901
|
+
];
|
|
60902
|
+
const Link = createLucideIcon("link", __iconNode$j);
|
|
60689
60903
|
/**
|
|
60690
60904
|
* @license lucide-react v0.575.0 - ISC
|
|
60691
60905
|
*
|
|
60692
60906
|
* This source code is licensed under the ISC license.
|
|
60693
60907
|
* See the LICENSE file in the root directory of this source tree.
|
|
60694
60908
|
*/
|
|
60695
|
-
const __iconNode$
|
|
60909
|
+
const __iconNode$i = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
60910
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$i);
|
|
60911
|
+
/**
|
|
60912
|
+
* @license lucide-react v0.575.0 - ISC
|
|
60913
|
+
*
|
|
60914
|
+
* This source code is licensed under the ISC license.
|
|
60915
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60916
|
+
*/
|
|
60917
|
+
const __iconNode$h = [
|
|
60696
60918
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
60697
60919
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
60698
60920
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -60702,38 +60924,38 @@ const __iconNode$f = [
|
|
|
60702
60924
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
60703
60925
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
60704
60926
|
];
|
|
60705
|
-
const Loader = createLucideIcon("loader", __iconNode$
|
|
60927
|
+
const Loader = createLucideIcon("loader", __iconNode$h);
|
|
60706
60928
|
/**
|
|
60707
60929
|
* @license lucide-react v0.575.0 - ISC
|
|
60708
60930
|
*
|
|
60709
60931
|
* This source code is licensed under the ISC license.
|
|
60710
60932
|
* See the LICENSE file in the root directory of this source tree.
|
|
60711
60933
|
*/
|
|
60712
|
-
const __iconNode$
|
|
60934
|
+
const __iconNode$g = [
|
|
60713
60935
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
60714
60936
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
60715
60937
|
];
|
|
60716
|
-
const Mail = createLucideIcon("mail", __iconNode$
|
|
60938
|
+
const Mail = createLucideIcon("mail", __iconNode$g);
|
|
60717
60939
|
/**
|
|
60718
60940
|
* @license lucide-react v0.575.0 - ISC
|
|
60719
60941
|
*
|
|
60720
60942
|
* This source code is licensed under the ISC license.
|
|
60721
60943
|
* See the LICENSE file in the root directory of this source tree.
|
|
60722
60944
|
*/
|
|
60723
|
-
const __iconNode$
|
|
60945
|
+
const __iconNode$f = [
|
|
60724
60946
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
60725
60947
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
60726
60948
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
60727
60949
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
60728
60950
|
];
|
|
60729
|
-
const Maximize2 = createLucideIcon("maximize-2", __iconNode$
|
|
60951
|
+
const Maximize2 = createLucideIcon("maximize-2", __iconNode$f);
|
|
60730
60952
|
/**
|
|
60731
60953
|
* @license lucide-react v0.575.0 - ISC
|
|
60732
60954
|
*
|
|
60733
60955
|
* This source code is licensed under the ISC license.
|
|
60734
60956
|
* See the LICENSE file in the root directory of this source tree.
|
|
60735
60957
|
*/
|
|
60736
|
-
const __iconNode$
|
|
60958
|
+
const __iconNode$e = [
|
|
60737
60959
|
[
|
|
60738
60960
|
"path",
|
|
60739
60961
|
{
|
|
@@ -60742,39 +60964,39 @@ const __iconNode$c = [
|
|
|
60742
60964
|
}
|
|
60743
60965
|
]
|
|
60744
60966
|
];
|
|
60745
|
-
const MessageSquare = createLucideIcon("message-square", __iconNode$
|
|
60967
|
+
const MessageSquare = createLucideIcon("message-square", __iconNode$e);
|
|
60746
60968
|
/**
|
|
60747
60969
|
* @license lucide-react v0.575.0 - ISC
|
|
60748
60970
|
*
|
|
60749
60971
|
* This source code is licensed under the ISC license.
|
|
60750
60972
|
* See the LICENSE file in the root directory of this source tree.
|
|
60751
60973
|
*/
|
|
60752
|
-
const __iconNode$
|
|
60974
|
+
const __iconNode$d = [
|
|
60753
60975
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
60754
60976
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
60755
60977
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
60756
60978
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
60757
60979
|
];
|
|
60758
|
-
const Minimize2 = createLucideIcon("minimize-2", __iconNode$
|
|
60980
|
+
const Minimize2 = createLucideIcon("minimize-2", __iconNode$d);
|
|
60759
60981
|
/**
|
|
60760
60982
|
* @license lucide-react v0.575.0 - ISC
|
|
60761
60983
|
*
|
|
60762
60984
|
* This source code is licensed under the ISC license.
|
|
60763
60985
|
* See the LICENSE file in the root directory of this source tree.
|
|
60764
60986
|
*/
|
|
60765
|
-
const __iconNode$
|
|
60987
|
+
const __iconNode$c = [
|
|
60766
60988
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
60767
60989
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
60768
60990
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
60769
60991
|
];
|
|
60770
|
-
const Monitor = createLucideIcon("monitor", __iconNode$
|
|
60992
|
+
const Monitor = createLucideIcon("monitor", __iconNode$c);
|
|
60771
60993
|
/**
|
|
60772
60994
|
* @license lucide-react v0.575.0 - ISC
|
|
60773
60995
|
*
|
|
60774
60996
|
* This source code is licensed under the ISC license.
|
|
60775
60997
|
* See the LICENSE file in the root directory of this source tree.
|
|
60776
60998
|
*/
|
|
60777
|
-
const __iconNode$
|
|
60999
|
+
const __iconNode$b = [
|
|
60778
61000
|
["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" }],
|
|
60779
61001
|
["path", { d: "M2 6h4", key: "aawbzj" }],
|
|
60780
61002
|
["path", { d: "M2 10h4", key: "l0bgd4" }],
|
|
@@ -60788,14 +61010,14 @@ const __iconNode$9 = [
|
|
|
60788
61010
|
}
|
|
60789
61011
|
]
|
|
60790
61012
|
];
|
|
60791
|
-
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$
|
|
61013
|
+
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$b);
|
|
60792
61014
|
/**
|
|
60793
61015
|
* @license lucide-react v0.575.0 - ISC
|
|
60794
61016
|
*
|
|
60795
61017
|
* This source code is licensed under the ISC license.
|
|
60796
61018
|
* See the LICENSE file in the root directory of this source tree.
|
|
60797
61019
|
*/
|
|
60798
|
-
const __iconNode$
|
|
61020
|
+
const __iconNode$a = [
|
|
60799
61021
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
60800
61022
|
[
|
|
60801
61023
|
"path",
|
|
@@ -60805,61 +61027,61 @@ const __iconNode$8 = [
|
|
|
60805
61027
|
}
|
|
60806
61028
|
]
|
|
60807
61029
|
];
|
|
60808
|
-
const PenLine = createLucideIcon("pen-line", __iconNode$
|
|
61030
|
+
const PenLine = createLucideIcon("pen-line", __iconNode$a);
|
|
60809
61031
|
/**
|
|
60810
61032
|
* @license lucide-react v0.575.0 - ISC
|
|
60811
61033
|
*
|
|
60812
61034
|
* This source code is licensed under the ISC license.
|
|
60813
61035
|
* See the LICENSE file in the root directory of this source tree.
|
|
60814
61036
|
*/
|
|
60815
|
-
const __iconNode$
|
|
61037
|
+
const __iconNode$9 = [
|
|
60816
61038
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
60817
61039
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
60818
61040
|
];
|
|
60819
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
61041
|
+
const Plus = createLucideIcon("plus", __iconNode$9);
|
|
60820
61042
|
/**
|
|
60821
61043
|
* @license lucide-react v0.575.0 - ISC
|
|
60822
61044
|
*
|
|
60823
61045
|
* This source code is licensed under the ISC license.
|
|
60824
61046
|
* See the LICENSE file in the root directory of this source tree.
|
|
60825
61047
|
*/
|
|
60826
|
-
const __iconNode$
|
|
61048
|
+
const __iconNode$8 = [
|
|
60827
61049
|
["path", { d: "M2 3h20", key: "91anmk" }],
|
|
60828
61050
|
["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
|
|
60829
61051
|
["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
|
|
60830
61052
|
];
|
|
60831
|
-
const Presentation = createLucideIcon("presentation", __iconNode$
|
|
61053
|
+
const Presentation = createLucideIcon("presentation", __iconNode$8);
|
|
60832
61054
|
/**
|
|
60833
61055
|
* @license lucide-react v0.575.0 - ISC
|
|
60834
61056
|
*
|
|
60835
61057
|
* This source code is licensed under the ISC license.
|
|
60836
61058
|
* See the LICENSE file in the root directory of this source tree.
|
|
60837
61059
|
*/
|
|
60838
|
-
const __iconNode$
|
|
61060
|
+
const __iconNode$7 = [
|
|
60839
61061
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
60840
61062
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
60841
61063
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
60842
61064
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
60843
61065
|
];
|
|
60844
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
61066
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
|
|
60845
61067
|
/**
|
|
60846
61068
|
* @license lucide-react v0.575.0 - ISC
|
|
60847
61069
|
*
|
|
60848
61070
|
* This source code is licensed under the ISC license.
|
|
60849
61071
|
* See the LICENSE file in the root directory of this source tree.
|
|
60850
61072
|
*/
|
|
60851
|
-
const __iconNode$
|
|
61073
|
+
const __iconNode$6 = [
|
|
60852
61074
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
60853
61075
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
60854
61076
|
];
|
|
60855
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
61077
|
+
const Search = createLucideIcon("search", __iconNode$6);
|
|
60856
61078
|
/**
|
|
60857
61079
|
* @license lucide-react v0.575.0 - ISC
|
|
60858
61080
|
*
|
|
60859
61081
|
* This source code is licensed under the ISC license.
|
|
60860
61082
|
* See the LICENSE file in the root directory of this source tree.
|
|
60861
61083
|
*/
|
|
60862
|
-
const __iconNode$
|
|
61084
|
+
const __iconNode$5 = [
|
|
60863
61085
|
[
|
|
60864
61086
|
"path",
|
|
60865
61087
|
{
|
|
@@ -60869,17 +61091,46 @@ const __iconNode$3 = [
|
|
|
60869
61091
|
],
|
|
60870
61092
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
60871
61093
|
];
|
|
60872
|
-
const Settings = createLucideIcon("settings", __iconNode$
|
|
61094
|
+
const Settings = createLucideIcon("settings", __iconNode$5);
|
|
60873
61095
|
/**
|
|
60874
61096
|
* @license lucide-react v0.575.0 - ISC
|
|
60875
61097
|
*
|
|
60876
61098
|
* This source code is licensed under the ISC license.
|
|
60877
61099
|
* See the LICENSE file in the root directory of this source tree.
|
|
60878
61100
|
*/
|
|
60879
|
-
const __iconNode$
|
|
61101
|
+
const __iconNode$4 = [
|
|
60880
61102
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
60881
61103
|
];
|
|
60882
|
-
const Square = createLucideIcon("square", __iconNode$
|
|
61104
|
+
const Square = createLucideIcon("square", __iconNode$4);
|
|
61105
|
+
/**
|
|
61106
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61107
|
+
*
|
|
61108
|
+
* This source code is licensed under the ISC license.
|
|
61109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61110
|
+
*/
|
|
61111
|
+
const __iconNode$3 = [
|
|
61112
|
+
["path", { d: "M12 19h8", key: "baeox8" }],
|
|
61113
|
+
["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
|
|
61114
|
+
];
|
|
61115
|
+
const Terminal = createLucideIcon("terminal", __iconNode$3);
|
|
61116
|
+
/**
|
|
61117
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61118
|
+
*
|
|
61119
|
+
* This source code is licensed under the ISC license.
|
|
61120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61121
|
+
*/
|
|
61122
|
+
const __iconNode$2 = [
|
|
61123
|
+
[
|
|
61124
|
+
"path",
|
|
61125
|
+
{
|
|
61126
|
+
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",
|
|
61127
|
+
key: "wmoenq"
|
|
61128
|
+
}
|
|
61129
|
+
],
|
|
61130
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
61131
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
61132
|
+
];
|
|
61133
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
60883
61134
|
/**
|
|
60884
61135
|
* @license lucide-react v0.575.0 - ISC
|
|
60885
61136
|
*
|
|
@@ -61002,6 +61253,8 @@ const TOOL_META = {
|
|
|
61002
61253
|
// Workflows
|
|
61003
61254
|
create_new_aop: { displayName: "Creating workflow", icon: Brain },
|
|
61004
61255
|
execute_aop: { displayName: "Running workflow", icon: Brain },
|
|
61256
|
+
// Drive / Assets
|
|
61257
|
+
open_asset_in_workspace: { displayName: "Opening asset", icon: FolderOpen },
|
|
61005
61258
|
// Preferences
|
|
61006
61259
|
save_preference_as_memory: { displayName: "Saving preference", icon: Settings }
|
|
61007
61260
|
};
|
|
@@ -61052,6 +61305,14 @@ function extractAssetId$1(result) {
|
|
|
61052
61305
|
}
|
|
61053
61306
|
return null;
|
|
61054
61307
|
}
|
|
61308
|
+
function extractAssetIdFromArgs(argsText) {
|
|
61309
|
+
if (!argsText) return null;
|
|
61310
|
+
const parsed = tryParseJson$2(argsText);
|
|
61311
|
+
if (!parsed) return null;
|
|
61312
|
+
const id = parsed.asset_id ?? parsed.assetId;
|
|
61313
|
+
if (typeof id === "string" && id.startsWith("asset_")) return id;
|
|
61314
|
+
return null;
|
|
61315
|
+
}
|
|
61055
61316
|
function toolMetaToAssetType(toolName) {
|
|
61056
61317
|
const lower = toolName.toLowerCase();
|
|
61057
61318
|
if (lower.includes("presentation") || lower.includes("pptx") || lower.includes("slide") || lower.includes("powerpoint"))
|
|
@@ -61060,13 +61321,16 @@ function toolMetaToAssetType(toolName) {
|
|
|
61060
61321
|
return "spreadsheet";
|
|
61061
61322
|
if (lower.includes("document") || lower.includes("doc") || lower.includes("markdown"))
|
|
61062
61323
|
return "document";
|
|
61324
|
+
if (lower.includes("notebook"))
|
|
61325
|
+
return "notebook";
|
|
61063
61326
|
return "unknown";
|
|
61064
61327
|
}
|
|
61065
61328
|
const CREATE_ASSET_TOOLS = [
|
|
61066
61329
|
"create_powerpoint_deck",
|
|
61067
61330
|
"create_document_from_markdown",
|
|
61068
61331
|
"create_new_document",
|
|
61069
|
-
"create_new_sheet"
|
|
61332
|
+
"create_new_sheet",
|
|
61333
|
+
"create_new_notebook"
|
|
61070
61334
|
];
|
|
61071
61335
|
function isAssetTool(toolName, result) {
|
|
61072
61336
|
return CREATE_ASSET_TOOLS.includes(toolName.toLowerCase()) || extractAssetId$1(result) !== null;
|
|
@@ -61415,6 +61679,22 @@ function AssetToolCard({
|
|
|
61415
61679
|
] })
|
|
61416
61680
|
] });
|
|
61417
61681
|
}
|
|
61682
|
+
function AssetOpenLink({ assetId, toolName }) {
|
|
61683
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
61684
|
+
const assetType = toolMetaToAssetType(toolName);
|
|
61685
|
+
return /* @__PURE__ */ jsx(
|
|
61686
|
+
"button",
|
|
61687
|
+
{
|
|
61688
|
+
onClick: (e) => {
|
|
61689
|
+
e.stopPropagation();
|
|
61690
|
+
openAsset(assetId, { type: assetType });
|
|
61691
|
+
},
|
|
61692
|
+
className: "flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground/50 transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
61693
|
+
title: "Open asset",
|
|
61694
|
+
children: /* @__PURE__ */ jsx(Link, { className: "size-3" })
|
|
61695
|
+
}
|
|
61696
|
+
);
|
|
61697
|
+
}
|
|
61418
61698
|
const ToolFallbackImpl = ({
|
|
61419
61699
|
toolName,
|
|
61420
61700
|
argsText,
|
|
@@ -61433,12 +61713,19 @@ const ToolFallbackImpl = ({
|
|
|
61433
61713
|
}
|
|
61434
61714
|
);
|
|
61435
61715
|
}
|
|
61716
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
|
|
61717
|
+
const resultAssetId = extractAssetId$1(result);
|
|
61718
|
+
const argsAssetId = extractAssetIdFromArgs(argsText);
|
|
61719
|
+
const fallbackAssetId = resultAssetId ?? argsAssetId;
|
|
61436
61720
|
return /* @__PURE__ */ jsxs(
|
|
61437
61721
|
ToolFallbackRoot,
|
|
61438
61722
|
{
|
|
61439
61723
|
className: cn(isCancelled && "border-muted-foreground/30 bg-muted/30"),
|
|
61440
61724
|
children: [
|
|
61441
|
-
/* @__PURE__ */
|
|
61725
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
61726
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx(ToolFallbackTrigger, { toolName, argsText, result, status }) }),
|
|
61727
|
+
fallbackAssetId && isComplete && !isCancelled && /* @__PURE__ */ jsx("div", { className: "shrink-0 pr-2", children: /* @__PURE__ */ jsx(AssetOpenLink, { assetId: fallbackAssetId, toolName }) })
|
|
61728
|
+
] }),
|
|
61442
61729
|
/* @__PURE__ */ jsxs(ToolFallbackContent, { children: [
|
|
61443
61730
|
/* @__PURE__ */ jsx(ToolFallbackError, { status }),
|
|
61444
61731
|
/* @__PURE__ */ jsx(
|
|
@@ -62168,6 +62455,190 @@ const CreateEmailDraftToolUI = memo(
|
|
|
62168
62455
|
CreateEmailDraftToolUIImpl
|
|
62169
62456
|
);
|
|
62170
62457
|
CreateEmailDraftToolUI.displayName = "CreateEmailDraftToolUI";
|
|
62458
|
+
const CreateNotebookToolUIImpl = (props) => /* @__PURE__ */ jsx(
|
|
62459
|
+
CreateAssetToolUIImpl,
|
|
62460
|
+
{
|
|
62461
|
+
icon: BookOpen,
|
|
62462
|
+
assetType: "notebook",
|
|
62463
|
+
runningLabel: "Creating notebook...",
|
|
62464
|
+
doneLabel: "Created notebook",
|
|
62465
|
+
...props
|
|
62466
|
+
}
|
|
62467
|
+
);
|
|
62468
|
+
const CreateNotebookToolUI = memo(
|
|
62469
|
+
CreateNotebookToolUIImpl
|
|
62470
|
+
);
|
|
62471
|
+
CreateNotebookToolUI.displayName = "CreateNotebookToolUI";
|
|
62472
|
+
function parsePythonResult(result) {
|
|
62473
|
+
const data = normalizeResult(result);
|
|
62474
|
+
if (!data) return { stdout: null, stderr: null, value: null, error: null, exception: null, imagePng: null, createdAssets: [] };
|
|
62475
|
+
const inner = typeof data.result === "object" && data.result !== null ? data.result : data;
|
|
62476
|
+
const stdout = inner.stdout ?? null;
|
|
62477
|
+
const stderr = inner.stderr ?? null;
|
|
62478
|
+
const value = inner.value ?? null;
|
|
62479
|
+
const error2 = inner.error ?? null;
|
|
62480
|
+
let exception = null;
|
|
62481
|
+
if (inner.exception && typeof inner.exception === "object") {
|
|
62482
|
+
const exc = inner.exception;
|
|
62483
|
+
exception = {
|
|
62484
|
+
name: exc.name ?? "Error",
|
|
62485
|
+
value: exc.value ?? "",
|
|
62486
|
+
traceback: exc.traceback ?? ""
|
|
62487
|
+
};
|
|
62488
|
+
}
|
|
62489
|
+
let imagePng = null;
|
|
62490
|
+
if (inner.data && typeof inner.data === "object") {
|
|
62491
|
+
imagePng = inner.data.png ?? null;
|
|
62492
|
+
}
|
|
62493
|
+
const createdAssets = Array.isArray(data.created_assets) ? data.created_assets : [];
|
|
62494
|
+
return { stdout, stderr, value, error: error2, exception, imagePng, createdAssets };
|
|
62495
|
+
}
|
|
62496
|
+
const RunPythonCodeToolUIImpl = ({
|
|
62497
|
+
toolName,
|
|
62498
|
+
args,
|
|
62499
|
+
result,
|
|
62500
|
+
status
|
|
62501
|
+
}) => {
|
|
62502
|
+
var _a2;
|
|
62503
|
+
const typedArgs = args;
|
|
62504
|
+
const code2 = (typedArgs == null ? void 0 : typedArgs.code) ?? "";
|
|
62505
|
+
const summary = (typedArgs == null ? void 0 : typedArgs.summary) ?? null;
|
|
62506
|
+
const lines = code2 ? code2.split("\n").length : 0;
|
|
62507
|
+
const isRunning = (status == null ? void 0 : status.type) === "running";
|
|
62508
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete";
|
|
62509
|
+
const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
|
|
62510
|
+
const parsed = useMemo(() => isComplete ? parsePythonResult(result) : null, [result, isComplete]);
|
|
62511
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
62512
|
+
const hasOutput = parsed && (parsed.stdout || parsed.stderr || parsed.value);
|
|
62513
|
+
const hasError = parsed && (parsed.error || parsed.exception);
|
|
62514
|
+
const hasImage = parsed == null ? void 0 : parsed.imagePng;
|
|
62515
|
+
return /* @__PURE__ */ jsxs(
|
|
62516
|
+
ToolCard,
|
|
62517
|
+
{
|
|
62518
|
+
icon: Code,
|
|
62519
|
+
status: (status == null ? void 0 : status.type) ?? "complete",
|
|
62520
|
+
title: isRunning ? "Running code..." : summary || `Executed ${lines} ${lines !== 1 ? "lines" : "line"}`,
|
|
62521
|
+
toolName,
|
|
62522
|
+
error: errorMsg,
|
|
62523
|
+
children: [
|
|
62524
|
+
code2 && /* @__PURE__ */ jsx(ExpandableSection, { label: "Show code", children: /* @__PURE__ */ jsx("pre", { className: "whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono text-foreground/80", children: code2 }) }),
|
|
62525
|
+
isComplete && hasOutput && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 px-4 py-2.5", children: [
|
|
62526
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
62527
|
+
/* @__PURE__ */ jsx(Terminal, { className: "size-3 text-muted-foreground" }),
|
|
62528
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Output" })
|
|
62529
|
+
] }),
|
|
62530
|
+
/* @__PURE__ */ 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") })
|
|
62531
|
+
] }),
|
|
62532
|
+
isComplete && hasError && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 bg-red-50/50 px-4 py-2.5", children: [
|
|
62533
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1", children: [
|
|
62534
|
+
/* @__PURE__ */ jsx(TriangleAlert, { className: "size-3 text-red-500" }),
|
|
62535
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-red-600", children: parsed.exception ? `${parsed.exception.name}: ${parsed.exception.value}` : "Error" })
|
|
62536
|
+
] }),
|
|
62537
|
+
/* @__PURE__ */ 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 })
|
|
62538
|
+
] }),
|
|
62539
|
+
isComplete && hasImage && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 px-4 py-2.5", children: [
|
|
62540
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
62541
|
+
/* @__PURE__ */ jsx(Image, { className: "size-3 text-muted-foreground" }),
|
|
62542
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Generated image" })
|
|
62543
|
+
] }),
|
|
62544
|
+
/* @__PURE__ */ jsx(
|
|
62545
|
+
"img",
|
|
62546
|
+
{
|
|
62547
|
+
src: `data:image/png;base64,${parsed.imagePng}`,
|
|
62548
|
+
alt: "Python output",
|
|
62549
|
+
className: "max-w-full rounded-md border border-border/40"
|
|
62550
|
+
}
|
|
62551
|
+
)
|
|
62552
|
+
] }),
|
|
62553
|
+
isComplete && parsed && parsed.createdAssets.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 px-4 py-2", children: [
|
|
62554
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Created assets" }),
|
|
62555
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-wrap gap-1.5", children: parsed.createdAssets.map((a) => /* @__PURE__ */ jsxs(
|
|
62556
|
+
"button",
|
|
62557
|
+
{
|
|
62558
|
+
onClick: () => openAsset(a.asset_id),
|
|
62559
|
+
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",
|
|
62560
|
+
children: [
|
|
62561
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-2.5" }),
|
|
62562
|
+
truncate(a.asset_id, 20)
|
|
62563
|
+
]
|
|
62564
|
+
},
|
|
62565
|
+
a.asset_id
|
|
62566
|
+
)) })
|
|
62567
|
+
] })
|
|
62568
|
+
]
|
|
62569
|
+
}
|
|
62570
|
+
);
|
|
62571
|
+
};
|
|
62572
|
+
const RunPythonCodeToolUI = memo(
|
|
62573
|
+
RunPythonCodeToolUIImpl
|
|
62574
|
+
);
|
|
62575
|
+
RunPythonCodeToolUI.displayName = "RunPythonCodeToolUI";
|
|
62576
|
+
const OpenAssetToolUIImpl = ({
|
|
62577
|
+
toolName,
|
|
62578
|
+
args,
|
|
62579
|
+
result,
|
|
62580
|
+
status
|
|
62581
|
+
}) => {
|
|
62582
|
+
const typedArgs = args;
|
|
62583
|
+
const argsAssetId = (typedArgs == null ? void 0 : typedArgs.asset_id) ?? (typedArgs == null ? void 0 : typedArgs.assetId) ?? "";
|
|
62584
|
+
const resultAssetId = extractAssetId(result);
|
|
62585
|
+
const assetId = resultAssetId ?? (argsAssetId.startsWith("asset_") ? argsAssetId : null);
|
|
62586
|
+
const isRunning = (status == null ? void 0 : status.type) === "running";
|
|
62587
|
+
const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
|
|
62588
|
+
const isCancelled = (status == null ? void 0 : status.type) === "incomplete" && status.reason === "cancelled";
|
|
62589
|
+
const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
|
|
62590
|
+
const openAsset = useAssetPanelStore((s) => s.openAsset);
|
|
62591
|
+
const wasCompleteAtMount = useRef(isComplete);
|
|
62592
|
+
useEffect(() => {
|
|
62593
|
+
if (isComplete && !isCancelled && assetId && !wasCompleteAtMount.current) {
|
|
62594
|
+
const store = useAssetPanelStore.getState();
|
|
62595
|
+
if (store.markAutoOpened(assetId)) {
|
|
62596
|
+
store.openAsset(assetId);
|
|
62597
|
+
}
|
|
62598
|
+
}
|
|
62599
|
+
}, [isComplete, isCancelled, assetId]);
|
|
62600
|
+
return /* @__PURE__ */ jsx(
|
|
62601
|
+
ToolCard,
|
|
62602
|
+
{
|
|
62603
|
+
icon: FolderOpen,
|
|
62604
|
+
status: (status == null ? void 0 : status.type) ?? "complete",
|
|
62605
|
+
title: isRunning ? "Opening asset..." : "Asset opened",
|
|
62606
|
+
subtitle: assetId ? truncate(assetId, 30) : void 0,
|
|
62607
|
+
toolName,
|
|
62608
|
+
error: errorMsg,
|
|
62609
|
+
children: assetId && isComplete && !isCancelled && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2", children: /* @__PURE__ */ jsxs(
|
|
62610
|
+
"button",
|
|
62611
|
+
{
|
|
62612
|
+
onClick: () => openAsset(assetId),
|
|
62613
|
+
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",
|
|
62614
|
+
children: [
|
|
62615
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3" }),
|
|
62616
|
+
"Open asset"
|
|
62617
|
+
]
|
|
62618
|
+
}
|
|
62619
|
+
) })
|
|
62620
|
+
}
|
|
62621
|
+
);
|
|
62622
|
+
};
|
|
62623
|
+
const OpenAssetToolUI = memo(
|
|
62624
|
+
OpenAssetToolUIImpl
|
|
62625
|
+
);
|
|
62626
|
+
OpenAssetToolUI.displayName = "OpenAssetToolUI";
|
|
62627
|
+
function createAssetToolUI(config2) {
|
|
62628
|
+
const Component = (props) => /* @__PURE__ */ jsx(
|
|
62629
|
+
CreateAssetToolUIImpl,
|
|
62630
|
+
{
|
|
62631
|
+
icon: config2.icon,
|
|
62632
|
+
assetType: config2.assetType,
|
|
62633
|
+
runningLabel: config2.runningLabel,
|
|
62634
|
+
doneLabel: config2.doneLabel,
|
|
62635
|
+
...props
|
|
62636
|
+
}
|
|
62637
|
+
);
|
|
62638
|
+
const Memoized = memo(Component);
|
|
62639
|
+
Memoized.displayName = `CreateAssetToolUI(${config2.assetType})`;
|
|
62640
|
+
return Memoized;
|
|
62641
|
+
}
|
|
62171
62642
|
const TOOL_UI_REGISTRY = {
|
|
62172
62643
|
search: WebSearchToolUI,
|
|
62173
62644
|
browse: BrowseToolUI,
|
|
@@ -62178,7 +62649,10 @@ const TOOL_UI_REGISTRY = {
|
|
|
62178
62649
|
create_new_document: CreateDocumentToolUI,
|
|
62179
62650
|
create_document_from_markdown: CreateDocumentToolUI,
|
|
62180
62651
|
create_new_sheet: CreateSheetToolUI,
|
|
62181
|
-
create_powerpoint_deck: CreatePresentationToolUI
|
|
62652
|
+
create_powerpoint_deck: CreatePresentationToolUI,
|
|
62653
|
+
create_new_notebook: CreateNotebookToolUI,
|
|
62654
|
+
run_python_code: RunPythonCodeToolUI,
|
|
62655
|
+
open_asset_in_workspace: OpenAssetToolUI
|
|
62182
62656
|
};
|
|
62183
62657
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
62184
62658
|
const cx = clsx;
|
|
@@ -62299,7 +62773,6 @@ const AthenaChat = ({
|
|
|
62299
62773
|
toolUIs,
|
|
62300
62774
|
mentionTools
|
|
62301
62775
|
}) => {
|
|
62302
|
-
const isLoadingThread = useThreadLoading();
|
|
62303
62776
|
const tools = mentionTools ?? EMPTY_MENTION_TOOLS;
|
|
62304
62777
|
const mergedToolUIs = useMemo(() => ({
|
|
62305
62778
|
append_markdown_to_athena_document: AppendDocumentToolUI,
|
|
@@ -62311,43 +62784,40 @@ const AthenaChat = ({
|
|
|
62311
62784
|
() => () => /* @__PURE__ */ jsx(AssistantMessage, { toolUIs: mergedToolUIs }),
|
|
62312
62785
|
[mergedToolUIs]
|
|
62313
62786
|
);
|
|
62314
|
-
return /* @__PURE__ */
|
|
62787
|
+
return /* @__PURE__ */ jsx(
|
|
62315
62788
|
ThreadPrimitiveRoot,
|
|
62316
62789
|
{
|
|
62317
62790
|
className: `aui-root aui-thread-root @container flex h-full flex-col bg-background ${className ?? ""}`,
|
|
62318
62791
|
style: { ["--thread-max-width"]: maxWidth, position: "relative" },
|
|
62319
|
-
children:
|
|
62320
|
-
|
|
62321
|
-
|
|
62322
|
-
|
|
62323
|
-
|
|
62324
|
-
|
|
62325
|
-
className: "aui-thread-
|
|
62326
|
-
|
|
62327
|
-
/* @__PURE__ */ jsx(
|
|
62328
|
-
|
|
62329
|
-
|
|
62330
|
-
|
|
62331
|
-
|
|
62332
|
-
|
|
62333
|
-
|
|
62334
|
-
|
|
62335
|
-
UserMessage,
|
|
62336
|
-
AssistantMessage: AssistantMessageComponent
|
|
62337
|
-
}
|
|
62792
|
+
children: /* @__PURE__ */ jsxs(
|
|
62793
|
+
ThreadPrimitiveViewport,
|
|
62794
|
+
{
|
|
62795
|
+
turnAnchor: "top",
|
|
62796
|
+
className: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",
|
|
62797
|
+
children: [
|
|
62798
|
+
/* @__PURE__ */ jsx(AuiIf, { condition: (s) => s.thread.isEmpty, children: /* @__PURE__ */ jsx("div", { className: "aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col", children: /* @__PURE__ */ jsx("div", { className: "aui-thread-welcome-center flex w-full grow flex-col items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "aui-thread-welcome-message flex size-full flex-col justify-center px-4", children: [
|
|
62799
|
+
/* @__PURE__ */ 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 }),
|
|
62800
|
+
/* @__PURE__ */ 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 })
|
|
62801
|
+
] }) }) }) }),
|
|
62802
|
+
/* @__PURE__ */ jsx(
|
|
62803
|
+
ThreadPrimitiveMessages,
|
|
62804
|
+
{
|
|
62805
|
+
components: {
|
|
62806
|
+
UserMessage,
|
|
62807
|
+
AssistantMessage: AssistantMessageComponent
|
|
62338
62808
|
}
|
|
62339
|
-
|
|
62340
|
-
|
|
62341
|
-
|
|
62342
|
-
|
|
62343
|
-
|
|
62344
|
-
|
|
62345
|
-
|
|
62809
|
+
}
|
|
62810
|
+
),
|
|
62811
|
+
/* @__PURE__ */ 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: [
|
|
62812
|
+
/* @__PURE__ */ jsx(ThreadScrollToBottom, {}),
|
|
62813
|
+
/* @__PURE__ */ 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: [
|
|
62814
|
+
/* @__PURE__ */ jsx(TiptapComposer, { tools }),
|
|
62815
|
+
/* @__PURE__ */ jsx(ComposerAction, {})
|
|
62346
62816
|
] })
|
|
62347
|
-
]
|
|
62348
|
-
|
|
62349
|
-
|
|
62350
|
-
|
|
62817
|
+
] })
|
|
62818
|
+
]
|
|
62819
|
+
}
|
|
62820
|
+
)
|
|
62351
62821
|
}
|
|
62352
62822
|
);
|
|
62353
62823
|
};
|
|
@@ -62455,57 +62925,6 @@ const AssistantActionBar = () => /* @__PURE__ */ jsxs(
|
|
|
62455
62925
|
]
|
|
62456
62926
|
}
|
|
62457
62927
|
);
|
|
62458
|
-
const ThreadLoadingOverlay = () => /* @__PURE__ */ jsxs(
|
|
62459
|
-
"div",
|
|
62460
|
-
{
|
|
62461
|
-
className: "aui-thread-loading-overlay",
|
|
62462
|
-
style: {
|
|
62463
|
-
position: "absolute",
|
|
62464
|
-
inset: 0,
|
|
62465
|
-
zIndex: 50,
|
|
62466
|
-
display: "flex",
|
|
62467
|
-
flexDirection: "column",
|
|
62468
|
-
alignItems: "center",
|
|
62469
|
-
justifyContent: "center",
|
|
62470
|
-
gap: 12,
|
|
62471
|
-
background: "color-mix(in srgb, var(--background, #fff) 80%, transparent)",
|
|
62472
|
-
backdropFilter: "blur(4px)",
|
|
62473
|
-
WebkitBackdropFilter: "blur(4px)",
|
|
62474
|
-
animation: "aui-overlay-in 0.2s ease-out"
|
|
62475
|
-
},
|
|
62476
|
-
children: [
|
|
62477
|
-
/* @__PURE__ */ jsx(
|
|
62478
|
-
"div",
|
|
62479
|
-
{
|
|
62480
|
-
style: {
|
|
62481
|
-
width: 28,
|
|
62482
|
-
height: 28,
|
|
62483
|
-
border: "2.5px solid var(--border, #e5e5e5)",
|
|
62484
|
-
borderTopColor: "var(--primary, #2563eb)",
|
|
62485
|
-
borderRadius: "50%",
|
|
62486
|
-
animation: "aui-spin 0.7s linear infinite"
|
|
62487
|
-
}
|
|
62488
|
-
}
|
|
62489
|
-
),
|
|
62490
|
-
/* @__PURE__ */ jsx(
|
|
62491
|
-
"span",
|
|
62492
|
-
{
|
|
62493
|
-
style: {
|
|
62494
|
-
fontSize: 13,
|
|
62495
|
-
fontWeight: 500,
|
|
62496
|
-
color: "var(--muted-foreground, #888)",
|
|
62497
|
-
letterSpacing: "0.01em"
|
|
62498
|
-
},
|
|
62499
|
-
children: "Loading conversation…"
|
|
62500
|
-
}
|
|
62501
|
-
),
|
|
62502
|
-
/* @__PURE__ */ jsx("style", { children: `
|
|
62503
|
-
@keyframes aui-spin { to { transform: rotate(360deg); } }
|
|
62504
|
-
@keyframes aui-overlay-in { from { opacity: 0; } to { opacity: 1; } }
|
|
62505
|
-
` })
|
|
62506
|
-
]
|
|
62507
|
-
}
|
|
62508
|
-
);
|
|
62509
62928
|
const UserMessage = () => /* @__PURE__ */ jsx(
|
|
62510
62929
|
MessagePrimitiveRoot,
|
|
62511
62930
|
{
|
|
@@ -62584,6 +63003,7 @@ const ASSET_TYPE_CONFIG = {
|
|
|
62584
63003
|
presentation: { icon: Presentation, label: "Presentation" },
|
|
62585
63004
|
spreadsheet: { icon: FileSpreadsheet, label: "Spreadsheet" },
|
|
62586
63005
|
document: { icon: FileText, label: "Document" },
|
|
63006
|
+
notebook: { icon: BookOpen, label: "Notebook" },
|
|
62587
63007
|
unknown: { icon: File$1, label: "Asset" }
|
|
62588
63008
|
};
|
|
62589
63009
|
const AssetIframe = memo(
|
|
@@ -62820,66 +63240,29 @@ const AthenaLayout = ({
|
|
|
62820
63240
|
/* @__PURE__ */ jsx("div", { className: "flex h-full flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsx(AssetPanel, {}) })
|
|
62821
63241
|
] });
|
|
62822
63242
|
};
|
|
62823
|
-
function useThreadList() {
|
|
62824
|
-
const store = useThreadListStore();
|
|
62825
|
-
return useStore$1(store);
|
|
62826
|
-
}
|
|
62827
|
-
function useActiveThreadId() {
|
|
62828
|
-
const store = useThreadListStore();
|
|
62829
|
-
return useStore$1(store, (s) => s.activeThreadId);
|
|
62830
|
-
}
|
|
62831
63243
|
function ThreadList({ className }) {
|
|
62832
|
-
|
|
62833
|
-
|
|
62834
|
-
|
|
62835
|
-
|
|
62836
|
-
|
|
62837
|
-
|
|
62838
|
-
|
|
62839
|
-
archiveThread: archiveThread2
|
|
62840
|
-
} = useThreadList();
|
|
62841
|
-
useEffect(() => {
|
|
62842
|
-
fetchThreads();
|
|
62843
|
-
}, [fetchThreads]);
|
|
62844
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
62845
|
-
/* @__PURE__ */ jsxs(
|
|
62846
|
-
"button",
|
|
63244
|
+
return /* @__PURE__ */ jsxs(ThreadListPrimitiveRoot, { className: cn("flex flex-col gap-1", className), children: [
|
|
63245
|
+
/* @__PURE__ */ 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: [
|
|
63246
|
+
/* @__PURE__ */ jsx(Plus, { className: "size-4" }),
|
|
63247
|
+
"New Chat"
|
|
63248
|
+
] }),
|
|
63249
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: /* @__PURE__ */ jsx(
|
|
63250
|
+
ThreadListPrimitiveItems,
|
|
62847
63251
|
{
|
|
62848
|
-
|
|
62849
|
-
|
|
62850
|
-
|
|
62851
|
-
/* @__PURE__ */ jsx(Plus, { className: "size-4" }),
|
|
62852
|
-
"New Chat"
|
|
62853
|
-
]
|
|
63252
|
+
components: {
|
|
63253
|
+
ThreadListItem
|
|
63254
|
+
}
|
|
62854
63255
|
}
|
|
62855
|
-
)
|
|
62856
|
-
|
|
62857
|
-
|
|
62858
|
-
|
|
62859
|
-
|
|
62860
|
-
|
|
62861
|
-
|
|
62862
|
-
|
|
62863
|
-
|
|
62864
|
-
|
|
62865
|
-
/* @__PURE__ */ jsx(MessageSquare, { className: "size-3.5 shrink-0" }),
|
|
62866
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: thread.title || "Untitled" }),
|
|
62867
|
-
/* @__PURE__ */ jsx(
|
|
62868
|
-
"button",
|
|
62869
|
-
{
|
|
62870
|
-
onClick: (e) => {
|
|
62871
|
-
e.stopPropagation();
|
|
62872
|
-
archiveThread2(thread.thread_id);
|
|
62873
|
-
},
|
|
62874
|
-
className: "hidden size-5 items-center justify-center rounded text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground group-hover:flex",
|
|
62875
|
-
title: "Archive",
|
|
62876
|
-
children: /* @__PURE__ */ jsx(Archive, { className: "size-3" })
|
|
62877
|
-
}
|
|
62878
|
-
)
|
|
62879
|
-
]
|
|
62880
|
-
},
|
|
62881
|
-
thread.thread_id
|
|
62882
|
-
)) })
|
|
63256
|
+
) })
|
|
63257
|
+
] });
|
|
63258
|
+
}
|
|
63259
|
+
function ThreadListItem() {
|
|
63260
|
+
return /* @__PURE__ */ jsxs(ThreadListItemPrimitiveRoot, { className: "group", children: [
|
|
63261
|
+
/* @__PURE__ */ 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: [
|
|
63262
|
+
/* @__PURE__ */ jsx(MessageSquare, { className: "size-3.5 shrink-0" }),
|
|
63263
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: /* @__PURE__ */ jsx(ThreadListItemPrimitiveTitle, { fallback: "Untitled" }) })
|
|
63264
|
+
] }),
|
|
63265
|
+
/* @__PURE__ */ 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__ */ jsx(Archive, { className: "size-3" }) })
|
|
62883
63266
|
] });
|
|
62884
63267
|
}
|
|
62885
63268
|
function useAppendToComposer() {
|
|
@@ -62917,6 +63300,74 @@ function useComposerAttachment() {
|
|
|
62917
63300
|
}, [aui]);
|
|
62918
63301
|
return { addFile, addContent, clear };
|
|
62919
63302
|
}
|
|
63303
|
+
const Toolkits = {
|
|
63304
|
+
/** Web search and page browsing. */
|
|
63305
|
+
WEB_SEARCH: "web_search_browse_toolkit",
|
|
63306
|
+
/** SQL query execution. */
|
|
63307
|
+
SQL: "sql_toolkit",
|
|
63308
|
+
/** Athena Code development environment. */
|
|
63309
|
+
ATHENA_CODE: "athena_code_toolkit",
|
|
63310
|
+
/** Document comments and collaboration. */
|
|
63311
|
+
COMMENTS: "comments_toolkit",
|
|
63312
|
+
/** Visual canvas creation. */
|
|
63313
|
+
CANVAS: "canvas_toolkit",
|
|
63314
|
+
/** PostgreSQL database management. */
|
|
63315
|
+
DATABASE: "database_toolkit",
|
|
63316
|
+
/** Asset collections management. */
|
|
63317
|
+
COLLECTIONS: "collections_toolkit",
|
|
63318
|
+
/** Charts, dashboards, and figures. */
|
|
63319
|
+
VISUALIZATIONS: "visualizations_toolkit",
|
|
63320
|
+
/** Custom UI creation. */
|
|
63321
|
+
USER_INTERFACE: "user_interface_toolkit",
|
|
63322
|
+
/** Agent Operating Procedures. */
|
|
63323
|
+
AOP: "aop_toolkit",
|
|
63324
|
+
/** Ephemeral compute environments. */
|
|
63325
|
+
COMPUTER_ASSET: "computer_asset_toolkit",
|
|
63326
|
+
/** Web browser automation. */
|
|
63327
|
+
BROWSER: "browser_toolkit",
|
|
63328
|
+
/** Virtual machine management. */
|
|
63329
|
+
VM: "vm_toolkit",
|
|
63330
|
+
/** Jupyter notebook execution. */
|
|
63331
|
+
NOTEBOOK: "notebook_toolkit",
|
|
63332
|
+
/** Presentation slide editing. */
|
|
63333
|
+
PRESENTATION: "presentation_toolkit",
|
|
63334
|
+
/** PowerPoint presentation creation from templates. */
|
|
63335
|
+
POWERPOINT: "powerpoint_deck_toolkit",
|
|
63336
|
+
/** Workspace file management (Spaces). */
|
|
63337
|
+
DRIVE: "olympus_drive_toolkit",
|
|
63338
|
+
/** Python code execution. */
|
|
63339
|
+
PYTHON: "python_toolkit",
|
|
63340
|
+
/** Multi-account email and calendar (Gmail + Outlook). */
|
|
63341
|
+
EMAIL: "unified_email_toolkit",
|
|
63342
|
+
/** Legacy email and calendar operations. */
|
|
63343
|
+
EMAIL_CALENDAR: "email_calendar_toolkit",
|
|
63344
|
+
/** Spreadsheet operations. */
|
|
63345
|
+
SPREADSHEET: "spreadsheet_toolkit",
|
|
63346
|
+
/** Athena document editing. */
|
|
63347
|
+
DOCUMENT: "document_toolkit",
|
|
63348
|
+
/** Word document backend operations. */
|
|
63349
|
+
WORD_DOCUMENT: "word_document_be_toolkit",
|
|
63350
|
+
/** Go-To-Market management. */
|
|
63351
|
+
GTM: "gtm_toolkit",
|
|
63352
|
+
/** Marketing campaign management. */
|
|
63353
|
+
MARKETING: "marketing_toolkit",
|
|
63354
|
+
/** FDE implementations and workflows. */
|
|
63355
|
+
FDE: "fde_toolkit",
|
|
63356
|
+
/** Code repository search via Greptile. */
|
|
63357
|
+
GREPTILE: "greptile_toolkit",
|
|
63358
|
+
/** SharePoint / Google Drive / workspace file access. */
|
|
63359
|
+
EXTERNAL_DRIVE: "external_drive_toolkit",
|
|
63360
|
+
/** Reusable playbooks and prompts. */
|
|
63361
|
+
PLAYBOOK: "playbook_toolkit",
|
|
63362
|
+
/** Local Chrome browser control via tunnel. */
|
|
63363
|
+
DEVICE_TUNNEL: "device_tunnel_toolkit",
|
|
63364
|
+
/** Project management. */
|
|
63365
|
+
PROJECTS: "projects_toolkit",
|
|
63366
|
+
/** Task Studio script execution. */
|
|
63367
|
+
TASK_STUDIO: "task_studio_toolkit",
|
|
63368
|
+
/** User memory and preferences. */
|
|
63369
|
+
PREFERENCES: "preferences_toolkit"
|
|
63370
|
+
};
|
|
62920
63371
|
export {
|
|
62921
63372
|
AppendDocumentToolUI,
|
|
62922
63373
|
AssetPanel,
|
|
@@ -62930,11 +63381,14 @@ export {
|
|
|
62930
63381
|
CollapsibleTrigger,
|
|
62931
63382
|
CreateDocumentToolUI,
|
|
62932
63383
|
CreateEmailDraftToolUI,
|
|
63384
|
+
CreateNotebookToolUI,
|
|
62933
63385
|
CreatePresentationToolUI,
|
|
62934
63386
|
CreateSheetToolUI,
|
|
62935
63387
|
DEFAULT_BACKEND_URL,
|
|
62936
63388
|
EmailSearchToolUI,
|
|
63389
|
+
OpenAssetToolUI,
|
|
62937
63390
|
ReadAssetToolUI,
|
|
63391
|
+
RunPythonCodeToolUI,
|
|
62938
63392
|
TOOL_UI_REGISTRY,
|
|
62939
63393
|
ThreadList,
|
|
62940
63394
|
TiptapComposer,
|
|
@@ -62946,6 +63400,7 @@ export {
|
|
|
62946
63400
|
ToolFallbackResult,
|
|
62947
63401
|
ToolFallbackRoot,
|
|
62948
63402
|
ToolFallbackTrigger,
|
|
63403
|
+
Toolkits,
|
|
62949
63404
|
Tooltip,
|
|
62950
63405
|
TooltipContent,
|
|
62951
63406
|
TooltipIconButton,
|
|
@@ -62955,11 +63410,12 @@ export {
|
|
|
62955
63410
|
buttonVariants,
|
|
62956
63411
|
clearAutoOpenedAssets,
|
|
62957
63412
|
cn,
|
|
62958
|
-
|
|
63413
|
+
createAssetToolUI,
|
|
62959
63414
|
getAssetInfo,
|
|
62960
63415
|
resetAssetAutoOpen,
|
|
63416
|
+
themeToStyleVars,
|
|
63417
|
+
themes,
|
|
62961
63418
|
tryParseJson$1 as tryParseJson,
|
|
62962
|
-
useActiveThreadId,
|
|
62963
63419
|
useAppendToComposer,
|
|
62964
63420
|
useAssetEmbed,
|
|
62965
63421
|
useAssetPanelStore,
|
|
@@ -62967,8 +63423,6 @@ export {
|
|
|
62967
63423
|
useAthenaRuntime,
|
|
62968
63424
|
useComposerAttachment,
|
|
62969
63425
|
useMentionSuggestions,
|
|
62970
|
-
useParentAuth
|
|
62971
|
-
useThreadList,
|
|
62972
|
-
useThreadLoading
|
|
63426
|
+
useParentAuth
|
|
62973
63427
|
};
|
|
62974
63428
|
//# sourceMappingURL=index.js.map
|