@athenaintel/react 0.9.24 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -24353,6 +24353,7 @@ const useAthenaRuntime = (config2) => {
24353
24353
  workbench = [],
24354
24354
  knowledgeBase = [],
24355
24355
  systemPrompt,
24356
+ customToolConfigs,
24356
24357
  threadId: threadIdProp
24357
24358
  } = config2;
24358
24359
  const resolvedResumeApiUrl = resumeApiUrl ?? apiUrl.replace(/\/api\/chat$/, "/api/resume");
@@ -24377,7 +24378,8 @@ const useAthenaRuntime = (config2) => {
24377
24378
  model,
24378
24379
  workbench,
24379
24380
  knowledgeBase,
24380
- systemPrompt
24381
+ systemPrompt,
24382
+ customToolConfigs
24381
24383
  });
24382
24384
  runConfigRef.current = {
24383
24385
  enabledTools,
@@ -24385,7 +24387,8 @@ const useAthenaRuntime = (config2) => {
24385
24387
  model,
24386
24388
  workbench,
24387
24389
  knowledgeBase,
24388
- systemPrompt
24390
+ systemPrompt,
24391
+ customToolConfigs
24389
24392
  };
24390
24393
  const isExistingThread = !!threadIdProp;
24391
24394
  const runtime = useAssistantTransportRuntime({
@@ -24495,7 +24498,8 @@ const useAthenaRuntime = (config2) => {
24495
24498
  plan_mode_enabled: false,
24496
24499
  workbench: currentRunConfig.workbench,
24497
24500
  knowledge_base: currentRunConfig.knowledgeBase,
24498
- ...currentRunConfig.systemPrompt ? { system_prompt: currentRunConfig.systemPrompt } : {}
24501
+ ...currentRunConfig.systemPrompt ? { system_prompt: currentRunConfig.systemPrompt } : {},
24502
+ ...currentRunConfig.customToolConfigs ? { custom_tool_configs: currentRunConfig.customToolConfigs } : {}
24499
24503
  },
24500
24504
  persistToolInvocationLogs: true
24501
24505
  };
@@ -24535,424 +24539,6 @@ const useAthenaRuntime = (config2) => {
24535
24539
  }, [isExistingThread, runtime, threadId, backendUrl]);
24536
24540
  return runtime;
24537
24541
  };
24538
- function createJSONStorage(getStorage, options) {
24539
- let storage;
24540
- try {
24541
- storage = getStorage();
24542
- } catch (e) {
24543
- return;
24544
- }
24545
- const persistStorage = {
24546
- getItem: (name) => {
24547
- var _a2;
24548
- const parse2 = (str2) => {
24549
- if (str2 === null) {
24550
- return null;
24551
- }
24552
- return JSON.parse(str2, void 0);
24553
- };
24554
- const str = (_a2 = storage.getItem(name)) != null ? _a2 : null;
24555
- if (str instanceof Promise) {
24556
- return str.then(parse2);
24557
- }
24558
- return parse2(str);
24559
- },
24560
- setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, void 0)),
24561
- removeItem: (name) => storage.removeItem(name)
24562
- };
24563
- return persistStorage;
24564
- }
24565
- const toThenable = (fn) => (input) => {
24566
- try {
24567
- const result = fn(input);
24568
- if (result instanceof Promise) {
24569
- return result;
24570
- }
24571
- return {
24572
- then(onFulfilled) {
24573
- return toThenable(onFulfilled)(result);
24574
- },
24575
- catch(_onRejected) {
24576
- return this;
24577
- }
24578
- };
24579
- } catch (e) {
24580
- return {
24581
- then(_onFulfilled) {
24582
- return this;
24583
- },
24584
- catch(onRejected) {
24585
- return toThenable(onRejected)(e);
24586
- }
24587
- };
24588
- }
24589
- };
24590
- const persistImpl = (config2, baseOptions) => (set2, get2, api) => {
24591
- let options = {
24592
- storage: createJSONStorage(() => window.localStorage),
24593
- partialize: (state) => state,
24594
- version: 0,
24595
- merge: (persistedState, currentState) => ({
24596
- ...currentState,
24597
- ...persistedState
24598
- }),
24599
- ...baseOptions
24600
- };
24601
- let hasHydrated = false;
24602
- let hydrationVersion = 0;
24603
- const hydrationListeners = /* @__PURE__ */ new Set();
24604
- const finishHydrationListeners = /* @__PURE__ */ new Set();
24605
- let storage = options.storage;
24606
- if (!storage) {
24607
- return config2(
24608
- (...args) => {
24609
- console.warn(
24610
- `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`
24611
- );
24612
- set2(...args);
24613
- },
24614
- get2,
24615
- api
24616
- );
24617
- }
24618
- const setItem = () => {
24619
- const state = options.partialize({ ...get2() });
24620
- return storage.setItem(options.name, {
24621
- state,
24622
- version: options.version
24623
- });
24624
- };
24625
- const savedSetState = api.setState;
24626
- api.setState = (state, replace2) => {
24627
- savedSetState(state, replace2);
24628
- return setItem();
24629
- };
24630
- const configResult = config2(
24631
- (...args) => {
24632
- set2(...args);
24633
- return setItem();
24634
- },
24635
- get2,
24636
- api
24637
- );
24638
- api.getInitialState = () => configResult;
24639
- let stateFromStorage;
24640
- const hydrate = () => {
24641
- var _a2, _b;
24642
- if (!storage) return;
24643
- const currentVersion = ++hydrationVersion;
24644
- hasHydrated = false;
24645
- hydrationListeners.forEach((cb) => {
24646
- var _a22;
24647
- return cb((_a22 = get2()) != null ? _a22 : configResult);
24648
- });
24649
- const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a2 = get2()) != null ? _a2 : configResult)) || void 0;
24650
- return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {
24651
- if (deserializedStorageValue) {
24652
- if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) {
24653
- if (options.migrate) {
24654
- const migration = options.migrate(
24655
- deserializedStorageValue.state,
24656
- deserializedStorageValue.version
24657
- );
24658
- if (migration instanceof Promise) {
24659
- return migration.then((result) => [true, result]);
24660
- }
24661
- return [true, migration];
24662
- }
24663
- console.error(
24664
- `State loaded from storage couldn't be migrated since no migrate function was provided`
24665
- );
24666
- } else {
24667
- return [false, deserializedStorageValue.state];
24668
- }
24669
- }
24670
- return [false, void 0];
24671
- }).then((migrationResult) => {
24672
- var _a22;
24673
- if (currentVersion !== hydrationVersion) {
24674
- return;
24675
- }
24676
- const [migrated, migratedState] = migrationResult;
24677
- stateFromStorage = options.merge(
24678
- migratedState,
24679
- (_a22 = get2()) != null ? _a22 : configResult
24680
- );
24681
- set2(stateFromStorage, true);
24682
- if (migrated) {
24683
- return setItem();
24684
- }
24685
- }).then(() => {
24686
- if (currentVersion !== hydrationVersion) {
24687
- return;
24688
- }
24689
- postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);
24690
- stateFromStorage = get2();
24691
- hasHydrated = true;
24692
- finishHydrationListeners.forEach((cb) => cb(stateFromStorage));
24693
- }).catch((e) => {
24694
- if (currentVersion !== hydrationVersion) {
24695
- return;
24696
- }
24697
- postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);
24698
- });
24699
- };
24700
- api.persist = {
24701
- setOptions: (newOptions) => {
24702
- options = {
24703
- ...options,
24704
- ...newOptions
24705
- };
24706
- if (newOptions.storage) {
24707
- storage = newOptions.storage;
24708
- }
24709
- },
24710
- clearStorage: () => {
24711
- storage == null ? void 0 : storage.removeItem(options.name);
24712
- },
24713
- getOptions: () => options,
24714
- rehydrate: () => hydrate(),
24715
- hasHydrated: () => hasHydrated,
24716
- onHydrate: (cb) => {
24717
- hydrationListeners.add(cb);
24718
- return () => {
24719
- hydrationListeners.delete(cb);
24720
- };
24721
- },
24722
- onFinishHydration: (cb) => {
24723
- finishHydrationListeners.add(cb);
24724
- return () => {
24725
- finishHydrationListeners.delete(cb);
24726
- };
24727
- }
24728
- };
24729
- if (!options.skipHydration) {
24730
- hydrate();
24731
- }
24732
- return stateFromStorage || configResult;
24733
- };
24734
- const persist = persistImpl;
24735
- const useAssetPanelStore = create()(
24736
- persist(
24737
- (set2, get2) => ({
24738
- isOpen: false,
24739
- tabs: [],
24740
- activeTabId: null,
24741
- viewMode: "tabs",
24742
- isFullscreen: false,
24743
- assetPanelHostCount: 0,
24744
- autoOpenGeneration: 0,
24745
- autoOpenedAssets: /* @__PURE__ */ new Map(),
24746
- registerAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: state.assetPanelHostCount + 1 })),
24747
- unregisterAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: Math.max(0, state.assetPanelHostCount - 1) })),
24748
- openAsset: (assetId, meta) => set2((s) => {
24749
- const existing = s.tabs.find((t) => t.id === assetId);
24750
- if (existing) {
24751
- const tabs = meta ? s.tabs.map(
24752
- (t) => t.id === assetId ? { ...t, name: meta.name ?? t.name, type: meta.type ?? t.type } : t
24753
- ) : s.tabs;
24754
- return { isOpen: true, tabs, activeTabId: assetId };
24755
- }
24756
- const newTab = {
24757
- id: assetId,
24758
- name: (meta == null ? void 0 : meta.name) ?? null,
24759
- type: (meta == null ? void 0 : meta.type) ?? "unknown"
24760
- };
24761
- return { isOpen: true, tabs: [...s.tabs, newTab], activeTabId: assetId };
24762
- }),
24763
- closeTab: (assetId) => set2((s) => {
24764
- var _a2;
24765
- const tabs = s.tabs.filter((t) => t.id !== assetId);
24766
- if (tabs.length === 0) {
24767
- return { isOpen: false, tabs: [], activeTabId: null, isFullscreen: false };
24768
- }
24769
- const activeTabId = s.activeTabId === assetId ? ((_a2 = tabs[Math.min(s.tabs.findIndex((t) => t.id === assetId), tabs.length - 1)]) == null ? void 0 : _a2.id) ?? null : s.activeTabId;
24770
- return { tabs, activeTabId };
24771
- }),
24772
- setActiveTab: (assetId) => set2({ activeTabId: assetId, viewMode: "tabs" }),
24773
- setViewMode: (mode) => set2({ viewMode: mode }),
24774
- closePanel: () => set2({ isOpen: false, tabs: [], activeTabId: null, viewMode: "tabs", isFullscreen: false }),
24775
- toggleFullscreen: () => set2((s) => ({ isFullscreen: !s.isFullscreen })),
24776
- resetAutoOpen: () => set2((s) => ({ autoOpenGeneration: s.autoOpenGeneration + 1 })),
24777
- markAutoOpened: (assetId) => {
24778
- const state = get2();
24779
- if (state.autoOpenedAssets.get(assetId) === state.autoOpenGeneration) {
24780
- return false;
24781
- }
24782
- state.autoOpenedAssets.set(assetId, state.autoOpenGeneration);
24783
- return true;
24784
- }
24785
- }),
24786
- {
24787
- name: "athena-react-asset-panel",
24788
- partialize: ({
24789
- isOpen,
24790
- tabs,
24791
- activeTabId,
24792
- viewMode,
24793
- isFullscreen
24794
- }) => ({
24795
- isOpen,
24796
- tabs,
24797
- activeTabId,
24798
- viewMode,
24799
- isFullscreen
24800
- }),
24801
- storage: createJSONStorage(() => sessionStorage)
24802
- }
24803
- )
24804
- );
24805
- const THREAD_SNAPSHOT_STORAGE_KEY = "athena-react-asset-panel-thread-snapshots";
24806
- const DEFAULT_ASSET_PANEL_SNAPSHOT = {
24807
- isOpen: false,
24808
- tabs: [],
24809
- activeTabId: null,
24810
- viewMode: "tabs",
24811
- isFullscreen: false
24812
- };
24813
- const useBrowserLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
24814
- const selectAssetPanelSnapshot = (state) => ({
24815
- isOpen: state.isOpen,
24816
- tabs: state.tabs,
24817
- activeTabId: state.activeTabId,
24818
- viewMode: state.viewMode,
24819
- isFullscreen: state.isFullscreen
24820
- });
24821
- const areSnapshotsEqual = (left, right) => {
24822
- if (left.isOpen !== right.isOpen || left.activeTabId !== right.activeTabId || left.viewMode !== right.viewMode || left.isFullscreen !== right.isFullscreen || left.tabs.length !== right.tabs.length) {
24823
- return false;
24824
- }
24825
- return left.tabs.every((tab, index2) => {
24826
- const otherTab = right.tabs[index2];
24827
- return otherTab !== void 0 && tab.id === otherTab.id && tab.name === otherTab.name && tab.type === otherTab.type;
24828
- });
24829
- };
24830
- const getSessionStorage = () => {
24831
- if (typeof window === "undefined") {
24832
- return null;
24833
- }
24834
- try {
24835
- return sessionStorage;
24836
- } catch {
24837
- return null;
24838
- }
24839
- };
24840
- const readAllThreadSnapshots = () => {
24841
- const storage = getSessionStorage();
24842
- if (!storage) {
24843
- return {};
24844
- }
24845
- try {
24846
- const raw = storage.getItem(THREAD_SNAPSHOT_STORAGE_KEY);
24847
- if (!raw) {
24848
- return {};
24849
- }
24850
- const parsed = JSON.parse(raw);
24851
- if (!parsed || typeof parsed !== "object") {
24852
- return {};
24853
- }
24854
- return parsed;
24855
- } catch {
24856
- return {};
24857
- }
24858
- };
24859
- const writeAllThreadSnapshots = (snapshots) => {
24860
- const storage = getSessionStorage();
24861
- if (!storage) {
24862
- return;
24863
- }
24864
- try {
24865
- storage.setItem(THREAD_SNAPSHOT_STORAGE_KEY, JSON.stringify(snapshots));
24866
- } catch {
24867
- }
24868
- };
24869
- const readThreadSnapshot = (threadInfo) => {
24870
- const snapshots = readAllThreadSnapshots();
24871
- if (threadInfo.remoteId && snapshots[threadInfo.remoteId]) {
24872
- return snapshots[threadInfo.remoteId];
24873
- }
24874
- return snapshots[threadInfo.threadId] ?? DEFAULT_ASSET_PANEL_SNAPSHOT;
24875
- };
24876
- const writeThreadSnapshot = (threadInfo, snapshot) => {
24877
- const keys2 = [threadInfo.threadId, threadInfo.remoteId].filter(
24878
- (value) => Boolean(value)
24879
- );
24880
- if (keys2.length === 0) {
24881
- return;
24882
- }
24883
- const snapshots = readAllThreadSnapshots();
24884
- let didChange = false;
24885
- for (const key of keys2) {
24886
- if (areSnapshotsEqual(snapshots[key] ?? DEFAULT_ASSET_PANEL_SNAPSHOT, snapshot)) {
24887
- continue;
24888
- }
24889
- snapshots[key] = snapshot;
24890
- didChange = true;
24891
- }
24892
- if (didChange) {
24893
- writeAllThreadSnapshots(snapshots);
24894
- }
24895
- };
24896
- function AssetPanelThreadPersistence() {
24897
- const mainThreadId = useAuiState((state) => state.threads.mainThreadId);
24898
- const activeRemoteId = useAuiState((state) => {
24899
- const activeThread = state.threads.threadItems.find(
24900
- (thread) => thread.id === state.threads.mainThreadId
24901
- );
24902
- return (activeThread == null ? void 0 : activeThread.remoteId) ?? null;
24903
- });
24904
- const panelSnapshot = useAssetPanelStore(selectAssetPanelSnapshot);
24905
- const previousThreadRef = React.useRef(null);
24906
- const pendingPersistSkipKeyRef = React.useRef(null);
24907
- useBrowserLayoutEffect(() => {
24908
- if (!mainThreadId) {
24909
- return;
24910
- }
24911
- const activeThread = {
24912
- threadId: mainThreadId,
24913
- remoteId: activeRemoteId
24914
- };
24915
- const previousThread = previousThreadRef.current;
24916
- const didThreadChange = !previousThread || previousThread.threadId !== activeThread.threadId || previousThread.remoteId !== activeThread.remoteId;
24917
- if (!didThreadChange) {
24918
- return;
24919
- }
24920
- if (previousThread) {
24921
- writeThreadSnapshot(
24922
- previousThread,
24923
- selectAssetPanelSnapshot(useAssetPanelStore.getState())
24924
- );
24925
- }
24926
- previousThreadRef.current = activeThread;
24927
- pendingPersistSkipKeyRef.current = activeThread.remoteId ?? activeThread.threadId;
24928
- const snapshotToRestore = readThreadSnapshot(activeThread);
24929
- const currentSnapshot = selectAssetPanelSnapshot(useAssetPanelStore.getState());
24930
- if (!areSnapshotsEqual(currentSnapshot, snapshotToRestore)) {
24931
- useAssetPanelStore.setState((state) => ({
24932
- ...state,
24933
- ...snapshotToRestore
24934
- }));
24935
- }
24936
- }, [mainThreadId, activeRemoteId]);
24937
- React.useEffect(() => {
24938
- if (!mainThreadId) {
24939
- return;
24940
- }
24941
- const activeThreadKey = activeRemoteId ?? mainThreadId;
24942
- if (pendingPersistSkipKeyRef.current === activeThreadKey) {
24943
- pendingPersistSkipKeyRef.current = null;
24944
- return;
24945
- }
24946
- writeThreadSnapshot(
24947
- {
24948
- threadId: mainThreadId,
24949
- remoteId: activeRemoteId
24950
- },
24951
- panelSnapshot
24952
- );
24953
- }, [mainThreadId, activeRemoteId, panelSnapshot]);
24954
- return null;
24955
- }
24956
24542
  function TooltipProvider({
24957
24543
  delayDuration = 0,
24958
24544
  ...props
@@ -25341,6 +24927,7 @@ function AthenaStandalone({
25341
24927
  workbench,
25342
24928
  knowledgeBase,
25343
24929
  systemPrompt,
24930
+ customToolConfigs,
25344
24931
  threadId,
25345
24932
  linkClicks,
25346
24933
  citationLinks
@@ -25359,6 +24946,7 @@ function AthenaStandalone({
25359
24946
  workbench,
25360
24947
  knowledgeBase,
25361
24948
  systemPrompt,
24949
+ customToolConfigs,
25362
24950
  threadId
25363
24951
  });
25364
24952
  const athenaConfig = useAthenaConfigValue({
@@ -25385,6 +24973,7 @@ function useAthenaRuntimeHook(config2) {
25385
24973
  workbench: config2.workbench,
25386
24974
  knowledgeBase: config2.knowledgeBase,
25387
24975
  systemPrompt: config2.systemPrompt,
24976
+ customToolConfigs: config2.customToolConfigs,
25388
24977
  threadId: remoteId
25389
24978
  });
25390
24979
  }
@@ -25403,6 +24992,7 @@ function AthenaWithThreadList({
25403
24992
  workbench,
25404
24993
  knowledgeBase,
25405
24994
  systemPrompt,
24995
+ customToolConfigs,
25406
24996
  linkClicks,
25407
24997
  citationLinks
25408
24998
  }) {
@@ -25422,7 +25012,8 @@ function AthenaWithThreadList({
25422
25012
  frontendToolIds,
25423
25013
  workbench,
25424
25014
  knowledgeBase,
25425
- systemPrompt
25015
+ systemPrompt,
25016
+ customToolConfigs
25426
25017
  });
25427
25018
  runtimeConfigRef.current = {
25428
25019
  apiUrl,
@@ -25435,7 +25026,8 @@ function AthenaWithThreadList({
25435
25026
  frontendToolIds,
25436
25027
  workbench,
25437
25028
  knowledgeBase,
25438
- systemPrompt
25029
+ systemPrompt,
25030
+ customToolConfigs
25439
25031
  };
25440
25032
  const runtimeHook = React.useCallback(
25441
25033
  () => useAthenaRuntimeHook(runtimeConfigRef.current),
@@ -25473,10 +25065,7 @@ function AthenaWithThreadList({
25473
25065
  linkClicks,
25474
25066
  citationLinks
25475
25067
  });
25476
- return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(ThreadListRefreshContext.Provider, { value: handleRefresh, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipProvider, { children: [
25477
- /* @__PURE__ */ jsxRuntime.jsx(AssetPanelThreadPersistence, {}),
25478
- children
25479
- ] }) }) }) });
25068
+ return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(ThreadListRefreshContext.Provider, { value: handleRefresh, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children }) }) }) });
25480
25069
  }
