@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.js CHANGED
@@ -24314,6 +24314,7 @@ const useAthenaRuntime = (config2) => {
24314
24314
  workbench = [],
24315
24315
  knowledgeBase = [],
24316
24316
  systemPrompt,
24317
+ customToolConfigs,
24317
24318
  threadId: threadIdProp
24318
24319
  } = config2;
24319
24320
  const resolvedResumeApiUrl = resumeApiUrl ?? apiUrl.replace(/\/api\/chat$/, "/api/resume");
@@ -24338,7 +24339,8 @@ const useAthenaRuntime = (config2) => {
24338
24339
  model,
24339
24340
  workbench,
24340
24341
  knowledgeBase,
24341
- systemPrompt
24342
+ systemPrompt,
24343
+ customToolConfigs
24342
24344
  });
24343
24345
  runConfigRef.current = {
24344
24346
  enabledTools,
@@ -24346,7 +24348,8 @@ const useAthenaRuntime = (config2) => {
24346
24348
  model,
24347
24349
  workbench,
24348
24350
  knowledgeBase,
24349
- systemPrompt
24351
+ systemPrompt,
24352
+ customToolConfigs
24350
24353
  };
24351
24354
  const isExistingThread = !!threadIdProp;
24352
24355
  const runtime = useAssistantTransportRuntime({
@@ -24456,7 +24459,8 @@ const useAthenaRuntime = (config2) => {
24456
24459
  plan_mode_enabled: false,
24457
24460
  workbench: currentRunConfig.workbench,
24458
24461
  knowledge_base: currentRunConfig.knowledgeBase,
24459
- ...currentRunConfig.systemPrompt ? { system_prompt: currentRunConfig.systemPrompt } : {}
24462
+ ...currentRunConfig.systemPrompt ? { system_prompt: currentRunConfig.systemPrompt } : {},
24463
+ ...currentRunConfig.customToolConfigs ? { custom_tool_configs: currentRunConfig.customToolConfigs } : {}
24460
24464
  },
24461
24465
  persistToolInvocationLogs: true
24462
24466
  };
@@ -24496,424 +24500,6 @@ const useAthenaRuntime = (config2) => {
24496
24500
  }, [isExistingThread, runtime, threadId, backendUrl]);
24497
24501
  return runtime;
24498
24502
  };
24499
- function createJSONStorage(getStorage, options) {
24500
- let storage;
24501
- try {
24502
- storage = getStorage();
24503
- } catch (e) {
24504
- return;
24505
- }
24506
- const persistStorage = {
24507
- getItem: (name) => {
24508
- var _a2;
24509
- const parse2 = (str2) => {
24510
- if (str2 === null) {
24511
- return null;
24512
- }
24513
- return JSON.parse(str2, void 0);
24514
- };
24515
- const str = (_a2 = storage.getItem(name)) != null ? _a2 : null;
24516
- if (str instanceof Promise) {
24517
- return str.then(parse2);
24518
- }
24519
- return parse2(str);
24520
- },
24521
- setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, void 0)),
24522
- removeItem: (name) => storage.removeItem(name)
24523
- };
24524
- return persistStorage;
24525
- }
24526
- const toThenable = (fn) => (input) => {
24527
- try {
24528
- const result = fn(input);
24529
- if (result instanceof Promise) {
24530
- return result;
24531
- }
24532
- return {
24533
- then(onFulfilled) {
24534
- return toThenable(onFulfilled)(result);
24535
- },
24536
- catch(_onRejected) {
24537
- return this;
24538
- }
24539
- };
24540
- } catch (e) {
24541
- return {
24542
- then(_onFulfilled) {
24543
- return this;
24544
- },
24545
- catch(onRejected) {
24546
- return toThenable(onRejected)(e);
24547
- }
24548
- };
24549
- }
24550
- };
24551
- const persistImpl = (config2, baseOptions) => (set2, get2, api) => {
24552
- let options = {
24553
- storage: createJSONStorage(() => window.localStorage),
24554
- partialize: (state) => state,
24555
- version: 0,
24556
- merge: (persistedState, currentState) => ({
24557
- ...currentState,
24558
- ...persistedState
24559
- }),
24560
- ...baseOptions
24561
- };
24562
- let hasHydrated = false;
24563
- let hydrationVersion = 0;
24564
- const hydrationListeners = /* @__PURE__ */ new Set();
24565
- const finishHydrationListeners = /* @__PURE__ */ new Set();
24566
- let storage = options.storage;
24567
- if (!storage) {
24568
- return config2(
24569
- (...args) => {
24570
- console.warn(
24571
- `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`
24572
- );
24573
- set2(...args);
24574
- },
24575
- get2,
24576
- api
24577
- );
24578
- }
24579
- const setItem = () => {
24580
- const state = options.partialize({ ...get2() });
24581
- return storage.setItem(options.name, {
24582
- state,
24583
- version: options.version
24584
- });
24585
- };
24586
- const savedSetState = api.setState;
24587
- api.setState = (state, replace2) => {
24588
- savedSetState(state, replace2);
24589
- return setItem();
24590
- };
24591
- const configResult = config2(
24592
- (...args) => {
24593
- set2(...args);
24594
- return setItem();
24595
- },
24596
- get2,
24597
- api
24598
- );
24599
- api.getInitialState = () => configResult;
24600
- let stateFromStorage;
24601
- const hydrate = () => {
24602
- var _a2, _b;
24603
- if (!storage) return;
24604
- const currentVersion = ++hydrationVersion;
24605
- hasHydrated = false;
24606
- hydrationListeners.forEach((cb) => {
24607
- var _a22;
24608
- return cb((_a22 = get2()) != null ? _a22 : configResult);
24609
- });
24610
- const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a2 = get2()) != null ? _a2 : configResult)) || void 0;
24611
- return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {
24612
- if (deserializedStorageValue) {
24613
- if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) {
24614
- if (options.migrate) {
24615
- const migration = options.migrate(
24616
- deserializedStorageValue.state,
24617
- deserializedStorageValue.version
24618
- );
24619
- if (migration instanceof Promise) {
24620
- return migration.then((result) => [true, result]);
24621
- }
24622
- return [true, migration];
24623
- }
24624
- console.error(
24625
- `State loaded from storage couldn't be migrated since no migrate function was provided`
24626
- );
24627
- } else {
24628
- return [false, deserializedStorageValue.state];
24629
- }
24630
- }
24631
- return [false, void 0];
24632
- }).then((migrationResult) => {
24633
- var _a22;
24634
- if (currentVersion !== hydrationVersion) {
24635
- return;
24636
- }
24637
- const [migrated, migratedState] = migrationResult;
24638
- stateFromStorage = options.merge(
24639
- migratedState,
24640
- (_a22 = get2()) != null ? _a22 : configResult
24641
- );
24642
- set2(stateFromStorage, true);
24643
- if (migrated) {
24644
- return setItem();
24645
- }
24646
- }).then(() => {
24647
- if (currentVersion !== hydrationVersion) {
24648
- return;
24649
- }
24650
- postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);
24651
- stateFromStorage = get2();
24652
- hasHydrated = true;
24653
- finishHydrationListeners.forEach((cb) => cb(stateFromStorage));
24654
- }).catch((e) => {
24655
- if (currentVersion !== hydrationVersion) {
24656
- return;
24657
- }
24658
- postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);
24659
- });
24660
- };
24661
- api.persist = {
24662
- setOptions: (newOptions) => {
24663
- options = {
24664
- ...options,
24665
- ...newOptions
24666
- };
24667
- if (newOptions.storage) {
24668
- storage = newOptions.storage;
24669
- }
24670
- },
24671
- clearStorage: () => {
24672
- storage == null ? void 0 : storage.removeItem(options.name);
24673
- },
24674
- getOptions: () => options,
24675
- rehydrate: () => hydrate(),
24676
- hasHydrated: () => hasHydrated,
24677
- onHydrate: (cb) => {
24678
- hydrationListeners.add(cb);
24679
- return () => {
24680
- hydrationListeners.delete(cb);
24681
- };
24682
- },
24683
- onFinishHydration: (cb) => {
24684
- finishHydrationListeners.add(cb);
24685
- return () => {
24686
- finishHydrationListeners.delete(cb);
24687
- };
24688
- }
24689
- };
24690
- if (!options.skipHydration) {
24691
- hydrate();
24692
- }
24693
- return stateFromStorage || configResult;
24694
- };
24695
- const persist = persistImpl;
24696
- const useAssetPanelStore = create()(
24697
- persist(
24698
- (set2, get2) => ({
24699
- isOpen: false,
24700
- tabs: [],
24701
- activeTabId: null,
24702
- viewMode: "tabs",
24703
- isFullscreen: false,
24704
- assetPanelHostCount: 0,
24705
- autoOpenGeneration: 0,
24706
- autoOpenedAssets: /* @__PURE__ */ new Map(),
24707
- registerAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: state.assetPanelHostCount + 1 })),
24708
- unregisterAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: Math.max(0, state.assetPanelHostCount - 1) })),
24709
- openAsset: (assetId, meta) => set2((s) => {
24710
- const existing = s.tabs.find((t) => t.id === assetId);
24711
- if (existing) {
24712
- const tabs = meta ? s.tabs.map(
24713
- (t) => t.id === assetId ? { ...t, name: meta.name ?? t.name, type: meta.type ?? t.type } : t
24714
- ) : s.tabs;
24715
- return { isOpen: true, tabs, activeTabId: assetId };
24716
- }
24717
- const newTab = {
24718
- id: assetId,
24719
- name: (meta == null ? void 0 : meta.name) ?? null,
24720
- type: (meta == null ? void 0 : meta.type) ?? "unknown"
24721
- };
24722
- return { isOpen: true, tabs: [...s.tabs, newTab], activeTabId: assetId };
24723
- }),
24724
- closeTab: (assetId) => set2((s) => {
24725
- var _a2;
24726
- const tabs = s.tabs.filter((t) => t.id !== assetId);
24727
- if (tabs.length === 0) {
24728
- return { isOpen: false, tabs: [], activeTabId: null, isFullscreen: false };
24729
- }
24730
- 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;
24731
- return { tabs, activeTabId };
24732
- }),
24733
- setActiveTab: (assetId) => set2({ activeTabId: assetId, viewMode: "tabs" }),
24734
- setViewMode: (mode) => set2({ viewMode: mode }),
24735
- closePanel: () => set2({ isOpen: false, tabs: [], activeTabId: null, viewMode: "tabs", isFullscreen: false }),
24736
- toggleFullscreen: () => set2((s) => ({ isFullscreen: !s.isFullscreen })),
24737
- resetAutoOpen: () => set2((s) => ({ autoOpenGeneration: s.autoOpenGeneration + 1 })),
24738
- markAutoOpened: (assetId) => {
24739
- const state = get2();
24740
- if (state.autoOpenedAssets.get(assetId) === state.autoOpenGeneration) {
24741
- return false;
24742
- }
24743
- state.autoOpenedAssets.set(assetId, state.autoOpenGeneration);
24744
- return true;
24745
- }
24746
- }),
24747
- {
24748
- name: "athena-react-asset-panel",
24749
- partialize: ({
24750
- isOpen,
24751
- tabs,
24752
- activeTabId,
24753
- viewMode,
24754
- isFullscreen
24755
- }) => ({
24756
- isOpen,
24757
- tabs,
24758
- activeTabId,
24759
- viewMode,
24760
- isFullscreen
24761
- }),
24762
- storage: createJSONStorage(() => sessionStorage)
24763
- }
24764
- )
24765
- );
24766
- const THREAD_SNAPSHOT_STORAGE_KEY = "athena-react-asset-panel-thread-snapshots";
24767
- const DEFAULT_ASSET_PANEL_SNAPSHOT = {
24768
- isOpen: false,
24769
- tabs: [],
24770
- activeTabId: null,
24771
- viewMode: "tabs",
24772
- isFullscreen: false
24773
- };
24774
- const useBrowserLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
24775
- const selectAssetPanelSnapshot = (state) => ({
24776
- isOpen: state.isOpen,
24777
- tabs: state.tabs,
24778
- activeTabId: state.activeTabId,
24779
- viewMode: state.viewMode,
24780
- isFullscreen: state.isFullscreen
24781
- });
24782
- const areSnapshotsEqual = (left, right) => {
24783
- if (left.isOpen !== right.isOpen || left.activeTabId !== right.activeTabId || left.viewMode !== right.viewMode || left.isFullscreen !== right.isFullscreen || left.tabs.length !== right.tabs.length) {
24784
- return false;
24785
- }
24786
- return left.tabs.every((tab, index2) => {
24787
- const otherTab = right.tabs[index2];
24788
- return otherTab !== void 0 && tab.id === otherTab.id && tab.name === otherTab.name && tab.type === otherTab.type;
24789
- });
24790
- };
24791
- const getSessionStorage = () => {
24792
- if (typeof window === "undefined") {
24793
- return null;
24794
- }
24795
- try {
24796
- return sessionStorage;
24797
- } catch {
24798
- return null;
24799
- }
24800
- };
24801
- const readAllThreadSnapshots = () => {
24802
- const storage = getSessionStorage();
24803
- if (!storage) {
24804
- return {};
24805
- }
24806
- try {
24807
- const raw = storage.getItem(THREAD_SNAPSHOT_STORAGE_KEY);
24808
- if (!raw) {
24809
- return {};
24810
- }
24811
- const parsed = JSON.parse(raw);
24812
- if (!parsed || typeof parsed !== "object") {
24813
- return {};
24814
- }
24815
- return parsed;
24816
- } catch {
24817
- return {};
24818
- }
24819
- };
24820
- const writeAllThreadSnapshots = (snapshots) => {
24821
- const storage = getSessionStorage();
24822
- if (!storage) {
24823
- return;
24824
- }
24825
- try {
24826
- storage.setItem(THREAD_SNAPSHOT_STORAGE_KEY, JSON.stringify(snapshots));
24827
- } catch {
24828
- }
24829
- };
24830
- const readThreadSnapshot = (threadInfo) => {
24831
- const snapshots = readAllThreadSnapshots();
24832
- if (threadInfo.remoteId && snapshots[threadInfo.remoteId]) {
24833
- return snapshots[threadInfo.remoteId];
24834
- }
24835
- return snapshots[threadInfo.threadId] ?? DEFAULT_ASSET_PANEL_SNAPSHOT;
24836
- };
24837
- const writeThreadSnapshot = (threadInfo, snapshot) => {
24838
- const keys2 = [threadInfo.threadId, threadInfo.remoteId].filter(
24839
- (value) => Boolean(value)
24840
- );
24841
- if (keys2.length === 0) {
24842
- return;
24843
- }
24844
- const snapshots = readAllThreadSnapshots();
24845
- let didChange = false;
24846
- for (const key of keys2) {
24847
- if (areSnapshotsEqual(snapshots[key] ?? DEFAULT_ASSET_PANEL_SNAPSHOT, snapshot)) {
24848
- continue;
24849
- }
24850
- snapshots[key] = snapshot;
24851
- didChange = true;
24852
- }
24853
- if (didChange) {
24854
- writeAllThreadSnapshots(snapshots);
24855
- }
24856
- };
24857
- function AssetPanelThreadPersistence() {
24858
- const mainThreadId = useAuiState((state) => state.threads.mainThreadId);
24859
- const activeRemoteId = useAuiState((state) => {
24860
- const activeThread = state.threads.threadItems.find(
24861
- (thread) => thread.id === state.threads.mainThreadId
24862
- );
24863
- return (activeThread == null ? void 0 : activeThread.remoteId) ?? null;
24864
- });
24865
- const panelSnapshot = useAssetPanelStore(selectAssetPanelSnapshot);
24866
- const previousThreadRef = useRef(null);
24867
- const pendingPersistSkipKeyRef = useRef(null);
24868
- useBrowserLayoutEffect(() => {
24869
- if (!mainThreadId) {
24870
- return;
24871
- }
24872
- const activeThread = {
24873
- threadId: mainThreadId,
24874
- remoteId: activeRemoteId
24875
- };
24876
- const previousThread = previousThreadRef.current;
24877
- const didThreadChange = !previousThread || previousThread.threadId !== activeThread.threadId || previousThread.remoteId !== activeThread.remoteId;
24878
- if (!didThreadChange) {
24879
- return;
24880
- }
24881
- if (previousThread) {
24882
- writeThreadSnapshot(
24883
- previousThread,
24884
- selectAssetPanelSnapshot(useAssetPanelStore.getState())
24885
- );
24886
- }
24887
- previousThreadRef.current = activeThread;
24888
- pendingPersistSkipKeyRef.current = activeThread.remoteId ?? activeThread.threadId;
24889
- const snapshotToRestore = readThreadSnapshot(activeThread);
24890
- const currentSnapshot = selectAssetPanelSnapshot(useAssetPanelStore.getState());
24891
- if (!areSnapshotsEqual(currentSnapshot, snapshotToRestore)) {
24892
- useAssetPanelStore.setState((state) => ({
24893
- ...state,
24894
- ...snapshotToRestore
24895
- }));
24896
- }
24897
- }, [mainThreadId, activeRemoteId]);
24898
- useEffect(() => {
24899
- if (!mainThreadId) {
24900
- return;
24901
- }
24902
- const activeThreadKey = activeRemoteId ?? mainThreadId;
24903
- if (pendingPersistSkipKeyRef.current === activeThreadKey) {
24904
- pendingPersistSkipKeyRef.current = null;
24905
- return;
24906
- }
24907
- writeThreadSnapshot(
24908
- {
24909
- threadId: mainThreadId,
24910
- remoteId: activeRemoteId
24911
- },
24912
- panelSnapshot
24913
- );
24914
- }, [mainThreadId, activeRemoteId, panelSnapshot]);
24915
- return null;
24916
- }
24917
24503
  function TooltipProvider({
24918
24504
  delayDuration = 0,
24919
24505
  ...props
@@ -25302,6 +24888,7 @@ function AthenaStandalone({
25302
24888
  workbench,
25303
24889
  knowledgeBase,
25304
24890
  systemPrompt,
24891
+ customToolConfigs,
25305
24892
  threadId,
25306
24893
  linkClicks,
25307
24894
  citationLinks
@@ -25320,6 +24907,7 @@ function AthenaStandalone({
25320
24907
  workbench,
25321
24908
  knowledgeBase,
25322
24909
  systemPrompt,
24910
+ customToolConfigs,
25323
24911
  threadId
25324
24912
  });
25325
24913
  const athenaConfig = useAthenaConfigValue({
@@ -25346,6 +24934,7 @@ function useAthenaRuntimeHook(config2) {
25346
24934
  workbench: config2.workbench,
25347
24935
  knowledgeBase: config2.knowledgeBase,
25348
24936
  systemPrompt: config2.systemPrompt,
24937
+ customToolConfigs: config2.customToolConfigs,
25349
24938
  threadId: remoteId
25350
24939
  });
25351
24940
  }
@@ -25364,6 +24953,7 @@ function AthenaWithThreadList({
25364
24953
  workbench,
25365
24954
  knowledgeBase,
25366
24955
  systemPrompt,
24956
+ customToolConfigs,
25367
24957
  linkClicks,
25368
24958
  citationLinks
25369
24959
  }) {
@@ -25383,7 +24973,8 @@ function AthenaWithThreadList({
25383
24973
  frontendToolIds,
25384
24974
  workbench,
25385
24975
  knowledgeBase,
25386
- systemPrompt
24976
+ systemPrompt,
24977
+ customToolConfigs
25387
24978
  });
25388
24979
  runtimeConfigRef.current = {
25389
24980
  apiUrl,
@@ -25396,7 +24987,8 @@ function AthenaWithThreadList({
25396
24987
  frontendToolIds,
25397
24988
  workbench,
25398
24989
  knowledgeBase,
25399
- systemPrompt
24990
+ systemPrompt,
24991
+ customToolConfigs
25400
24992
  };
25401
24993
  const runtimeHook = useCallback(
25402
24994
  () => useAthenaRuntimeHook(runtimeConfigRef.current),
@@ -25434,10 +25026,7 @@ function AthenaWithThreadList({
25434
25026
  linkClicks,
25435
25027
  citationLinks
25436
25028
  });
25437
- return /* @__PURE__ */ jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsx(ThreadListRefreshContext.Provider, { value: handleRefresh, children: /* @__PURE__ */ jsxs(TooltipProvider, { children: [
25438
- /* @__PURE__ */ jsx(AssetPanelThreadPersistence, {}),
25439
- children
25440
- ] }) }) }) });
25029
+ return /* @__PURE__ */ jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsx(ThreadListRefreshContext.Provider, { value: handleRefresh, children: /* @__PURE__ */ jsx(TooltipProvider, { children }) }) }) });
25441
25030
  }
