local-operator-ui 0.10.9 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/out/main/index.jsc +0 -0
  2. package/out/preload/index.jsc +0 -0
  3. package/out/renderer/assets/{_basePickBy-r5hhhokw.js → _basePickBy-B8VDBNMq.js} +2 -2
  4. package/out/renderer/assets/{_baseUniq-BBOEV9y0.js → _baseUniq-DEnIwqeZ.js} +1 -1
  5. package/out/renderer/assets/{arc-Clqwk4k6.js → arc-Dg0I-9m1.js} +1 -1
  6. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-Bx8X697l.js → architectureDiagram-IEHRJDOE-BEROcdGh.js} +7 -7
  7. package/out/renderer/assets/{blockDiagram-JOT3LUYC-B1Up6r6-.js → blockDiagram-JOT3LUYC-D2Cng1Yf.js} +5 -5
  8. package/out/renderer/assets/{c4Diagram-VJAJSXHY-C36lbIjS.js → c4Diagram-VJAJSXHY-DZAmVkcX.js} +2 -2
  9. package/out/renderer/assets/{channel-RymPaL1a.js → channel-BaWS2P4w.js} +1 -1
  10. package/out/renderer/assets/{chunk-4BMEZGHF-hetp-v-b.js → chunk-4BMEZGHF-LXzWRzt0.js} +1 -1
  11. package/out/renderer/assets/{chunk-A2AXSNBT-RJ03JkZb.js → chunk-A2AXSNBT-Bnzaay7E.js} +2 -2
  12. package/out/renderer/assets/{chunk-AEK57VVT-DC5ye4z8.js → chunk-AEK57VVT-D6E6iv2X.js} +2 -2
  13. package/out/renderer/assets/{chunk-D6G4REZN-D6XUL9LI.js → chunk-D6G4REZN-DbujHPxG.js} +1 -1
  14. package/out/renderer/assets/{chunk-RZ5BOZE2-D6JxF993.js → chunk-RZ5BOZE2-CUtI6bpt.js} +1 -1
  15. package/out/renderer/assets/{chunk-XZIHB7SX--AwbJm2E.js → chunk-XZIHB7SX-BeYgUVS6.js} +1 -1
  16. package/out/renderer/assets/{classDiagram-GIVACNV2-vtFcXgAr.js → classDiagram-GIVACNV2-crUyrp4C.js} +3 -3
  17. package/out/renderer/assets/{classDiagram-v2-COTLJTTW-vtFcXgAr.js → classDiagram-v2-COTLJTTW-crUyrp4C.js} +3 -3
  18. package/out/renderer/assets/{clone-BAOF7mPn.js → clone-CB3yEbFy.js} +1 -1
  19. package/out/renderer/assets/{dagre-OKDRZEBW-BsxbY4uX.js → dagre-OKDRZEBW-sjSQ3pUv.js} +6 -6
  20. package/out/renderer/assets/{diagram-SSKATNLV-Cc6v1RBI.js → diagram-SSKATNLV-CASziOFr.js} +6 -6
  21. package/out/renderer/assets/{diagram-VNBRO52H-CU_0csUZ.js → diagram-VNBRO52H-ZbJyeILZ.js} +6 -6
  22. package/out/renderer/assets/{erDiagram-Q7BY3M3F-Ccs7n14X.js → erDiagram-Q7BY3M3F-xM-l45kg.js} +3 -3
  23. package/out/renderer/assets/{flowDiagram-4HSFHLVR-BTDwdXoq.js → flowDiagram-4HSFHLVR-QV5jY4yk.js} +3 -3
  24. package/out/renderer/assets/{ganttDiagram-APWFNJXF-BsHcmVQL.js → ganttDiagram-APWFNJXF-CAR2eCVK.js} +1 -1
  25. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BrsAP7d3.js → gitGraphDiagram-7IBYFJ6S-C2VL8kHA.js} +7 -7
  26. package/out/renderer/assets/{graph-U8n0FRxu.js → graph-BLYSrmBS.js} +2 -2
  27. package/out/renderer/assets/{index-JQ7XEBgh.js → index-BvMg8RoK.js} +1 -1
  28. package/out/renderer/assets/{index-B1kgBLxO.js → index-ClmkH6IK.js} +1 -1
  29. package/out/renderer/assets/{index-DnSZJXOl.js → index-wVqUqdGp.js} +297 -150
  30. package/out/renderer/assets/{infoDiagram-PH2N3AL5-CeBCRQ-r.js → infoDiagram-PH2N3AL5-BRVBGsSX.js} +5 -5
  31. package/out/renderer/assets/{journeyDiagram-U35MCT3I-CFEflF1X.js → journeyDiagram-U35MCT3I-CiYS6pRL.js} +3 -3
  32. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-lJsLyjEH.js → kanban-definition-NDS4AKOZ-BcF1dSLj.js} +1 -1
  33. package/out/renderer/assets/{layout-B7mvVV0Q.js → layout-CNdPM3EZ.js} +4 -4
  34. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-DuRohiYz.js → mindmap-definition-ALO5MXBD-B8OKj4Qj.js} +1 -1
  35. package/out/renderer/assets/{pieDiagram-IB7DONF6-CwHy1pe3.js → pieDiagram-IB7DONF6-Bd9suVWv.js} +7 -7
  36. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-DteRiyWH.js → quadrantDiagram-7GDLP6J5-Bs4DyNjf.js} +1 -1
  37. package/out/renderer/assets/{radar-MK3ICKWK-D4mwq75I.js → radar-MK3ICKWK-DwOpwmYh.js} +4 -4
  38. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-Cjtft40u.js → requirementDiagram-KVF5MWMF-DymCgMvI.js} +2 -2
  39. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DQ_oTubV.js → sankeyDiagram-QLVOVGJD-vLIhFWzQ.js} +1 -1
  40. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CMUs0WWj.js → sequenceDiagram-X6HHIX6F-DvLeGWo9.js} +3 -3
  41. package/out/renderer/assets/{stateDiagram-DGXRK772-JkRRAJkE.js → stateDiagram-DGXRK772-DyugZZym.js} +7 -7
  42. package/out/renderer/assets/{stateDiagram-v2-YXO3MK2T-DhB-86w-.js → stateDiagram-v2-YXO3MK2T-BD7GaWgL.js} +3 -3
  43. package/out/renderer/assets/{timeline-definition-BDJGKUSR-DmImWV1j.js → timeline-definition-BDJGKUSR-B6m24a_n.js} +2 -2
  44. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DjE9t7Qo.js → xychartDiagram-VJFVF3MP-BIx1OvAe.js} +1 -1
  45. package/out/renderer/index.html +1 -1
  46. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-JQ7XEBgh.js","./fonts-Bb3Axuvj.js","./fonts-B9KBGB-g.css","./index-B1kgBLxO.js","./pug-By0kVCfm.js","./javascript-C3MnDRiU.js","./dagre-OKDRZEBW-BsxbY4uX.js","./graph-U8n0FRxu.js","./_baseUniq-BBOEV9y0.js","./layout-B7mvVV0Q.js","./_basePickBy-r5hhhokw.js","./clone-BAOF7mPn.js","./c4Diagram-VJAJSXHY-C36lbIjS.js","./chunk-D6G4REZN-D6XUL9LI.js","./flowDiagram-4HSFHLVR-BTDwdXoq.js","./chunk-RZ5BOZE2-D6JxF993.js","./channel-RymPaL1a.js","./erDiagram-Q7BY3M3F-Ccs7n14X.js","./gitGraphDiagram-7IBYFJ6S-BrsAP7d3.js","./chunk-4BMEZGHF-hetp-v-b.js","./chunk-XZIHB7SX--AwbJm2E.js","./radar-MK3ICKWK-D4mwq75I.js","./ganttDiagram-APWFNJXF-BsHcmVQL.js","./infoDiagram-PH2N3AL5-CeBCRQ-r.js","./pieDiagram-IB7DONF6-CwHy1pe3.js","./arc-Clqwk4k6.js","./quadrantDiagram-7GDLP6J5-DteRiyWH.js","./xychartDiagram-VJFVF3MP-DjE9t7Qo.js","./requirementDiagram-KVF5MWMF-Cjtft40u.js","./sequenceDiagram-X6HHIX6F-CMUs0WWj.js","./classDiagram-GIVACNV2-vtFcXgAr.js","./chunk-A2AXSNBT-RJ03JkZb.js","./classDiagram-v2-COTLJTTW-vtFcXgAr.js","./stateDiagram-DGXRK772-JkRRAJkE.js","./chunk-AEK57VVT-DC5ye4z8.js","./stateDiagram-v2-YXO3MK2T-DhB-86w-.js","./journeyDiagram-U35MCT3I-CFEflF1X.js","./timeline-definition-BDJGKUSR-DmImWV1j.js","./mindmap-definition-ALO5MXBD-DuRohiYz.js","./cytoscape.esm-C0AOj4uS.js","./kanban-definition-NDS4AKOZ-lJsLyjEH.js","./sankeyDiagram-QLVOVGJD-DQ_oTubV.js","./diagram-VNBRO52H-CU_0csUZ.js","./diagram-SSKATNLV-Cc6v1RBI.js","./blockDiagram-JOT3LUYC-B1Up6r6-.js","./architectureDiagram-IEHRJDOE-Bx8X697l.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BvMg8RoK.js","./fonts-Bb3Axuvj.js","./fonts-B9KBGB-g.css","./index-ClmkH6IK.js","./pug-By0kVCfm.js","./javascript-C3MnDRiU.js","./dagre-OKDRZEBW-sjSQ3pUv.js","./graph-BLYSrmBS.js","./_baseUniq-DEnIwqeZ.js","./layout-CNdPM3EZ.js","./_basePickBy-B8VDBNMq.js","./clone-CB3yEbFy.js","./c4Diagram-VJAJSXHY-DZAmVkcX.js","./chunk-D6G4REZN-DbujHPxG.js","./flowDiagram-4HSFHLVR-QV5jY4yk.js","./chunk-RZ5BOZE2-CUtI6bpt.js","./channel-BaWS2P4w.js","./erDiagram-Q7BY3M3F-xM-l45kg.js","./gitGraphDiagram-7IBYFJ6S-C2VL8kHA.js","./chunk-4BMEZGHF-LXzWRzt0.js","./chunk-XZIHB7SX-BeYgUVS6.js","./radar-MK3ICKWK-DwOpwmYh.js","./ganttDiagram-APWFNJXF-CAR2eCVK.js","./infoDiagram-PH2N3AL5-BRVBGsSX.js","./pieDiagram-IB7DONF6-Bd9suVWv.js","./arc-Dg0I-9m1.js","./quadrantDiagram-7GDLP6J5-Bs4DyNjf.js","./xychartDiagram-VJFVF3MP-BIx1OvAe.js","./requirementDiagram-KVF5MWMF-DymCgMvI.js","./sequenceDiagram-X6HHIX6F-DvLeGWo9.js","./classDiagram-GIVACNV2-crUyrp4C.js","./chunk-A2AXSNBT-Bnzaay7E.js","./classDiagram-v2-COTLJTTW-crUyrp4C.js","./stateDiagram-DGXRK772-DyugZZym.js","./chunk-AEK57VVT-D6E6iv2X.js","./stateDiagram-v2-YXO3MK2T-BD7GaWgL.js","./journeyDiagram-U35MCT3I-CiYS6pRL.js","./timeline-definition-BDJGKUSR-B6m24a_n.js","./mindmap-definition-ALO5MXBD-B8OKj4Qj.js","./cytoscape.esm-C0AOj4uS.js","./kanban-definition-NDS4AKOZ-BcF1dSLj.js","./sankeyDiagram-QLVOVGJD-vLIhFWzQ.js","./diagram-VNBRO52H-ZbJyeILZ.js","./diagram-SSKATNLV-CASziOFr.js","./blockDiagram-JOT3LUYC-D2Cng1Yf.js","./architectureDiagram-IEHRJDOE-BEROcdGh.js"])))=>i.map(i=>d[i]);