25481
25070
  function AthenaProvider({
25482
25071
  children,
@@ -25494,6 +25083,7 @@ function AthenaProvider({
25494
25083
  workbench,
25495
25084
  knowledgeBase,
25496
25085
  systemPrompt,
25086
+ customToolConfigs,
25497
25087
  threadId: threadIdProp,
25498
25088
  enableThreadList = false,
25499
25089
  theme,
@@ -25545,6 +25135,7 @@ function AthenaProvider({
25545
25135
  workbench,
25546
25136
  knowledgeBase,
25547
25137
  systemPrompt,
25138
+ customToolConfigs,
25548
25139
  linkClicks,
25549
25140
  citationLinks,
25550
25141
  children
@@ -25567,6 +25158,7 @@ function AthenaProvider({
25567
25158
  workbench,
25568
25159
  knowledgeBase,
25569
25160
  systemPrompt,
25161
+ customToolConfigs,
25570
25162
  threadId: threadIdProp,
25571
25163
  linkClicks,
25572
25164
  citationLinks,
@@ -58466,10 +58058,10 @@ function childNodes(node) {
58466
58058
  var _node$content$content, _node$content;
58467
58059
  return (_node$content$content = node === null || node === void 0 || (_node$content = node.content) === null || _node$content === void 0 ? void 0 : _node$content.content) !== null && _node$content$content !== void 0 ? _node$content$content : [];
58468
58060
  }
58469
- const Table = Node3.create({
58061
+ const Table$1 = Node3.create({
58470
58062
  name: "table"
58471
58063
  });
58472
- const Table$1 = Table.extend({
58064
+ const Table$1$1 = Table$1.extend({
58473
58065
  /**
58474
58066
  * @return {{markdown: MarkdownNodeSpec}}
58475
58067
  */
@@ -58698,7 +58290,7 @@ const Strike$1 = Strike.extend({
58698
58290
  };
58699
58291
  }
58700
58292
  });
58701
- 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];
58293
+ 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$1, TaskItem$1, TaskList$1, Text$1, Bold$1, Code$1$1, HTMLMark, Italic$1, Link$1$1, Strike$1];
58702
58294
  function getMarkdownSpec(extension) {
58703
58295
  var _extension$storage, _markdownExtensions$f;
58704
58296
  const markdownSpec = (_extension$storage = extension.storage) === null || _extension$storage === void 0 ? void 0 : _extension$storage.markdown;
@@ -59229,6 +58821,273 @@ const MentionExtension = Node3.create({
59229
58821
  };
59230
58822
  }
59231
58823
  });
58824
+ function createJSONStorage(getStorage, options) {
58825
+ let storage;
58826
+ try {
58827
+ storage = getStorage();
58828
+ } catch (e) {
58829
+ return;
58830
+ }
58831
+ const persistStorage = {
58832
+ getItem: (name) => {
58833
+ var _a2;
58834
+ const parse2 = (str2) => {
58835
+ if (str2 === null) {
58836
+ return null;
58837
+ }
58838
+ return JSON.parse(str2, void 0);
58839
+ };
58840
+ const str = (_a2 = storage.getItem(name)) != null ? _a2 : null;
58841
+ if (str instanceof Promise) {
58842
+ return str.then(parse2);
58843
+ }
58844
+ return parse2(str);
58845
+ },
58846
+ setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, void 0)),
58847
+ removeItem: (name) => storage.removeItem(name)
58848
+ };
58849
+ return persistStorage;
58850
+ }
58851
+ const toThenable = (fn) => (input) => {
58852
+ try {
58853
+ const result = fn(input);
58854
+ if (result instanceof Promise) {
58855
+ return result;
58856
+ }
58857
+ return {
58858
+ then(onFulfilled) {
58859
+ return toThenable(onFulfilled)(result);
58860
+ },
58861
+ catch(_onRejected) {
58862
+ return this;
58863
+ }
58864
+ };
58865
+ } catch (e) {
58866
+ return {
58867
+ then(_onFulfilled) {
58868
+ return this;
58869
+ },
58870
+ catch(onRejected) {
58871
+ return toThenable(onRejected)(e);
58872
+ }
58873
+ };
58874
+ }
58875
+ };
58876
+ const persistImpl = (config2, baseOptions) => (set2, get2, api) => {
58877
+ let options = {
58878
+ storage: createJSONStorage(() => window.localStorage),
58879
+ partialize: (state) => state,
58880
+ version: 0,
58881
+ merge: (persistedState, currentState) => ({
58882
+ ...currentState,
58883
+ ...persistedState
58884
+ }),
58885
+ ...baseOptions
58886
+ };
58887
+ let hasHydrated = false;
58888
+ let hydrationVersion = 0;
58889
+ const hydrationListeners = /* @__PURE__ */ new Set();
58890
+ const finishHydrationListeners = /* @__PURE__ */ new Set();
58891
+ let storage = options.storage;
58892
+ if (!storage) {
58893
+ return config2(
58894
+ (...args) => {
58895
+ console.warn(
58896
+ `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`
58897
+ );
58898
+ set2(...args);
58899
+ },
58900
+ get2,
58901
+ api
58902
+ );
58903
+ }
58904
+ const setItem = () => {
58905
+ const state = options.partialize({ ...get2() });
58906
+ return storage.setItem(options.name, {
58907
+ state,
58908
+ version: options.version
58909
+ });
58910
+ };
58911
+ const savedSetState = api.setState;
58912
+ api.setState = (state, replace2) => {
58913
+ savedSetState(state, replace2);
58914
+ return setItem();
58915
+ };
58916
+ const configResult = config2(
58917
+ (...args) => {
58918
+ set2(...args);
58919
+ return setItem();
58920
+ },
58921
+ get2,
58922
+ api
58923
+ );
58924
+ api.getInitialState = () => configResult;
58925
+ let stateFromStorage;
58926
+ const hydrate = () => {
58927
+ var _a2, _b;
58928
+ if (!storage) return;
58929
+ const currentVersion = ++hydrationVersion;
58930
+ hasHydrated = false;
58931
+ hydrationListeners.forEach((cb) => {
58932
+ var _a22;
58933
+ return cb((_a22 = get2()) != null ? _a22 : configResult);
58934
+ });
58935
+ const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a2 = get2()) != null ? _a2 : configResult)) || void 0;
58936
+ return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {
58937
+ if (deserializedStorageValue) {
58938
+ if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) {
58939
+ if (options.migrate) {
58940
+ const migration = options.migrate(
58941
+ deserializedStorageValue.state,
58942
+ deserializedStorageValue.version
58943
+ );
58944
+ if (migration instanceof Promise) {
58945
+ return migration.then((result) => [true, result]);
58946
+ }
58947
+ return [true, migration];
58948
+ }
58949
+ console.error(
58950
+ `State loaded from storage couldn't be migrated since no migrate function was provided`
58951
+ );
58952
+ } else {
58953
+ return [false, deserializedStorageValue.state];
58954
+ }
58955
+ }
58956
+ return [false, void 0];
58957
+ }).then((migrationResult) => {
58958
+ var _a22;
58959
+ if (currentVersion !== hydrationVersion) {
58960
+ return;
58961
+ }
58962
+ const [migrated, migratedState] = migrationResult;
58963
+ stateFromStorage = options.merge(
58964
+ migratedState,
58965
+ (_a22 = get2()) != null ? _a22 : configResult
58966
+ );
58967
+ set2(stateFromStorage, true);
58968
+ if (migrated) {
58969
+ return setItem();
58970
+ }
58971
+ }).then(() => {
58972
+ if (currentVersion !== hydrationVersion) {
58973
+ return;
58974
+ }
58975
+ postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);
58976
+ stateFromStorage = get2();
58977
+ hasHydrated = true;
58978
+ finishHydrationListeners.forEach((cb) => cb(stateFromStorage));
58979
+ }).catch((e) => {
58980
+ if (currentVersion !== hydrationVersion) {
58981
+ return;
58982
+ }
58983
+ postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);
58984
+ });
58985
+ };
58986
+ api.persist = {
58987
+ setOptions: (newOptions) => {
58988
+ options = {
58989
+ ...options,
58990
+ ...newOptions
58991
+ };
58992
+ if (newOptions.storage) {
58993
+ storage = newOptions.storage;
58994
+ }
58995
+ },
58996
+ clearStorage: () => {
58997
+ storage == null ? void 0 : storage.removeItem(options.name);
58998
+ },
58999
+ getOptions: () => options,
59000
+ rehydrate: () => hydrate(),
59001
+ hasHydrated: () => hasHydrated,
59002
+ onHydrate: (cb) => {
59003
+ hydrationListeners.add(cb);
59004
+ return () => {
59005
+ hydrationListeners.delete(cb);
59006
+ };
59007
+ },
59008
+ onFinishHydration: (cb) => {
59009
+ finishHydrationListeners.add(cb);
59010
+ return () => {
59011
+ finishHydrationListeners.delete(cb);
59012
+ };
59013
+ }
59014
+ };
59015
+ if (!options.skipHydration) {
59016
+ hydrate();
59017
+ }
59018
+ return stateFromStorage || configResult;
59019
+ };
59020
+ const persist = persistImpl;
59021
+ const useAssetPanelStore = create()(
59022
+ persist(
59023
+ (set2, get2) => ({
59024
+ isOpen: false,
59025
+ tabs: [],
59026
+ activeTabId: null,
59027
+ viewMode: "tabs",
59028
+ isFullscreen: false,
59029
+ assetPanelHostCount: 0,
59030
+ autoOpenGeneration: 0,
59031
+ autoOpenedAssets: /* @__PURE__ */ new Map(),
59032
+ registerAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: state.assetPanelHostCount + 1 })),
59033
+ unregisterAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: Math.max(0, state.assetPanelHostCount - 1) })),
59034
+ openAsset: (assetId, meta) => set2((s) => {
59035
+ const existing = s.tabs.find((t) => t.id === assetId);
59036
+ if (existing) {
59037
+ const tabs = meta ? s.tabs.map(
59038
+ (t) => t.id === assetId ? { ...t, name: meta.name ?? t.name, type: meta.type ?? t.type } : t
59039
+ ) : s.tabs;
59040
+ return { isOpen: true, tabs, activeTabId: assetId };
59041
+ }
59042
+ const newTab = {
59043
+ id: assetId,
59044
+ name: (meta == null ? void 0 : meta.name) ?? null,
59045
+ type: (meta == null ? void 0 : meta.type) ?? "unknown"
59046
+ };
59047
+ return { isOpen: true, tabs: [...s.tabs, newTab], activeTabId: assetId };
59048
+ }),
59049
+ closeTab: (assetId) => set2((s) => {
59050
+ var _a2;
59051
+ const tabs = s.tabs.filter((t) => t.id !== assetId);
59052
+ if (tabs.length === 0) {
59053
+ return { isOpen: false, tabs: [], activeTabId: null, isFullscreen: false };
59054
+ }
59055
+ const activeTabId = s.activeTabId === assetId ? ((_a2 = tabs[Math.min(s.tabs.findIndex((t) => t.id === assetId), tabs.length - 1)]) == null ? void 0 : _a2.id) ?? null : s.activeTabId;
59056
+ return { tabs, activeTabId };
59057
+ }),
59058
+ setActiveTab: (assetId) => set2({ activeTabId: assetId, viewMode: "tabs" }),
59059
+ setViewMode: (mode) => set2({ viewMode: mode }),
59060
+ closePanel: () => set2({ isOpen: false, tabs: [], activeTabId: null, viewMode: "tabs", isFullscreen: false }),
59061
+ toggleFullscreen: () => set2((s) => ({ isFullscreen: !s.isFullscreen })),
59062
+ resetAutoOpen: () => set2((s) => ({ autoOpenGeneration: s.autoOpenGeneration + 1 })),
59063
+ markAutoOpened: (assetId) => {
59064
+ const state = get2();
59065
+ if (state.autoOpenedAssets.get(assetId) === state.autoOpenGeneration) {
59066
+ return false;
59067
+ }
59068
+ state.autoOpenedAssets.set(assetId, state.autoOpenGeneration);
59069
+ return true;
59070
+ }
59071
+ }),
59072
+ {
59073
+ name: "athena-react-asset-panel",
59074
+ partialize: ({
59075
+ isOpen,
59076
+ tabs,
59077
+ activeTabId,
59078
+ viewMode,
59079
+ isFullscreen
59080
+ }) => ({
59081
+ isOpen,
59082
+ tabs,
59083
+ activeTabId,
59084
+ viewMode,
59085
+ isFullscreen
59086
+ }),
59087
+ storage: createJSONStorage(() => sessionStorage)
59088
+ }
59089
+ )
59090
+ );
59232
59091
  const ATHENA_APP_HOSTNAMES = /* @__PURE__ */ new Set(["app.athenaintel.com", "staging-app.athenaintel.com"]);