25442
25031
  function AthenaProvider({
25443
25032
  children,
@@ -25455,6 +25044,7 @@ function AthenaProvider({
25455
25044
  workbench,
25456
25045
  knowledgeBase,
25457
25046
  systemPrompt,
25047
+ customToolConfigs,
25458
25048
  threadId: threadIdProp,
25459
25049
  enableThreadList = false,
25460
25050
  theme,
@@ -25506,6 +25096,7 @@ function AthenaProvider({
25506
25096
  workbench,
25507
25097
  knowledgeBase,
25508
25098
  systemPrompt,
25099
+ customToolConfigs,
25509
25100
  linkClicks,
25510
25101
  citationLinks,
25511
25102
  children
@@ -25528,6 +25119,7 @@ function AthenaProvider({
25528
25119
  workbench,
25529
25120
  knowledgeBase,
25530
25121
  systemPrompt,
25122
+ customToolConfigs,
25531
25123
  threadId: threadIdProp,
25532
25124
  linkClicks,
25533
25125
  citationLinks,
@@ -58427,10 +58019,10 @@ function childNodes(node) {
58427
58019
  var _node$content$content, _node$content;
58428
58020
  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 : [];
58429
58021
  }
58430
- const Table = Node3.create({
58022
+ const Table$1 = Node3.create({
58431
58023
  name: "table"
58432
58024
  });
58433
- const Table$1 = Table.extend({
58025
+ const Table$1$1 = Table$1.extend({
58434
58026
  /**
58435
58027
  * @return {{markdown: MarkdownNodeSpec}}
58436
58028
  */
@@ -58659,7 +58251,7 @@ const Strike$1 = Strike.extend({
58659
58251
  };
58660
58252
  }
58661
58253
  });
58662
- 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];
58254
+ 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];
58663
58255
  function getMarkdownSpec(extension) {
58664
58256
  var _extension$storage, _markdownExtensions$f;
58665
58257
  const markdownSpec = (_extension$storage = extension.storage) === null || _extension$storage === void 0 ? void 0 : _extension$storage.markdown;
@@ -59190,6 +58782,273 @@ const MentionExtension = Node3.create({
59190
58782
  };
59191
58783
  }
59192
58784
  });
58785
+ function createJSONStorage(getStorage, options) {
58786
+ let storage;
58787
+ try {
58788
+ storage = getStorage();
58789
+ } catch (e) {
58790
+ return;
58791
+ }
58792
+ const persistStorage = {
58793
+ getItem: (name) => {
58794
+ var _a2;
58795
+ const parse2 = (str2) => {
58796
+ if (str2 === null) {
58797
+ return null;
58798
+ }
58799
+ return JSON.parse(str2, void 0);
58800
+ };
58801
+ const str = (_a2 = storage.getItem(name)) != null ? _a2 : null;
58802
+ if (str instanceof Promise) {
58803
+ return str.then(parse2);
58804
+ }
58805
+ return parse2(str);
58806
+ },
58807
+ setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, void 0)),
58808
+ removeItem: (name) => storage.removeItem(name)
58809
+ };
58810
+ return persistStorage;
58811
+ }
58812
+ const toThenable = (fn) => (input) => {
58813
+ try {
58814
+ const result = fn(input);
58815
+ if (result instanceof Promise) {
58816
+ return result;
58817
+ }
58818
+ return {
58819
+ then(onFulfilled) {
58820
+ return toThenable(onFulfilled)(result);
58821
+ },
58822
+ catch(_onRejected) {
58823
+ return this;
58824
+ }
58825
+ };
58826
+ } catch (e) {
58827
+ return {
58828
+ then(_onFulfilled) {
58829
+ return this;
58830
+ },
58831
+ catch(onRejected) {
58832
+ return toThenable(onRejected)(e);
58833
+ }
58834
+ };
58835
+ }
58836
+ };
58837
+ const persistImpl = (config2, baseOptions) => (set2, get2, api) => {
58838
+ let options = {
58839
+ storage: createJSONStorage(() => window.localStorage),
58840
+ partialize: (state) => state,
58841
+ version: 0,
58842
+ merge: (persistedState, currentState) => ({
58843
+ ...currentState,
58844
+ ...persistedState
58845
+ }),
58846
+ ...baseOptions
58847
+ };
58848
+ let hasHydrated = false;
58849
+ let hydrationVersion = 0;
58850
+ const hydrationListeners = /* @__PURE__ */ new Set();
58851
+ const finishHydrationListeners = /* @__PURE__ */ new Set();
58852
+ let storage = options.storage;
58853
+ if (!storage) {
58854
+ return config2(
58855
+ (...args) => {
58856
+ console.warn(
58857
+ `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`
58858
+ );
58859
+ set2(...args);
58860
+ },
58861
+ get2,
58862
+ api
58863
+ );
58864
+ }
58865
+ const setItem = () => {
58866
+ const state = options.partialize({ ...get2() });
58867
+ return storage.setItem(options.name, {
58868
+ state,
58869
+ version: options.version
58870
+ });
58871
+ };
58872
+ const savedSetState = api.setState;
58873
+ api.setState = (state, replace2) => {
58874
+ savedSetState(state, replace2);
58875
+ return setItem();
58876
+ };
58877
+ const configResult = config2(
58878
+ (...args) => {
58879
+ set2(...args);
58880
+ return setItem();
58881
+ },
58882
+ get2,
58883
+ api
58884
+ );
58885
+ api.getInitialState = () => configResult;
58886
+ let stateFromStorage;
58887
+ const hydrate = () => {
58888
+ var _a2, _b;
58889
+ if (!storage) return;
58890
+ const currentVersion = ++hydrationVersion;
58891
+ hasHydrated = false;
58892
+ hydrationListeners.forEach((cb) => {
58893
+ var _a22;
58894
+ return cb((_a22 = get2()) != null ? _a22 : configResult);
58895
+ });
58896
+ const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a2 = get2()) != null ? _a2 : configResult)) || void 0;
58897
+ return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {
58898
+ if (deserializedStorageValue) {
58899
+ if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) {
58900
+ if (options.migrate) {
58901
+ const migration = options.migrate(
58902
+ deserializedStorageValue.state,
58903
+ deserializedStorageValue.version
58904
+ );
58905
+ if (migration instanceof Promise) {
58906
+ return migration.then((result) => [true, result]);
58907
+ }
58908
+ return [true, migration];
58909
+ }
58910
+ console.error(
58911
+ `State loaded from storage couldn't be migrated since no migrate function was provided`
58912
+ );
58913
+ } else {
58914
+ return [false, deserializedStorageValue.state];
58915
+ }
58916
+ }
58917
+ return [false, void 0];
58918
+ }).then((migrationResult) => {
58919
+ var _a22;
58920
+ if (currentVersion !== hydrationVersion) {
58921
+ return;
58922
+ }
58923
+ const [migrated, migratedState] = migrationResult;
58924
+ stateFromStorage = options.merge(
58925
+ migratedState,
58926
+ (_a22 = get2()) != null ? _a22 : configResult
58927
+ );
58928
+ set2(stateFromStorage, true);
58929
+ if (migrated) {
58930
+ return setItem();
58931
+ }
58932
+ }).then(() => {
58933
+ if (currentVersion !== hydrationVersion) {
58934
+ return;
58935
+ }
58936
+ postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);
58937
+ stateFromStorage = get2();
58938
+ hasHydrated = true;
58939
+ finishHydrationListeners.forEach((cb) => cb(stateFromStorage));
58940
+ }).catch((e) => {
58941
+ if (currentVersion !== hydrationVersion) {
58942
+ return;
58943
+ }
58944
+ postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);
58945
+ });
58946
+ };
58947
+ api.persist = {
58948
+ setOptions: (newOptions) => {
58949
+ options = {
58950
+ ...options,
58951
+ ...newOptions
58952
+ };
58953
+ if (newOptions.storage) {
58954
+ storage = newOptions.storage;
58955
+ }
58956
+ },
58957
+ clearStorage: () => {
58958
+ storage == null ? void 0 : storage.removeItem(options.name);
58959
+ },
58960
+ getOptions: () => options,
58961
+ rehydrate: () => hydrate(),
58962
+ hasHydrated: () => hasHydrated,
58963
+ onHydrate: (cb) => {
58964
+ hydrationListeners.add(cb);
58965
+ return () => {
58966
+ hydrationListeners.delete(cb);
58967
+ };
58968
+ },
58969
+ onFinishHydration: (cb) => {
58970
+ finishHydrationListeners.add(cb);
58971
+ return () => {
58972
+ finishHydrationListeners.delete(cb);
58973
+ };
58974
+ }
58975
+ };
58976
+ if (!options.skipHydration) {
58977
+ hydrate();
58978
+ }
58979
+ return stateFromStorage || configResult;
58980
+ };
58981
+ const persist = persistImpl;
58982
+ const useAssetPanelStore = create()(
58983
+ persist(
58984
+ (set2, get2) => ({
58985
+ isOpen: false,
58986
+ tabs: [],
58987
+ activeTabId: null,
58988
+ viewMode: "tabs",
58989
+ isFullscreen: false,
58990
+ assetPanelHostCount: 0,
58991
+ autoOpenGeneration: 0,
58992
+ autoOpenedAssets: /* @__PURE__ */ new Map(),
58993
+ registerAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: state.assetPanelHostCount + 1 })),
58994
+ unregisterAssetPanelHost: () => set2((state) => ({ assetPanelHostCount: Math.max(0, state.assetPanelHostCount - 1) })),
58995
+ openAsset: (assetId, meta) => set2((s) => {
58996
+ const existing = s.tabs.find((t) => t.id === assetId);
58997
+ if (existing) {
58998
+ const tabs = meta ? s.tabs.map(
58999
+ (t) => t.id === assetId ? { ...t, name: meta.name ?? t.name, type: meta.type ?? t.type } : t
59000
+ ) : s.tabs;
59001
+ return { isOpen: true, tabs, activeTabId: assetId };
59002
+ }
59003
+ const newTab = {
59004
+ id: assetId,
59005
+ name: (meta == null ? void 0 : meta.name) ?? null,
59006
+ type: (meta == null ? void 0 : meta.type) ?? "unknown"
59007
+ };
59008
+ return { isOpen: true, tabs: [...s.tabs, newTab], activeTabId: assetId };
59009
+ }),
59010
+ closeTab: (assetId) => set2((s) => {
59011
+ var _a2;
59012
+ const tabs = s.tabs.filter((t) => t.id !== assetId);
59013
+ if (tabs.length === 0) {
59014
+ return { isOpen: false, tabs: [], activeTabId: null, isFullscreen: false };
59015
+ }
59016
+ 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;
59017
+ return { tabs, activeTabId };
59018
+ }),
59019
+ setActiveTab: (assetId) => set2({ activeTabId: assetId, viewMode: "tabs" }),
59020
+ setViewMode: (mode) => set2({ viewMode: mode }),
59021
+ closePanel: () => set2({ isOpen: false, tabs: [], activeTabId: null, viewMode: "tabs", isFullscreen: false }),
59022
+ toggleFullscreen: () => set2((s) => ({ isFullscreen: !s.isFullscreen })),
59023
+ resetAutoOpen: () => set2((s) => ({ autoOpenGeneration: s.autoOpenGeneration + 1 })),
59024
+ markAutoOpened: (assetId) => {
59025
+ const state = get2();
59026
+ if (state.autoOpenedAssets.get(assetId) === state.autoOpenGeneration) {
59027
+ return false;
59028
+ }
59029
+ state.autoOpenedAssets.set(assetId, state.autoOpenGeneration);
59030
+ return true;
59031
+ }
59032
+ }),
59033
+ {
59034
+ name: "athena-react-asset-panel",
59035
+ partialize: ({
59036
+ isOpen,
59037
+ tabs,
59038
+ activeTabId,
59039
+ viewMode,
59040
+ isFullscreen
59041
+ }) => ({
59042
+ isOpen,
59043
+ tabs,
59044
+ activeTabId,
59045
+ viewMode,
59046
+ isFullscreen
59047
+ }),
59048
+ storage: createJSONStorage(() => sessionStorage)
59049
+ }
59050
+ )
59051
+ );
59193
59052
  const ATHENA_APP_HOSTNAMES = /* @__PURE__ */ new Set(["app.athenaintel.com", "staging-app.athenaintel.com"]);