2
2
  import { i as createStyled, l as resolveProps, m as useTheme, n as useTheme$1, r as reactExports, o as React, p as useEnhancedEffect$1, q as clsx, t as useForkRef$1, v as extendSxProp, j as jsxRuntimeExports, w as handleBreakpoints, x as resolveBreakpointValues, y as createUnarySpacing, z as deepmerge, A as mergeBreakpointsInOrder, F as composeClasses$1, G as generateUtilityClass$1, I as createTheme$1, J as getValue$1, h as React$1, K as requireReactDom, g as getDefaultExportFromCjs, L as defaultTheme$2, M as THEME_ID, N as generateUtilityClasses$1, O as useDefaultProps, s as styled$1, P as capitalize$1, Q as memoTheme, _ as _inheritsLoose, S as _objectWithoutPropertiesLoose$k, U as TransitionGroupContext, V as _extends$w, W as duration, u as useTheme$2, X as useTimeout$1, Y as useId$1, Z as ButtonBase, b as alpha$1, $ as createSimplePaletteValueFilter, a0 as CircularProgress, a1 as Paper, a2 as darken$1, a3 as lighten$1, a4 as useEventCallback$1, a5 as useRtl, a6 as globalCss, a7 as formatMuiErrorMessage$1, a8 as rootShouldForwardProp, T as Typography, a9 as css$1, k as keyframes, aa as getPath$2, ab as isFocusVisible, ac as typographyClasses, ad as slotShouldForwardProp, ae as clamp, af as emphasize, ag as Timeout$1, c as createLucideIcon, a as Button, B as Box, ah as FontAwesomeIcon, ai as faExclamationTriangle, D as DEFAULT_THEME, aj as faChevronLeft, ak as faChevronRight, al as faRobot, am as faCheck, an as faTimes, ao as faEraser, ap as faPen, aq as faFileImport, ar as faUpload, as as GlobalStyles, at as requireReact, au as faComment, av as faSave, aw as faEdit, ax as faTrashAlt, ay as faInfoCircle, az as faGear, aA as faPlus, aB as faServer, aC as faStar, aD as faTag, aE as faIdCard, aF as faCalendarAlt, aG as faCodeBranch, aH as faShieldAlt, aI as faArrowLeft, aJ as faClock, C as Code, aK as faSliders, aL as faTrash, aM as faHome, aN as faDownload, aO as faFileAlt, aP as faDesktop, aQ as faImage, aR as faMusic, aS as faVideo, aT as faLaptop, aU as faUsers, aV as faDatabase, aW as faBoxOpen, aX as faBook, aY as faHdd, aZ as faBox, a_ as faArchive, a$ as faNetworkWired, b0 as faFolder, b1 as faFolderOpen, b2 as faFolderTree, b3 as faArrowDown, b4 as faPaperclip, b5 as faStop, b6 as faPaperPlane, b7 as faFile, b8 as faExclamationCircle, b9 as faChevronDown, ba as isDevelopmentMode, bb as faCommentSlash, bc as faArrowRight, bd as faBrain, be as faWandMagicSparkles, bf as faExternalLinkAlt, bg as faKey, bh as radientTheme, bi as faGlobe, bj as faSearch, bk as PropTypes, bl as shouldForwardProp, bm as TransitionGroup, bn as commonjsGlobal, bo as faLock, bp as faPuzzlePiece, H as HardDrive, bq as faSignOut, br as themes$1, bs as faMoon, bt as faSun, bu as faHexagonNodes, bv as faSkull, bw as faLeaf, bx as faCode, by as faMountain, bz as faFire, bA as faIcicles, bB as faBolt, bC as faAdjust, bD as faWaveSquare, bE as faUser, bF as faEnvelope, bG as faHistory, bH as faListAlt, bI as faCreditCard, bJ as faPlusCircle, bK as faChartLine, bL as faShield, bM as library$1, bN as icons$1, f as CssBaseline, e as ThemeProvider$1, d as getTheme, R as ReactDOM$1, E as ErrorBoundary } from "./fonts-Bb3Axuvj.js";
3
3
  const styled = createStyled();
4
4
  function getThemeProps(params) {
@@ -36243,10 +36243,13 @@ const CirclePlus = createLucideIcon("circle-plus", __iconNode$17);
36243
36243
  * See the LICENSE file in the root directory of this source tree.
36244
36244
  */
36245
36245
  const __iconNode$16 = [
36246
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
36247
- ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
36246
+ ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
36247
+ ["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" }],
36248
+ ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
36249
+ ["path", { d: "M21 14H11", key: "1bme5i" }],
36250
+ ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
36248
36251
  ];