59233
59092
  const ATHENA_PREVIEW_HOSTNAME_SUFFIX = ".previews.athenaintel.com";
59234
59093
  const ATHENA_WORKSPACE_HOSTNAME_SUFFIXES = [".app.athenaintel.com", ".staging-app.athenaintel.com"];
@@ -61726,9 +61585,13 @@ const TiptapComposer = ({ tools = [] }) => {
61726
61585
  quoteRef.current = quote;
61727
61586
  const isUploadingRef = React.useRef(isUploading);
61728
61587
  isUploadingRef.current = isUploading;
61588
+ const isThreadRunning = useAuiState((s) => s.thread.isRunning);
61589
+ const isThreadRunningRef = React.useRef(isThreadRunning);
61590
+ isThreadRunningRef.current = isThreadRunning;
61729
61591
  const handleSubmit = React.useCallback(() => {
61730
61592
  var _a2;
61731
61593
  if (isUploadingRef.current) return;
61594
+ if (isThreadRunningRef.current) return;
61732
61595
  const editor2 = editorRef.current;
61733
61596
  if (!editor2) return;
61734
61597
  const currentAttachments = attachmentsRef.current;
@@ -61948,40 +61811,40 @@ const createLucideIcon = (iconName, iconNode) => {
61948
61811
  * This source code is licensed under the ISC license.
61949
61812
  * See the LICENSE file in the root directory of this source tree.
61950
61813
  */
61951
- const __iconNode$N = [
61814
+ const __iconNode$Q = [
61952
61815
  ["path", { d: "M12 5v14", key: "s699le" }],
61953
61816
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
61954
61817
  ];
61955
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$N);
61818
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$Q);
61956
61819
  /**
61957
61820
  * @license lucide-react v0.575.0 - ISC
61958
61821
  *
61959
61822
  * This source code is licensed under the ISC license.
61960
61823
  * See the LICENSE file in the root directory of this source tree.
61961
61824
  */
61962
- const __iconNode$M = [
61825
+ const __iconNode$P = [
61963
61826
  ["path", { d: "M5 12h14", key: "1ays0h" }],
61964
61827
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
61965
61828
  ];
61966
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$M);
61829
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$P);
61967
61830
  /**
61968
61831
  * @license lucide-react v0.575.0 - ISC
61969
61832
  *
61970
61833
  * This source code is licensed under the ISC license.
61971
61834
  * See the LICENSE file in the root directory of this source tree.
61972
61835
  */
61973
- const __iconNode$L = [
61836
+ const __iconNode$O = [
61974
61837
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
61975
61838
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
61976
61839
  ];
61977
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$L);
61840
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$O);
61978
61841
  /**
61979
61842
  * @license lucide-react v0.575.0 - ISC
61980
61843
  *
61981
61844
  * This source code is licensed under the ISC license.
61982
61845
  * See the LICENSE file in the root directory of this source tree.
61983
61846
  */
61984
- const __iconNode$K = [
61847
+ const __iconNode$N = [
61985
61848
  ["path", { d: "M12 7v14", key: "1akyts" }],
61986
61849
  [
61987
61850
  "path",
@@ -61991,14 +61854,14 @@ const __iconNode$K = [
61991
61854
  }
61992
61855
  ]
61993
61856
  ];
61994
- const BookOpen = createLucideIcon("book-open", __iconNode$K);
61857
+ const BookOpen = createLucideIcon("book-open", __iconNode$N);
61995
61858
  /**
61996
61859
  * @license lucide-react v0.575.0 - ISC
61997
61860
  *
61998
61861
  * This source code is licensed under the ISC license.
61999
61862
  * See the LICENSE file in the root directory of this source tree.
62000
61863
  */
62001
- const __iconNode$J = [
61864
+ const __iconNode$M = [
62002
61865
  ["path", { d: "M12 18V5", key: "adv99a" }],
62003
61866
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
62004
61867
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -62008,170 +61871,170 @@ const __iconNode$J = [
62008
61871
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
62009
61872
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
62010
61873
  ];
62011
- const Brain = createLucideIcon("brain", __iconNode$J);
61874
+ const Brain = createLucideIcon("brain", __iconNode$M);
62012
61875
  /**
62013
61876
  * @license lucide-react v0.575.0 - ISC
62014
61877
  *
62015
61878
  * This source code is licensed under the ISC license.
62016
61879
  * See the LICENSE file in the root directory of this source tree.
62017
61880
  */
62018
- const __iconNode$I = [
61881
+ const __iconNode$L = [
62019
61882
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
62020
61883
  ["path", { d: "M18 17V9", key: "2bz60n" }],
62021
61884
  ["path", { d: "M13 17V5", key: "1frdt8" }],
62022
61885
  ["path", { d: "M8 17v-3", key: "17ska0" }]
62023
61886
  ];
62024
- const ChartColumn = createLucideIcon("chart-column", __iconNode$I);
61887
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$L);
62025
61888
  /**
62026
61889
  * @license lucide-react v0.575.0 - ISC
62027
61890
  *
62028
61891
  * This source code is licensed under the ISC license.
62029
61892
  * See the LICENSE file in the root directory of this source tree.
62030
61893
  */
62031
- const __iconNode$H = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
62032
- const Check = createLucideIcon("check", __iconNode$H);
61894
+ const __iconNode$K = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
61895
+ const Check = createLucideIcon("check", __iconNode$K);
62033
61896
  /**
62034
61897
  * @license lucide-react v0.575.0 - ISC
62035
61898
  *
62036
61899
  * This source code is licensed under the ISC license.
62037
61900
  * See the LICENSE file in the root directory of this source tree.
62038
61901
  */
62039
- const __iconNode$G = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
62040
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$G);
61902
+ const __iconNode$J = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
61903
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$J);
62041
61904
  /**
62042
61905
  * @license lucide-react v0.575.0 - ISC
62043
61906
  *
62044
61907
  * This source code is licensed under the ISC license.
62045
61908
  * See the LICENSE file in the root directory of this source tree.
62046
61909
  */
62047
- const __iconNode$F = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
62048
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$F);
61910
+ const __iconNode$I = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
61911
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$I);
62049
61912
  /**
62050
61913
  * @license lucide-react v0.575.0 - ISC
62051
61914
  *
62052
61915
  * This source code is licensed under the ISC license.
62053
61916
  * See the LICENSE file in the root directory of this source tree.
62054
61917
  */