59194
59053
  const ATHENA_PREVIEW_HOSTNAME_SUFFIX = ".previews.athenaintel.com";
59195
59054
  const ATHENA_WORKSPACE_HOSTNAME_SUFFIXES = [".app.athenaintel.com", ".staging-app.athenaintel.com"];
@@ -61687,9 +61546,13 @@ const TiptapComposer = ({ tools = [] }) => {
61687
61546
  quoteRef.current = quote;
61688
61547
  const isUploadingRef = useRef(isUploading);
61689
61548
  isUploadingRef.current = isUploading;
61549
+ const isThreadRunning = useAuiState((s) => s.thread.isRunning);
61550
+ const isThreadRunningRef = useRef(isThreadRunning);
61551
+ isThreadRunningRef.current = isThreadRunning;
61690
61552
  const handleSubmit = useCallback(() => {
61691
61553
  var _a2;
61692
61554
  if (isUploadingRef.current) return;
61555
+ if (isThreadRunningRef.current) return;
61693
61556
  const editor2 = editorRef.current;
61694
61557
  if (!editor2) return;
61695
61558
  const currentAttachments = attachmentsRef.current;
@@ -61909,40 +61772,40 @@ const createLucideIcon = (iconName, iconNode) => {
61909
61772
  * This source code is licensed under the ISC license.
61910
61773
  * See the LICENSE file in the root directory of this source tree.
61911
61774
  */
61912
- const __iconNode$N = [
61775
+ const __iconNode$Q = [
61913
61776
  ["path", { d: "M12 5v14", key: "s699le" }],
61914
61777
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
61915
61778
  ];
61916
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$N);
61779
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$Q);
61917
61780
  /**
61918
61781
  * @license lucide-react v0.575.0 - ISC
61919
61782
  *
61920
61783
  * This source code is licensed under the ISC license.
61921
61784
  * See the LICENSE file in the root directory of this source tree.
61922
61785
  */
61923
- const __iconNode$M = [
61786
+ const __iconNode$P = [
61924
61787
  ["path", { d: "M5 12h14", key: "1ays0h" }],
61925
61788
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
61926
61789
  ];
61927
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$M);
61790
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$P);
61928
61791
  /**
61929
61792
  * @license lucide-react v0.575.0 - ISC
61930
61793
  *
61931
61794
  * This source code is licensed under the ISC license.
61932
61795
  * See the LICENSE file in the root directory of this source tree.
61933
61796
  */
61934
- const __iconNode$L = [
61797
+ const __iconNode$O = [
61935
61798
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
61936
61799
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
61937
61800
  ];
61938
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$L);
61801
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$O);
61939
61802
  /**
61940
61803
  * @license lucide-react v0.575.0 - ISC
61941
61804
  *
61942
61805
  * This source code is licensed under the ISC license.
61943
61806
  * See the LICENSE file in the root directory of this source tree.
61944
61807
  */
61945
- const __iconNode$K = [
61808
+ const __iconNode$N = [
61946
61809
  ["path", { d: "M12 7v14", key: "1akyts" }],
61947
61810
  [
61948
61811
  "path",
@@ -61952,14 +61815,14 @@ const __iconNode$K = [
61952
61815
  }
61953
61816
  ]
61954
61817
  ];
61955
- const BookOpen = createLucideIcon("book-open", __iconNode$K);
61818
+ const BookOpen = createLucideIcon("book-open", __iconNode$N);
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$J = [
61825
+ const __iconNode$M = [
61963
61826
  ["path", { d: "M12 18V5", key: "adv99a" }],
61964
61827
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
61965
61828
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -61969,170 +61832,170 @@ const __iconNode$J = [
61969
61832
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
61970
61833
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
61971
61834
  ];
61972
- const Brain = createLucideIcon("brain", __iconNode$J);
61835
+ const Brain = createLucideIcon("brain", __iconNode$M);
61973
61836
  /**
61974
61837
  * @license lucide-react v0.575.0 - ISC
61975
61838
  *
61976
61839
  * This source code is licensed under the ISC license.
61977
61840
  * See the LICENSE file in the root directory of this source tree.
61978
61841
  */
61979
- const __iconNode$I = [
61842
+ const __iconNode$L = [
61980
61843
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
61981
61844
  ["path", { d: "M18 17V9", key: "2bz60n" }],
61982
61845
  ["path", { d: "M13 17V5", key: "1frdt8" }],
61983
61846
  ["path", { d: "M8 17v-3", key: "17ska0" }]
61984
61847
  ];
61985
- const ChartColumn = createLucideIcon("chart-column", __iconNode$I);
61848
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$L);
61986
61849
  /**
61987
61850
  * @license lucide-react v0.575.0 - ISC
61988
61851
  *
61989
61852
  * This source code is licensed under the ISC license.
61990
61853
  * See the LICENSE file in the root directory of this source tree.
61991
61854
  */
61992
- const __iconNode$H = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
61993
- const Check = createLucideIcon("check", __iconNode$H);
61855
+ const __iconNode$K = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
61856
+ const Check = createLucideIcon("check", __iconNode$K);
61994
61857
  /**
61995
61858
  * @license lucide-react v0.575.0 - ISC
61996
61859
  *
61997
61860
  * This source code is licensed under the ISC license.
61998
61861
  * See the LICENSE file in the root directory of this source tree.
61999
61862
  */
62000
- const __iconNode$G = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
62001
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$G);
61863
+ const __iconNode$J = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
61864
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$J);
62002
61865
  /**
62003
61866
  * @license lucide-react v0.575.0 - ISC
62004
61867
  *
62005
61868
  * This source code is licensed under the ISC license.
62006
61869
  * See the LICENSE file in the root directory of this source tree.
62007
61870
  */
62008
- const __iconNode$F = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
62009
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$F);
61871
+ const __iconNode$I = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
61872
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$I);
62010
61873
  /**
62011
61874
  * @license lucide-react v0.575.0 - ISC
62012
61875
  *
62013
61876
  * This source code is licensed under the ISC license.
62014
61877
  * See the LICENSE file in the root directory of this source tree.
62015
61878
  */