36249
- const CircleStop = createLucideIcon("circle-stop", __iconNode$16);
36252
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$16);
36250
36253
  /**
36251
36254
  * @license lucide-react v0.507.0 - ISC
36252
36255
  *
@@ -37387,6 +37390,22 @@ const ConfirmationModal = ({
37387
37390
  onConfirm,
37388
37391
  onCancel
37389
37392
  }) => {
37393
+ reactExports.useEffect(() => {
37394
+ const handleKeyDown = (event) => {
37395
+ if (!open2) {
37396
+ return;
37397
+ }
37398
+ if (event.key === "Enter") {
37399
+ onConfirm();
37400
+ } else if (event.key === "Escape") {
37401
+ onCancel();
37402
+ }
37403
+ };
37404
+ document.addEventListener("keydown", handleKeyDown);
37405
+ return () => {
37406
+ document.removeEventListener("keydown", handleKeyDown);
37407
+ };
37408
+ }, [open2, onConfirm, onCancel]);
37390
37409
  const dialogTitle = isDangerous ? /* @__PURE__ */ jsxRuntimeExports.jsxs(TitleContainer, { children: [
37391
37410
  /* @__PURE__ */ jsxRuntimeExports.jsx(WarningIcon, { icon: faExclamationTriangle }),
37392
37411
  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h6", component: "span", color: "error", children: title })
@@ -87055,7 +87074,7 @@ const languages = [
87055
87074
  name: "Go",
87056
87075
  extensions: ["go"],
87057
87076
  load() {
87058
- return __vitePreload(() => import("./index-JQ7XEBgh.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
87077
+ return __vitePreload(() => import("./index-BvMg8RoK.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
87059
87078
  }
87060
87079
  }),
87061
87080
  /* @__PURE__ */ LanguageDescription.of({
@@ -87232,7 +87251,7 @@ const languages = [
87232
87251
  alias: ["yml"],
87233
87252
  extensions: ["yaml", "yml"],
87234
87253
  load() {
87235
- return __vitePreload(() => import("./index-B1kgBLxO.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
87254
+ return __vitePreload(() => import("./index-ClmkH6IK.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
87236
87255
  }
87237
87256
  }),
87238
87257
  // Legacy modes ported from CodeMirror 5
@@ -126616,13 +126635,14 @@ const CodeEditor = ({ document: document2 }) => {
126616
126635
  const [languageExtensions, setLanguageExtensions] = reactExports.useState([]);
126617
126636
  const theme2 = useTheme$2();
126618
126637
  reactExports.useEffect(() => {
126619
- if (document2.id !== value?.id) {
126638
+ if (document2.id !== value?.id || document2.content !== value?.content) {
126620
126639
  setValue(document2);
126621
126640
  const newLangExtension = loadLanguageExtensions(document2.title);
126622
- if (!newLangExtension) return;
126623
- setLanguageExtensions([newLangExtension]);
126641
+ if (newLangExtension) {
126642
+ setLanguageExtensions([newLangExtension]);
126643
+ }
126624
126644
  }
126625
- }, [document2, value?.id]);
126645
+ }, [document2, value?.id, value?.content]);
126626
126646
  const codeEditorTheme = theme2.palette.mode === "light" ? basicLight : basicDark;
126627
126647
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
126628
126648
  Box,
@@ -126677,7 +126697,8 @@ const HtmlPreview = ({ document: document2 }) => {
126677
126697
  src: htmlUrl,
126678
126698
  title: `HTML Preview: ${document2.title}`,
126679
126699
  sandbox: "allow-scripts allow-same-origin allow-forms"
126680
- }
126700
+ },
126701
+ document2.content
126681
126702
  ) });
126682
126703
  };
126683
126704
  const search = /[#.]/g;
@@ -169671,7 +169692,7 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
169671
169692
  registerLayoutLoaders([
169672
169693
  {
169673
169694
  name: "dagre",
169674
- loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-OKDRZEBW-BsxbY4uX.js"), true ? __vite__mapDeps([6,7,8,9,10,11,1,2]) : void 0, import.meta.url), "loader")
169695
+ loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-OKDRZEBW-sjSQ3pUv.js"), true ? __vite__mapDeps([6,7,8,9,10,11,1,2]) : void 0, import.meta.url), "loader")
169675
169696
  }
169676
169697
  ]);
169677
169698
  }, "registerDefaultLayoutLoaders");
@@ -170261,7 +170282,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
170261
170282
  }, "detector");
170262
170283
  var loader = /* @__PURE__ */ __name(async () => {
170263
170284
  const { diagram: diagram2 } = await __vitePreload(async () => {
170264
- const { diagram: diagram22 } = await import("./c4Diagram-VJAJSXHY-C36lbIjS.js");
170285
+ const { diagram: diagram22 } = await import("./c4Diagram-VJAJSXHY-DZAmVkcX.js");
170265
170286
  return { diagram: diagram22 };
170266
170287
  }, true ? __vite__mapDeps([12,13,1,2]) : void 0, import.meta.url);
170267
170288
  return { id, diagram: diagram2 };
@@ -170281,7 +170302,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
170281
170302
  }, "detector");
170282
170303
  var loader2 = /* @__PURE__ */ __name(async () => {
170283
170304
  const { diagram: diagram2 } = await __vitePreload(async () => {
170284
- const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-BTDwdXoq.js");
170305
+ const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-QV5jY4yk.js");
170285
170306
  return { diagram: diagram22 };
170286
170307
  }, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
170287
170308
  return { id: id2, diagram: diagram2 };
@@ -170307,7 +170328,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
170307
170328
  }, "detector");
170308
170329
  var loader3 = /* @__PURE__ */ __name(async () => {
170309
170330
  const { diagram: diagram2 } = await __vitePreload(async () => {
170310
- const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-BTDwdXoq.js");
170331
+ const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-QV5jY4yk.js");
170311
170332
  return { diagram: diagram22 };
170312
170333
  }, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
170313
170334
  return { id: id3, diagram: diagram2 };
@@ -170324,7 +170345,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
170324
170345
  }, "detector");
170325
170346
  var loader4 = /* @__PURE__ */ __name(async () => {
170326
170347
  const { diagram: diagram2 } = await __vitePreload(async () => {
170327
- const { diagram: diagram22 } = await import("./erDiagram-Q7BY3M3F-Ccs7n14X.js");
170348
+ const { diagram: diagram22 } = await import("./erDiagram-Q7BY3M3F-xM-l45kg.js");
170328
170349
  return { diagram: diagram22 };
170329
170350
  }, true ? __vite__mapDeps([17,15,16,1,2]) : void 0, import.meta.url);
170330
170351
  return { id: id4, diagram: diagram2 };
@@ -170341,7 +170362,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
170341
170362
  }, "detector");
170342
170363
  var loader5 = /* @__PURE__ */ __name(async () => {
170343
170364
  const { diagram: diagram2 } = await __vitePreload(async () => {
170344
- const { diagram: diagram22 } = await import("./gitGraphDiagram-7IBYFJ6S-BrsAP7d3.js");
170365
+ const { diagram: diagram22 } = await import("./gitGraphDiagram-7IBYFJ6S-C2VL8kHA.js");
170345
170366
  return { diagram: diagram22 };
170346
170367
  }, true ? __vite__mapDeps([18,19,20,21,8,10,11,1,2]) : void 0, import.meta.url);
170347
170368
  return { id: id5, diagram: diagram2 };
@@ -170358,7 +170379,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
170358
170379
  }, "detector");
170359
170380
  var loader6 = /* @__PURE__ */ __name(async () => {
170360
170381
  const { diagram: diagram2 } = await __vitePreload(async () => {
170361
- const { diagram: diagram22 } = await import("./ganttDiagram-APWFNJXF-BsHcmVQL.js");
170382
+ const { diagram: diagram22 } = await import("./ganttDiagram-APWFNJXF-CAR2eCVK.js");
170362
170383
  return { diagram: diagram22 };
170363
170384
  }, true ? __vite__mapDeps([22,1,2]) : void 0, import.meta.url);
170364
170385
  return { id: id6, diagram: diagram2 };
@@ -170375,7 +170396,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
170375
170396
  }, "detector");
170376
170397
  var loader7 = /* @__PURE__ */ __name(async () => {
170377
170398
  const { diagram: diagram2 } = await __vitePreload(async () => {
170378
- const { diagram: diagram22 } = await import("./infoDiagram-PH2N3AL5-CeBCRQ-r.js");
170399
+ const { diagram: diagram22 } = await import("./infoDiagram-PH2N3AL5-BRVBGsSX.js");
170379
170400
  return { diagram: diagram22 };
170380
170401
  }, true ? __vite__mapDeps([23,21,8,10,11,1,2]) : void 0, import.meta.url);
170381
170402
  return { id: id7, diagram: diagram2 };
@@ -170391,7 +170412,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
170391
170412
  }, "detector");
170392
170413
  var loader8 = /* @__PURE__ */ __name(async () => {
170393
170414
  const { diagram: diagram2 } = await __vitePreload(async () => {
170394
- const { diagram: diagram22 } = await import("./pieDiagram-IB7DONF6-CwHy1pe3.js");
170415
+ const { diagram: diagram22 } = await import("./pieDiagram-IB7DONF6-Bd9suVWv.js");
170395
170416
  return { diagram: diagram22 };
170396
170417
  }, true ? __vite__mapDeps([24,19,21,8,10,11,25,1,2]) : void 0, import.meta.url);
170397
170418
  return { id: id8, diagram: diagram2 };
@@ -170407,7 +170428,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
170407
170428
  }, "detector");
170408
170429
  var loader9 = /* @__PURE__ */ __name(async () => {
170409
170430
  const { diagram: diagram2 } = await __vitePreload(async () => {
170410
- const { diagram: diagram22 } = await import("./quadrantDiagram-7GDLP6J5-DteRiyWH.js");
170431
+ const { diagram: diagram22 } = await import("./quadrantDiagram-7GDLP6J5-Bs4DyNjf.js");
170411
170432
  return { diagram: diagram22 };
170412
170433
  }, true ? __vite__mapDeps([26,1,2]) : void 0, import.meta.url);
170413
170434
  return { id: id9, diagram: diagram2 };
@@ -170424,7 +170445,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
170424
170445
  }, "detector");
170425
170446
  var loader10 = /* @__PURE__ */ __name(async () => {
170426
170447
  const { diagram: diagram2 } = await __vitePreload(async () => {
170427
- const { diagram: diagram22 } = await import("./xychartDiagram-VJFVF3MP-DjE9t7Qo.js");
170448
+ const { diagram: diagram22 } = await import("./xychartDiagram-VJFVF3MP-BIx1OvAe.js");
170428
170449
  return { diagram: diagram22 };
170429
170450
  }, true ? __vite__mapDeps([27,1,2]) : void 0, import.meta.url);
170430
170451
  return { id: id10, diagram: diagram2 };
@@ -170441,7 +170462,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
170441
170462
  }, "detector");
170442
170463
  var loader11 = /* @__PURE__ */ __name(async () => {
170443
170464
  const { diagram: diagram2 } = await __vitePreload(async () => {
170444
- const { diagram: diagram22 } = await import("./requirementDiagram-KVF5MWMF-Cjtft40u.js");
170465
+ const { diagram: diagram22 } = await import("./requirementDiagram-KVF5MWMF-DymCgMvI.js");
170445
170466
  return { diagram: diagram22 };
170446
170467
  }, true ? __vite__mapDeps([28,15,1,2]) : void 0, import.meta.url);
170447
170468
  return { id: id11, diagram: diagram2 };
@@ -170458,7 +170479,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
170458
170479
  }, "detector");
170459
170480
  var loader12 = /* @__PURE__ */ __name(async () => {
170460
170481
  const { diagram: diagram2 } = await __vitePreload(async () => {
170461
- const { diagram: diagram22 } = await import("./sequenceDiagram-X6HHIX6F-CMUs0WWj.js");
170482
+ const { diagram: diagram22 } = await import("./sequenceDiagram-X6HHIX6F-DvLeGWo9.js");
170462
170483
  return { diagram: diagram22 };
170463
170484
  }, true ? __vite__mapDeps([29,13,20,1,2]) : void 0, import.meta.url);
170464
170485
  return { id: id12, diagram: diagram2 };
@@ -170478,7 +170499,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
170478
170499
  }, "detector");
170479
170500
  var loader13 = /* @__PURE__ */ __name(async () => {
170480
170501
  const { diagram: diagram2 } = await __vitePreload(async () => {
170481
- const { diagram: diagram22 } = await import("./classDiagram-GIVACNV2-vtFcXgAr.js");
170502
+ const { diagram: diagram22 } = await import("./classDiagram-GIVACNV2-crUyrp4C.js");
170482
170503
  return { diagram: diagram22 };
170483
170504
  }, true ? __vite__mapDeps([30,31,15,1,2]) : void 0, import.meta.url);
170484
170505
  return { id: id13, diagram: diagram2 };
@@ -170498,7 +170519,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
170498
170519
  }, "detector");
170499
170520
  var loader14 = /* @__PURE__ */ __name(async () => {
170500
170521
  const { diagram: diagram2 } = await __vitePreload(async () => {
170501
- const { diagram: diagram22 } = await import("./classDiagram-v2-COTLJTTW-vtFcXgAr.js");
170522
+ const { diagram: diagram22 } = await import("./classDiagram-v2-COTLJTTW-crUyrp4C.js");
170502
170523
  return { diagram: diagram22 };
170503
170524
  }, true ? __vite__mapDeps([32,31,15,1,2]) : void 0, import.meta.url);
170504
170525
  return { id: id14, diagram: diagram2 };
@@ -170518,7 +170539,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
170518
170539
  }, "detector");
170519
170540
  var loader15 = /* @__PURE__ */ __name(async () => {
170520
170541
  const { diagram: diagram2 } = await __vitePreload(async () => {
170521
- const { diagram: diagram22 } = await import("./stateDiagram-DGXRK772-JkRRAJkE.js");
170542
+ const { diagram: diagram22 } = await import("./stateDiagram-DGXRK772-DyugZZym.js");
170522
170543
  return { diagram: diagram22 };
170523
170544
  }, true ? __vite__mapDeps([33,34,15,7,8,9,10,1,2]) : void 0, import.meta.url);
170524
170545
  return { id: id15, diagram: diagram2 };
@@ -170541,7 +170562,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
170541
170562
  }, "detector");
170542
170563
  var loader16 = /* @__PURE__ */ __name(async () => {
170543
170564
  const { diagram: diagram2 } = await __vitePreload(async () => {
170544
- const { diagram: diagram22 } = await import("./stateDiagram-v2-YXO3MK2T-DhB-86w-.js");
170565
+ const { diagram: diagram22 } = await import("./stateDiagram-v2-YXO3MK2T-BD7GaWgL.js");
170545
170566
  return { diagram: diagram22 };
170546
170567
  }, true ? __vite__mapDeps([35,34,15,1,2]) : void 0, import.meta.url);
170547
170568
  return { id: id16, diagram: diagram2 };
@@ -170558,7 +170579,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
170558
170579
  }, "detector");
170559
170580
  var loader17 = /* @__PURE__ */ __name(async () => {
170560
170581
  const { diagram: diagram2 } = await __vitePreload(async () => {
170561
- const { diagram: diagram22 } = await import("./journeyDiagram-U35MCT3I-CFEflF1X.js");
170582
+ const { diagram: diagram22 } = await import("./journeyDiagram-U35MCT3I-CiYS6pRL.js");
170562
170583
  return { diagram: diagram22 };
170563
170584
  }, true ? __vite__mapDeps([36,13,25,1,2]) : void 0, import.meta.url);
170564
170585
  return { id: id17, diagram: diagram2 };
@@ -170628,7 +170649,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
170628
170649
  }, "detector");
170629
170650
  var loader18 = /* @__PURE__ */ __name(async () => {
170630
170651
  const { diagram: diagram2 } = await __vitePreload(async () => {
170631
- const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-BTDwdXoq.js");
170652
+ const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-QV5jY4yk.js");
170632
170653
  return { diagram: diagram22 };
170633
170654
  }, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
170634
170655
  return { id: id18, diagram: diagram2 };
@@ -170645,7 +170666,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
170645
170666
  }, "detector");
170646
170667
  var loader19 = /* @__PURE__ */ __name(async () => {
170647
170668
  const { diagram: diagram2 } = await __vitePreload(async () => {
170648
- const { diagram: diagram22 } = await import("./timeline-definition-BDJGKUSR-DmImWV1j.js");
170669
+ const { diagram: diagram22 } = await import("./timeline-definition-BDJGKUSR-B6m24a_n.js");
170649
170670
  return { diagram: diagram22 };
170650
170671
  }, true ? __vite__mapDeps([37,25,1,2]) : void 0, import.meta.url);
170651
170672
  return { id: id19, diagram: diagram2 };
@@ -170662,7 +170683,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
170662
170683
  }, "detector");
170663
170684
  var loader20 = /* @__PURE__ */ __name(async () => {
170664
170685
  const { diagram: diagram2 } = await __vitePreload(async () => {
170665
- const { diagram: diagram22 } = await import("./mindmap-definition-ALO5MXBD-DuRohiYz.js");
170686
+ const { diagram: diagram22 } = await import("./mindmap-definition-ALO5MXBD-B8OKj4Qj.js");
170666
170687
  return { diagram: diagram22 };
170667
170688
  }, true ? __vite__mapDeps([38,39,1,2]) : void 0, import.meta.url);
170668
170689
  return { id: id20, diagram: diagram2 };
@@ -170679,7 +170700,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
170679
170700
  }, "detector");
170680
170701
  var loader21 = /* @__PURE__ */ __name(async () => {
170681
170702
  const { diagram: diagram2 } = await __vitePreload(async () => {
170682
- const { diagram: diagram22 } = await import("./kanban-definition-NDS4AKOZ-lJsLyjEH.js");
170703
+ const { diagram: diagram22 } = await import("./kanban-definition-NDS4AKOZ-BcF1dSLj.js");
170683
170704
  return { diagram: diagram22 };
170684
170705
  }, true ? __vite__mapDeps([40,1,2]) : void 0, import.meta.url);
170685
170706
  return { id: id21, diagram: diagram2 };
@@ -170696,7 +170717,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
170696
170717
  }, "detector");
170697
170718
  var loader22 = /* @__PURE__ */ __name(async () => {
170698
170719
  const { diagram: diagram2 } = await __vitePreload(async () => {
170699
- const { diagram: diagram22 } = await import("./sankeyDiagram-QLVOVGJD-DQ_oTubV.js");
170720
+ const { diagram: diagram22 } = await import("./sankeyDiagram-QLVOVGJD-vLIhFWzQ.js");
170700
170721
  return { diagram: diagram22 };
170701
170722
  }, true ? __vite__mapDeps([41,1,2]) : void 0, import.meta.url);
170702
170723
  return { id: id22, diagram: diagram2 };
@@ -170713,7 +170734,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
170713
170734
  }, "detector");
170714
170735
  var loader23 = /* @__PURE__ */ __name(async () => {
170715
170736
  const { diagram: diagram2 } = await __vitePreload(async () => {
170716
- const { diagram: diagram22 } = await import("./diagram-VNBRO52H-CU_0csUZ.js");
170737
+ const { diagram: diagram22 } = await import("./diagram-VNBRO52H-ZbJyeILZ.js");
170717
170738
  return { diagram: diagram22 };
170718
170739
  }, true ? __vite__mapDeps([42,19,21,8,10,11,1,2]) : void 0, import.meta.url);
170719
170740
  return { id: id23, diagram: diagram2 };
@@ -170729,7 +170750,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
170729
170750
  }, "detector");
170730
170751
  var loader24 = /* @__PURE__ */ __name(async () => {
170731
170752
  const { diagram: diagram2 } = await __vitePreload(async () => {
170732
- const { diagram: diagram22 } = await import("./diagram-SSKATNLV-Cc6v1RBI.js");
170753
+ const { diagram: diagram22 } = await import("./diagram-SSKATNLV-CASziOFr.js");
170733
170754
  return { diagram: diagram22 };
170734
170755
  }, true ? __vite__mapDeps([43,19,21,8,10,11,1,2]) : void 0, import.meta.url);
170735
170756
  return { id: id24, diagram: diagram2 };
@@ -170745,7 +170766,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
170745
170766
  }, "detector");
170746
170767
  var loader25 = /* @__PURE__ */ __name(async () => {
170747
170768
  const { diagram: diagram2 } = await __vitePreload(async () => {
170748
- const { diagram: diagram22 } = await import("./blockDiagram-JOT3LUYC-B1Up6r6-.js");
170769
+ const { diagram: diagram22 } = await import("./blockDiagram-JOT3LUYC-D2Cng1Yf.js");
170749
170770
  return { diagram: diagram22 };
170750
170771
  }, true ? __vite__mapDeps([44,11,8,7,16,1,2]) : void 0, import.meta.url);
170751
170772
  return { id: id25, diagram: diagram2 };
@@ -170762,7 +170783,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
170762
170783
  }, "detector");
170763
170784
  var loader26 = /* @__PURE__ */ __name(async () => {
170764
170785
  const { diagram: diagram2 } = await __vitePreload(async () => {
170765
- const { diagram: diagram22 } = await import("./architectureDiagram-IEHRJDOE-Bx8X697l.js");
170786
+ const { diagram: diagram22 } = await import("./architectureDiagram-IEHRJDOE-BEROcdGh.js");
170766
170787
  return { diagram: diagram22 };
170767
170788
  }, true ? __vite__mapDeps([45,19,20,21,8,10,11,39,1,2]) : void 0, import.meta.url);
170768
170789
  return { id: id26, diagram: diagram2 };
@@ -172233,10 +172254,51 @@ const CanvasContentComponent = ({ document: document2 }) => {
172233
172254
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CodeEditor, { document: document2 });
172234
172255
  };
172235
172256
  const CanvasContent = reactExports.memo(CanvasContentComponent);
172257
+ const getFileTypeFromPath = (filePath) => {
172258
+ if (filePath.startsWith("data:image/")) return "image";
172259
+ if (filePath.startsWith("data:video/")) return "video";
172260
+ if (filePath.startsWith("data:application/pdf")) return "pdf";
172261
+ const extension2 = filePath.split(".").pop()?.toLowerCase();
172262
+ if (!extension2) return "other";
172263
+ if (["png", "jpg", "jpeg", "gif", "bmp", "webp", "svg"].includes(extension2))
172264
+ return "image";
172265
+ if (["mp4", "webm", "ogg", "mov", "avi", "mkv"].includes(extension2))
172266
+ return "video";
172267
+ if (["pdf"].includes(extension2)) return "pdf";
172268
+ if (["md", "markdown"].includes(extension2)) return "markdown";
172269
+ if (["html", "htm"].includes(extension2)) return "html";
172270
+ if (["zip", "tar", "gz", "rar", "7z"].includes(extension2)) return "archive";
172271
+ if (["txt", "log", "csv", "json", "xml", "yaml", "yml"].includes(extension2))
172272
+ return "text";
172273
+ if ([
172274
+ "js",
172275
+ "ts",
172276
+ "jsx",
172277
+ "tsx",
172278
+ "py",
172279
+ "java",
172280
+ "c",
172281
+ "cpp",
172282
+ "cs",
172283
+ "go",
172284
+ "rb",
172285
+ "php",
172286
+ "sh",
172287
+ "css",
172288
+ "scss",
172289
+ "less"
172290
+ ].includes(extension2))
172291
+ return "code";
172292
+ if (["doc", "docx", "odt"].includes(extension2)) return "document";
172293
+ if (["xls", "xlsx", "ods"].includes(extension2)) return "spreadsheet";
172294
+ if (["ppt", "pptx", "odp"].includes(extension2)) return "presentation";
172295
+ if (["mp3", "wav", "aac", "flac"].includes(extension2)) return "audio";
172296
+ return "other";
172297
+ };
172236
172298
  const RESOURCE_NAME_REGEX$2 = /name=([^;,]+)/;
172237
- const PATH_SEPARATOR_REGEX$5 = /[/\\]/;
172299
+ const PATH_SEPARATOR_REGEX$4 = /[/\\]/;
172238
172300
  const DATA_URI_REGEX = /^data:([^;,]+)/;
172239
- const getFileName$4 = (path2) => {
172301
+ const getFileName$3 = (path2) => {
172240
172302
  if (path2.startsWith("data:image/")) {
172241
172303
  const nameMatch = path2.match(RESOURCE_NAME_REGEX$2);
172242
172304
  if (nameMatch?.[1]) {
@@ -172266,7 +172328,7 @@ const getFileName$4 = (path2) => {
172266
172328
  }
172267
172329
  return "Pasted File";
172268
172330
  }
172269
- const parts = path2.split(PATH_SEPARATOR_REGEX$5);
172331
+ const parts = path2.split(PATH_SEPARATOR_REGEX$4);
172270
172332
  return parts[parts.length - 1];
172271
172333
  };
172272
172334
  const canvasSupportedExtensions = /* @__PURE__ */ new Set([
@@ -172348,6 +172410,18 @@ const FileActionsMenu = ({
172348
172410
  const handleCloseMenu = () => {
172349
172411
  setAnchorEl(null);
172350
172412
  };
172413
+ const handleCopyFilePath = async () => {
172414
+ handleCloseMenu();
172415
+ if (filePath) {
172416
+ try {
172417
+ await navigator.clipboard.writeText(filePath);
172418
+ showSuccessToast("File path copied to clipboard");
172419
+ } catch (err) {
172420
+ console.error("Failed to copy file path: ", err);
172421
+ showErrorToast("Failed to copy file path");
172422
+ }
172423
+ }
172424
+ };
172351
172425
  const handleOpenFile = () => {
172352
172426
  handleCloseMenu();
172353
172427
  if (filePath) {
@@ -172398,7 +172472,11 @@ const FileActionsMenu = ({
172398
172472
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Open Folder" })
172399
172473
  ]
172400
172474
  }
172401
- )
172475
+ ),
172476
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledMenuItem$2, { onClick: handleCopyFilePath, children: [
172477
+ /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItemIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClipboardCopy, { "aria-label": "Copy File Path" }) }),
172478
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Copy File Path" })
172479
+ ] })
172402
172480
  ]
172403
172481
  }
172404
172482
  )
@@ -172537,7 +172615,19 @@ const CanvasFileViewer = ({
172537
172615
  const setFiles = useCanvasStore((s2) => s2.setFiles);
172538
172616
  const setOpenTabs = useCanvasStore((s2) => s2.setOpenTabs);
172539
172617
  const setSelectedTab = useCanvasStore((s2) => s2.setSelectedTab);
172540
- const memoizedFiles = reactExports.useMemo(() => files, [files]);
172618
+ const memoizedFiles = reactExports.useMemo(() => {
172619
+ const filesByBaseName = files.reduce(
172620
+ (acc, file) => {
172621
+ const name2 = getFileName$3(file.path);
172622
+ if (!acc[name2] || file.path.length > acc[name2].path.length) {
172623
+ acc[name2] = file;
172624
+ }
172625
+ return acc;
172626
+ },
172627
+ {}
172628
+ );
172629
+ return Object.values(filesByBaseName);
172630
+ }, [files]);
172541
172631
  const client = reactExports.useMemo(() => {
172542
172632
  return createLocalOperatorClient(apiConfig.baseUrl);
172543
172633
  }, []);
@@ -172571,8 +172661,9 @@ const CanvasFileViewer = ({
172571
172661
  title,
172572
172662
  path: docId,
172573
172663
  // Store data URI as path for consistency if needed
172574
- content: fileDoc.path
172664
+ content: fileDoc.path,
172575
172665
  // The content is the data URI itself
172666
+ type: getFileTypeFromPath(title)
172576
172667
  };
172577
172668
  const state2 = useCanvasStore.getState();
172578
172669
  const conversationCanvasState = state2.conversations?.[conversationId];
@@ -172608,7 +172699,8 @@ const CanvasFileViewer = ({
172608
172699
  id: docId,
172609
172700
  title,
172610
172701
  path: normalizedPath,
172611
- content: result.data
172702
+ content: result.data,
172703
+ type: getFileTypeFromPath(title)
172612
172704
  };
172613
172705
  const state2 = useCanvasStore.getState();
172614
172706
  const conversationCanvasState = state2.conversations?.[conversationId];
@@ -172720,7 +172812,7 @@ const CanvasFileViewer = ({
172720
172812
  CardContent,
172721
172813
  {
172722
172814
  sx: { width: "100%", pt: 1, pb: "8px !important" },
172723
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: fileDoc.title, placement: "bottom", arrow: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileNameTypography, { variant: "caption", children: getFileName$4(fileDoc.title) }) })
172815
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: fileDoc.title, placement: "bottom", arrow: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FileNameTypography, { variant: "caption", children: getFileName$3(fileDoc.title) }) })
172724
172816
  }
172725
172817
  )
172726
172818
  ]
@@ -174706,7 +174798,7 @@ styled$1(Tab, {
174706
174798
  fontSize: "0.9rem"
174707
174799
  }
174708
174800
  }));
174709
- const PATH_SEPARATOR_REGEX$4 = /[/\\]/;
174801
+ const PATH_SEPARATOR_REGEX$3 = /[/\\]/;
174710
174802
  const RESOURCE_NAME_REGEX$1 = /name=([^;,]+)/;
174711
174803
  const MIME_TYPE_REGEX = /^data:([^;,]+)/;
174712
174804
  const AttachmentsContainer = styled$1(Box)(({ theme: theme2 }) => ({
@@ -174873,7 +174965,7 @@ const AttachmentsPreview = ({
174873
174965
  }
174874
174966
  return "Pasted File";
174875
174967
  }
174876
- const parts = path2.split(PATH_SEPARATOR_REGEX$4);
174968
+ const parts = path2.split(PATH_SEPARATOR_REGEX$3);
174877
174969
  return parts[parts.length - 1];
174878
174970
  }, []);
174879
174971
  const getAttachmentUrl2 = reactExports.useCallback(
@@ -176016,12 +176108,45 @@ const MessageInput = reactExports.forwardRef(
176016
176108
  showErrorToast("Audio recording is not supported on your browser.");
176017
176109
  }
176018
176110
  }, []);
176019
- const handleStopRecording = reactExports.useCallback(() => {
176111
+ const handleConfirmRecording = reactExports.useCallback(() => {
176112
+ if (mediaRecorderRef.current && isRecording) {
176113
+ mediaRecorderRef.current.stop();
176114
+ setIsRecording(false);
176115
+ }
176116
+ }, [isRecording]);
176117
+ const handleCancelRecording = reactExports.useCallback(() => {
176020
176118
  if (mediaRecorderRef.current && isRecording) {
176119
+ mediaRecorderRef.current.onstop = () => {
176120
+ if (mediaRecorderRef.current?.stream) {
176121
+ for (const track of mediaRecorderRef.current.stream.getTracks()) {
176122
+ track.stop();
176123
+ }
176124
+ }
176125
+ setAudioBlob(null);
176126
+ audioChunksRef.current = [];
176127
+ };
176021
176128
  mediaRecorderRef.current.stop();
176022
176129
  setIsRecording(false);
176023
176130
  }
176024
176131
  }, [isRecording]);
176132
+ reactExports.useEffect(() => {
176133
+ if (isRecording) {
176134
+ const handleKeyDown2 = (event) => {
176135
+ if (event.key === "Enter") {
176136
+ event.preventDefault();
176137
+ handleConfirmRecording();
176138
+ } else if (event.key === "Escape") {
176139
+ event.preventDefault();
176140
+ handleCancelRecording();
176141
+ }
176142
+ };
176143
+ window.addEventListener("keydown", handleKeyDown2);
176144
+ return () => {
176145
+ window.removeEventListener("keydown", handleKeyDown2);
176146
+ };
176147
+ }
176148
+ return void 0;
176149
+ }, [isRecording, handleConfirmRecording, handleCancelRecording]);
176025
176150
  const handleSendAudio = reactExports.useCallback(async () => {
176026
176151
  if (!audioBlob) return;
176027
176152
  try {
@@ -176178,51 +176303,68 @@ const MessageInput = reactExports.forwardRef(
176178
176303
  )
176179
176304
  ] }),
176180
176305
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
176181
- !isLoading && !currentJobId && !isTranscribing && // @ts-ignore Tooltip type issue
176182
- /* @__PURE__ */ jsxRuntimeExports.jsx(
176306
+ !isRecording && !isTranscribing && !(isLoading && currentJobId) && /* @__PURE__ */ jsxRuntimeExports.jsx(
176183
176307
  Tooltip$1,
176184
176308
  {
176185
- title: !canEnableRecordingFeature ? "Sign in to Radient in the settings page to enable audio recording" : isRecording ? "Stop recording" : "Start recording",
176309
+ title: !canEnableRecordingFeature ? "Sign in to Radient in the settings page to enable audio recording" : "Start recording",
176186
176310
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176187
176311
  IconButton,
176188
176312
  {
176189
- onClick: isRecording ? handleStopRecording : handleStartRecording,
176190
- color: isRecording ? "error" : "primary",
176313
+ onClick: handleStartRecording,
176314
+ color: "primary",
176191
176315
  size: "small",
176192
- "aria-label": isRecording ? "Stop recording" : "Start recording",
176316
+ "aria-label": "Start recording",
176193
176317
  disabled: isLoading || !canEnableRecordingFeature,
176194
- children: isRecording ? /* @__PURE__ */ jsxRuntimeExports.jsx(CircleStop, { size: 24 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Mic, { size: 24 })
176318
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Mic, { size: 22 })
176195
176319
  }
176196
176320
  ) })
176197
176321
  }
176198
176322
  ),
176199
- isLoading && currentJobId ? (
176200
- // @ts-ignore Tooltip type issue
176201
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Stop agent", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176202
- SendButton,
176323
+ isRecording && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
176324
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Confirm recording (Enter)", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176325
+ IconButton,
176203
176326
  {
176204
- type: "button",
176205
- variant: "contained",
176206
- color: "error",
176207
- onClick: () => onCancelJob?.(currentJobId),
176208
- "aria-label": "Stop agent",
176209
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faStop })
176327
+ onClick: handleConfirmRecording,
176328
+ color: "success",
176329
+ size: "small",
176330
+ "aria-label": "Confirm recording",
176331
+ disabled: isLoading,
176332
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 18 })
176210
176333
  }