62055
- const __iconNode$E = [
61918
+ const __iconNode$H = [
62056
61919
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62057
61920
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
62058
61921
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
62059
61922
  ];
62060
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$E);
61923
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$H);
62061
61924
  /**
62062
61925
  * @license lucide-react v0.575.0 - ISC
62063
61926
  *
62064
61927
  * This source code is licensed under the ISC license.
62065
61928
  * See the LICENSE file in the root directory of this source tree.
62066
61929
  */
62067
- const __iconNode$D = [
61930
+ const __iconNode$G = [
62068
61931
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62069
61932
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
62070
61933
  ];
62071
- const CircleCheck = createLucideIcon("circle-check", __iconNode$D);
61934
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$G);
62072
61935
  /**
62073
61936
  * @license lucide-react v0.575.0 - ISC
62074
61937
  *
62075
61938
  * This source code is licensed under the ISC license.
62076
61939
  * See the LICENSE file in the root directory of this source tree.
62077
61940
  */
62078
- const __iconNode$C = [
61941
+ const __iconNode$F = [
62079
61942
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62080
61943
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
62081
61944
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
62082
61945
  ];
62083
- const CircleX = createLucideIcon("circle-x", __iconNode$C);
61946
+ const CircleX = createLucideIcon("circle-x", __iconNode$F);
62084
61947
  /**
62085
61948
  * @license lucide-react v0.575.0 - ISC
62086
61949
  *
62087
61950
  * This source code is licensed under the ISC license.
62088
61951
  * See the LICENSE file in the root directory of this source tree.
62089
61952
  */
62090
- const __iconNode$B = [
61953
+ const __iconNode$E = [
62091
61954
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
62092
61955
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
62093
61956
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
62094
61957
  ["path", { d: "M21 14H11", key: "1bme5i" }],
62095
61958
  ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
62096
61959
  ];
62097
- const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$B);
61960
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$E);
62098
61961
  /**
62099
61962
  * @license lucide-react v0.575.0 - ISC
62100
61963
  *
62101
61964
  * This source code is licensed under the ISC license.
62102
61965
  * See the LICENSE file in the root directory of this source tree.
62103
61966
  */