62016
- const __iconNode$E = [
61879
+ const __iconNode$H = [
62017
61880
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62018
61881
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
62019
61882
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
62020
61883
  ];
62021
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$E);
61884
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$H);
62022
61885
  /**
62023
61886
  * @license lucide-react v0.575.0 - ISC
62024
61887
  *
62025
61888
  * This source code is licensed under the ISC license.
62026
61889
  * See the LICENSE file in the root directory of this source tree.
62027
61890
  */
62028
- const __iconNode$D = [
61891
+ const __iconNode$G = [
62029
61892
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62030
61893
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
62031
61894
  ];
62032
- const CircleCheck = createLucideIcon("circle-check", __iconNode$D);
61895
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$G);
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$C = [
61902
+ const __iconNode$F = [
62040
61903
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62041
61904
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
62042
61905
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
62043
61906
  ];
62044
- const CircleX = createLucideIcon("circle-x", __iconNode$C);
61907
+ const CircleX = createLucideIcon("circle-x", __iconNode$F);
62045
61908
  /**
62046
61909
  * @license lucide-react v0.575.0 - ISC
62047
61910
  *
62048
61911
  * This source code is licensed under the ISC license.
62049
61912
  * See the LICENSE file in the root directory of this source tree.
62050
61913
  */
62051
- const __iconNode$B = [
61914
+ const __iconNode$E = [
62052
61915
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
62053
61916
  ["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" }],
62054
61917
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
62055
61918
  ["path", { d: "M21 14H11", key: "1bme5i" }],
62056
61919
  ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
62057
61920
  ];
62058
- const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$B);
61921
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$E);
62059
61922
  /**
62060
61923
  * @license lucide-react v0.575.0 - ISC
62061
61924
  *
62062
61925
  * This source code is licensed under the ISC license.
62063
61926
  * See the LICENSE file in the root directory of this source tree.
62064
61927
  */