176211
- ) }) })
176212
- ) : (
176213
- // @ts-ignore Tooltip type issue
176214
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Send message", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176215
- SendButton,
176334
+ ) }) }),
176335
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Cancel recording (Esc)", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176336
+ IconButton,
176216
176337
  {
176217
- type: "submit",
176218
- variant: "contained",
176219
- color: "primary",
176220
- disabled: isLoading || isRecording || isTranscribing || !newMessage.trim() && attachments.length === 0,
176221
- "aria-label": "Send message",
176222
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperPlane })
176338
+ onClick: handleCancelRecording,
176339
+ color: "error",
176340
+ size: "small",
176341
+ "aria-label": "Cancel recording",
176342
+ disabled: isLoading,
176343
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$2, { size: 18 })
176223
176344
  }
176224
176345
  ) }) })
176225
- )
176346
+ ] }),
176347
+ isLoading && currentJobId ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Stop agent", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176348
+ SendButton,
176349
+ {
176350
+ type: "button",
176351
+ variant: "contained",
176352
+ color: "error",
176353
+ onClick: () => onCancelJob?.(currentJobId),
176354
+ "aria-label": "Stop agent",
176355
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faStop })
176356
+ }
176357
+ ) }) }) : !isRecording && !isTranscribing && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Send message", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
176358
+ SendButton,
176359
+ {
176360
+ type: "submit",
176361
+ variant: "contained",
176362
+ color: "primary",
176363
+ disabled: isLoading || !newMessage.trim() && attachments.length === 0,
176364
+ "aria-label": "Send message",
176365
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperPlane })
176366
+ }
176367
+ ) }) })
176226
176368
  ] })