62104
- const __iconNode$A = [
61967
+ const __iconNode$D = [
62105
61968
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
62106
61969
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
62107
61970
  ];
62108
- const Code = createLucideIcon("code", __iconNode$A);
61971
+ const Code = createLucideIcon("code", __iconNode$D);
62109
61972
  /**
62110
61973
  * @license lucide-react v0.575.0 - ISC
62111
61974
  *
62112
61975
  * This source code is licensed under the ISC license.
62113
61976
  * See the LICENSE file in the root directory of this source tree.
62114
61977
  */
62115
- const __iconNode$z = [
61978
+ const __iconNode$C = [
62116
61979
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
62117
61980
  ["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" }]
62118
61981
  ];
62119
- const Copy = createLucideIcon("copy", __iconNode$z);
61982
+ const Copy = createLucideIcon("copy", __iconNode$C);
62120
61983
  /**
62121
61984
  * @license lucide-react v0.575.0 - ISC
62122
61985
  *
62123
61986
  * This source code is licensed under the ISC license.
62124
61987
  * See the LICENSE file in the root directory of this source tree.
62125
61988
  */
62126
- const __iconNode$y = [
61989
+ const __iconNode$B = [
62127
61990
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
62128
61991
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
62129
61992
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
62130
61993
  ];
62131
- const Database = createLucideIcon("database", __iconNode$y);
61994
+ const Database = createLucideIcon("database", __iconNode$B);
62132
61995
  /**
62133
61996
  * @license lucide-react v0.575.0 - ISC
62134
61997
  *
62135
61998
  * This source code is licensed under the ISC license.
62136
61999
  * See the LICENSE file in the root directory of this source tree.
62137
62000
  */
62138
- const __iconNode$x = [
62001
+ const __iconNode$A = [
62139
62002
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
62140
62003
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
62141
62004
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
62142
62005
  ];
62143
- const Download = createLucideIcon("download", __iconNode$x);
62006
+ const Download = createLucideIcon("download", __iconNode$A);
62144
62007
  /**
62145
62008
  * @license lucide-react v0.575.0 - ISC
62146
62009
  *
62147
62010
  * This source code is licensed under the ISC license.
62148
62011
  * See the LICENSE file in the root directory of this source tree.
62149
62012
  */
62150
- const __iconNode$w = [
62013
+ const __iconNode$z = [
62151
62014
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
62152
62015
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
62153
62016
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
62154
62017
  ];
62155
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$w);
62018
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$z);
62156
62019
  /**
62157
62020
  * @license lucide-react v0.575.0 - ISC
62158
62021
  *
62159
62022
  * This source code is licensed under the ISC license.
62160
62023
  * See the LICENSE file in the root directory of this source tree.
62161
62024
  */
62162
- const __iconNode$v = [
62025
+ const __iconNode$y = [
62163
62026
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
62164
62027
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
62165
62028
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
62166
62029
  ];
62167
- const ExternalLink = createLucideIcon("external-link", __iconNode$v);
62030
+ const ExternalLink = createLucideIcon("external-link", __iconNode$y);
62168
62031
  /**
62169
62032
  * @license lucide-react v0.575.0 - ISC
62170
62033
  *
62171
62034
  * This source code is licensed under the ISC license.
62172
62035
  * See the LICENSE file in the root directory of this source tree.
62173
62036
  */
62174
- const __iconNode$u = [
62037
+ const __iconNode$x = [
62175
62038
  [
62176
62039
  "path",
62177
62040
  {
@@ -62183,14 +62046,14 @@ const __iconNode$u = [
62183
62046
  ["path", { d: "M9 15h6", key: "cctwl0" }],
62184
62047
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
62185
62048
  ];
62186
- const FilePlus = createLucideIcon("file-plus", __iconNode$u);
62049
+ const FilePlus = createLucideIcon("file-plus", __iconNode$x);
62187
62050
  /**
62188
62051
  * @license lucide-react v0.575.0 - ISC
62189
62052
  *
62190
62053
  * This source code is licensed under the ISC license.
62191
62054
  * See the LICENSE file in the root directory of this source tree.
62192
62055
  */
62193
- const __iconNode$t = [
62056
+ const __iconNode$w = [
62194
62057
  [
62195
62058
  "path",
62196
62059
  {
@@ -62204,14 +62067,14 @@ const __iconNode$t = [
62204
62067
  ["path", { d: "M8 17h2", key: "2yhykz" }],
62205
62068
  ["path", { d: "M14 17h2", key: "10kma7" }]
62206
62069
  ];
62207
- const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$t);
62070
+ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$w);
62208
62071
  /**
62209
62072
  * @license lucide-react v0.575.0 - ISC
62210
62073
  *
62211
62074
  * This source code is licensed under the ISC license.
62212
62075
  * See the LICENSE file in the root directory of this source tree.
62213
62076
  */
62214
- const __iconNode$s = [
62077
+ const __iconNode$v = [
62215
62078
  [
62216
62079
  "path",
62217
62080
  {
@@ -62224,14 +62087,14 @@ const __iconNode$s = [
62224
62087
  ["path", { d: "M16 13H8", key: "t4e002" }],
62225
62088
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
62226
62089
  ];
62227
- const FileText = createLucideIcon("file-text", __iconNode$s);
62090
+ const FileText = createLucideIcon("file-text", __iconNode$v);
62228
62091
  /**
62229
62092
  * @license lucide-react v0.575.0 - ISC
62230
62093
  *
62231
62094
  * This source code is licensed under the ISC license.
62232
62095
  * See the LICENSE file in the root directory of this source tree.
62233
62096
  */
62234
- const __iconNode$r = [
62097
+ const __iconNode$u = [
62235
62098
  [
62236
62099
  "path",
62237
62100
  {
@@ -62241,14 +62104,14 @@ const __iconNode$r = [
62241
62104
  ],
62242
62105
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
62243
62106
  ];
62244
- const File$1 = createLucideIcon("file", __iconNode$r);
62107
+ const File$1 = createLucideIcon("file", __iconNode$u);
62245
62108
  /**
62246
62109
  * @license lucide-react v0.575.0 - ISC
62247
62110
  *
62248
62111
  * This source code is licensed under the ISC license.
62249
62112
  * See the LICENSE file in the root directory of this source tree.
62250
62113
  */
62251
- const __iconNode$q = [
62114
+ const __iconNode$t = [
62252
62115
  [
62253
62116
  "path",
62254
62117
  {
@@ -62257,38 +62120,38 @@ const __iconNode$q = [
62257
62120
  }
62258
62121
  ]
62259
62122
  ];
62260
- const FolderOpen = createLucideIcon("folder-open", __iconNode$q);
62123
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$t);
62261
62124
  /**
62262
62125
  * @license lucide-react v0.575.0 - ISC
62263
62126
  *
62264
62127
  * This source code is licensed under the ISC license.
62265
62128
  * See the LICENSE file in the root directory of this source tree.
62266
62129
  */
62267
- const __iconNode$p = [
62130
+ const __iconNode$s = [
62268
62131
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62269
62132
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
62270
62133
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
62271
62134
  ];
62272
- const Globe = createLucideIcon("globe", __iconNode$p);
62135
+ const Globe = createLucideIcon("globe", __iconNode$s);
62273
62136
  /**
62274
62137
  * @license lucide-react v0.575.0 - ISC
62275
62138
  *
62276
62139
  * This source code is licensed under the ISC license.
62277
62140
  * See the LICENSE file in the root directory of this source tree.
62278
62141
  */
62279
- const __iconNode$o = [
62142
+ const __iconNode$r = [
62280
62143
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
62281
62144
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
62282
62145
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
62283
62146
  ];
62284
- const Image = createLucideIcon("image", __iconNode$o);
62147
+ const Image = createLucideIcon("image", __iconNode$r);
62285
62148
  /**
62286
62149
  * @license lucide-react v0.575.0 - ISC
62287
62150
  *
62288
62151
  * This source code is licensed under the ISC license.
62289
62152
  * See the LICENSE file in the root directory of this source tree.
62290
62153
  */
62291
- const __iconNode$n = [
62154
+ const __iconNode$q = [
62292
62155
  [
62293
62156
  "path",
62294
62157
  {
@@ -62311,46 +62174,46 @@ const __iconNode$n = [
62311
62174
  }
62312
62175
  ]
62313
62176
  ];
62314
- const Layers = createLucideIcon("layers", __iconNode$n);
62177
+ const Layers = createLucideIcon("layers", __iconNode$q);
62315
62178
  /**
62316
62179
  * @license lucide-react v0.575.0 - ISC
62317
62180
  *
62318
62181
  * This source code is licensed under the ISC license.
62319
62182
  * See the LICENSE file in the root directory of this source tree.
62320
62183
  */
62321
- const __iconNode$m = [
62184
+ const __iconNode$p = [
62322
62185
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
62323
62186
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
62324
62187
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
62325
62188
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
62326
62189
  ];
62327
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$m);
62190
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$p);
62328
62191
  /**
62329
62192
  * @license lucide-react v0.575.0 - ISC
62330
62193
  *
62331
62194
  * This source code is licensed under the ISC license.
62332
62195
  * See the LICENSE file in the root directory of this source tree.
62333
62196
  */
62334
- const __iconNode$l = [
62197
+ const __iconNode$o = [
62335
62198
  ["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" }],
62336
62199
  ["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" }]
62337
62200
  ];
62338
- const Link = createLucideIcon("link", __iconNode$l);
62201
+ const Link = createLucideIcon("link", __iconNode$o);
62339
62202
  /**
62340
62203
  * @license lucide-react v0.575.0 - ISC
62341
62204
  *
62342
62205
  * This source code is licensed under the ISC license.
62343
62206
  * See the LICENSE file in the root directory of this source tree.
62344
62207
  */
62345
- const __iconNode$k = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62346
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$k);
62208
+ const __iconNode$n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62209
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$n);
62347
62210
  /**
62348
62211
  * @license lucide-react v0.575.0 - ISC
62349
62212
  *
62350
62213
  * This source code is licensed under the ISC license.
62351
62214
  * See the LICENSE file in the root directory of this source tree.
62352
62215
  */
62353
- const __iconNode$j = [
62216
+ const __iconNode$m = [
62354
62217
  ["path", { d: "M12 2v4", key: "3427ic" }],
62355
62218
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
62356
62219
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -62360,38 +62223,38 @@ const __iconNode$j = [
62360
62223
  ["path", { d: "M2 12h4", key: "j09sii" }],
62361
62224
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
62362
62225
  ];
62363
- const Loader = createLucideIcon("loader", __iconNode$j);
62226
+ const Loader = createLucideIcon("loader", __iconNode$m);
62364
62227
  /**
62365
62228
  * @license lucide-react v0.575.0 - ISC
62366
62229
  *
62367
62230
  * This source code is licensed under the ISC license.
62368
62231
  * See the LICENSE file in the root directory of this source tree.
62369
62232
  */
62370
- const __iconNode$i = [
62233
+ const __iconNode$l = [
62371
62234
  ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
62372
62235
  ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
62373
62236
  ];
62374
- const Mail = createLucideIcon("mail", __iconNode$i);
62237
+ const Mail = createLucideIcon("mail", __iconNode$l);
62375
62238
  /**
62376
62239
  * @license lucide-react v0.575.0 - ISC
62377
62240
  *
62378
62241
  * This source code is licensed under the ISC license.
62379
62242
  * See the LICENSE file in the root directory of this source tree.
62380
62243
  */
62381
- const __iconNode$h = [
62244
+ const __iconNode$k = [
62382
62245
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
62383
62246
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
62384
62247
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62385
62248
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
62386
62249
  ];
62387
- const Maximize2 = createLucideIcon("maximize-2", __iconNode$h);
62250
+ const Maximize2 = createLucideIcon("maximize-2", __iconNode$k);
62388
62251
  /**
62389
62252
  * @license lucide-react v0.575.0 - ISC
62390
62253
  *
62391
62254
  * This source code is licensed under the ISC license.
62392
62255
  * See the LICENSE file in the root directory of this source tree.
62393
62256
  */
62394
- const __iconNode$g = [
62257
+ const __iconNode$j = [
62395
62258
  [
62396
62259
  "path",
62397
62260
  {
@@ -62400,39 +62263,39 @@ const __iconNode$g = [
62400
62263
  }
62401
62264
  ]
62402
62265
  ];
62403
- const MessageSquare = createLucideIcon("message-square", __iconNode$g);
62266
+ const MessageSquare = createLucideIcon("message-square", __iconNode$j);
62404
62267
  /**
62405
62268
  * @license lucide-react v0.575.0 - ISC
62406
62269
  *
62407
62270
  * This source code is licensed under the ISC license.
62408
62271
  * See the LICENSE file in the root directory of this source tree.
62409
62272
  */
62410
- const __iconNode$f = [
62273
+ const __iconNode$i = [
62411
62274
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
62412
62275
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
62413
62276
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62414
62277
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
62415
62278
  ];
62416
- const Minimize2 = createLucideIcon("minimize-2", __iconNode$f);
62279
+ const Minimize2 = createLucideIcon("minimize-2", __iconNode$i);
62417
62280
  /**
62418
62281
  * @license lucide-react v0.575.0 - ISC
62419
62282
  *
62420
62283
  * This source code is licensed under the ISC license.
62421
62284
  * See the LICENSE file in the root directory of this source tree.
62422
62285
  */
62423
- const __iconNode$e = [
62286
+ const __iconNode$h = [
62424
62287
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
62425
62288
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
62426
62289
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
62427
62290
  ];
62428
- const Monitor = createLucideIcon("monitor", __iconNode$e);
62291
+ const Monitor = createLucideIcon("monitor", __iconNode$h);
62429
62292
  /**
62430
62293
  * @license lucide-react v0.575.0 - ISC
62431
62294
  *
62432
62295
  * This source code is licensed under the ISC license.
62433
62296
  * See the LICENSE file in the root directory of this source tree.
62434
62297
  */
62435
- const __iconNode$d = [
62298
+ const __iconNode$g = [
62436
62299
  ["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" }],
62437
62300
  ["path", { d: "M2 6h4", key: "aawbzj" }],
62438
62301
  ["path", { d: "M2 10h4", key: "l0bgd4" }],
@@ -62446,14 +62309,14 @@ const __iconNode$d = [
62446
62309
  }
62447
62310
  ]
62448
62311
  ];
62449
- const NotebookPen = createLucideIcon("notebook-pen", __iconNode$d);
62312
+ const NotebookPen = createLucideIcon("notebook-pen", __iconNode$g);
62450
62313
  /**
62451
62314
  * @license lucide-react v0.575.0 - ISC
62452
62315
  *
62453
62316
  * This source code is licensed under the ISC license.
62454
62317
  * See the LICENSE file in the root directory of this source tree.
62455
62318
  */
62456
- const __iconNode$c = [
62319
+ const __iconNode$f = [
62457
62320
  [
62458
62321
  "path",
62459
62322
  {
@@ -62462,14 +62325,14 @@ const __iconNode$c = [
62462
62325
  }
62463
62326
  ]
62464
62327
  ];
62465
- const Paperclip = createLucideIcon("paperclip", __iconNode$c);
62328
+ const Paperclip = createLucideIcon("paperclip", __iconNode$f);
62466
62329
  /**
62467
62330
  * @license lucide-react v0.575.0 - ISC
62468
62331
  *
62469
62332
  * This source code is licensed under the ISC license.
62470
62333
  * See the LICENSE file in the root directory of this source tree.
62471
62334
  */
62472
- const __iconNode$b = [
62335
+ const __iconNode$e = [
62473
62336
  ["path", { d: "M13 21h8", key: "1jsn5i" }],
62474
62337
  [
62475
62338
  "path",
@@ -62479,37 +62342,53 @@ const __iconNode$b = [
62479
62342
  }
62480
62343
  ]
62481
62344
  ];
62482
- const PenLine = createLucideIcon("pen-line", __iconNode$b);
62345
+ const PenLine = createLucideIcon("pen-line", __iconNode$e);
62483
62346
  /**
62484
62347
  * @license lucide-react v0.575.0 - ISC
62485
62348
  *
62486
62349
  * This source code is licensed under the ISC license.
62487
62350
  * See the LICENSE file in the root directory of this source tree.
62488
62351
  */
62489
- const __iconNode$a = [
62352
+ const __iconNode$d = [
62353
+ [
62354
+ "path",
62355
+ {
62356
+ d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
62357
+ key: "10ikf1"
62358
+ }
62359
+ ]
62360
+ ];
62361
+ const Play = createLucideIcon("play", __iconNode$d);
62362
+ /**
62363
+ * @license lucide-react v0.575.0 - ISC
62364
+ *
62365
+ * This source code is licensed under the ISC license.
62366
+ * See the LICENSE file in the root directory of this source tree.
62367
+ */
62368
+ const __iconNode$c = [
62490
62369
  ["path", { d: "M5 12h14", key: "1ays0h" }],
62491
62370
  ["path", { d: "M12 5v14", key: "s699le" }]
62492
62371
  ];
62493
- const Plus = createLucideIcon("plus", __iconNode$a);
62372
+ const Plus = createLucideIcon("plus", __iconNode$c);
62494
62373
  /**
62495
62374
  * @license lucide-react v0.575.0 - ISC
62496
62375
  *
62497
62376
  * This source code is licensed under the ISC license.
62498
62377
  * See the LICENSE file in the root directory of this source tree.
62499
62378
  */
62500
- const __iconNode$9 = [
62379
+ const __iconNode$b = [
62501
62380
  ["path", { d: "M2 3h20", key: "91anmk" }],
62502
62381
  ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
62503
62382
  ["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
62504
62383
  ];
62505
- const Presentation = createLucideIcon("presentation", __iconNode$9);
62384
+ const Presentation = createLucideIcon("presentation", __iconNode$b);
62506
62385
  /**
62507
62386
  * @license lucide-react v0.575.0 - ISC
62508
62387
  *
62509
62388
  * This source code is licensed under the ISC license.
62510
62389
  * See the LICENSE file in the root directory of this source tree.
62511
62390
  */
62512
- const __iconNode$8 = [
62391
+ const __iconNode$a = [
62513
62392
  [
62514
62393
  "path",
62515
62394
  {
@@ -62525,38 +62404,38 @@ const __iconNode$8 = [
62525
62404
  }
62526
62405
  ]
62527
62406
  ];
62528
- const Quote = createLucideIcon("quote", __iconNode$8);
62407
+ const Quote = createLucideIcon("quote", __iconNode$a);
62529
62408
  /**
62530
62409
  * @license lucide-react v0.575.0 - ISC
62531
62410
  *
62532
62411
  * This source code is licensed under the ISC license.
62533
62412
  * See the LICENSE file in the root directory of this source tree.
62534
62413
  */
62535
- const __iconNode$7 = [
62414
+ const __iconNode$9 = [
62536
62415
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
62537
62416
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
62538
62417
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
62539
62418
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
62540
62419
  ];
62541
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
62420
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$9);
62542
62421
  /**
62543
62422
  * @license lucide-react v0.575.0 - ISC
62544
62423
  *
62545
62424
  * This source code is licensed under the ISC license.
62546
62425
  * See the LICENSE file in the root directory of this source tree.
62547
62426
  */
62548
- const __iconNode$6 = [
62427
+ const __iconNode$8 = [
62549
62428
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
62550
62429
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
62551
62430
  ];
62552
- const Search = createLucideIcon("search", __iconNode$6);
62431
+ const Search = createLucideIcon("search", __iconNode$8);
62553
62432
  /**
62554
62433
  * @license lucide-react v0.575.0 - ISC
62555
62434
  *
62556
62435
  * This source code is licensed under the ISC license.
62557
62436
  * See the LICENSE file in the root directory of this source tree.
62558
62437
  */
62559
- const __iconNode$5 = [
62438
+ const __iconNode$7 = [
62560
62439
  [
62561
62440
  "path",
62562
62441
  {
@@ -62566,17 +62445,43 @@ const __iconNode$5 = [
62566
62445
  ],
62567
62446
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
62568
62447
  ];
62569
- const Settings = createLucideIcon("settings", __iconNode$5);
62448
+ const Settings = createLucideIcon("settings", __iconNode$7);
62570
62449
  /**
62571
62450
  * @license lucide-react v0.575.0 - ISC
62572
62451
  *
62573
62452
  * This source code is licensed under the ISC license.
62574
62453
  * See the LICENSE file in the root directory of this source tree.
62575
62454
  */
62576
- const __iconNode$4 = [
62455
+ const __iconNode$6 = [
62577
62456
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
62578
62457
  ];
62579
- const Square = createLucideIcon("square", __iconNode$4);
62458
+ const Square = createLucideIcon("square", __iconNode$6);
62459
+ /**
62460
+ * @license lucide-react v0.575.0 - ISC
62461
+ *
62462
+ * This source code is licensed under the ISC license.
62463
+ * See the LICENSE file in the root directory of this source tree.
62464
+ */
62465
+ const __iconNode$5 = [
62466
+ ["path", { d: "M15 3v18", key: "14nvp0" }],
62467
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
62468
+ ["path", { d: "M21 9H3", key: "1338ky" }],
62469
+ ["path", { d: "M21 15H3", key: "9uk58r" }]
62470
+ ];
62471
+ const TableProperties = createLucideIcon("table-properties", __iconNode$5);
62472
+ /**
62473
+ * @license lucide-react v0.575.0 - ISC
62474
+ *
62475
+ * This source code is licensed under the ISC license.
62476
+ * See the LICENSE file in the root directory of this source tree.
62477
+ */
62478
+ const __iconNode$4 = [
62479
+ ["path", { d: "M12 3v18", key: "108xh3" }],
62480
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
62481
+ ["path", { d: "M3 9h18", key: "1pudct" }],
62482
+ ["path", { d: "M3 15h18", key: "5xshup" }]
62483
+ ];
62484
+ const Table = createLucideIcon("table", __iconNode$4);
62580
62485
  /**
62581
62486
  * @license lucide-react v0.575.0 - ISC
62582
62487
  *
@@ -62643,6 +62548,10 @@ function CollapsibleContent({ ...props }) {
62643
62548
  return /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent$1, { "data-slot": "collapsible-content", ...props });
62644
62549
  }
62645
62550
  const ANIMATION_DURATION = 200;
62551
+ function truncateLine(text2, max2 = 70) {
62552
+ const oneLine = text2.replace(/\s+/g, " ").trim();
62553
+ return oneLine.length > max2 ? `${oneLine.slice(0, max2)}...` : oneLine;
62554
+ }
62646
62555
  const TOOL_META = {
62647
62556
  // Search & Browse
62648
62557
  search: { displayName: "Searching the web", icon: Search, describer: (a) => a.query ? `"${a.query}"` : "" },
@@ -62674,9 +62583,13 @@ const TOOL_META = {
62674
62583
  execute_presentation_code: { displayName: "Generating slides", icon: Monitor },
62675
62584
  // Code & Data
62676
62585
  run_python_code: { displayName: "Running analysis", icon: Code },
62677
- run_sql_query_tool: { displayName: "Querying data", icon: Database },
62586
+ run_sql_query_tool: { displayName: "Running SQL query", icon: Database, describer: (a) => a.sql_query ?? a.query ?? a.sql ? `"${truncateLine(a.sql_query ?? a.query ?? a.sql)}"` : "" },
62587
+ run_database_sql: { displayName: "Running SQL query", icon: Database, describer: (a) => a.sql_query ?? a.query ?? a.sql ? `"${truncateLine(a.sql_query ?? a.query ?? a.sql)}"` : "" },
62588
+ run_sql: { displayName: "Running SQL query", icon: Database, describer: (a) => a.sql_query ?? a.query ?? a.sql ? `"${truncateLine(a.sql_query ?? a.query ?? a.sql)}"` : "" },
62678
62589
  create_database: { displayName: "Setting up database", icon: Database },
62679
- run_database_sql: { displayName: "Querying database", icon: Database },
62590
+ describe_database: { displayName: "Inspecting database", icon: Database },
62591
+ list_database_tables: { displayName: "Listing database tables", icon: Database },
62592
+ get_database_table_schema: { displayName: "Reading table schema", icon: Database, describer: (a) => a.table_name ?? "" },
62680
62593
  computer_asset_exec: { displayName: "Running command", icon: Monitor },
62681
62594
  // Notebooks
62682
62595
  create_new_notebook: { displayName: "Creating notebook", icon: BookOpen },
@@ -64611,6 +64524,497 @@ const OpenAssetToolUI = React.memo(
64611
64524
  OpenAssetToolUIImpl
64612
64525
  );
64613
64526
  OpenAssetToolUI.displayName = "OpenAssetToolUI";
64527
+ const DescribeDatabaseToolUIImpl = ({
64528
+ toolName,
64529
+ args,
64530
+ result,
64531
+ status
64532
+ }) => {
64533
+ const typedArgs = args;
64534
+ const data = React.useMemo(() => normalizeResult(result), [result]);
64535
+ const title = typeof (data == null ? void 0 : data.title) === "string" ? data.title : null;
64536
+ const provider = typeof (data == null ? void 0 : data.provider) === "string" ? data.provider : null;
64537
+ const databaseName = typeof (data == null ? void 0 : data.database_name) === "string" ? data.database_name : null;
64538
+ const tableCount = typeof (data == null ? void 0 : data.table_count) === "number" ? data.table_count : null;
64539
+ const dbStatus = typeof (data == null ? void 0 : data.status) === "string" ? data.status : null;
64540
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64541
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64542
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64543
+ return /* @__PURE__ */ jsxRuntime.jsx(
64544
+ ToolCard,
64545
+ {
64546
+ icon: Database,
64547
+ status: (status == null ? void 0 : status.type) ?? "complete",
64548
+ title: isRunning ? "Inspecting database..." : title ? `Database: ${title}` : "Database overview",
64549
+ subtitle: databaseName ?? void 0,
64550
+ toolName,
64551
+ args: typedArgs,
64552
+ result,
64553
+ badge: isComplete && tableCount !== null ? `${tableCount} ${tableCount === 1 ? "table" : "tables"}` : void 0,
64554
+ error: errorMsg,
64555
+ children: isComplete && (title || provider || databaseName || dbStatus) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 text-[11px]", children: [
64556
+ title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64557
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-muted-foreground", children: "Name" }),
64558
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground/80", children: title })
64559
+ ] }),
64560
+ provider && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64561
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-muted-foreground", children: "Provider" }),
64562
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground/80 capitalize", children: provider })
64563
+ ] }),
64564
+ databaseName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64565
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-muted-foreground", children: "Database" }),
64566
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-foreground/80", children: databaseName })
64567
+ ] }),
64568
+ dbStatus && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64569
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-muted-foreground", children: "Status" }),
64570
+ /* @__PURE__ */ jsxRuntime.jsxs(
64571
+ "span",
64572
+ {
64573
+ className: cn(
64574
+ "inline-flex w-fit items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium capitalize",
64575
+ dbStatus === "active" ? "bg-emerald-50 text-emerald-700" : "bg-muted text-muted-foreground"
64576
+ ),
64577
+ children: [
64578
+ /* @__PURE__ */ jsxRuntime.jsx(
64579
+ "span",
64580
+ {
64581
+ className: cn(
64582
+ "size-1.5 rounded-full",
64583
+ dbStatus === "active" ? "bg-emerald-500" : "bg-muted-foreground"
64584
+ )
64585
+ }
64586
+ ),
64587
+ dbStatus
64588
+ ]
64589
+ }
64590
+ )
64591
+ ] })
64592
+ ] }) })
64593
+ }
64594
+ );
64595
+ };
64596
+ const DescribeDatabaseToolUI = React.memo(
64597
+ DescribeDatabaseToolUIImpl
64598
+ );
64599
+ DescribeDatabaseToolUI.displayName = "DescribeDatabaseToolUI";
64600
+ const ListDatabaseTablesToolUIImpl = ({
64601
+ toolName,
64602
+ args,
64603
+ result,
64604
+ status
64605
+ }) => {
64606
+ const typedArgs = args;
64607
+ const data = React.useMemo(() => normalizeResult(result), [result]);
64608
+ const tables = React.useMemo(() => {
64609
+ if (!data || !Array.isArray(data.tables)) return [];
64610
+ return data.tables.map((t) => {
64611
+ const item = t ?? {};
64612
+ return {
64613
+ table_name: typeof item.table_name === "string" ? item.table_name : "",
64614
+ schema_name: typeof item.schema_name === "string" ? item.schema_name : void 0,
64615
+ row_count: typeof item.row_count === "number" ? item.row_count : void 0
64616
+ };
64617
+ });
64618
+ }, [data]);
64619
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64620
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64621
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64622
+ return /* @__PURE__ */ jsxRuntime.jsx(
64623
+ ToolCard,
64624
+ {
64625
+ icon: Table,
64626
+ status: (status == null ? void 0 : status.type) ?? "complete",
64627
+ title: isRunning ? "Listing database tables..." : "Database tables",
64628
+ toolName,
64629
+ args: typedArgs,
64630
+ result,
64631
+ badge: isComplete && tables.length > 0 ? `${tables.length} ${tables.length === 1 ? "table" : "tables"}` : void 0,
64632
+ error: errorMsg,
64633
+ children: isComplete && tables.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
64634
+ ExpandableSection,
64635
+ {
64636
+ label: "Show tables",
64637
+ defaultOpen: tables.length <= 10,
64638
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children: tables.map((t) => {
64639
+ const qualified = t.schema_name ? `${t.schema_name}.${t.table_name}` : t.table_name;
64640
+ return /* @__PURE__ */ jsxRuntime.jsxs(
64641
+ "div",
64642
+ {
64643
+ className: "flex items-center justify-between gap-3 rounded-md px-2 py-1 hover:bg-muted/40",
64644
+ children: [
64645
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
64646
+ /* @__PURE__ */ jsxRuntime.jsx(Table, { className: "size-3 shrink-0 text-muted-foreground/60" }),
64647
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-[12px] text-foreground/90", children: qualified })
64648
+ ] }),
64649
+ t.row_count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: [
64650
+ t.row_count.toLocaleString(),
64651
+ " ",
64652
+ t.row_count === 1 ? "row" : "rows"
64653
+ ] })
64654
+ ]
64655
+ },
64656
+ qualified
64657
+ );
64658
+ }) })
64659
+ }
64660
+ )
64661
+ }
64662
+ );
64663
+ };
64664
+ const ListDatabaseTablesToolUI = React.memo(
64665
+ ListDatabaseTablesToolUIImpl
64666
+ );
64667
+ ListDatabaseTablesToolUI.displayName = "ListDatabaseTablesToolUI";
64668
+ const GetDatabaseTableSchemaToolUIImpl = ({
64669
+ toolName,
64670
+ args,
64671
+ result,
64672
+ status
64673
+ }) => {
64674
+ const typedArgs = args;
64675
+ const data = React.useMemo(() => normalizeResult(result), [result]);
64676
+ const tableName = (typeof (data == null ? void 0 : data.table_name) === "string" ? data.table_name : null) ?? (typeof (typedArgs == null ? void 0 : typedArgs.table_name) === "string" ? typedArgs.table_name : null);
64677
+ const schemaName = typeof (data == null ? void 0 : data.schema_name) === "string" ? data.schema_name : null;
64678
+ const columns = React.useMemo(() => {
64679
+ if (!data || !Array.isArray(data.columns)) return [];
64680
+ return data.columns.map((c) => {
64681
+ const item = c ?? {};
64682
+ return {
64683
+ name: typeof item.name === "string" ? item.name : "",
64684
+ data_type: typeof item.data_type === "string" ? item.data_type : "",
64685
+ is_nullable: typeof item.is_nullable === "boolean" ? item.is_nullable : void 0,
64686
+ default_value: typeof item.default_value === "string" ? item.default_value : null,
64687
+ max_length: typeof item.max_length === "number" ? item.max_length : null
64688
+ };
64689
+ });
64690
+ }, [data]);
64691
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64692
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64693
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64694
+ const displayName = tableName ? schemaName ? `${schemaName}.${tableName}` : tableName : null;
64695
+ return /* @__PURE__ */ jsxRuntime.jsx(
64696
+ ToolCard,
64697
+ {
64698
+ icon: TableProperties,
64699
+ status: (status == null ? void 0 : status.type) ?? "complete",
64700
+ title: isRunning ? "Reading table schema..." : displayName ? `Schema: ${displayName}` : "Table schema",
64701
+ toolName,
64702
+ args: typedArgs,
64703
+ result,
64704
+ badge: isComplete && columns.length > 0 ? `${columns.length} ${columns.length === 1 ? "column" : "columns"}` : void 0,
64705
+ error: errorMsg,
64706
+ children: isComplete && columns.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
64707
+ ExpandableSection,
64708
+ {
64709
+ label: "Show columns",
64710
+ defaultOpen: columns.length <= 12,
64711
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-md border border-border/40", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-[11px]", children: [
64712
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
64713
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1.5 text-left font-medium text-muted-foreground", children: "Column" }),
64714
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1.5 text-left font-medium text-muted-foreground", children: "Type" }),
64715
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1.5 text-right font-medium text-muted-foreground", children: "Nullable" })
64716
+ ] }) }),
64717
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: columns.map((col) => {
64718
+ const typeLabel = col.max_length != null ? `${col.data_type}(${col.max_length})` : col.data_type;
64719
+ return /* @__PURE__ */ jsxRuntime.jsxs(
64720
+ "tr",
64721
+ {
64722
+ className: "border-t border-border/30",
64723
+ title: col.default_value ? `default: ${col.default_value}` : void 0,
64724
+ children: [
64725
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "whitespace-nowrap px-2 py-1 font-mono text-foreground/90", children: col.name }),
64726
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "whitespace-nowrap px-2 py-1 text-muted-foreground", children: typeLabel }),
64727
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "whitespace-nowrap px-2 py-1 text-right", children: col.is_nullable === false ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-amber-50 px-1 py-0.5 text-[10px] font-medium text-amber-700", children: "NOT NULL" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/50", children: "—" }) })
64728
+ ]
64729
+ },
64730
+ col.name
64731
+ );
64732
+ }) })
64733
+ ] }) })
64734
+ }
64735
+ )
64736
+ }
64737
+ );
64738
+ };
64739
+ const GetDatabaseTableSchemaToolUI = React.memo(
64740
+ GetDatabaseTableSchemaToolUIImpl
64741
+ );
64742
+ GetDatabaseTableSchemaToolUI.displayName = "GetDatabaseTableSchemaToolUI";
64743
+ const SQL_KEYWORDS = /* @__PURE__ */ new Set([
64744
+ "SELECT",
64745
+ "FROM",
64746
+ "WHERE",
64747
+ "JOIN",
64748
+ "LEFT",
64749
+ "RIGHT",
64750
+ "INNER",
64751
+ "OUTER",
64752
+ "FULL",
64753
+ "CROSS",
64754
+ "ON",
64755
+ "USING",
64756
+ "AND",
64757
+ "OR",
64758
+ "NOT",
64759
+ "IN",
64760
+ "IS",
64761
+ "NULL",
64762
+ "AS",
64763
+ "ORDER",
64764
+ "BY",
64765
+ "GROUP",
64766
+ "HAVING",
64767
+ "LIMIT",
64768
+ "OFFSET",
64769
+ "UNION",
64770
+ "ALL",
64771
+ "DISTINCT",
64772
+ "INSERT",
64773
+ "INTO",
64774
+ "VALUES",
64775
+ "UPDATE",
64776
+ "SET",
64777
+ "DELETE",
64778
+ "CREATE",
64779
+ "TABLE",
64780
+ "DROP",
64781
+ "ALTER",
64782
+ "ADD",
64783
+ "COLUMN",
64784
+ "INDEX",
64785
+ "PRIMARY",
64786
+ "KEY",
64787
+ "FOREIGN",
64788
+ "REFERENCES",
64789
+ "CONSTRAINT",
64790
+ "CASCADE",
64791
+ "CASE",
64792
+ "WHEN",
64793
+ "THEN",
64794
+ "ELSE",
64795
+ "END",
64796
+ "WITH",
64797
+ "RECURSIVE",
64798
+ "ASC",
64799
+ "DESC",
64800
+ "BETWEEN",
64801
+ "LIKE",
64802
+ "ILIKE",
64803
+ "EXISTS",
64804
+ "ANY",
64805
+ "SOME",
64806
+ "RETURNING",
64807
+ "OVER",
64808
+ "PARTITION",
64809
+ "WINDOW"
64810
+ ]);
64811
+ const SQL_FUNCTIONS = /* @__PURE__ */ new Set([
64812
+ "COUNT",
64813
+ "SUM",
64814
+ "AVG",
64815
+ "MIN",
64816
+ "MAX",
64817
+ "ROUND",
64818
+ "CAST",
64819
+ "COALESCE",
64820
+ "NULLIF",
64821
+ "UPPER",
64822
+ "LOWER",
64823
+ "LENGTH",
64824
+ "SUBSTRING",
64825
+ "TRIM",
64826
+ "CONCAT",
64827
+ "DATE",
64828
+ "NOW",
64829
+ "CURRENT_DATE",
64830
+ "CURRENT_TIMESTAMP",
64831
+ "EXTRACT",
64832
+ "DATE_TRUNC",
64833
+ "ROW_NUMBER",
64834
+ "RANK",
64835
+ "DENSE_RANK",
64836
+ "LAG",
64837
+ "LEAD"
64838
+ ]);
64839
+ function highlightSql(code2) {
64840
+ let result = "";
64841
+ let i = 0;
64842
+ while (i < code2.length) {
64843
+ if (code2.slice(i, i + 2) === "--") {
64844
+ const end = code2.indexOf("\n", i);
64845
+ const str = end >= 0 ? code2.slice(i, end) : code2.slice(i);
64846
+ result += `<span style="color:var(--aui-syn-comment, #6a9955)">${escapeHtml(str)}</span>`;
64847
+ i += str.length;
64848
+ continue;
64849
+ }
64850
+ if (code2[i] === "'" || code2[i] === '"') {
64851
+ const q = code2[i];
64852
+ let j = i + 1;
64853
+ while (j < code2.length && code2[j] !== q) {
64854
+ if (code2[j] === "\\") j++;
64855
+ j++;
64856
+ }
64857
+ const str = code2.slice(i, j + 1);
64858
+ result += `<span style="color:var(--aui-syn-string, #ce9178)">${escapeHtml(str)}</span>`;
64859
+ i = j + 1;
64860
+ continue;
64861
+ }
64862
+ if (/\d/.test(code2[i]) && (i === 0 || /[\s(,=[\-+*/:!<>]/.test(code2[i - 1]))) {
64863
+ const m = code2.slice(i).match(/^(\d+\.?\d*)/);
64864
+ if (m) {
64865
+ result += `<span style="color:var(--aui-syn-number, #b5cea8)">${escapeHtml(m[1])}</span>`;
64866
+ i += m[1].length;
64867
+ continue;
64868
+ }
64869
+ }
64870
+ if (/[a-zA-Z_]/.test(code2[i])) {
64871
+ const m = code2.slice(i).match(/^[a-zA-Z_]\w*/);
64872
+ if (m) {
64873
+ const word = m[0];
64874
+ const upper = word.toUpperCase();
64875
+ if (SQL_KEYWORDS.has(upper)) {
64876
+ result += `<span style="color:var(--aui-syn-keyword, #569cd6)">${escapeHtml(word)}</span>`;
64877
+ } else if (SQL_FUNCTIONS.has(upper)) {
64878
+ result += `<span style="color:var(--aui-syn-func, #dcdcaa)">${escapeHtml(word)}</span>`;
64879
+ } else {
64880
+ result += escapeHtml(word);
64881
+ }
64882
+ i += word.length;
64883
+ continue;
64884
+ }
64885
+ }
64886
+ result += escapeHtml(code2[i]);
64887
+ i++;
64888
+ }
64889
+ return result;
64890
+ }
64891
+ const SyntaxHighlightedSql = React.memo(({ code: code2 }) => {
64892
+ const highlighted = React.useMemo(() => highlightSql(code2), [code2]);
64893
+ return /* @__PURE__ */ jsxRuntime.jsx(
64894
+ "pre",
64895
+ {
64896
+ className: "whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono",
64897
+ dangerouslySetInnerHTML: { __html: highlighted }
64898
+ }
64899
+ );
64900
+ });
64901
+ SyntaxHighlightedSql.displayName = "SyntaxHighlightedSql";
64902
+ function parseSqlResult(result) {
64903
+ const empty2 = { columns: [], rows: [], rowCount: null };
64904
+ const data = normalizeResult(result);
64905
+ if (!data) return empty2;
64906
+ const inner = data.result && typeof data.result === "object" && !Array.isArray(data.result) ? data.result : data;
64907
+ const rawRows = inner.rows ?? inner.data ?? inner.records;
64908
+ if (!Array.isArray(rawRows)) return empty2;
64909
+ const rows = rawRows.filter(
64910
+ (r2) => typeof r2 === "object" && r2 !== null && !Array.isArray(r2)
64911
+ );
64912
+ let columns = [];
64913
+ if (Array.isArray(inner.columns)) {
64914
+ columns = inner.columns.map((c) => {
64915
+ if (typeof c === "string") return c;
64916
+ if (c && typeof c === "object") {
64917
+ const name = c.name;
64918
+ return typeof name === "string" ? name : null;
64919
+ }
64920
+ return null;
64921
+ }).filter((c) => c !== null);
64922
+ }
64923
+ if (columns.length === 0 && rows.length > 0) {
64924
+ columns = Object.keys(rows[0]);
64925
+ }
64926
+ const rowCount = typeof inner.row_count === "number" ? inner.row_count : typeof inner.rowCount === "number" ? inner.rowCount : rows.length;
64927
+ return { columns, rows, rowCount };
64928
+ }
64929
+ const RunSqlToolUIImpl = ({
64930
+ toolName,
64931
+ args,
64932
+ result,
64933
+ status
64934
+ }) => {
64935
+ const typedArgs = args;
64936
+ const sqlQuery = (typedArgs == null ? void 0 : typedArgs.sql_query) ?? (typedArgs == null ? void 0 : typedArgs.query) ?? (typedArgs == null ? void 0 : typedArgs.sql) ?? "";
64937
+ const trimmedQuery = sqlQuery.trim();
64938
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64939
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64940
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64941
+ const parsed = React.useMemo(
64942
+ () => isComplete ? parseSqlResult(result) : null,
64943
+ [result, isComplete]
64944
+ );
64945
+ const querySubtitle = React.useMemo(() => {
64946
+ if (!trimmedQuery) return void 0;
64947
+ const oneLine = trimmedQuery.replace(/\s+/g, " ");
64948
+ return truncate(oneLine, 80);
64949
+ }, [trimmedQuery]);
64950
+ return /* @__PURE__ */ jsxRuntime.jsxs(
64951
+ ToolCard,
64952
+ {
64953
+ icon: Play,
64954
+ status: (status == null ? void 0 : status.type) ?? "complete",
64955
+ title: isRunning ? "Running SQL query..." : "SQL query",
64956
+ subtitle: querySubtitle,
64957
+ toolName,
64958
+ args: typedArgs,
64959
+ result,
64960
+ badge: isComplete && parsed && parsed.rowCount !== null ? `${parsed.rowCount} ${parsed.rowCount === 1 ? "row" : "rows"}` : void 0,
64961
+ error: errorMsg,
64962
+ children: [
64963
+ trimmedQuery && /* @__PURE__ */ jsxRuntime.jsx(
64964
+ ExpandableSection,
64965
+ {
64966
+ label: "Show query",
64967
+ defaultOpen: isComplete && (!parsed || parsed.rows.length === 0),
64968
+ children: /* @__PURE__ */ jsxRuntime.jsx(SyntaxHighlightedSql, { code: trimmedQuery })
64969
+ }
64970
+ ),
64971
+ isComplete && parsed && parsed.rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40", children: [
64972
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-72 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-[11px]", children: [
64973
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "sticky top-0 bg-muted/60 backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: parsed.columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
64974
+ "th",
64975
+ {
64976
+ className: "whitespace-nowrap px-2 py-1.5 text-left font-medium text-muted-foreground",
64977
+ children: col
64978
+ },
64979
+ col
64980
+ )) }) }),
64981
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: parsed.rows.slice(0, 50).map((row, i) => /* @__PURE__ */ jsxRuntime.jsx(
64982
+ "tr",
64983
+ {
64984
+ className: "border-t border-border/30 hover:bg-muted/20",
64985
+ children: parsed.columns.map((col) => {
64986
+ const value = row[col];
64987
+ const isNull = value === null || value === void 0;
64988
+ const str = isNull ? "" : typeof value === "object" ? JSON.stringify(value) : String(value);
64989
+ return /* @__PURE__ */ jsxRuntime.jsx(
64990
+ "td",
64991
+ {
64992
+ className: "max-w-[240px] truncate whitespace-nowrap px-2 py-1 text-foreground/80",
64993
+ title: isNull ? "null" : str,
64994
+ children: isNull ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic text-muted-foreground/60", children: "null" }) : str
64995
+ },
64996
+ col
64997
+ );
64998
+ })
64999
+ },
65000
+ i
65001
+ )) })
65002
+ ] }) }),
65003
+ parsed.rows.length > 50 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/30 px-4 py-1.5 text-[10px] text-muted-foreground", children: [
65004
+ "Showing first 50 of ",
65005
+ parsed.rows.length,
65006
+ " rows"
65007
+ ] })
65008
+ ] }),
65009
+ isComplete && parsed && parsed.rows.length === 0 && parsed.rowCount === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] italic text-muted-foreground", children: "Query returned no rows" }) })
65010
+ ]
65011
+ }
65012
+ );
65013
+ };
65014
+ const RunSqlToolUI = React.memo(
65015
+ RunSqlToolUIImpl
65016
+ );
65017
+ RunSqlToolUI.displayName = "RunSqlToolUI";
64614
65018
  function createAssetToolUI(config2) {
64615
65019
  const Component = (props) => /* @__PURE__ */ jsxRuntime.jsx(
64616
65020
  CreateAssetToolUIImpl,
@@ -64640,7 +65044,14 @@ const TOOL_UI_REGISTRY = {
64640
65044
  create_new_notebook: CreateNotebookToolUI,
64641
65045
  execute_presentation_code: ExecutePresentationCodeToolUI,
64642
65046
  run_python_code: RunPythonCodeToolUI,
64643
- open_asset_in_workspace: OpenAssetToolUI
65047
+ open_asset_in_workspace: OpenAssetToolUI,
65048
+ // Database toolkit
65049
+ describe_database: DescribeDatabaseToolUI,
65050
+ list_database_tables: ListDatabaseTablesToolUI,
65051
+ get_database_table_schema: GetDatabaseTableSchemaToolUI,
65052
+ run_sql: RunSqlToolUI,
65053
+ run_database_sql: RunSqlToolUI,
65054
+ run_sql_query_tool: RunSqlToolUI
64644
65055
  };
64645
65056
  const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
64646
65057
  const cx = clsx;
@@ -65333,10 +65744,11 @@ const ComposerSendWithQuote = () => {
65333
65744
  const { attachments, clearAttachments, isUploading } = useAttachments();
65334
65745
  const editorRef = useComposerEditorRef();
65335
65746
  const editorEmpty = useComposerEditorEmpty();
65747
+ const isThreadRunning = useAuiState((s) => s.thread.isRunning);
65336
65748
  const hasExtras = !!quote || attachments.length > 0;
65337
65749
  const handleSend = React.useCallback(() => {
65338
65750
  var _a2;
65339
- if (isUploading) return;
65751
+ if (isUploading || isThreadRunning) return;
65340
65752
  const editor = editorRef.current;
65341
65753
  if (!editor && !quote && attachments.length === 0) return;
65342
65754
  const userText = ((_a2 = editor == null ? void 0 : editor.getMarkdown()) == null ? void 0 : _a2.trim()) ?? "";
@@ -65360,7 +65772,7 @@ const ComposerSendWithQuote = () => {
65360
65772
  composerRuntime.send();
65361
65773
  }
65362
65774
  editor == null ? void 0 : editor.clear();
65363
- }, [aui, composerRuntime, quote, attachments, hasExtras, isUploading, clearQuote, clearAttachments, editorRef, appUrl]);
65775
+ }, [aui, composerRuntime, quote, attachments, hasExtras, isUploading, isThreadRunning, clearQuote, clearAttachments, editorRef, appUrl]);
65364
65776
  return /* @__PURE__ */ jsxRuntime.jsx(
65365
65777
  TooltipIconButton,
65366
65778
  {
@@ -65372,7 +65784,7 @@ const ComposerSendWithQuote = () => {
65372
65784
  className: "aui-composer-send size-8 rounded-full",
65373
65785
  "aria-label": "Send message",
65374
65786
  onClick: handleSend,
65375
- disabled: isUploading || editorEmpty && !hasExtras,
65787
+ disabled: isUploading || isThreadRunning || editorEmpty && !hasExtras,
65376
65788
  children: /* @__PURE__ */ jsxRuntime.jsx(ArrowUp, { className: "aui-composer-send-icon size-4" })
65377
65789
  }
65378
65790
  );
@@ -65390,7 +65802,10 @@ const MessageError = () => /* @__PURE__ */ jsxRuntime.jsx(MessagePrimitiveError,
65390
65802
  }
65391
65803
  ) })