62065
- const __iconNode$A = [
61928
+ const __iconNode$D = [
62066
61929
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
62067
61930
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
62068
61931
  ];
62069
- const Code = createLucideIcon("code", __iconNode$A);
61932
+ const Code = createLucideIcon("code", __iconNode$D);
62070
61933
  /**
62071
61934
  * @license lucide-react v0.575.0 - ISC
62072
61935
  *
62073
61936
  * This source code is licensed under the ISC license.
62074
61937
  * See the LICENSE file in the root directory of this source tree.
62075
61938
  */
62076
- const __iconNode$z = [
61939
+ const __iconNode$C = [
62077
61940
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
62078
61941
  ["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" }]
62079
61942
  ];
62080
- const Copy = createLucideIcon("copy", __iconNode$z);
61943
+ const Copy = createLucideIcon("copy", __iconNode$C);
62081
61944
  /**
62082
61945
  * @license lucide-react v0.575.0 - ISC
62083
61946
  *
62084
61947
  * This source code is licensed under the ISC license.
62085
61948
  * See the LICENSE file in the root directory of this source tree.
62086
61949
  */
62087
- const __iconNode$y = [
61950
+ const __iconNode$B = [
62088
61951
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
62089
61952
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
62090
61953
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
62091
61954
  ];
62092
- const Database = createLucideIcon("database", __iconNode$y);
61955
+ const Database = createLucideIcon("database", __iconNode$B);
62093
61956
  /**
62094
61957
  * @license lucide-react v0.575.0 - ISC
62095
61958
  *
62096
61959
  * This source code is licensed under the ISC license.
62097
61960
  * See the LICENSE file in the root directory of this source tree.
62098
61961
  */
62099
- const __iconNode$x = [
61962
+ const __iconNode$A = [
62100
61963
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
62101
61964
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
62102
61965
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
62103
61966
  ];
62104
- const Download = createLucideIcon("download", __iconNode$x);
61967
+ const Download = createLucideIcon("download", __iconNode$A);
62105
61968
  /**
62106
61969
  * @license lucide-react v0.575.0 - ISC
62107
61970
  *
62108
61971
  * This source code is licensed under the ISC license.
62109
61972
  * See the LICENSE file in the root directory of this source tree.
62110
61973
  */
62111
- const __iconNode$w = [
61974
+ const __iconNode$z = [
62112
61975
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
62113
61976
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
62114
61977
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
62115
61978
  ];
62116
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$w);
61979
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$z);
62117
61980
  /**
62118
61981
  * @license lucide-react v0.575.0 - ISC
62119
61982
  *
62120
61983
  * This source code is licensed under the ISC license.
62121
61984
  * See the LICENSE file in the root directory of this source tree.
62122
61985
  */
62123
- const __iconNode$v = [
61986
+ const __iconNode$y = [
62124
61987
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
62125
61988
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
62126
61989
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
62127
61990
  ];
62128
- const ExternalLink = createLucideIcon("external-link", __iconNode$v);
61991
+ const ExternalLink = createLucideIcon("external-link", __iconNode$y);
62129
61992
  /**
62130
61993
  * @license lucide-react v0.575.0 - ISC
62131
61994
  *
62132
61995
  * This source code is licensed under the ISC license.
62133
61996
  * See the LICENSE file in the root directory of this source tree.
62134
61997
  */
62135
- const __iconNode$u = [
61998
+ const __iconNode$x = [
62136
61999
  [
62137
62000
  "path",
62138
62001
  {
@@ -62144,14 +62007,14 @@ const __iconNode$u = [
62144
62007
  ["path", { d: "M9 15h6", key: "cctwl0" }],
62145
62008
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
62146
62009
  ];
62147
- const FilePlus = createLucideIcon("file-plus", __iconNode$u);
62010
+ const FilePlus = createLucideIcon("file-plus", __iconNode$x);
62148
62011
  /**
62149
62012
  * @license lucide-react v0.575.0 - ISC
62150
62013
  *
62151
62014
  * This source code is licensed under the ISC license.
62152
62015
  * See the LICENSE file in the root directory of this source tree.
62153
62016
  */
62154
- const __iconNode$t = [
62017
+ const __iconNode$w = [
62155
62018
  [
62156
62019
  "path",
62157
62020
  {
@@ -62165,14 +62028,14 @@ const __iconNode$t = [
62165
62028
  ["path", { d: "M8 17h2", key: "2yhykz" }],
62166
62029
  ["path", { d: "M14 17h2", key: "10kma7" }]
62167
62030
  ];
62168
- const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$t);
62031
+ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$w);
62169
62032
  /**
62170
62033
  * @license lucide-react v0.575.0 - ISC
62171
62034
  *
62172
62035
  * This source code is licensed under the ISC license.
62173
62036
  * See the LICENSE file in the root directory of this source tree.
62174
62037
  */
62175
- const __iconNode$s = [
62038
+ const __iconNode$v = [
62176
62039
  [
62177
62040
  "path",
62178
62041
  {
@@ -62185,14 +62048,14 @@ const __iconNode$s = [
62185
62048
  ["path", { d: "M16 13H8", key: "t4e002" }],
62186
62049
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
62187
62050
  ];
62188
- const FileText = createLucideIcon("file-text", __iconNode$s);
62051
+ const FileText = createLucideIcon("file-text", __iconNode$v);
62189
62052
  /**
62190
62053
  * @license lucide-react v0.575.0 - ISC
62191
62054
  *
62192
62055
  * This source code is licensed under the ISC license.
62193
62056
  * See the LICENSE file in the root directory of this source tree.
62194
62057
  */
62195
- const __iconNode$r = [
62058
+ const __iconNode$u = [
62196
62059
  [
62197
62060
  "path",
62198
62061
  {
@@ -62202,14 +62065,14 @@ const __iconNode$r = [
62202
62065
  ],
62203
62066
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
62204
62067
  ];
62205
- const File$1 = createLucideIcon("file", __iconNode$r);
62068
+ const File$1 = createLucideIcon("file", __iconNode$u);
62206
62069
  /**
62207
62070
  * @license lucide-react v0.575.0 - ISC
62208
62071
  *
62209
62072
  * This source code is licensed under the ISC license.
62210
62073
  * See the LICENSE file in the root directory of this source tree.
62211
62074
  */
62212
- const __iconNode$q = [
62075
+ const __iconNode$t = [
62213
62076
  [
62214
62077
  "path",
62215
62078
  {
@@ -62218,38 +62081,38 @@ const __iconNode$q = [
62218
62081
  }
62219
62082
  ]
62220
62083
  ];
62221
- const FolderOpen = createLucideIcon("folder-open", __iconNode$q);
62084
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$t);
62222
62085
  /**
62223
62086
  * @license lucide-react v0.575.0 - ISC
62224
62087
  *
62225
62088
  * This source code is licensed under the ISC license.
62226
62089
  * See the LICENSE file in the root directory of this source tree.
62227
62090
  */
62228
- const __iconNode$p = [
62091
+ const __iconNode$s = [
62229
62092
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62230
62093
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
62231
62094
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
62232
62095
  ];
62233
- const Globe = createLucideIcon("globe", __iconNode$p);
62096
+ const Globe = createLucideIcon("globe", __iconNode$s);
62234
62097
  /**
62235
62098
  * @license lucide-react v0.575.0 - ISC
62236
62099
  *
62237
62100
  * This source code is licensed under the ISC license.
62238
62101
  * See the LICENSE file in the root directory of this source tree.
62239
62102
  */
62240
- const __iconNode$o = [
62103
+ const __iconNode$r = [
62241
62104
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
62242
62105
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
62243
62106
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
62244
62107
  ];
62245
- const Image = createLucideIcon("image", __iconNode$o);
62108
+ const Image = createLucideIcon("image", __iconNode$r);
62246
62109
  /**
62247
62110
  * @license lucide-react v0.575.0 - ISC
62248
62111
  *
62249
62112
  * This source code is licensed under the ISC license.
62250
62113
  * See the LICENSE file in the root directory of this source tree.
62251
62114
  */
62252
- const __iconNode$n = [
62115
+ const __iconNode$q = [
62253
62116
  [
62254
62117
  "path",
62255
62118
  {
@@ -62272,46 +62135,46 @@ const __iconNode$n = [
62272
62135
  }
62273
62136
  ]
62274
62137
  ];
62275
- const Layers = createLucideIcon("layers", __iconNode$n);
62138
+ const Layers = createLucideIcon("layers", __iconNode$q);
62276
62139
  /**
62277
62140
  * @license lucide-react v0.575.0 - ISC
62278
62141
  *
62279
62142
  * This source code is licensed under the ISC license.
62280
62143
  * See the LICENSE file in the root directory of this source tree.
62281
62144
  */
62282
- const __iconNode$m = [
62145
+ const __iconNode$p = [
62283
62146
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
62284
62147
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
62285
62148
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
62286
62149
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
62287
62150
  ];
62288
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$m);
62151
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$p);
62289
62152
  /**
62290
62153
  * @license lucide-react v0.575.0 - ISC
62291
62154
  *
62292
62155
  * This source code is licensed under the ISC license.
62293
62156
  * See the LICENSE file in the root directory of this source tree.
62294
62157
  */
62295
- const __iconNode$l = [
62158
+ const __iconNode$o = [
62296
62159
  ["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" }],
62297
62160
  ["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" }]
62298
62161
  ];
62299
- const Link = createLucideIcon("link", __iconNode$l);
62162
+ const Link = createLucideIcon("link", __iconNode$o);
62300
62163
  /**
62301
62164
  * @license lucide-react v0.575.0 - ISC
62302
62165
  *
62303
62166
  * This source code is licensed under the ISC license.
62304
62167
  * See the LICENSE file in the root directory of this source tree.
62305
62168
  */
62306
- const __iconNode$k = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62307
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$k);
62169
+ const __iconNode$n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62170
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$n);
62308
62171
  /**
62309
62172
  * @license lucide-react v0.575.0 - ISC
62310
62173
  *
62311
62174
  * This source code is licensed under the ISC license.
62312
62175
  * See the LICENSE file in the root directory of this source tree.
62313
62176
  */
62314
- const __iconNode$j = [
62177
+ const __iconNode$m = [
62315
62178
  ["path", { d: "M12 2v4", key: "3427ic" }],
62316
62179
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
62317
62180
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -62321,38 +62184,38 @@ const __iconNode$j = [
62321
62184
  ["path", { d: "M2 12h4", key: "j09sii" }],
62322
62185
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
62323
62186
  ];
62324
- const Loader = createLucideIcon("loader", __iconNode$j);
62187
+ const Loader = createLucideIcon("loader", __iconNode$m);
62325
62188
  /**
62326
62189
  * @license lucide-react v0.575.0 - ISC
62327
62190
  *
62328
62191
  * This source code is licensed under the ISC license.
62329
62192
  * See the LICENSE file in the root directory of this source tree.
62330
62193
  */
62331
- const __iconNode$i = [
62194
+ const __iconNode$l = [
62332
62195
  ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
62333
62196
  ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
62334
62197
  ];
62335
- const Mail = createLucideIcon("mail", __iconNode$i);
62198
+ const Mail = createLucideIcon("mail", __iconNode$l);
62336
62199
  /**
62337
62200
  * @license lucide-react v0.575.0 - ISC
62338
62201
  *
62339
62202
  * This source code is licensed under the ISC license.
62340
62203
  * See the LICENSE file in the root directory of this source tree.
62341
62204
  */
62342
- const __iconNode$h = [
62205
+ const __iconNode$k = [
62343
62206
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
62344
62207
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
62345
62208
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62346
62209
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
62347
62210
  ];
62348
- const Maximize2 = createLucideIcon("maximize-2", __iconNode$h);
62211
+ const Maximize2 = createLucideIcon("maximize-2", __iconNode$k);
62349
62212
  /**
62350
62213
  * @license lucide-react v0.575.0 - ISC
62351
62214
  *
62352
62215
  * This source code is licensed under the ISC license.
62353
62216
  * See the LICENSE file in the root directory of this source tree.
62354
62217
  */
62355
- const __iconNode$g = [
62218
+ const __iconNode$j = [
62356
62219
  [
62357
62220
  "path",
62358
62221
  {
@@ -62361,39 +62224,39 @@ const __iconNode$g = [
62361
62224
  }
62362
62225
  ]
62363
62226
  ];
62364
- const MessageSquare = createLucideIcon("message-square", __iconNode$g);
62227
+ const MessageSquare = createLucideIcon("message-square", __iconNode$j);
62365
62228
  /**
62366
62229
  * @license lucide-react v0.575.0 - ISC
62367
62230
  *
62368
62231
  * This source code is licensed under the ISC license.
62369
62232
  * See the LICENSE file in the root directory of this source tree.
62370
62233
  */
62371
- const __iconNode$f = [
62234
+ const __iconNode$i = [
62372
62235
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
62373
62236
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
62374
62237
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62375
62238
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
62376
62239
  ];
62377
- const Minimize2 = createLucideIcon("minimize-2", __iconNode$f);
62240
+ const Minimize2 = createLucideIcon("minimize-2", __iconNode$i);
62378
62241
  /**
62379
62242
  * @license lucide-react v0.575.0 - ISC
62380
62243
  *
62381
62244
  * This source code is licensed under the ISC license.
62382
62245
  * See the LICENSE file in the root directory of this source tree.
62383
62246
  */
62384
- const __iconNode$e = [
62247
+ const __iconNode$h = [
62385
62248
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
62386
62249
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
62387
62250
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
62388
62251
  ];
62389
- const Monitor = createLucideIcon("monitor", __iconNode$e);
62252
+ const Monitor = createLucideIcon("monitor", __iconNode$h);
62390
62253
  /**
62391
62254
  * @license lucide-react v0.575.0 - ISC
62392
62255
  *
62393
62256
  * This source code is licensed under the ISC license.
62394
62257
  * See the LICENSE file in the root directory of this source tree.
62395
62258
  */
62396
- const __iconNode$d = [
62259
+ const __iconNode$g = [
62397
62260
  ["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" }],
62398
62261
  ["path", { d: "M2 6h4", key: "aawbzj" }],
62399
62262
  ["path", { d: "M2 10h4", key: "l0bgd4" }],
@@ -62407,14 +62270,14 @@ const __iconNode$d = [
62407
62270
  }
62408
62271
  ]
62409
62272
  ];
62410
- const NotebookPen = createLucideIcon("notebook-pen", __iconNode$d);
62273
+ const NotebookPen = createLucideIcon("notebook-pen", __iconNode$g);
62411
62274
  /**
62412
62275
  * @license lucide-react v0.575.0 - ISC
62413
62276
  *
62414
62277
  * This source code is licensed under the ISC license.
62415
62278
  * See the LICENSE file in the root directory of this source tree.
62416
62279
  */
62417
- const __iconNode$c = [
62280
+ const __iconNode$f = [
62418
62281
  [
62419
62282
  "path",
62420
62283
  {
@@ -62423,14 +62286,14 @@ const __iconNode$c = [
62423
62286
  }
62424
62287
  ]
62425
62288
  ];
62426
- const Paperclip = createLucideIcon("paperclip", __iconNode$c);
62289
+ const Paperclip = createLucideIcon("paperclip", __iconNode$f);
62427
62290
  /**
62428
62291
  * @license lucide-react v0.575.0 - ISC
62429
62292
  *
62430
62293
  * This source code is licensed under the ISC license.
62431
62294
  * See the LICENSE file in the root directory of this source tree.
62432
62295
  */
62433
- const __iconNode$b = [
62296
+ const __iconNode$e = [
62434
62297
  ["path", { d: "M13 21h8", key: "1jsn5i" }],
62435
62298
  [
62436
62299
  "path",
@@ -62440,37 +62303,53 @@ const __iconNode$b = [
62440
62303
  }
62441
62304
  ]
62442
62305
  ];
62443
- const PenLine = createLucideIcon("pen-line", __iconNode$b);
62306
+ const PenLine = createLucideIcon("pen-line", __iconNode$e);
62444
62307
  /**
62445
62308
  * @license lucide-react v0.575.0 - ISC
62446
62309
  *
62447
62310
  * This source code is licensed under the ISC license.
62448
62311
  * See the LICENSE file in the root directory of this source tree.
62449
62312
  */
62450
- const __iconNode$a = [
62313
+ const __iconNode$d = [
62314
+ [
62315
+ "path",
62316
+ {
62317
+ 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",
62318
+ key: "10ikf1"
62319
+ }
62320
+ ]
62321
+ ];
62322
+ const Play = createLucideIcon("play", __iconNode$d);
62323
+ /**
62324
+ * @license lucide-react v0.575.0 - ISC
62325
+ *
62326
+ * This source code is licensed under the ISC license.
62327
+ * See the LICENSE file in the root directory of this source tree.
62328
+ */
62329
+ const __iconNode$c = [
62451
62330
  ["path", { d: "M5 12h14", key: "1ays0h" }],
62452
62331
  ["path", { d: "M12 5v14", key: "s699le" }]
62453
62332
  ];
62454
- const Plus = createLucideIcon("plus", __iconNode$a);
62333
+ const Plus = createLucideIcon("plus", __iconNode$c);
62455
62334
  /**
62456
62335
  * @license lucide-react v0.575.0 - ISC
62457
62336
  *
62458
62337
  * This source code is licensed under the ISC license.
62459
62338
  * See the LICENSE file in the root directory of this source tree.
62460
62339
  */
62461
- const __iconNode$9 = [
62340
+ const __iconNode$b = [
62462
62341
  ["path", { d: "M2 3h20", key: "91anmk" }],
62463
62342
  ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
62464
62343
  ["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
62465
62344
  ];
62466
- const Presentation = createLucideIcon("presentation", __iconNode$9);
62345
+ const Presentation = createLucideIcon("presentation", __iconNode$b);
62467
62346
  /**
62468
62347
  * @license lucide-react v0.575.0 - ISC
62469
62348
  *
62470
62349
  * This source code is licensed under the ISC license.
62471
62350
  * See the LICENSE file in the root directory of this source tree.
62472
62351
  */
62473
- const __iconNode$8 = [
62352
+ const __iconNode$a = [
62474
62353
  [
62475
62354
  "path",
62476
62355
  {
@@ -62486,38 +62365,38 @@ const __iconNode$8 = [
62486
62365
  }
62487
62366
  ]
62488
62367
  ];
62489
- const Quote = createLucideIcon("quote", __iconNode$8);
62368
+ const Quote = createLucideIcon("quote", __iconNode$a);
62490
62369
  /**
62491
62370
  * @license lucide-react v0.575.0 - ISC
62492
62371
  *
62493
62372
  * This source code is licensed under the ISC license.
62494
62373
  * See the LICENSE file in the root directory of this source tree.
62495
62374
  */
62496
- const __iconNode$7 = [
62375
+ const __iconNode$9 = [
62497
62376
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
62498
62377
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
62499
62378
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
62500
62379
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
62501
62380
  ];
62502
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
62381
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$9);
62503
62382
  /**
62504
62383
  * @license lucide-react v0.575.0 - ISC
62505
62384
  *
62506
62385
  * This source code is licensed under the ISC license.
62507
62386
  * See the LICENSE file in the root directory of this source tree.
62508
62387
  */
62509
- const __iconNode$6 = [
62388
+ const __iconNode$8 = [
62510
62389
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
62511
62390
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
62512
62391
  ];
62513
- const Search = createLucideIcon("search", __iconNode$6);
62392
+ const Search = createLucideIcon("search", __iconNode$8);
62514
62393
  /**
62515
62394
  * @license lucide-react v0.575.0 - ISC
62516
62395
  *
62517
62396
  * This source code is licensed under the ISC license.
62518
62397
  * See the LICENSE file in the root directory of this source tree.
62519
62398
  */
62520
- const __iconNode$5 = [
62399
+ const __iconNode$7 = [
62521
62400
  [
62522
62401
  "path",
62523
62402
  {
@@ -62527,17 +62406,43 @@ const __iconNode$5 = [
62527
62406
  ],
62528
62407
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
62529
62408
  ];
62530
- const Settings = createLucideIcon("settings", __iconNode$5);
62409
+ const Settings = createLucideIcon("settings", __iconNode$7);
62531
62410
  /**
62532
62411
  * @license lucide-react v0.575.0 - ISC
62533
62412
  *
62534
62413
  * This source code is licensed under the ISC license.
62535
62414
  * See the LICENSE file in the root directory of this source tree.
62536
62415
  */
62537
- const __iconNode$4 = [
62416
+ const __iconNode$6 = [
62538
62417
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
62539
62418
  ];
62540
- const Square = createLucideIcon("square", __iconNode$4);
62419
+ const Square = createLucideIcon("square", __iconNode$6);
62420
+ /**
62421
+ * @license lucide-react v0.575.0 - ISC
62422
+ *
62423
+ * This source code is licensed under the ISC license.
62424
+ * See the LICENSE file in the root directory of this source tree.
62425
+ */
62426
+ const __iconNode$5 = [
62427
+ ["path", { d: "M15 3v18", key: "14nvp0" }],
62428
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
62429
+ ["path", { d: "M21 9H3", key: "1338ky" }],
62430
+ ["path", { d: "M21 15H3", key: "9uk58r" }]
62431
+ ];
62432
+ const TableProperties = createLucideIcon("table-properties", __iconNode$5);
62433
+ /**
62434
+ * @license lucide-react v0.575.0 - ISC
62435
+ *
62436
+ * This source code is licensed under the ISC license.
62437
+ * See the LICENSE file in the root directory of this source tree.
62438
+ */
62439
+ const __iconNode$4 = [
62440
+ ["path", { d: "M12 3v18", key: "108xh3" }],
62441
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
62442
+ ["path", { d: "M3 9h18", key: "1pudct" }],
62443
+ ["path", { d: "M3 15h18", key: "5xshup" }]
62444
+ ];
62445
+ const Table = createLucideIcon("table", __iconNode$4);
62541
62446
  /**
62542
62447
  * @license lucide-react v0.575.0 - ISC
62543
62448
  *
@@ -62604,6 +62509,10 @@ function CollapsibleContent({ ...props }) {
62604
62509
  return /* @__PURE__ */ jsx(CollapsibleContent$1, { "data-slot": "collapsible-content", ...props });
62605
62510
  }
62606
62511
  const ANIMATION_DURATION = 200;
62512
+ function truncateLine(text2, max2 = 70) {
62513
+ const oneLine = text2.replace(/\s+/g, " ").trim();
62514
+ return oneLine.length > max2 ? `${oneLine.slice(0, max2)}...` : oneLine;
62515
+ }
62607
62516
  const TOOL_META = {
62608
62517
  // Search & Browse
62609
62518
  search: { displayName: "Searching the web", icon: Search, describer: (a) => a.query ? `"${a.query}"` : "" },
@@ -62635,9 +62544,13 @@ const TOOL_META = {
62635
62544
  execute_presentation_code: { displayName: "Generating slides", icon: Monitor },
62636
62545
  // Code & Data
62637
62546
  run_python_code: { displayName: "Running analysis", icon: Code },
62638
- run_sql_query_tool: { displayName: "Querying data", icon: Database },
62547
+ 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)}"` : "" },
62548
+ 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)}"` : "" },
62549
+ 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)}"` : "" },
62639
62550
  create_database: { displayName: "Setting up database", icon: Database },
62640
- run_database_sql: { displayName: "Querying database", icon: Database },
62551
+ describe_database: { displayName: "Inspecting database", icon: Database },
62552
+ list_database_tables: { displayName: "Listing database tables", icon: Database },
62553
+ get_database_table_schema: { displayName: "Reading table schema", icon: Database, describer: (a) => a.table_name ?? "" },
62641
62554
  computer_asset_exec: { displayName: "Running command", icon: Monitor },
62642
62555
  // Notebooks
62643
62556
  create_new_notebook: { displayName: "Creating notebook", icon: BookOpen },
@@ -64572,6 +64485,497 @@ const OpenAssetToolUI = memo(
64572
64485
  OpenAssetToolUIImpl
64573
64486
  );
64574
64487
  OpenAssetToolUI.displayName = "OpenAssetToolUI";
64488
+ const DescribeDatabaseToolUIImpl = ({
64489
+ toolName,
64490
+ args,
64491
+ result,
64492
+ status
64493
+ }) => {
64494
+ const typedArgs = args;
64495
+ const data = useMemo(() => normalizeResult(result), [result]);
64496
+ const title = typeof (data == null ? void 0 : data.title) === "string" ? data.title : null;
64497
+ const provider = typeof (data == null ? void 0 : data.provider) === "string" ? data.provider : null;
64498
+ const databaseName = typeof (data == null ? void 0 : data.database_name) === "string" ? data.database_name : null;
64499
+ const tableCount = typeof (data == null ? void 0 : data.table_count) === "number" ? data.table_count : null;
64500
+ const dbStatus = typeof (data == null ? void 0 : data.status) === "string" ? data.status : null;
64501
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64502
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64503
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64504
+ return /* @__PURE__ */ jsx(
64505
+ ToolCard,
64506
+ {
64507
+ icon: Database,
64508
+ status: (status == null ? void 0 : status.type) ?? "complete",
64509
+ title: isRunning ? "Inspecting database..." : title ? `Database: ${title}` : "Database overview",
64510
+ subtitle: databaseName ?? void 0,
64511
+ toolName,
64512
+ args: typedArgs,
64513
+ result,
64514
+ badge: isComplete && tableCount !== null ? `${tableCount} ${tableCount === 1 ? "table" : "tables"}` : void 0,
64515
+ error: errorMsg,
64516
+ children: isComplete && (title || provider || databaseName || dbStatus) && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 text-[11px]", children: [
64517
+ title && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64518
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Name" }),
64519
+ /* @__PURE__ */ jsx("span", { className: "truncate text-foreground/80", children: title })
64520
+ ] }),
64521
+ provider && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64522
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Provider" }),
64523
+ /* @__PURE__ */ jsx("span", { className: "truncate text-foreground/80 capitalize", children: provider })
64524
+ ] }),
64525
+ databaseName && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64526
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Database" }),
64527
+ /* @__PURE__ */ jsx("span", { className: "truncate font-mono text-foreground/80", children: databaseName })
64528
+ ] }),
64529
+ dbStatus && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
64530
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: "Status" }),
64531
+ /* @__PURE__ */ jsxs(
64532
+ "span",
64533
+ {
64534
+ className: cn(
64535
+ "inline-flex w-fit items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium capitalize",
64536
+ dbStatus === "active" ? "bg-emerald-50 text-emerald-700" : "bg-muted text-muted-foreground"
64537
+ ),
64538
+ children: [
64539
+ /* @__PURE__ */ jsx(
64540
+ "span",
64541
+ {
64542
+ className: cn(
64543
+ "size-1.5 rounded-full",
64544
+ dbStatus === "active" ? "bg-emerald-500" : "bg-muted-foreground"
64545
+ )
64546
+ }
64547
+ ),
64548
+ dbStatus
64549
+ ]
64550
+ }
64551
+ )
64552
+ ] })
64553
+ ] }) })
64554
+ }
64555
+ );
64556
+ };
64557
+ const DescribeDatabaseToolUI = memo(
64558
+ DescribeDatabaseToolUIImpl
64559
+ );
64560
+ DescribeDatabaseToolUI.displayName = "DescribeDatabaseToolUI";
64561
+ const ListDatabaseTablesToolUIImpl = ({
64562
+ toolName,
64563
+ args,
64564
+ result,
64565
+ status
64566
+ }) => {
64567
+ const typedArgs = args;
64568
+ const data = useMemo(() => normalizeResult(result), [result]);
64569
+ const tables = useMemo(() => {
64570
+ if (!data || !Array.isArray(data.tables)) return [];
64571
+ return data.tables.map((t) => {
64572
+ const item = t ?? {};
64573
+ return {
64574
+ table_name: typeof item.table_name === "string" ? item.table_name : "",
64575
+ schema_name: typeof item.schema_name === "string" ? item.schema_name : void 0,
64576
+ row_count: typeof item.row_count === "number" ? item.row_count : void 0
64577
+ };
64578
+ });
64579
+ }, [data]);
64580
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64581
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64582
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64583
+ return /* @__PURE__ */ jsx(
64584
+ ToolCard,
64585
+ {
64586
+ icon: Table,
64587
+ status: (status == null ? void 0 : status.type) ?? "complete",
64588
+ title: isRunning ? "Listing database tables..." : "Database tables",
64589
+ toolName,
64590
+ args: typedArgs,
64591
+ result,
64592
+ badge: isComplete && tables.length > 0 ? `${tables.length} ${tables.length === 1 ? "table" : "tables"}` : void 0,
64593
+ error: errorMsg,
64594
+ children: isComplete && tables.length > 0 && /* @__PURE__ */ jsx(
64595
+ ExpandableSection,
64596
+ {
64597
+ label: "Show tables",
64598
+ defaultOpen: tables.length <= 10,
64599
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: tables.map((t) => {
64600
+ const qualified = t.schema_name ? `${t.schema_name}.${t.table_name}` : t.table_name;
64601
+ return /* @__PURE__ */ jsxs(
64602
+ "div",
64603
+ {
64604
+ className: "flex items-center justify-between gap-3 rounded-md px-2 py-1 hover:bg-muted/40",
64605
+ children: [
64606
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
64607
+ /* @__PURE__ */ jsx(Table, { className: "size-3 shrink-0 text-muted-foreground/60" }),
64608
+ /* @__PURE__ */ jsx("span", { className: "truncate font-mono text-[12px] text-foreground/90", children: qualified })
64609
+ ] }),
64610
+ t.row_count !== void 0 && /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: [
64611
+ t.row_count.toLocaleString(),
64612
+ " ",
64613
+ t.row_count === 1 ? "row" : "rows"
64614
+ ] })
64615
+ ]
64616
+ },
64617
+ qualified
64618
+ );
64619
+ }) })
64620
+ }
64621
+ )
64622
+ }
64623
+ );
64624
+ };
64625
+ const ListDatabaseTablesToolUI = memo(
64626
+ ListDatabaseTablesToolUIImpl
64627
+ );
64628
+ ListDatabaseTablesToolUI.displayName = "ListDatabaseTablesToolUI";
64629
+ const GetDatabaseTableSchemaToolUIImpl = ({
64630
+ toolName,
64631
+ args,
64632
+ result,
64633
+ status
64634
+ }) => {
64635
+ const typedArgs = args;
64636
+ const data = useMemo(() => normalizeResult(result), [result]);
64637
+ 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);
64638
+ const schemaName = typeof (data == null ? void 0 : data.schema_name) === "string" ? data.schema_name : null;
64639
+ const columns = useMemo(() => {
64640
+ if (!data || !Array.isArray(data.columns)) return [];
64641
+ return data.columns.map((c) => {
64642
+ const item = c ?? {};
64643
+ return {
64644
+ name: typeof item.name === "string" ? item.name : "",
64645
+ data_type: typeof item.data_type === "string" ? item.data_type : "",
64646
+ is_nullable: typeof item.is_nullable === "boolean" ? item.is_nullable : void 0,
64647
+ default_value: typeof item.default_value === "string" ? item.default_value : null,
64648
+ max_length: typeof item.max_length === "number" ? item.max_length : null
64649
+ };
64650
+ });
64651
+ }, [data]);
64652
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64653
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64654
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64655
+ const displayName = tableName ? schemaName ? `${schemaName}.${tableName}` : tableName : null;
64656
+ return /* @__PURE__ */ jsx(
64657
+ ToolCard,
64658
+ {
64659
+ icon: TableProperties,
64660
+ status: (status == null ? void 0 : status.type) ?? "complete",
64661
+ title: isRunning ? "Reading table schema..." : displayName ? `Schema: ${displayName}` : "Table schema",
64662
+ toolName,
64663
+ args: typedArgs,
64664
+ result,
64665
+ badge: isComplete && columns.length > 0 ? `${columns.length} ${columns.length === 1 ? "column" : "columns"}` : void 0,
64666
+ error: errorMsg,
64667
+ children: isComplete && columns.length > 0 && /* @__PURE__ */ jsx(
64668
+ ExpandableSection,
64669
+ {
64670
+ label: "Show columns",
64671
+ defaultOpen: columns.length <= 12,
64672
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-md border border-border/40", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-[11px]", children: [
64673
+ /* @__PURE__ */ jsx("thead", { className: "bg-muted/50", children: /* @__PURE__ */ jsxs("tr", { children: [
64674
+ /* @__PURE__ */ jsx("th", { className: "px-2 py-1.5 text-left font-medium text-muted-foreground", children: "Column" }),
64675
+ /* @__PURE__ */ jsx("th", { className: "px-2 py-1.5 text-left font-medium text-muted-foreground", children: "Type" }),
64676
+ /* @__PURE__ */ jsx("th", { className: "px-2 py-1.5 text-right font-medium text-muted-foreground", children: "Nullable" })
64677
+ ] }) }),
64678
+ /* @__PURE__ */ jsx("tbody", { children: columns.map((col) => {
64679
+ const typeLabel = col.max_length != null ? `${col.data_type}(${col.max_length})` : col.data_type;
64680
+ return /* @__PURE__ */ jsxs(
64681
+ "tr",
64682
+ {
64683
+ className: "border-t border-border/30",
64684
+ title: col.default_value ? `default: ${col.default_value}` : void 0,
64685
+ children: [
64686
+ /* @__PURE__ */ jsx("td", { className: "whitespace-nowrap px-2 py-1 font-mono text-foreground/90", children: col.name }),
64687
+ /* @__PURE__ */ jsx("td", { className: "whitespace-nowrap px-2 py-1 text-muted-foreground", children: typeLabel }),
64688
+ /* @__PURE__ */ jsx("td", { className: "whitespace-nowrap px-2 py-1 text-right", children: col.is_nullable === false ? /* @__PURE__ */ jsx("span", { className: "rounded bg-amber-50 px-1 py-0.5 text-[10px] font-medium text-amber-700", children: "NOT NULL" }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/50", children: "—" }) })
64689
+ ]
64690
+ },
64691
+ col.name
64692
+ );
64693
+ }) })
64694
+ ] }) })
64695
+ }
64696
+ )
64697
+ }
64698
+ );
64699
+ };
64700
+ const GetDatabaseTableSchemaToolUI = memo(
64701
+ GetDatabaseTableSchemaToolUIImpl
64702
+ );
64703
+ GetDatabaseTableSchemaToolUI.displayName = "GetDatabaseTableSchemaToolUI";
64704
+ const SQL_KEYWORDS = /* @__PURE__ */ new Set([
64705
+ "SELECT",
64706
+ "FROM",
64707
+ "WHERE",
64708
+ "JOIN",
64709
+ "LEFT",
64710
+ "RIGHT",
64711
+ "INNER",
64712
+ "OUTER",
64713
+ "FULL",
64714
+ "CROSS",
64715
+ "ON",
64716
+ "USING",
64717
+ "AND",
64718
+ "OR",
64719
+ "NOT",
64720
+ "IN",
64721
+ "IS",
64722
+ "NULL",
64723
+ "AS",
64724
+ "ORDER",
64725
+ "BY",
64726
+ "GROUP",
64727
+ "HAVING",
64728
+ "LIMIT",
64729
+ "OFFSET",
64730
+ "UNION",
64731
+ "ALL",
64732
+ "DISTINCT",
64733
+ "INSERT",
64734
+ "INTO",
64735
+ "VALUES",
64736
+ "UPDATE",
64737
+ "SET",
64738
+ "DELETE",
64739
+ "CREATE",
64740
+ "TABLE",
64741
+ "DROP",
64742
+ "ALTER",
64743
+ "ADD",
64744
+ "COLUMN",
64745
+ "INDEX",
64746
+ "PRIMARY",
64747
+ "KEY",
64748
+ "FOREIGN",
64749
+ "REFERENCES",
64750
+ "CONSTRAINT",
64751
+ "CASCADE",
64752
+ "CASE",
64753
+ "WHEN",
64754
+ "THEN",
64755
+ "ELSE",
64756
+ "END",
64757
+ "WITH",
64758
+ "RECURSIVE",
64759
+ "ASC",
64760
+ "DESC",
64761
+ "BETWEEN",
64762
+ "LIKE",
64763
+ "ILIKE",
64764
+ "EXISTS",
64765
+ "ANY",
64766
+ "SOME",
64767
+ "RETURNING",
64768
+ "OVER",
64769
+ "PARTITION",
64770
+ "WINDOW"
64771
+ ]);
64772
+ const SQL_FUNCTIONS = /* @__PURE__ */ new Set([
64773
+ "COUNT",
64774
+ "SUM",
64775
+ "AVG",
64776
+ "MIN",
64777
+ "MAX",
64778
+ "ROUND",
64779
+ "CAST",
64780
+ "COALESCE",
64781
+ "NULLIF",
64782
+ "UPPER",
64783
+ "LOWER",
64784
+ "LENGTH",
64785
+ "SUBSTRING",
64786
+ "TRIM",
64787
+ "CONCAT",
64788
+ "DATE",
64789
+ "NOW",
64790
+ "CURRENT_DATE",
64791
+ "CURRENT_TIMESTAMP",
64792
+ "EXTRACT",
64793
+ "DATE_TRUNC",
64794
+ "ROW_NUMBER",
64795
+ "RANK",
64796
+ "DENSE_RANK",
64797
+ "LAG",
64798
+ "LEAD"
64799
+ ]);
64800
+ function highlightSql(code2) {
64801
+ let result = "";
64802
+ let i = 0;
64803
+ while (i < code2.length) {
64804
+ if (code2.slice(i, i + 2) === "--") {
64805
+ const end = code2.indexOf("\n", i);
64806
+ const str = end >= 0 ? code2.slice(i, end) : code2.slice(i);
64807
+ result += `<span style="color:var(--aui-syn-comment, #6a9955)">${escapeHtml(str)}</span>`;
64808
+ i += str.length;
64809
+ continue;
64810
+ }
64811
+ if (code2[i] === "'" || code2[i] === '"') {
64812
+ const q = code2[i];
64813
+ let j = i + 1;
64814
+ while (j < code2.length && code2[j] !== q) {
64815
+ if (code2[j] === "\\") j++;
64816
+ j++;
64817
+ }
64818
+ const str = code2.slice(i, j + 1);
64819
+ result += `<span style="color:var(--aui-syn-string, #ce9178)">${escapeHtml(str)}</span>`;
64820
+ i = j + 1;
64821
+ continue;
64822
+ }
64823
+ if (/\d/.test(code2[i]) && (i === 0 || /[\s(,=[\-+*/:!<>]/.test(code2[i - 1]))) {
64824
+ const m = code2.slice(i).match(/^(\d+\.?\d*)/);
64825
+ if (m) {
64826
+ result += `<span style="color:var(--aui-syn-number, #b5cea8)">${escapeHtml(m[1])}</span>`;
64827
+ i += m[1].length;
64828
+ continue;
64829
+ }
64830
+ }
64831
+ if (/[a-zA-Z_]/.test(code2[i])) {
64832
+ const m = code2.slice(i).match(/^[a-zA-Z_]\w*/);
64833
+ if (m) {
64834
+ const word = m[0];
64835
+ const upper = word.toUpperCase();
64836
+ if (SQL_KEYWORDS.has(upper)) {
64837
+ result += `<span style="color:var(--aui-syn-keyword, #569cd6)">${escapeHtml(word)}</span>`;
64838
+ } else if (SQL_FUNCTIONS.has(upper)) {
64839
+ result += `<span style="color:var(--aui-syn-func, #dcdcaa)">${escapeHtml(word)}</span>`;
64840
+ } else {
64841
+ result += escapeHtml(word);
64842
+ }
64843
+ i += word.length;
64844
+ continue;
64845
+ }
64846
+ }
64847
+ result += escapeHtml(code2[i]);
64848
+ i++;
64849
+ }
64850
+ return result;
64851
+ }
64852
+ const SyntaxHighlightedSql = memo(({ code: code2 }) => {
64853
+ const highlighted = useMemo(() => highlightSql(code2), [code2]);
64854
+ return /* @__PURE__ */ jsx(
64855
+ "pre",
64856
+ {
64857
+ className: "whitespace-pre-wrap break-words text-[11px] leading-relaxed font-mono",
64858
+ dangerouslySetInnerHTML: { __html: highlighted }
64859
+ }
64860
+ );
64861
+ });
64862
+ SyntaxHighlightedSql.displayName = "SyntaxHighlightedSql";
64863
+ function parseSqlResult(result) {
64864
+ const empty2 = { columns: [], rows: [], rowCount: null };
64865
+ const data = normalizeResult(result);
64866
+ if (!data) return empty2;
64867
+ const inner = data.result && typeof data.result === "object" && !Array.isArray(data.result) ? data.result : data;
64868
+ const rawRows = inner.rows ?? inner.data ?? inner.records;
64869
+ if (!Array.isArray(rawRows)) return empty2;
64870
+ const rows = rawRows.filter(
64871
+ (r2) => typeof r2 === "object" && r2 !== null && !Array.isArray(r2)
64872
+ );
64873
+ let columns = [];
64874
+ if (Array.isArray(inner.columns)) {
64875
+ columns = inner.columns.map((c) => {
64876
+ if (typeof c === "string") return c;
64877
+ if (c && typeof c === "object") {
64878
+ const name = c.name;
64879
+ return typeof name === "string" ? name : null;
64880
+ }
64881
+ return null;
64882
+ }).filter((c) => c !== null);
64883
+ }
64884
+ if (columns.length === 0 && rows.length > 0) {
64885
+ columns = Object.keys(rows[0]);
64886
+ }
64887
+ const rowCount = typeof inner.row_count === "number" ? inner.row_count : typeof inner.rowCount === "number" ? inner.rowCount : rows.length;
64888
+ return { columns, rows, rowCount };
64889
+ }
64890
+ const RunSqlToolUIImpl = ({
64891
+ toolName,
64892
+ args,
64893
+ result,
64894
+ status
64895
+ }) => {
64896
+ const typedArgs = args;
64897
+ const sqlQuery = (typedArgs == null ? void 0 : typedArgs.sql_query) ?? (typedArgs == null ? void 0 : typedArgs.query) ?? (typedArgs == null ? void 0 : typedArgs.sql) ?? "";
64898
+ const trimmedQuery = sqlQuery.trim();
64899
+ const isRunning = (status == null ? void 0 : status.type) === "running";
64900
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
64901
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
64902
+ const parsed = useMemo(
64903
+ () => isComplete ? parseSqlResult(result) : null,
64904
+ [result, isComplete]
64905
+ );
64906
+ const querySubtitle = useMemo(() => {
64907
+ if (!trimmedQuery) return void 0;
64908
+ const oneLine = trimmedQuery.replace(/\s+/g, " ");
64909
+ return truncate(oneLine, 80);
64910
+ }, [trimmedQuery]);
64911
+ return /* @__PURE__ */ jsxs(
64912
+ ToolCard,
64913
+ {
64914
+ icon: Play,
64915
+ status: (status == null ? void 0 : status.type) ?? "complete",
64916
+ title: isRunning ? "Running SQL query..." : "SQL query",
64917
+ subtitle: querySubtitle,
64918
+ toolName,
64919
+ args: typedArgs,
64920
+ result,
64921
+ badge: isComplete && parsed && parsed.rowCount !== null ? `${parsed.rowCount} ${parsed.rowCount === 1 ? "row" : "rows"}` : void 0,
64922
+ error: errorMsg,
64923
+ children: [
64924
+ trimmedQuery && /* @__PURE__ */ jsx(
64925
+ ExpandableSection,
64926
+ {
64927
+ label: "Show query",
64928
+ defaultOpen: isComplete && (!parsed || parsed.rows.length === 0),
64929
+ children: /* @__PURE__ */ jsx(SyntaxHighlightedSql, { code: trimmedQuery })
64930
+ }
64931
+ ),
64932
+ isComplete && parsed && parsed.rows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40", children: [
64933
+ /* @__PURE__ */ jsx("div", { className: "max-h-72 overflow-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-[11px]", children: [
64934
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-muted/60 backdrop-blur", children: /* @__PURE__ */ jsx("tr", { children: parsed.columns.map((col) => /* @__PURE__ */ jsx(
64935
+ "th",
64936
+ {
64937
+ className: "whitespace-nowrap px-2 py-1.5 text-left font-medium text-muted-foreground",
64938
+ children: col
64939
+ },
64940
+ col
64941
+ )) }) }),
64942
+ /* @__PURE__ */ jsx("tbody", { children: parsed.rows.slice(0, 50).map((row, i) => /* @__PURE__ */ jsx(
64943
+ "tr",
64944
+ {
64945
+ className: "border-t border-border/30 hover:bg-muted/20",
64946
+ children: parsed.columns.map((col) => {
64947
+ const value = row[col];
64948
+ const isNull = value === null || value === void 0;
64949
+ const str = isNull ? "" : typeof value === "object" ? JSON.stringify(value) : String(value);
64950
+ return /* @__PURE__ */ jsx(
64951
+ "td",
64952
+ {
64953
+ className: "max-w-[240px] truncate whitespace-nowrap px-2 py-1 text-foreground/80",
64954
+ title: isNull ? "null" : str,
64955
+ children: isNull ? /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground/60", children: "null" }) : str
64956
+ },
64957
+ col
64958
+ );
64959
+ })
64960
+ },
64961
+ i
64962
+ )) })
64963
+ ] }) }),
64964
+ parsed.rows.length > 50 && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/30 px-4 py-1.5 text-[10px] text-muted-foreground", children: [
64965
+ "Showing first 50 of ",
64966
+ parsed.rows.length,
64967
+ " rows"
64968
+ ] })
64969
+ ] }),
64970
+ isComplete && parsed && parsed.rows.length === 0 && parsed.rowCount === 0 && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2.5", children: /* @__PURE__ */ jsx("span", { className: "text-[11px] italic text-muted-foreground", children: "Query returned no rows" }) })
64971
+ ]
64972
+ }
64973
+ );
64974
+ };
64975
+ const RunSqlToolUI = memo(
64976
+ RunSqlToolUIImpl
64977
+ );
64978
+ RunSqlToolUI.displayName = "RunSqlToolUI";
64575
64979
  function createAssetToolUI(config2) {
64576
64980
  const Component = (props) => /* @__PURE__ */ jsx(
64577
64981
  CreateAssetToolUIImpl,
@@ -64601,7 +65005,14 @@ const TOOL_UI_REGISTRY = {
64601
65005
  create_new_notebook: CreateNotebookToolUI,
64602
65006
  execute_presentation_code: ExecutePresentationCodeToolUI,
64603
65007
  run_python_code: RunPythonCodeToolUI,
64604
- open_asset_in_workspace: OpenAssetToolUI
65008
+ open_asset_in_workspace: OpenAssetToolUI,
65009
+ // Database toolkit
65010
+ describe_database: DescribeDatabaseToolUI,
65011
+ list_database_tables: ListDatabaseTablesToolUI,
65012
+ get_database_table_schema: GetDatabaseTableSchemaToolUI,
65013
+ run_sql: RunSqlToolUI,
65014
+ run_database_sql: RunSqlToolUI,
65015
+ run_sql_query_tool: RunSqlToolUI
64605
65016
  };
64606
65017
  const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
64607
65018
  const cx = clsx;
@@ -65294,10 +65705,11 @@ const ComposerSendWithQuote = () => {
65294
65705
  const { attachments, clearAttachments, isUploading } = useAttachments();
65295
65706
  const editorRef = useComposerEditorRef();
65296
65707
  const editorEmpty = useComposerEditorEmpty();
65708
+ const isThreadRunning = useAuiState((s) => s.thread.isRunning);
65297
65709
  const hasExtras = !!quote || attachments.length > 0;
65298
65710
  const handleSend = useCallback(() => {
65299
65711
  var _a2;
65300
- if (isUploading) return;
65712
+ if (isUploading || isThreadRunning) return;
65301
65713
  const editor = editorRef.current;
65302
65714
  if (!editor && !quote && attachments.length === 0) return;
65303
65715
  const userText = ((_a2 = editor == null ? void 0 : editor.getMarkdown()) == null ? void 0 : _a2.trim()) ?? "";
@@ -65321,7 +65733,7 @@ const ComposerSendWithQuote = () => {
65321
65733
  composerRuntime.send();
65322
65734
  }
65323
65735
  editor == null ? void 0 : editor.clear();
65324
- }, [aui, composerRuntime, quote, attachments, hasExtras, isUploading, clearQuote, clearAttachments, editorRef, appUrl]);
65736
+ }, [aui, composerRuntime, quote, attachments, hasExtras, isUploading, isThreadRunning, clearQuote, clearAttachments, editorRef, appUrl]);
65325
65737
  return /* @__PURE__ */ jsx(
65326
65738
  TooltipIconButton,
65327
65739
  {
@@ -65333,7 +65745,7 @@ const ComposerSendWithQuote = () => {
65333
65745
  className: "aui-composer-send size-8 rounded-full",
65334
65746
  "aria-label": "Send message",
65335
65747
  onClick: handleSend,
65336
- disabled: isUploading || editorEmpty && !hasExtras,
65748
+ disabled: isUploading || isThreadRunning || editorEmpty && !hasExtras,
65337
65749
  children: /* @__PURE__ */ jsx(ArrowUp, { className: "aui-composer-send-icon size-4" })
65338
65750
  }
65339
65751
  );
@@ -65351,7 +65763,10 @@ const MessageError = () => /* @__PURE__ */ jsx(MessagePrimitiveError, { children
65351
65763
  }
65352
65764
  ) })