176227
176369
  ] })
176228
176370
  ] }),
@@ -176537,47 +176679,6 @@ const LoadingIndicator = reactExports.memo(({ status, currentExecution }) => {
176537
176679
  ] }) }) })
176538
176680
  ] });
176539
176681
  });
176540
- const getFileTypeFromPath = (filePath) => {
176541
- if (filePath.startsWith("data:image/")) return "image";
176542
- if (filePath.startsWith("data:video/")) return "video";
176543
- if (filePath.startsWith("data:application/pdf")) return "pdf";
176544
- const extension2 = filePath.split(".").pop()?.toLowerCase();
176545
- if (!extension2) return "other";
176546
- if (["png", "jpg", "jpeg", "gif", "bmp", "webp", "svg"].includes(extension2))
176547
- return "image";
176548
- if (["mp4", "webm", "ogg", "mov", "avi", "mkv"].includes(extension2))
176549
- return "video";
176550
- if (["pdf"].includes(extension2)) return "pdf";
176551
- if (["md", "markdown"].includes(extension2)) return "markdown";
176552
- if (["html", "htm"].includes(extension2)) return "html";
176553
- if (["zip", "tar", "gz", "rar", "7z"].includes(extension2)) return "archive";
176554
- if (["txt", "log", "csv", "json", "xml", "yaml", "yml"].includes(extension2))
176555
- return "text";
176556
- if ([
176557
- "js",
176558
- "ts",
176559
- "jsx",
176560
- "tsx",
176561
- "py",
176562
- "java",
176563
- "c",
176564
- "cpp",
176565
- "cs",
176566
- "go",
176567
- "rb",
176568
- "php",
176569
- "sh",
176570
- "css",
176571
- "scss",
176572
- "less"
176573
- ].includes(extension2))
176574
- return "code";
176575
- if (["doc", "docx", "odt"].includes(extension2)) return "document";
176576
- if (["xls", "xlsx", "ods"].includes(extension2)) return "spreadsheet";
176577
- if (["ppt", "pptx", "odp"].includes(extension2)) return "presentation";
176578
- if (["mp3", "wav", "aac", "flac"].includes(extension2)) return "audio";
176579
- return "other";
176580
- };
176581
176682
  const FILE_EXTENSION_REGEX = /\.([a-zA-Z0-9]+)$/;