65392
65804
  ] }) });
65393
- const AthenaAssistantMessageEmpty = () => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
65805
+ const AthenaAssistantMessageEmpty = ({ status }) => {
65806
+ if ((status == null ? void 0 : status.type) !== "running") return null;
65807
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
65808
+ };
65394
65809
  const AthenaReasoningPart = ({
65395
65810
  text: text2,
65396
65811
  status,
@@ -66018,8 +66433,6 @@ const Toolkits = {
66018
66433
  MARKETING: "marketing_toolkit",
66019
66434
  /** FDE implementations and workflows. */
66020
66435
  FDE: "fde_toolkit",
66021
- /** Code repository search via Greptile. */
66022
- GREPTILE: "greptile_toolkit",
66023
66436
  /** SharePoint / Google Drive / workspace file access. */
66024
66437
  EXTERNAL_DRIVE: "external_drive_toolkit",
66025
66438
  /** Reusable playbooks and prompts. */
@@ -66057,12 +66470,16 @@ exports.CreateSheetToolUI = CreateSheetToolUI;
66057
66470
  exports.DEFAULT_API_URL = DEFAULT_API_URL;
66058
66471
  exports.DEFAULT_APP_URL = DEFAULT_APP_URL;
66059
66472
  exports.DEFAULT_BACKEND_URL = DEFAULT_BACKEND_URL;
66473
+ exports.DescribeDatabaseToolUI = DescribeDatabaseToolUI;
66060
66474
  exports.EmailSearchToolUI = EmailSearchToolUI;
66061
66475
  exports.ExpandableSection = ExpandableSection;
66062
66476
  exports.FileUploadButton = FileUploadButton;
66477
+ exports.GetDatabaseTableSchemaToolUI = GetDatabaseTableSchemaToolUI;
66478
+ exports.ListDatabaseTablesToolUI = ListDatabaseTablesToolUI;
66063
66479
  exports.OpenAssetToolUI = OpenAssetToolUI;
66064
66480
  exports.ReadAssetToolUI = ReadAssetToolUI;
66065
66481
  exports.RunPythonCodeToolUI = RunPythonCodeToolUI;
66482
+ exports.RunSqlToolUI = RunSqlToolUI;
66066
66483
  exports.TOOL_UI_REGISTRY = TOOL_UI_REGISTRY;
66067
66484
  exports.ThreadList = ThreadList;
66068
66485
  exports.TiptapComposer = TiptapComposer;