65353
65765
  ] }) });
65354
- const AthenaAssistantMessageEmpty = () => /* @__PURE__ */ jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
65766
+ const AthenaAssistantMessageEmpty = ({ status }) => {
65767
+ if ((status == null ? void 0 : status.type) !== "running") return null;
65768
+ return /* @__PURE__ */ jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
65769
+ };
65355
65770
  const AthenaReasoningPart = ({
65356
65771
  text: text2,
65357
65772
  status,
@@ -65979,8 +66394,6 @@ const Toolkits = {
65979
66394
  MARKETING: "marketing_toolkit",
65980
66395
  /** FDE implementations and workflows. */
65981
66396
  FDE: "fde_toolkit",
65982
- /** Code repository search via Greptile. */
65983
- GREPTILE: "greptile_toolkit",
65984
66397
  /** SharePoint / Google Drive / workspace file access. */
65985
66398
  EXTERNAL_DRIVE: "external_drive_toolkit",
65986
66399
  /** Reusable playbooks and prompts. */
@@ -66019,12 +66432,16 @@ export {
66019
66432
  DEFAULT_API_URL,
66020
66433
  DEFAULT_APP_URL,
66021
66434
  DEFAULT_BACKEND_URL,
66435
+ DescribeDatabaseToolUI,
66022
66436
  EmailSearchToolUI,
66023
66437
  ExpandableSection,
66024
66438
  FileUploadButton,
66439
+ GetDatabaseTableSchemaToolUI,
66440
+ ListDatabaseTablesToolUI,
66025
66441
  OpenAssetToolUI,
66026
66442
  ReadAssetToolUI,
66027
66443
  RunPythonCodeToolUI,
66444
+ RunSqlToolUI,
66028
66445
  TOOL_UI_REGISTRY,
66029
66446
  ThreadList,
66030
66447
  TiptapComposer,