176582
176683
  const PATH_SLASH_REGEX = /[\\/]/;
176583
176684
  const getLanguageFromExtension = (filename) => {
@@ -214443,8 +214544,8 @@ const FileActionsContainer$2 = styled$1(Box)({
214443
214544
  visibility: "hidden",
214444
214545
  transition: "opacity 0.2s ease, visibility 0.2s ease"
214445
214546
  });
214446
- const PATH_SEPARATOR_REGEX$3 = /[/\\]/;
214447
- const getFileName$3 = (path2) => {
214547
+ const PATH_SEPARATOR_REGEX$2 = /[/\\]/;
214548
+ const getFileName$2 = (path2) => {
214448
214549
  if (path2.startsWith("data:image/")) {
214449
214550
  const nameMatch = path2.match(RESOURCE_NAME_REGEX);
214450
214551
  if (nameMatch?.[1]) {
@@ -214467,15 +214568,69 @@ const getFileName$3 = (path2) => {
214467
214568
  }
214468
214569
  return "Pasted File";
214469
214570
  }
214470
- const parts = path2.split(PATH_SEPARATOR_REGEX$3);
214571
+ const parts = path2.split(PATH_SEPARATOR_REGEX$2);
214471
214572
  return parts[parts.length - 1];
214472
214573
  };
214473
214574
  const FileAttachment = reactExports.memo(
214474
214575
  ({ file, onClick, conversationId }) => {
214475
214576
  const setCanvasOpen = useUiPreferencesStore((s2) => s2.setCanvasOpen);
214476
214577
  const { setViewMode } = useCanvasStore();
214578
+ reactExports.useEffect(() => {
214579
+ const autoUpdateOpenFile = async () => {
214580
+ const state2 = useCanvasStore.getState();
214581
+ const conversationCanvasState = state2.conversations?.[conversationId];
214582
+ if (!conversationCanvasState) return;
214583
+ const openTabs = conversationCanvasState.openTabs ?? [];
214584
+ const filesInState = conversationCanvasState.files ?? [];
214585
+ const title = getFileName$2(file);
214586
+ const normalizedPath2 = file.startsWith("file://") ? file.substring(7) : file;
214587
+ const docId = file.startsWith("data:") ? file : normalizedPath2;
214588
+ const isFileOpen = openTabs.some((tab2) => tab2.id === docId);
214589
+ if (!isFileOpen) return;
214590
+ if (file.startsWith("data:")) {
214591
+ const newDoc = {
214592
+ id: docId,
214593
+ title,
214594
+ path: docId,
214595
+ content: file,
214596
+ type: getFileTypeFromPath(file)
214597
+ };
214598
+ const fileIndex = filesInState.findIndex((f2) => f2.id === docId);
214599
+ if (fileIndex !== -1) {
214600
+ const updatedFiles = [...filesInState];
214601
+ updatedFiles[fileIndex] = newDoc;
214602
+ state2.setFiles(conversationId, updatedFiles);
214603
+ }
214604
+ } else {
214605
+ try {
214606
+ const result = await window.api.readFile(normalizedPath2);
214607
+ if (result.success) {
214608
+ const newDoc = {
214609
+ id: docId,
214610
+ title,
214611
+ path: normalizedPath2,
214612
+ content: result.data,
214613
+ type: getFileTypeFromPath(file)
214614
+ };
214615
+ const fileIndex = filesInState.findIndex((f2) => f2.id === docId);
214616
+ if (fileIndex !== -1) {
214617
+ const updatedFiles = [...filesInState];
214618
+ updatedFiles[fileIndex] = newDoc;
214619
+ state2.setFiles(conversationId, updatedFiles);
214620
+ }
214621
+ }
214622
+ } catch (error) {
214623
+ console.error(
214624
+ `Failed to auto-refresh file in canvas: ${normalizedPath2}`,
214625
+ error
214626
+ );
214627
+ }
214628
+ }
214629
+ };
214630
+ autoUpdateOpenFile();
214631
+ }, [file, conversationId]);
214477
214632
  const handleClick = reactExports.useCallback(async () => {
214478
- const title = getFileName$3(file);
214633
+ const title = getFileName$2(file);
214479
214634
  const fallbackAction = (err) => {
214480
214635
  if (err) console.error("Error processing file:", err);
214481
214636
  onClick(file);
@@ -214572,7 +214727,7 @@ const FileAttachment = reactExports.memo(
214572
214727
  FileAttachmentContainer,
214573
214728
  {
214574
214729
  onClick: handleClick,
214575
- title: `Click to open ${getFileName$3(file)}`,
214730
+ title: `Click to open ${getFileName$2(file)}`,
214576
214731
  sx: {
214577
214732
  padding: isPastedImage ? 0 : "8px 12px",
214578
214733
  height: isPastedImage ? "auto" : "auto",
@@ -214593,7 +214748,7 @@ const FileAttachment = reactExports.memo(
214593
214748
  }
214594
214749
  ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
214595
214750
  /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faFile, size: "sm" }) }),
214596
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileName, { variant: "body2", children: getFileName$3(file) }),
214751
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileName, { variant: "body2", children: getFileName$2(file) }),
214597
214752
  isLocalFile && /* @__PURE__ */ jsxRuntimeExports.jsx(
214598
214753
  FileActionsContainer$2,
214599
214754
  {
@@ -214645,20 +214800,20 @@ const ErrorText = styled$1(Typography)({
214645
214800
  whiteSpace: "nowrap",
214646
214801
  maxWidth: "100%"
214647
214802
  });
214648
- const PATH_SEPARATOR_REGEX$2 = /[/\\]/;
214649
- const getFileName$2 = (path2) => {
214650
- const parts = path2.split(PATH_SEPARATOR_REGEX$2);
214803
+ const PATH_SEPARATOR_REGEX$1 = /[/\\]/;
214804
+ const getFileName$1 = (path2) => {
214805
+ const parts = path2.split(PATH_SEPARATOR_REGEX$1);
214651
214806
  return parts[parts.length - 1];
214652
214807
  };
214653
214808
  const InvalidAttachment = ({ file }) => {
214654
214809
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
214655
214810
  InvalidAttachmentContainer,
214656
214811
  {
214657
- title: `File not viewable: ${getFileName$2(file)}`,
214812
+ title: `File not viewable: ${getFileName$1(file)}`,
214658
214813
  children: [
214659
214814
  /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faExclamationCircle, size: "sm" }) }),
214660
214815
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorText, { variant: "body2", children: [
214661
- getFileName$2(file),
214816
+ getFileName$1(file),
214662
214817
  " is not viewable (file may be incomplete, deleted, or moved)"
214663
214818
  ] })
214664
214819
  ]
@@ -214695,9 +214850,9 @@ const AttachmentImageContainer = styled$1(Box)({
214695
214850
  visibility: "visible"
214696
214851
  }
214697
214852
  });
214698
- const PATH_SEPARATOR_REGEX$1 = /[/\\]/;
214699
- const getFileName$1 = (path2) => {
214700
- const parts = path2.split(PATH_SEPARATOR_REGEX$1);
214853
+ const PATH_SEPARATOR_REGEX = /[/\\]/;
214854
+ const getFileName = (path2) => {
214855
+ const parts = path2.split(PATH_SEPARATOR_REGEX);
214701
214856
  return parts[parts.length - 1];
214702
214857
  };
214703
214858
  const ImageAttachment = reactExports.memo(
@@ -214706,7 +214861,7 @@ const ImageAttachment = reactExports.memo(
214706
214861
  const setCanvasOpen = useUiPreferencesStore((s2) => s2.setCanvasOpen);
214707
214862
  const { setViewMode } = useCanvasStore();
214708
214863
  const handleShowInCanvas = reactExports.useCallback(async () => {
214709
- const title = getFileName$1(file);
214864
+ const title = getFileName(file);
214710
214865
  const fallbackAction = (err) => {
214711
214866
  if (err) console.error("Error processing file:", err);
214712
214867
  onClick(file);
@@ -214809,10 +214964,10 @@ const ImageAttachment = reactExports.memo(
214809
214964
  AttachmentImage,
214810
214965
  {
214811
214966
  src,
214812
- alt: getFileName$1(file),
214967
+ alt: getFileName(file),
214813
214968
  onClick: handleClick,
214814
214969
  onError: handleError2,
214815
- title: `Click to open ${getFileName$1(file)}`
214970
+ title: `Click to open ${getFileName(file)}`
214816
214971
  }
214817
214972
  ),
214818
214973
  isLocalFile && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -214968,18 +215123,13 @@ const AttachmentVideoContainer = styled$1(Box)({
214968
215123
  visibility: "visible"
214969
215124
  }
214970
215125
  });
214971
- const PATH_SEPARATOR_REGEX = /[/\\]/;
214972
- const getFileName = (path2) => {
214973
- const parts = path2.split(PATH_SEPARATOR_REGEX);
214974
- return parts[parts.length - 1];
214975
- };
214976
215126
  const VideoAttachment = reactExports.memo(
214977
215127
  ({ file, src, onClick, conversationId }) => {
214978
215128
  const [hasError, setHasError] = reactExports.useState(false);
214979
215129
  const setCanvasOpen = useUiPreferencesStore((s2) => s2.setCanvasOpen);
214980
215130
  const { setViewMode } = useCanvasStore();
214981
215131
  const handleShowInCanvas = reactExports.useCallback(async () => {
214982
- const title = getFileName(file);
215132
+ const title = getFileName$3(file);
214983
215133
  const fallbackAction = (err) => {
214984
215134
  if (err) console.error("Error processing file:", err);
214985
215135
  onClick(file);
@@ -215085,7 +215235,7 @@ const VideoAttachment = reactExports.memo(
215085
215235
  preload: "metadata",
215086
215236
  onClick: handleClick,
215087
215237
  onError: handleError2,
215088
- title: `Click to open ${getFileName(file)}`
215238
+ title: `Click to open ${getFileName$3(file)}`
215089
215239
  }
215090
215240
  ),
215091
215241
  isLocalFile && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -216212,7 +216362,7 @@ const MessageItem = reactExports.memo(
216212
216362
  if (fileString.startsWith("data:")) {
216213
216363
  return null;
216214
216364
  }
216215
- const title = getFileName$4(fileString);
216365
+ const title = getFileName$3(fileString);
216216
216366
  const fileType = getFileTypeFromPath(fileString);
216217
216367
  const normalizedPath = fileString.startsWith("file://") ? fileString.substring(7) : fileString;
216218
216368
  const id27 = normalizedPath;
@@ -218060,20 +218210,17 @@ const CommandPalette = () => {
218060
218210
  isCanvasOpen,
218061
218211
  setCanvasOpen,
218062
218212
  isCreateAgentDialogOpen,
218063
- // Use global state
218064
218213
  openCreateAgentDialog,
218065
- // Use global action
218066
218214
  closeCreateAgentDialog
218067
- // Use global action
218068
218215
  } = useUiPreferencesStore();
218069
218216
  const { agentId: currentAgentIdFromRoute } = useAgentRouteParam();
218070
218217
  const { getLastAgentId } = useAgentSelectionStore();
218071
- const { data: agentsData } = useAgents(1, 20);
218218
+ const [localQuery, setLocalQuery] = reactExports.useState(commandPaletteQuery);
218219
+ const debouncedLocalQuery = useDebounce(localQuery, 200);
218220
+ const { data: agentsData } = useAgents(1, 10, 0, debouncedLocalQuery);
218072
218221
  const theme2 = useTheme$2();
218073
218222
  const clearConversationMutation = useClearAgentConversation();
218074
218223
  const [selectedIndex, setSelectedIndex] = reactExports.useState(0);
218075
- const [localQuery, setLocalQuery] = reactExports.useState(commandPaletteQuery);
218076
- const debouncedLocalQuery = useDebounce(localQuery, 200);
218077
218224
  const [isClearConfirmationOpen, setIsClearConfirmationOpen] = reactExports.useState(false);
218078
218225
  const effectiveAgentId = currentAgentIdFromRoute || getLastAgentId("chat");
218079
218226
  const isOnChatPage = location2.pathname.startsWith("/chat");