@tutti-os/agent-gui 0.0.98 → 0.0.100

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 (95) hide show
  1. package/dist/{AgentGUI-Bkk2TRS0.d.ts → AgentGUI-DgBjACOL.d.ts} +12 -3
  2. package/dist/agent-conversation/index.d.ts +4 -4
  3. package/dist/agent-conversation/index.js +8 -9
  4. package/dist/agent-conversation/index.js.map +1 -1
  5. package/dist/agent-gui.d.ts +5 -4
  6. package/dist/agent-gui.js +19 -19
  7. package/dist/agent-message-center/index.d.ts +4 -6
  8. package/dist/agent-message-center/index.js +13 -52
  9. package/dist/agent-message-center/index.js.map +1 -1
  10. package/dist/agent-title-text.js +1 -1
  11. package/dist/{agentConversationVM-C335TR6S.d.ts → agentConversationVM-BzHZhwFP.d.ts} +1 -1
  12. package/dist/{agentGuiNodeTypes-DAsluxjv.d.ts → agentGuiNodeTypes-C-wBSM-Y.d.ts} +19 -4
  13. package/dist/app/renderer/agentactivity.css +141 -36
  14. package/dist/chunk-2RQM7PJN.js +16 -0
  15. package/dist/chunk-2RQM7PJN.js.map +1 -0
  16. package/dist/{chunk-FSKGEGGX.js → chunk-4E3QCW6L.js} +17 -3
  17. package/dist/chunk-4E3QCW6L.js.map +1 -0
  18. package/dist/{chunk-63BE6RGM.js → chunk-4YCCATI4.js} +14 -374
  19. package/dist/chunk-4YCCATI4.js.map +1 -0
  20. package/dist/{chunk-IYEXLOUE.js → chunk-4YVKAPKW.js} +5 -8
  21. package/dist/chunk-4YVKAPKW.js.map +1 -0
  22. package/dist/{chunk-7O4D4KOE.js → chunk-BQJOYTW2.js} +939 -751
  23. package/dist/chunk-BQJOYTW2.js.map +1 -0
  24. package/dist/{chunk-MRRICFWA.js → chunk-D7HMQLBO.js} +159 -55
  25. package/dist/chunk-D7HMQLBO.js.map +1 -0
  26. package/dist/{chunk-OTRZBTFQ.js → chunk-DWUVRWXD.js} +2 -2
  27. package/dist/{chunk-RHTZAODZ.js → chunk-E5AD46HP.js} +2 -2
  28. package/dist/{chunk-3NOJFKDV.js → chunk-EUW6VPIK.js} +414 -49
  29. package/dist/chunk-EUW6VPIK.js.map +1 -0
  30. package/dist/{chunk-Y35GDLP2.js → chunk-F5UR6EJG.js} +2 -17
  31. package/dist/chunk-F5UR6EJG.js.map +1 -0
  32. package/dist/{chunk-J7ZYAUPC.js → chunk-FAE7CXZO.js} +8 -6
  33. package/dist/chunk-FAE7CXZO.js.map +1 -0
  34. package/dist/{chunk-CPUEPDF7.js → chunk-GCW57WYQ.js} +646 -595
  35. package/dist/chunk-GCW57WYQ.js.map +1 -0
  36. package/dist/{chunk-7M77BK6K.js → chunk-JWHPVETQ.js} +154 -147
  37. package/dist/chunk-JWHPVETQ.js.map +1 -0
  38. package/dist/{chunk-4ROALW3K.js → chunk-KAV2WHTG.js} +82 -61
  39. package/dist/chunk-KAV2WHTG.js.map +1 -0
  40. package/dist/{chunk-T6PEJFRP.js → chunk-MES7BQWI.js} +378 -369
  41. package/dist/chunk-MES7BQWI.js.map +1 -0
  42. package/dist/chunk-MIJXEELH.js +96 -0
  43. package/dist/chunk-MIJXEELH.js.map +1 -0
  44. package/dist/{chunk-QWGJ5TEG.js → chunk-QY22OBJS.js} +28 -30
  45. package/dist/chunk-QY22OBJS.js.map +1 -0
  46. package/dist/{chunk-MASXZENX.js → chunk-UESYITH6.js} +21 -2
  47. package/dist/chunk-UESYITH6.js.map +1 -0
  48. package/dist/{chunk-SPZJCTBV.js → chunk-XFRY2WWB.js} +348 -322
  49. package/dist/chunk-XFRY2WWB.js.map +1 -0
  50. package/dist/context-mention-palette/index.d.ts +5 -1
  51. package/dist/context-mention-palette/index.js +10 -11
  52. package/dist/contribution-CTVBPN0R.d.ts +119 -0
  53. package/dist/i18n/index.d.ts +16 -2
  54. package/dist/i18n/index.js +2 -2
  55. package/dist/index.d.ts +8 -7
  56. package/dist/index.js +21 -20
  57. package/dist/index.js.map +1 -1
  58. package/dist/mention-search.d.ts +18 -6
  59. package/dist/mention-search.js +8 -9
  60. package/dist/workbench/contribution.d.ts +6 -107
  61. package/dist/workbench/contribution.js +7 -3
  62. package/dist/workbench/index.d.ts +6 -4
  63. package/dist/workbench/index.js +27 -21
  64. package/dist/workbench/launch.d.ts +13 -5
  65. package/dist/workbench/launch.js +1 -1
  66. package/dist/workbench/sessionTitle.d.ts +5 -7
  67. package/dist/workbench/sessionTitle.js +3 -4
  68. package/dist/workbench/state.js +3 -1
  69. package/dist/workspace-agent-generated-files.d.ts +8 -13
  70. package/dist/workspace-agent-generated-files.js +6 -21
  71. package/dist/{workspaceAgentActivityListTypes-C7gPWYiA.d.ts → workspaceAgentActivityListTypes-DZfS_HgG.d.ts} +3 -26
  72. package/package.json +12 -12
  73. package/dist/chunk-3NOJFKDV.js.map +0 -1
  74. package/dist/chunk-4ROALW3K.js.map +0 -1
  75. package/dist/chunk-63BE6RGM.js.map +0 -1
  76. package/dist/chunk-7M77BK6K.js.map +0 -1
  77. package/dist/chunk-7O4D4KOE.js.map +0 -1
  78. package/dist/chunk-CPUEPDF7.js.map +0 -1
  79. package/dist/chunk-FSKGEGGX.js.map +0 -1
  80. package/dist/chunk-GAD6Y3BF.js +0 -88
  81. package/dist/chunk-GAD6Y3BF.js.map +0 -1
  82. package/dist/chunk-GCBDIQDX.js +0 -22
  83. package/dist/chunk-GCBDIQDX.js.map +0 -1
  84. package/dist/chunk-IYEXLOUE.js.map +0 -1
  85. package/dist/chunk-J7ZYAUPC.js.map +0 -1
  86. package/dist/chunk-MASXZENX.js.map +0 -1
  87. package/dist/chunk-MRRICFWA.js.map +0 -1
  88. package/dist/chunk-QWGJ5TEG.js.map +0 -1
  89. package/dist/chunk-SPZJCTBV.js.map +0 -1
  90. package/dist/chunk-T6PEJFRP.js.map +0 -1
  91. package/dist/chunk-Y35GDLP2.js.map +0 -1
  92. package/dist/chunk-Y5M6Q6WX.js +0 -25
  93. package/dist/chunk-Y5M6Q6WX.js.map +0 -1
  94. /package/dist/{chunk-OTRZBTFQ.js.map → chunk-DWUVRWXD.js.map} +0 -0
  95. /package/dist/{chunk-RHTZAODZ.js.map → chunk-E5AD46HP.js.map} +0 -0
@@ -2,14 +2,14 @@ import {
2
2
  getOptionalAgentHostApi,
3
3
  managedAgentRoundedIconUrl,
4
4
  useOptionalAgentHostApi
5
- } from "./chunk-MASXZENX.js";
5
+ } from "./chunk-UESYITH6.js";
6
6
  import {
7
7
  resolveAgentWorkspaceFileVisualKind
8
8
  } from "./chunk-PJP5BUU6.js";
9
9
  import {
10
10
  translate,
11
11
  useTranslation
12
- } from "./chunk-RHTZAODZ.js";
12
+ } from "./chunk-E5AD46HP.js";
13
13
  import {
14
14
  getAgentCustomMentionKind
15
15
  } from "./chunk-5X7YDOC6.js";
@@ -253,202 +253,9 @@ function arrayValue2(value) {
253
253
  return Array.isArray(value) ? value : [];
254
254
  }
255
255
 
256
- // app/renderer/components/icons/MessageSquareMoreIcon.tsx
257
- import {
258
- forwardRef,
259
- useCallback,
260
- useEffect,
261
- useImperativeHandle,
262
- useRef
263
- } from "react";
264
- import {
265
- motion,
266
- useAnimation,
267
- useReducedMotion
268
- } from "framer-motion";
269
- import { jsx, jsxs } from "react/jsx-runtime";
270
- var DOT_TRANSITION = {
271
- times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
272
- duration: 1.5
273
- };
274
- var DOT_VARIANTS = {
275
- normal: {
276
- opacity: 1
277
- },
278
- animate: (custom) => ({
279
- opacity: [1, 0, 0, 1, 1, 0, 0, 1],
280
- transition: {
281
- opacity: {
282
- ...DOT_TRANSITION,
283
- times: DOT_TRANSITION.times.map(
284
- (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
285
- )
286
- }
287
- }
288
- }),
289
- active: (custom) => ({
290
- opacity: [1, 0, 0, 1, 1, 0, 0, 1],
291
- transition: {
292
- opacity: {
293
- ...DOT_TRANSITION,
294
- repeat: Infinity,
295
- times: DOT_TRANSITION.times.map(
296
- (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
297
- )
298
- }
299
- }
300
- })
301
- };
302
- var MessageSquareMoreIcon = forwardRef(
303
- ({
304
- active = false,
305
- onMouseEnter,
306
- onMouseLeave,
307
- className,
308
- size = 28,
309
- ...props
310
- }, ref) => {
311
- const controls = useAnimation();
312
- const reduceMotion = useReducedMotion();
313
- const isControlledRef = useRef(false);
314
- const startAnimation = useCallback(() => {
315
- if (reduceMotion) {
316
- return;
317
- }
318
- void controls.start(active ? "active" : "animate");
319
- }, [active, controls, reduceMotion]);
320
- const stopAnimation = useCallback(() => {
321
- void controls.start("normal");
322
- }, [controls]);
323
- useImperativeHandle(ref, () => {
324
- isControlledRef.current = true;
325
- return {
326
- startAnimation,
327
- stopAnimation
328
- };
329
- });
330
- useEffect(() => {
331
- if (active) {
332
- startAnimation();
333
- return;
334
- }
335
- stopAnimation();
336
- }, [active, startAnimation, stopAnimation]);
337
- const handleMouseEnter = useCallback(
338
- (event) => {
339
- if (isControlledRef.current) {
340
- onMouseEnter?.(event);
341
- } else {
342
- startAnimation();
343
- }
344
- },
345
- [onMouseEnter, startAnimation]
346
- );
347
- const handleMouseLeave = useCallback(
348
- (event) => {
349
- if (isControlledRef.current) {
350
- onMouseLeave?.(event);
351
- } else {
352
- stopAnimation();
353
- }
354
- },
355
- [onMouseLeave, stopAnimation]
356
- );
357
- return /* @__PURE__ */ jsx(
358
- "div",
359
- {
360
- className: cn("inline-flex items-center justify-center", className),
361
- onMouseEnter: handleMouseEnter,
362
- onMouseLeave: handleMouseLeave,
363
- ...props,
364
- children: /* @__PURE__ */ jsxs(
365
- "svg",
366
- {
367
- fill: "none",
368
- height: size,
369
- stroke: "currentColor",
370
- strokeLinecap: "round",
371
- strokeLinejoin: "round",
372
- strokeWidth: "2",
373
- viewBox: "0 0 24 24",
374
- width: size,
375
- xmlns: "http://www.w3.org/2000/svg",
376
- children: [
377
- /* @__PURE__ */ jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
378
- /* @__PURE__ */ jsx(
379
- motion.path,
380
- {
381
- animate: controls,
382
- custom: 0,
383
- d: "M8 10h.01",
384
- variants: DOT_VARIANTS
385
- }
386
- ),
387
- /* @__PURE__ */ jsx(
388
- motion.path,
389
- {
390
- animate: controls,
391
- custom: 1,
392
- d: "M12 10h.01",
393
- variants: DOT_VARIANTS
394
- }
395
- ),
396
- /* @__PURE__ */ jsx(
397
- motion.path,
398
- {
399
- animate: controls,
400
- custom: 2,
401
- d: "M16 10h.01",
402
- variants: DOT_VARIANTS
403
- }
404
- )
405
- ]
406
- }
407
- )
408
- }
409
- );
410
- }
411
- );
412
- MessageSquareMoreIcon.displayName = "MessageSquareMoreIcon";
413
-
414
- // agent-gui/agentGuiNode/AgentGUIConversation.styles.ts
415
- var styles = {
416
- interactivePrompt: "agent-gui-conversation__interactive-prompt",
417
- interactivePromptCard: "agent-gui-conversation__interactive-prompt-card",
418
- interactivePromptHeader: "agent-gui-conversation__interactive-prompt-header",
419
- interactivePromptLead: "agent-gui-conversation__interactive-prompt-lead",
420
- interactivePromptMeta: "agent-gui-conversation__interactive-prompt-meta",
421
- interactivePromptQuestion: "agent-gui-conversation__interactive-prompt-question",
422
- interactivePromptOptions: "agent-gui-conversation__interactive-prompt-options",
423
- interactiveOptionDisplay: "agent-gui-conversation__interactive-option-display",
424
- interactiveOptionButton: "agent-gui-conversation__interactive-option-button",
425
- interactiveOptionTitle: "agent-gui-conversation__interactive-option-title",
426
- interactiveOptionDescription: "agent-gui-conversation__interactive-option-description",
427
- interactiveOptionCommandDescription: "agent-gui-conversation__interactive-option-command-description",
428
- interactiveOptionCommandTooltip: "agent-gui-conversation__interactive-option-command-tooltip",
429
- interactiveOptionShortcut: "agent-gui-conversation__interactive-option-shortcut",
430
- interactiveOptionSpinner: "agent-gui-conversation__interactive-option-spinner",
431
- interactiveFeedbackComposer: "agent-gui-conversation__interactive-feedback-composer",
432
- interactivePromptTextarea: "agent-gui-conversation__interactive-prompt-textarea",
433
- interactiveFeedbackSendButton: "agent-gui-conversation__interactive-feedback-send-button",
434
- interactivePromptFooter: "agent-gui-conversation__interactive-prompt-footer",
435
- interactivePromptActions: "agent-gui-conversation__interactive-prompt-actions",
436
- userMessageFlow: "agent-gui-conversation__user-message-flow",
437
- assistantMessageFlow: "agent-gui-conversation__assistant-message-flow",
438
- messageGroup: "agent-gui-conversation__message-group",
439
- messageFooter: "agent-gui-conversation__message-footer",
440
- messageTimestamp: "agent-gui-conversation__message-timestamp",
441
- messageCopyButton: "agent-gui-conversation__message-copy-button",
442
- userImageGrid: "agent-gui-conversation__user-image-grid",
443
- userImageThumbnail: "agent-gui-conversation__user-image-thumbnail",
444
- userMessageBubble: "agent-gui-conversation__user-message-bubble",
445
- assistantMarkdown: "agent-gui-conversation__assistant-markdown"
446
- };
447
- var AgentGUIConversation_styles_default = styles;
448
-
449
256
  // shared/AgentMessageMarkdown.tsx
450
257
  import {
451
- useCallback as useCallback5,
258
+ useCallback as useCallback4,
452
259
  memo,
453
260
  useMemo,
454
261
  useState as useState7
@@ -1051,8 +858,8 @@ function countChar(value, char) {
1051
858
  // shared/useStreamingVisibleText.ts
1052
859
  import {
1053
860
  startTransition,
1054
- useEffect as useEffect2,
1055
- useRef as useRef2,
861
+ useEffect,
862
+ useRef,
1056
863
  useState
1057
864
  } from "react";
1058
865
  var DEFAULT_FRAME_MS = 24;
@@ -1066,19 +873,19 @@ function useStreamingVisibleText(sourceText, options) {
1066
873
  trailingFlushChars = DEFAULT_TRAILING_FLUSH_CHARS
1067
874
  } = options;
1068
875
  const [visibleText, setVisibleText] = useState(sourceText);
1069
- const sourceRef = useRef2(sourceText);
1070
- const visibleRef = useRef2(visibleText);
1071
- const timerRef = useRef2(null);
1072
- useEffect2(() => {
876
+ const sourceRef = useRef(sourceText);
877
+ const visibleRef = useRef(visibleText);
878
+ const timerRef = useRef(null);
879
+ useEffect(() => {
1073
880
  visibleRef.current = visibleText;
1074
881
  }, [visibleText]);
1075
- useEffect2(
882
+ useEffect(
1076
883
  () => () => {
1077
884
  clearStreamingVisibleTextTimer(timerRef);
1078
885
  },
1079
886
  []
1080
887
  );
1081
- useEffect2(() => {
888
+ useEffect(() => {
1082
889
  sourceRef.current = sourceText;
1083
890
  if (!enabled) {
1084
891
  clearStreamingVisibleTextTimer(timerRef);
@@ -1164,7 +971,7 @@ function clearStreamingVisibleTextTimer(timerRef) {
1164
971
 
1165
972
  // shared/AgentTargetPresentationContext.tsx
1166
973
  import { createContext, useContext } from "react";
1167
- import { jsx as jsx2 } from "react/jsx-runtime";
974
+ import { jsx } from "react/jsx-runtime";
1168
975
  var EMPTY_AGENT_TARGETS = Object.freeze([]);
1169
976
  var AgentTargetPresentationContext = createContext(
1170
977
  EMPTY_AGENT_TARGETS
@@ -1173,7 +980,7 @@ function AgentTargetPresentationProvider({
1173
980
  agentTargets,
1174
981
  children
1175
982
  }) {
1176
- return /* @__PURE__ */ jsx2(AgentTargetPresentationContext.Provider, { value: agentTargets, children });
983
+ return /* @__PURE__ */ jsx(AgentTargetPresentationContext.Provider, { value: agentTargets, children });
1177
984
  }
1178
985
  function useAgentTargetPresentations() {
1179
986
  return useContext(AgentTargetPresentationContext);
@@ -1194,7 +1001,7 @@ function resolveAgentTargetPresentation(input) {
1194
1001
  // shared/agentMessageMarkdownRuntime.ts
1195
1002
  import {
1196
1003
  startTransition as startTransition2,
1197
- useEffect as useEffect3,
1004
+ useEffect as useEffect2,
1198
1005
  useState as useState2
1199
1006
  } from "react";
1200
1007
  var COLLAPSED_LINE_LIMIT = 8;
@@ -1298,7 +1105,7 @@ function useDeferredMarkdownRenderReady(contentSignature, shouldDefer) {
1298
1105
  shouldDefer ? null : contentSignature
1299
1106
  );
1300
1107
  const renderReady = !shouldDefer || readySignature === contentSignature;
1301
- useEffect3(() => {
1108
+ useEffect2(() => {
1302
1109
  if (!shouldDefer) {
1303
1110
  setReadySignature(contentSignature);
1304
1111
  return;
@@ -1811,13 +1618,13 @@ var MarkdownLinkContext = createContext2(false);
1811
1618
 
1812
1619
  // shared/AgentMessageMarkdownRenderers.tsx
1813
1620
  import {
1814
- useCallback as useCallback2,
1621
+ useCallback,
1815
1622
  useContext as useContext2,
1816
- useRef as useRef3,
1623
+ useRef as useRef2,
1817
1624
  useState as useState3
1818
1625
  } from "react";
1819
1626
  import { Check, Copy } from "lucide-react";
1820
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1627
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
1821
1628
  function MarkdownCode({
1822
1629
  node: _node,
1823
1630
  children,
@@ -1830,9 +1637,9 @@ function MarkdownCode({
1830
1637
  const text = textFromReactNode(children).trim();
1831
1638
  const isLinkablePath = !isInsideLink && onLinkClick && !className && (isExplicitWorkspaceFilePath(text) || isHttpUrl(text));
1832
1639
  if (isLinkablePath) {
1833
- return /* @__PURE__ */ jsx3(PathLink, { href: text, onLinkClick, children });
1640
+ return /* @__PURE__ */ jsx2(PathLink, { href: text, onLinkClick, children });
1834
1641
  }
1835
- return /* @__PURE__ */ jsx3("code", { ...props, className, children });
1642
+ return /* @__PURE__ */ jsx2("code", { ...props, className, children });
1836
1643
  }
1837
1644
  var MARKDOWN_ORDERED_LIST_STYLE = {
1838
1645
  listStylePosition: "outside",
@@ -1854,7 +1661,7 @@ function MarkdownUnorderedList({
1854
1661
  ...props
1855
1662
  }) {
1856
1663
  "use memo";
1857
- return /* @__PURE__ */ jsx3(
1664
+ return /* @__PURE__ */ jsx2(
1858
1665
  "ul",
1859
1666
  {
1860
1667
  ...props,
@@ -1872,7 +1679,7 @@ function MarkdownOrderedList({
1872
1679
  ...props
1873
1680
  }) {
1874
1681
  "use memo";
1875
- return /* @__PURE__ */ jsx3(
1682
+ return /* @__PURE__ */ jsx2(
1876
1683
  "ol",
1877
1684
  {
1878
1685
  ...props,
@@ -1890,7 +1697,7 @@ function MarkdownListItem({
1890
1697
  ...props
1891
1698
  }) {
1892
1699
  "use memo";
1893
- return /* @__PURE__ */ jsx3("li", { ...props, style: { ...MARKDOWN_LIST_ITEM_STYLE, ...style } });
1700
+ return /* @__PURE__ */ jsx2("li", { ...props, style: { ...MARKDOWN_LIST_ITEM_STYLE, ...style } });
1894
1701
  }
1895
1702
  function MarkdownParagraph({
1896
1703
  node: _node,
@@ -1899,9 +1706,9 @@ function MarkdownParagraph({
1899
1706
  }) {
1900
1707
  "use memo";
1901
1708
  if (inline) {
1902
- return /* @__PURE__ */ jsx3("span", { ...props });
1709
+ return /* @__PURE__ */ jsx2("span", { ...props });
1903
1710
  }
1904
- return /* @__PURE__ */ jsx3("p", { ...props });
1711
+ return /* @__PURE__ */ jsx2("p", { ...props });
1905
1712
  }
1906
1713
  function PathLink({
1907
1714
  href,
@@ -1909,7 +1716,7 @@ function PathLink({
1909
1716
  onLinkClick
1910
1717
  }) {
1911
1718
  "use memo";
1912
- return /* @__PURE__ */ jsx3(
1719
+ return /* @__PURE__ */ jsx2(
1913
1720
  "a",
1914
1721
  {
1915
1722
  className: "cursor-pointer",
@@ -1943,10 +1750,10 @@ function MarkdownPre({
1943
1750
  ...props
1944
1751
  }) {
1945
1752
  "use memo";
1946
- const preRef = useRef3(null);
1753
+ const preRef = useRef2(null);
1947
1754
  const [copied, setCopied] = useState3(false);
1948
- const copyResetRef = useRef3(null);
1949
- const handleCopy = useCallback2(() => {
1755
+ const copyResetRef = useRef2(null);
1756
+ const handleCopy = useCallback(() => {
1950
1757
  const text = preRef.current?.textContent?.trim();
1951
1758
  if (!text) {
1952
1759
  return;
@@ -1959,8 +1766,8 @@ function MarkdownPre({
1959
1766
  copyResetRef.current = setTimeout(() => setCopied(false), 1500);
1960
1767
  });
1961
1768
  }, []);
1962
- return /* @__PURE__ */ jsxs2("div", { className: "group relative", children: [
1963
- /* @__PURE__ */ jsx3(
1769
+ return /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
1770
+ /* @__PURE__ */ jsx2(
1964
1771
  "button",
1965
1772
  {
1966
1773
  type: "button",
@@ -1969,20 +1776,20 @@ function MarkdownPre({
1969
1776
  "aria-label": translate("agentHost.agentGui.copyCode"),
1970
1777
  title: translate("agentHost.agentGui.copyCode"),
1971
1778
  onClick: handleCopy,
1972
- children: copied ? /* @__PURE__ */ jsx3(Check, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx3(Copy, { size: 13, strokeWidth: 2, "aria-hidden": "true" })
1779
+ children: copied ? /* @__PURE__ */ jsx2(Check, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx2(Copy, { size: 13, strokeWidth: 2, "aria-hidden": "true" })
1973
1780
  }
1974
1781
  ),
1975
- /* @__PURE__ */ jsx3("pre", { ...props, ref: preRef, children })
1782
+ /* @__PURE__ */ jsx2("pre", { ...props, ref: preRef, children })
1976
1783
  ] });
1977
1784
  }
1978
1785
 
1979
1786
  // shared/AgentMessageMarkdownMedia.tsx
1980
- import { useContext as useContext3, useEffect as useEffect5, useState as useState6 } from "react";
1787
+ import { useContext as useContext3, useEffect as useEffect4, useState as useState6 } from "react";
1981
1788
 
1982
1789
  // app/renderer/components/ZoomableImage.tsx
1983
1790
  import {
1984
- useCallback as useCallback4,
1985
- useEffect as useEffect4,
1791
+ useCallback as useCallback3,
1792
+ useEffect as useEffect3,
1986
1793
  useState as useState5
1987
1794
  } from "react";
1988
1795
  import { createPortal } from "react-dom";
@@ -2000,8 +1807,8 @@ import { RotateCcwIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
2000
1807
 
2001
1808
  // shared/agentConversation/components/ConversationImageContextMenu.tsx
2002
1809
  import {
2003
- useCallback as useCallback3,
2004
- useRef as useRef4,
1810
+ useCallback as useCallback2,
1811
+ useRef as useRef3,
2005
1812
  useState as useState4
2006
1813
  } from "react";
2007
1814
  import {
@@ -2084,7 +1891,7 @@ async function copyImageToClipboard(src, hostClipboard) {
2084
1891
  }
2085
1892
 
2086
1893
  // shared/agentConversation/components/ConversationImageContextMenu.tsx
2087
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1894
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
2088
1895
  function ConversationImageContextMenu({
2089
1896
  src,
2090
1897
  children,
@@ -2092,9 +1899,9 @@ function ConversationImageContextMenu({
2092
1899
  contentStyle
2093
1900
  }) {
2094
1901
  const agentHostApi = useOptionalAgentHostApi();
2095
- const copyStartedRef = useRef4(false);
1902
+ const copyStartedRef = useRef3(false);
2096
1903
  const [menuResetKey, setMenuResetKey] = useState4(0);
2097
- const copyAndClose = useCallback3(() => {
1904
+ const copyAndClose = useCallback2(() => {
2098
1905
  if (copyStartedRef.current) {
2099
1906
  return;
2100
1907
  }
@@ -2104,9 +1911,9 @@ function ConversationImageContextMenu({
2104
1911
  copyStartedRef.current = false;
2105
1912
  });
2106
1913
  }, [agentHostApi?.clipboard, src]);
2107
- return /* @__PURE__ */ jsxs3(ContextMenu, { children: [
2108
- /* @__PURE__ */ jsx4(ContextMenuTrigger, { asChild, children }),
2109
- /* @__PURE__ */ jsx4(ContextMenuContent, { style: contentStyle, children: /* @__PURE__ */ jsx4(
1914
+ return /* @__PURE__ */ jsxs2(ContextMenu, { children: [
1915
+ /* @__PURE__ */ jsx3(ContextMenuTrigger, { asChild, children }),
1916
+ /* @__PURE__ */ jsx3(ContextMenuContent, { style: contentStyle, children: /* @__PURE__ */ jsx3(
2110
1917
  ContextMenuItem,
2111
1918
  {
2112
1919
  onClick: copyAndClose,
@@ -2192,7 +1999,7 @@ function decodeURIComponentSafe(value) {
2192
1999
  }
2193
2000
 
2194
2001
  // app/renderer/components/ZoomableImage.tsx
2195
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2002
+ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
2196
2003
  var IMAGE_PREVIEW_ZOOM_MIN = 0.5;
2197
2004
  var IMAGE_PREVIEW_ZOOM_MAX = 3;
2198
2005
  var IMAGE_PREVIEW_ZOOM_STEP = 0.25;
@@ -2218,7 +2025,7 @@ function ZoomableImage({
2218
2025
  const imagePreviewZoomPercent = Math.round(imagePreviewZoom * 100);
2219
2026
  const canZoomOut = imagePreviewZoom > IMAGE_PREVIEW_ZOOM_MIN;
2220
2027
  const canZoomIn = imagePreviewZoom < IMAGE_PREVIEW_ZOOM_MAX;
2221
- const closeContextMenu = useCallback4(() => {
2028
+ const closeContextMenu = useCallback3(() => {
2222
2029
  setContextMenuPosition(null);
2223
2030
  }, []);
2224
2031
  const finishClosePreviewImage = () => {
@@ -2244,18 +2051,32 @@ function ZoomableImage({
2244
2051
  setIsImagePreviewClosing(false);
2245
2052
  setIsImagePreviewOpen(true);
2246
2053
  };
2247
- useEffect4(() => {
2248
- if (!contextMenuPosition) {
2249
- return;
2054
+ useEffect3(() => {
2055
+ const handleWindowKeyDown = (event) => {
2056
+ if (!isImagePreviewOpen || event.key !== "Escape") {
2057
+ return;
2058
+ }
2059
+ event.preventDefault();
2060
+ event.stopPropagation();
2061
+ setIsImagePreviewClosing(true);
2062
+ setIsWheelZooming(false);
2063
+ setImagePreviewZoom(1);
2064
+ closeContextMenu();
2065
+ };
2066
+ if (contextMenuPosition) {
2067
+ document.addEventListener("click", closeContextMenu);
2068
+ document.addEventListener("scroll", closeContextMenu, true);
2069
+ }
2070
+ if (isImagePreviewOpen) {
2071
+ window.addEventListener("keydown", handleWindowKeyDown, true);
2250
2072
  }
2251
- document.addEventListener("click", closeContextMenu);
2252
- document.addEventListener("scroll", closeContextMenu, true);
2253
2073
  return () => {
2254
2074
  document.removeEventListener("click", closeContextMenu);
2255
2075
  document.removeEventListener("scroll", closeContextMenu, true);
2076
+ window.removeEventListener("keydown", handleWindowKeyDown, true);
2256
2077
  };
2257
- }, [closeContextMenu, contextMenuPosition]);
2258
- const handleContextMenu = useCallback4(
2078
+ }, [closeContextMenu, contextMenuPosition, isImagePreviewOpen]);
2079
+ const handleContextMenu = useCallback3(
2259
2080
  (event) => {
2260
2081
  onContextMenu?.(event);
2261
2082
  if (event.defaultPrevented || !actionSource || !hasImageActions) {
@@ -2271,7 +2092,7 @@ function ZoomableImage({
2271
2092
  },
2272
2093
  [actionSource, hasImageActions, onContextMenu]
2273
2094
  );
2274
- const handleCopyImage = useCallback4(async () => {
2095
+ const handleCopyImage = useCallback3(async () => {
2275
2096
  if (!actionSource) {
2276
2097
  return;
2277
2098
  }
@@ -2297,10 +2118,10 @@ function ZoomableImage({
2297
2118
  variant: copied ? "success" : "destructive"
2298
2119
  });
2299
2120
  }, [actionSource, agentHostApi?.clipboard, closeContextMenu, t]);
2300
- const handleCopyImageAction = useCallback4(() => {
2121
+ const handleCopyImageAction = useCallback3(() => {
2301
2122
  void handleCopyImage().catch(() => void 0);
2302
2123
  }, [handleCopyImage]);
2303
- const handleDownloadImage = useCallback4(() => {
2124
+ const handleDownloadImage = useCallback3(() => {
2304
2125
  if (!actionSource) {
2305
2126
  return;
2306
2127
  }
@@ -2310,23 +2131,23 @@ function ZoomableImage({
2310
2131
  resolveImageDownloadName(downloadName, actionSource, alt)
2311
2132
  );
2312
2133
  }, [actionSource, alt, closeContextMenu, downloadName]);
2313
- const zoomOutPreviewImage = useCallback4(() => {
2134
+ const zoomOutPreviewImage = useCallback3(() => {
2314
2135
  setIsWheelZooming(false);
2315
2136
  setImagePreviewZoom(
2316
2137
  (value) => clampSteppedImagePreviewZoom(value - IMAGE_PREVIEW_ZOOM_STEP)
2317
2138
  );
2318
2139
  }, []);
2319
- const zoomInPreviewImage = useCallback4(() => {
2140
+ const zoomInPreviewImage = useCallback3(() => {
2320
2141
  setIsWheelZooming(false);
2321
2142
  setImagePreviewZoom(
2322
2143
  (value) => clampSteppedImagePreviewZoom(value + IMAGE_PREVIEW_ZOOM_STEP)
2323
2144
  );
2324
2145
  }, []);
2325
- const resetPreviewImageZoom = useCallback4(() => {
2146
+ const resetPreviewImageZoom = useCallback3(() => {
2326
2147
  setIsWheelZooming(false);
2327
2148
  setImagePreviewZoom(1);
2328
2149
  }, []);
2329
- const handlePreviewImageWheel = useCallback4(
2150
+ const handlePreviewImageWheel = useCallback3(
2330
2151
  (event) => {
2331
2152
  event.preventDefault();
2332
2153
  event.stopPropagation();
@@ -2340,7 +2161,7 @@ function ZoomableImage({
2340
2161
  },
2341
2162
  []
2342
2163
  );
2343
- const actionButtons = hasImageActions ? /* @__PURE__ */ jsx5(
2164
+ const actionButtons = hasImageActions ? /* @__PURE__ */ jsx4(
2344
2165
  ImageActionButtons,
2345
2166
  {
2346
2167
  copyLabel: t("common.copyImage"),
@@ -2349,7 +2170,7 @@ function ZoomableImage({
2349
2170
  onDownload: handleDownloadImage
2350
2171
  }
2351
2172
  ) : null;
2352
- const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */ jsx5(
2173
+ const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */ jsx4(
2353
2174
  "img",
2354
2175
  {
2355
2176
  alt,
@@ -2377,7 +2198,7 @@ function ZoomableImage({
2377
2198
  onWheel: handlePreviewImageWheel
2378
2199
  }
2379
2200
  ) : null;
2380
- const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */ jsx5(
2201
+ const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */ jsx4(
2381
2202
  ConversationImageContextMenu,
2382
2203
  {
2383
2204
  src: actionSource,
@@ -2387,8 +2208,8 @@ function ZoomableImage({
2387
2208
  }
2388
2209
  ) : previewImage;
2389
2210
  const Wrapper = wrapElement;
2390
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2391
- /* @__PURE__ */ jsxs4(
2211
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2212
+ /* @__PURE__ */ jsxs3(
2392
2213
  Wrapper,
2393
2214
  {
2394
2215
  className: cn(
@@ -2396,7 +2217,7 @@ function ZoomableImage({
2396
2217
  wrapElement === "div" && "tsh-zoomable-image--block"
2397
2218
  ),
2398
2219
  children: [
2399
- /* @__PURE__ */ jsx5(
2220
+ /* @__PURE__ */ jsx4(
2400
2221
  "img",
2401
2222
  {
2402
2223
  ...props,
@@ -2412,7 +2233,7 @@ function ZoomableImage({
2412
2233
  className: cn("nodrag tsh-desktop-no-drag cursor-zoom-in", className)
2413
2234
  }
2414
2235
  ),
2415
- /* @__PURE__ */ jsx5(
2236
+ /* @__PURE__ */ jsx4(
2416
2237
  "button",
2417
2238
  {
2418
2239
  type: "button",
@@ -2426,7 +2247,7 @@ function ZoomableImage({
2426
2247
  }
2427
2248
  ),
2428
2249
  contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ? createPortal(
2429
- /* @__PURE__ */ jsx5(
2250
+ /* @__PURE__ */ jsx4(
2430
2251
  "div",
2431
2252
  {
2432
2253
  className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
@@ -2436,7 +2257,7 @@ function ZoomableImage({
2436
2257
  },
2437
2258
  role: "menu",
2438
2259
  onClick: (event) => event.stopPropagation(),
2439
- children: /* @__PURE__ */ jsx5(
2260
+ children: /* @__PURE__ */ jsx4(
2440
2261
  ImageActionButtons,
2441
2262
  {
2442
2263
  copyLabel: t("common.copyImage"),
@@ -2451,7 +2272,7 @@ function ZoomableImage({
2451
2272
  document.body
2452
2273
  ) : null,
2453
2274
  (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? createPortal(
2454
- /* @__PURE__ */ jsxs4(
2275
+ /* @__PURE__ */ jsxs3(
2455
2276
  "div",
2456
2277
  {
2457
2278
  "aria-modal": "true",
@@ -2466,21 +2287,16 @@ function ZoomableImage({
2466
2287
  finishClosePreviewImage();
2467
2288
  }
2468
2289
  },
2469
- onKeyDown: (event) => {
2470
- if (event.key === "Escape") {
2471
- closePreviewImage();
2472
- }
2473
- },
2474
2290
  children: [
2475
- /* @__PURE__ */ jsx5(
2291
+ /* @__PURE__ */ jsx4(
2476
2292
  "div",
2477
2293
  {
2478
2294
  "data-rmiz-modal-overlay": "visible",
2479
2295
  onClick: closePreviewImage
2480
2296
  }
2481
2297
  ),
2482
- /* @__PURE__ */ jsx5("div", { "data-rmiz-modal-content": "true", children: previewContent }),
2483
- /* @__PURE__ */ jsx5(
2298
+ /* @__PURE__ */ jsx4("div", { "data-rmiz-modal-content": "true", children: previewContent }),
2299
+ /* @__PURE__ */ jsx4(
2484
2300
  ImagePreviewZoomControls,
2485
2301
  {
2486
2302
  canZoomIn,
@@ -2499,8 +2315,8 @@ function ZoomableImage({
2499
2315
  onWheel: handlePreviewImageWheel
2500
2316
  }
2501
2317
  ),
2502
- actionButtons ? /* @__PURE__ */ jsx5("div", { className: "tsh-zoom-dialog__image-actions nodrag tsh-desktop-no-drag", children: actionButtons }) : null,
2503
- contextMenuPosition?.inZoomDialog && actionButtons ? /* @__PURE__ */ jsx5(
2318
+ actionButtons ? /* @__PURE__ */ jsx4("div", { className: "tsh-zoom-dialog__image-actions nodrag tsh-desktop-no-drag", children: actionButtons }) : null,
2319
+ contextMenuPosition?.inZoomDialog && actionButtons ? /* @__PURE__ */ jsx4(
2504
2320
  "div",
2505
2321
  {
2506
2322
  className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
@@ -2510,7 +2326,7 @@ function ZoomableImage({
2510
2326
  },
2511
2327
  role: "menu",
2512
2328
  onClick: (event) => event.stopPropagation(),
2513
- children: /* @__PURE__ */ jsx5(
2329
+ children: /* @__PURE__ */ jsx4(
2514
2330
  ImageActionButtons,
2515
2331
  {
2516
2332
  copyLabel: t("common.copyImage"),
@@ -2522,7 +2338,7 @@ function ZoomableImage({
2522
2338
  )
2523
2339
  }
2524
2340
  ) : null,
2525
- copyStatus ? /* @__PURE__ */ jsx5(
2341
+ copyStatus ? /* @__PURE__ */ jsx4(
2526
2342
  ImageCopyStatusToast,
2527
2343
  {
2528
2344
  busy: copyStatus.busy,
@@ -2535,21 +2351,21 @@ function ZoomableImage({
2535
2351
  }
2536
2352
  }
2537
2353
  ) : null,
2538
- /* @__PURE__ */ jsx5(
2354
+ /* @__PURE__ */ jsx4(
2539
2355
  Button,
2540
2356
  {
2541
2357
  asChild: true,
2542
2358
  className: "tsh-zoom-dialog__icon-button nodrag tsh-desktop-no-drag",
2543
2359
  size: "icon",
2544
2360
  variant: "chrome",
2545
- children: /* @__PURE__ */ jsx5(
2361
+ children: /* @__PURE__ */ jsx4(
2546
2362
  "button",
2547
2363
  {
2548
2364
  type: "button",
2549
2365
  "aria-label": t("common.minimizeImage"),
2550
2366
  "data-rmiz-btn-unzoom": "",
2551
2367
  onClick: closePreviewImage,
2552
- children: /* @__PURE__ */ jsx5(RestoreIcon, { "aria-hidden": "true", className: "size-4" })
2368
+ children: /* @__PURE__ */ jsx4(RestoreIcon, { "aria-hidden": "true", className: "size-4" })
2553
2369
  }
2554
2370
  )
2555
2371
  }
@@ -2560,7 +2376,7 @@ function ZoomableImage({
2560
2376
  document.body
2561
2377
  ) : null,
2562
2378
  copyStatus && !isImagePreviewOpen ? createPortal(
2563
- /* @__PURE__ */ jsx5(
2379
+ /* @__PURE__ */ jsx4(
2564
2380
  ImageCopyStatusToast,
2565
2381
  {
2566
2382
  busy: copyStatus.busy,
@@ -2583,8 +2399,8 @@ function ImageCopyStatusToast({
2583
2399
  onOpenChange,
2584
2400
  variant
2585
2401
  }) {
2586
- return /* @__PURE__ */ jsxs4(ToastProvider, { duration: 1600, swipeDirection: "right", children: [
2587
- /* @__PURE__ */ jsx5(
2402
+ return /* @__PURE__ */ jsxs3(ToastProvider, { duration: 1600, swipeDirection: "right", children: [
2403
+ /* @__PURE__ */ jsx4(
2588
2404
  ToastRoot,
2589
2405
  {
2590
2406
  open: true,
@@ -2594,10 +2410,10 @@ function ImageCopyStatusToast({
2594
2410
  "data-tsh-image-copy-status": "true",
2595
2411
  style: { zIndex: 100303 },
2596
2412
  onOpenChange,
2597
- children: /* @__PURE__ */ jsx5(ToastTitle, { children: message })
2413
+ children: /* @__PURE__ */ jsx4(ToastTitle, { children: message })
2598
2414
  }
2599
2415
  ),
2600
- /* @__PURE__ */ jsx5(
2416
+ /* @__PURE__ */ jsx4(
2601
2417
  ToastViewport,
2602
2418
  {
2603
2419
  className: "nodrag tsh-desktop-no-drag",
@@ -2623,13 +2439,13 @@ function ImagePreviewZoomControls({
2623
2439
  onZoomOut,
2624
2440
  onWheel
2625
2441
  }) {
2626
- return /* @__PURE__ */ jsxs4(
2442
+ return /* @__PURE__ */ jsxs3(
2627
2443
  "div",
2628
2444
  {
2629
2445
  className: "tsh-zoom-dialog__zoom-controls nodrag tsh-desktop-no-drag",
2630
2446
  onWheel,
2631
2447
  children: [
2632
- /* @__PURE__ */ jsx5(
2448
+ /* @__PURE__ */ jsx4(
2633
2449
  "button",
2634
2450
  {
2635
2451
  type: "button",
@@ -2637,10 +2453,10 @@ function ImagePreviewZoomControls({
2637
2453
  "aria-label": zoomOutLabel,
2638
2454
  disabled: !canZoomOut,
2639
2455
  onClick: onZoomOut,
2640
- children: /* @__PURE__ */ jsx5(ZoomOutIcon, { "aria-hidden": "true", className: "size-4" })
2456
+ children: /* @__PURE__ */ jsx4(ZoomOutIcon, { "aria-hidden": "true", className: "size-4" })
2641
2457
  }
2642
2458
  ),
2643
- /* @__PURE__ */ jsxs4(
2459
+ /* @__PURE__ */ jsxs3(
2644
2460
  "span",
2645
2461
  {
2646
2462
  "aria-label": percentLabel,
@@ -2651,17 +2467,17 @@ function ImagePreviewZoomControls({
2651
2467
  ]
2652
2468
  }
2653
2469
  ),
2654
- /* @__PURE__ */ jsx5(
2470
+ /* @__PURE__ */ jsx4(
2655
2471
  "button",
2656
2472
  {
2657
2473
  type: "button",
2658
2474
  title: resetLabel,
2659
2475
  "aria-label": resetLabel,
2660
2476
  onClick: onReset,
2661
- children: /* @__PURE__ */ jsx5(RotateCcwIcon, { "aria-hidden": "true", className: "size-4" })
2477
+ children: /* @__PURE__ */ jsx4(RotateCcwIcon, { "aria-hidden": "true", className: "size-4" })
2662
2478
  }
2663
2479
  ),
2664
- /* @__PURE__ */ jsx5(
2480
+ /* @__PURE__ */ jsx4(
2665
2481
  "button",
2666
2482
  {
2667
2483
  type: "button",
@@ -2669,7 +2485,7 @@ function ImagePreviewZoomControls({
2669
2485
  "aria-label": zoomInLabel,
2670
2486
  disabled: !canZoomIn,
2671
2487
  onClick: onZoomIn,
2672
- children: /* @__PURE__ */ jsx5(ZoomInIcon, { "aria-hidden": "true", className: "size-4" })
2488
+ children: /* @__PURE__ */ jsx4(ZoomInIcon, { "aria-hidden": "true", className: "size-4" })
2673
2489
  }
2674
2490
  )
2675
2491
  ]
@@ -2684,8 +2500,8 @@ function ImageActionButtons({
2684
2500
  onDownload
2685
2501
  }) {
2686
2502
  if (!itemRole) {
2687
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2688
- /* @__PURE__ */ jsx5(
2503
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2504
+ /* @__PURE__ */ jsx4(
2689
2505
  Button,
2690
2506
  {
2691
2507
  "aria-label": copyLabel,
@@ -2699,10 +2515,10 @@ function ImageActionButtons({
2699
2515
  event.stopPropagation();
2700
2516
  onCopy();
2701
2517
  },
2702
- children: /* @__PURE__ */ jsx5(CopyIcon, { "aria-hidden": "true", className: "size-4" })
2518
+ children: /* @__PURE__ */ jsx4(CopyIcon, { "aria-hidden": "true", className: "size-4" })
2703
2519
  }
2704
2520
  ),
2705
- /* @__PURE__ */ jsx5(
2521
+ /* @__PURE__ */ jsx4(
2706
2522
  Button,
2707
2523
  {
2708
2524
  "aria-label": downloadLabel,
@@ -2716,13 +2532,13 @@ function ImageActionButtons({
2716
2532
  event.stopPropagation();
2717
2533
  onDownload();
2718
2534
  },
2719
- children: /* @__PURE__ */ jsx5(DownloadIcon, { "aria-hidden": "true", className: "size-4" })
2535
+ children: /* @__PURE__ */ jsx4(DownloadIcon, { "aria-hidden": "true", className: "size-4" })
2720
2536
  }
2721
2537
  )
2722
2538
  ] });
2723
2539
  }
2724
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2725
- /* @__PURE__ */ jsxs4(
2540
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2541
+ /* @__PURE__ */ jsxs3(
2726
2542
  "button",
2727
2543
  {
2728
2544
  type: "button",
@@ -2735,12 +2551,12 @@ function ImageActionButtons({
2735
2551
  onCopy();
2736
2552
  },
2737
2553
  children: [
2738
- /* @__PURE__ */ jsx5(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
2739
- /* @__PURE__ */ jsx5("span", { children: copyLabel })
2554
+ /* @__PURE__ */ jsx4(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
2555
+ /* @__PURE__ */ jsx4("span", { children: copyLabel })
2740
2556
  ]
2741
2557
  }
2742
2558
  ),
2743
- /* @__PURE__ */ jsxs4(
2559
+ /* @__PURE__ */ jsxs3(
2744
2560
  "button",
2745
2561
  {
2746
2562
  type: "button",
@@ -2753,8 +2569,8 @@ function ImageActionButtons({
2753
2569
  onDownload();
2754
2570
  },
2755
2571
  children: [
2756
- /* @__PURE__ */ jsx5(DownloadIcon, { "aria-hidden": "true", className: "size-4" }),
2757
- /* @__PURE__ */ jsx5("span", { children: downloadLabel })
2572
+ /* @__PURE__ */ jsx4(DownloadIcon, { "aria-hidden": "true", className: "size-4" }),
2573
+ /* @__PURE__ */ jsx4("span", { children: downloadLabel })
2758
2574
  ]
2759
2575
  }
2760
2576
  )
@@ -2812,7 +2628,7 @@ function formatImagePreviewZoom(value) {
2812
2628
 
2813
2629
  // shared/AgentMessageMarkdownMedia.tsx
2814
2630
  import { workspaceFileName as basenameWorkspacePath } from "@tutti-os/workspace-file-manager/services";
2815
- import { jsx as jsx6 } from "react/jsx-runtime";
2631
+ import { jsx as jsx5 } from "react/jsx-runtime";
2816
2632
  function MarkdownMedia({
2817
2633
  node: _node,
2818
2634
  src,
@@ -2835,7 +2651,7 @@ function MarkdownMedia({
2835
2651
  const [state, setState] = useState6(
2836
2652
  () => canReadWorkspaceImage && workspacePath ? peekCachedMarkdownMediaState(workspacePath) ?? { status: "loading" } : null
2837
2653
  );
2838
- useEffect5(() => {
2654
+ useEffect4(() => {
2839
2655
  if (!workspacePath || !readWorkspaceImage) {
2840
2656
  setState(null);
2841
2657
  return;
@@ -2902,9 +2718,9 @@ function MarkdownMedia({
2902
2718
  if (!workspacePath || !readWorkspaceImage) {
2903
2719
  if (fallbackMediaKind === "video") {
2904
2720
  if (!canRenderMarkdownVideoFallback(src)) {
2905
- return /* @__PURE__ */ jsx6(UnsupportedMarkdownMediaPreview, {});
2721
+ return /* @__PURE__ */ jsx5(UnsupportedMarkdownMediaPreview, {});
2906
2722
  }
2907
- return /* @__PURE__ */ jsx6(
2723
+ return /* @__PURE__ */ jsx5(
2908
2724
  "video",
2909
2725
  {
2910
2726
  src: resolvedSrc,
@@ -2921,7 +2737,7 @@ function MarkdownMedia({
2921
2737
  );
2922
2738
  }
2923
2739
  if (!shouldEnableZoom) {
2924
- return /* @__PURE__ */ jsx6(
2740
+ return /* @__PURE__ */ jsx5(
2925
2741
  "img",
2926
2742
  {
2927
2743
  ...props,
@@ -2932,7 +2748,7 @@ function MarkdownMedia({
2932
2748
  }
2933
2749
  );
2934
2750
  }
2935
- return /* @__PURE__ */ jsx6(
2751
+ return /* @__PURE__ */ jsx5(
2936
2752
  ZoomableImage,
2937
2753
  {
2938
2754
  ...props,
@@ -2947,7 +2763,7 @@ function MarkdownMedia({
2947
2763
  }
2948
2764
  if (state?.status === "ready") {
2949
2765
  if (state.kind === "video") {
2950
- return /* @__PURE__ */ jsx6(
2766
+ return /* @__PURE__ */ jsx5(
2951
2767
  "video",
2952
2768
  {
2953
2769
  src: state.src,
@@ -2964,7 +2780,7 @@ function MarkdownMedia({
2964
2780
  );
2965
2781
  }
2966
2782
  if (!shouldEnableZoom) {
2967
- return /* @__PURE__ */ jsx6(
2783
+ return /* @__PURE__ */ jsx5(
2968
2784
  "img",
2969
2785
  {
2970
2786
  ...props,
@@ -2978,7 +2794,7 @@ function MarkdownMedia({
2978
2794
  }
2979
2795
  );
2980
2796
  }
2981
- return /* @__PURE__ */ jsx6(
2797
+ return /* @__PURE__ */ jsx5(
2982
2798
  ZoomableImage,
2983
2799
  {
2984
2800
  ...props,
@@ -2994,13 +2810,13 @@ function MarkdownMedia({
2994
2810
  }
2995
2811
  );
2996
2812
  }
2997
- return /* @__PURE__ */ jsx6("span", { className: "mt-2 flex min-h-[160px] w-full items-center justify-center rounded-[8px] bg-[var(--transparency-block)] px-5 py-5 text-center text-[13px] leading-5 text-[var(--text-tertiary)]", children: state?.status === "error" ? state.reason === "unsupported" ? t("agentHost.workspaceFileManager.previewUnsupported") : t("agentHost.workspaceFileManager.previewReadFailed", {
2813
+ return /* @__PURE__ */ jsx5("span", { className: "mt-2 flex min-h-[160px] w-full items-center justify-center rounded-[8px] bg-[var(--transparency-block)] px-5 py-5 text-center text-[13px] leading-5 text-[var(--text-tertiary)]", children: state?.status === "error" ? state.reason === "unsupported" ? t("agentHost.workspaceFileManager.previewUnsupported") : t("agentHost.workspaceFileManager.previewReadFailed", {
2998
2814
  message: state.detail ?? ""
2999
2815
  }) : t("agentHost.workspaceFileManager.previewLoading") });
3000
2816
  }
3001
2817
  function UnsupportedMarkdownMediaPreview() {
3002
2818
  const { t } = useTranslation();
3003
- return /* @__PURE__ */ jsx6("span", { className: "mt-2 flex min-h-[160px] w-full items-center justify-center rounded-[8px] bg-[var(--transparency-block)] px-5 py-5 text-center text-[13px] leading-5 text-[var(--text-tertiary)]", children: t("agentHost.workspaceFileManager.previewUnsupported") });
2819
+ return /* @__PURE__ */ jsx5("span", { className: "mt-2 flex min-h-[160px] w-full items-center justify-center rounded-[8px] bg-[var(--transparency-block)] px-5 py-5 text-center text-[13px] leading-5 text-[var(--text-tertiary)]", children: t("agentHost.workspaceFileManager.previewUnsupported") });
3004
2820
  }
3005
2821
  function resolveMarkdownImageDownloadName(src, alt) {
3006
2822
  if (typeof src === "string") {
@@ -3013,7 +2829,7 @@ function resolveMarkdownImageDownloadName(src, alt) {
3013
2829
  }
3014
2830
 
3015
2831
  // shared/AgentMessageMarkdown.tsx
3016
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
2832
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
3017
2833
  var DEFERRED_LONG_MARKDOWN_CHAR_THRESHOLD = 4096;
3018
2834
  var STREAMING_MARKDOWN_EMERGENCY_PLAIN_CHAR_THRESHOLD = 96e3;
3019
2835
  var STREAMING_MARKDOWN_FRAME_MS = 24;
@@ -3106,7 +2922,7 @@ function AgentMessageMarkdown({
3106
2922
  contentSignature,
3107
2923
  shouldDeferMarkdownRender
3108
2924
  );
3109
- const handleLinkClick = useCallback5(
2925
+ const handleLinkClick = useCallback4(
3110
2926
  (href) => {
3111
2927
  if (workspaceLinkSource && onLinkAction && (workspaceRoot || basePath)) {
3112
2928
  const action = resolveWorkspaceLinkAction({
@@ -3124,7 +2940,7 @@ function AgentMessageMarkdown({
3124
2940
  },
3125
2941
  [basePath, onLinkAction, onLinkClick, workspaceLinkSource, workspaceRoot]
3126
2942
  );
3127
- const handleAnchorClickCapture = useCallback5(
2943
+ const handleAnchorClickCapture = useCallback4(
3128
2944
  (event) => {
3129
2945
  const href = resolveMarkdownAnchorHref(event.target);
3130
2946
  if (!href) {
@@ -3138,7 +2954,7 @@ function AgentMessageMarkdown({
3138
2954
  );
3139
2955
  const markdownComponents = useMemo(
3140
2956
  () => ({
3141
- a: (props) => /* @__PURE__ */ jsx7(
2957
+ a: (props) => /* @__PURE__ */ jsx6(
3142
2958
  MarkdownLink,
3143
2959
  {
3144
2960
  ...props,
@@ -3148,9 +2964,9 @@ function AgentMessageMarkdown({
3148
2964
  previewMode
3149
2965
  }
3150
2966
  ),
3151
- code: (props) => /* @__PURE__ */ jsx7(MarkdownCode, { ...props, onLinkClick: handleLinkClick }),
3152
- img: (props) => /* @__PURE__ */ jsx7(MarkdownMedia, { ...props, enableZoom: enableImageZoom }),
3153
- p: (props) => /* @__PURE__ */ jsx7(MarkdownParagraph, { ...props, inline }),
2967
+ code: (props) => /* @__PURE__ */ jsx6(MarkdownCode, { ...props, onLinkClick: handleLinkClick }),
2968
+ img: (props) => /* @__PURE__ */ jsx6(MarkdownMedia, { ...props, enableZoom: enableImageZoom }),
2969
+ p: (props) => /* @__PURE__ */ jsx6(MarkdownParagraph, { ...props, inline }),
3154
2970
  ul: MarkdownUnorderedList,
3155
2971
  ol: MarkdownOrderedList,
3156
2972
  li: MarkdownListItem,
@@ -3165,13 +2981,13 @@ function AgentMessageMarkdown({
3165
2981
  workspaceAppIcons
3166
2982
  ]
3167
2983
  );
3168
- return /* @__PURE__ */ jsxs5(
2984
+ return /* @__PURE__ */ jsxs4(
3169
2985
  ContainerTag,
3170
2986
  {
3171
2987
  className: "flex w-full min-w-0 flex-col items-start gap-1",
3172
2988
  "data-workspace-agent-markdown-shell": "true",
3173
2989
  children: [
3174
- /* @__PURE__ */ jsx7(
2990
+ /* @__PURE__ */ jsx6(
3175
2991
  ContainerTag,
3176
2992
  {
3177
2993
  className: cn(
@@ -3202,13 +3018,13 @@ function AgentMessageMarkdown({
3202
3018
  "data-agent-mention-only": isMentionOnly ? "true" : void 0,
3203
3019
  "data-collapsed": isCollapsed ? "true" : "false",
3204
3020
  onClickCapture: handleAnchorClickCapture,
3205
- children: markdownRenderReady ? streaming ? /* @__PURE__ */ jsx7(
3021
+ children: markdownRenderReady ? streaming ? /* @__PURE__ */ jsx6(
3206
3022
  StreamingMarkdownBlocks,
3207
3023
  {
3208
3024
  content: normalizedContent,
3209
3025
  components: markdownComponents
3210
3026
  }
3211
- ) : /* @__PURE__ */ jsx7(
3027
+ ) : /* @__PURE__ */ jsx6(
3212
3028
  ReactMarkdown,
3213
3029
  {
3214
3030
  remarkPlugins: [remarkGfm],
@@ -3217,7 +3033,7 @@ function AgentMessageMarkdown({
3217
3033
  components: markdownComponents,
3218
3034
  children: normalizedContent
3219
3035
  }
3220
- ) : /* @__PURE__ */ jsx7(
3036
+ ) : /* @__PURE__ */ jsx6(
3221
3037
  "div",
3222
3038
  {
3223
3039
  className: "whitespace-pre-wrap [overflow-wrap:anywhere]",
@@ -3227,7 +3043,7 @@ function AgentMessageMarkdown({
3227
3043
  )
3228
3044
  }
3229
3045
  ),
3230
- shouldCollapse && !isExpanded ? /* @__PURE__ */ jsx7(
3046
+ shouldCollapse && !isExpanded ? /* @__PURE__ */ jsx6(
3231
3047
  "button",
3232
3048
  {
3233
3049
  type: "button",
@@ -3248,7 +3064,7 @@ function StreamingMarkdownBlocks({
3248
3064
  () => splitStreamingMarkdownBlocks(content),
3249
3065
  [content]
3250
3066
  );
3251
- return /* @__PURE__ */ jsx7(Fragment2, { children: blocks.map((block, index) => /* @__PURE__ */ jsx7(
3067
+ return /* @__PURE__ */ jsx6(Fragment2, { children: blocks.map((block, index) => /* @__PURE__ */ jsx6(
3252
3068
  MemoizedMarkdownBlock,
3253
3069
  {
3254
3070
  content: block.content,
@@ -3261,7 +3077,7 @@ var MemoizedMarkdownBlock = memo(function MemoizedMarkdownBlock2({
3261
3077
  content,
3262
3078
  components
3263
3079
  }) {
3264
- return /* @__PURE__ */ jsx7(
3080
+ return /* @__PURE__ */ jsx6(
3265
3081
  ReactMarkdown,
3266
3082
  {
3267
3083
  remarkPlugins: [remarkGfm],
@@ -3293,7 +3109,7 @@ function MarkdownLink({
3293
3109
  t("agentHost.agentGui.workspaceAppFactoryMentionFallback")
3294
3110
  ) : null;
3295
3111
  if (mention) {
3296
- return /* @__PURE__ */ jsx7(
3112
+ return /* @__PURE__ */ jsx6(
3297
3113
  MentionLink,
3298
3114
  {
3299
3115
  ...props,
@@ -3309,7 +3125,7 @@ function MarkdownLink({
3309
3125
  textFromReactNode(props.children)
3310
3126
  ) : null;
3311
3127
  if (fileMention) {
3312
- return /* @__PURE__ */ jsx7(
3128
+ return /* @__PURE__ */ jsx6(
3313
3129
  WorkspaceFileMentionLink,
3314
3130
  {
3315
3131
  ...props,
@@ -3320,9 +3136,9 @@ function MarkdownLink({
3320
3136
  );
3321
3137
  }
3322
3138
  if (!isClickableMarkdownHref(targetHref)) {
3323
- return /* @__PURE__ */ jsx7(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx7("span", { className: props.className, title: props.title, children: props.children }) });
3139
+ return /* @__PURE__ */ jsx6(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx6("span", { className: props.className, title: props.title, children: props.children }) });
3324
3140
  }
3325
- return /* @__PURE__ */ jsx7(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx7(
3141
+ return /* @__PURE__ */ jsx6(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx6(
3326
3142
  "a",
3327
3143
  {
3328
3144
  ...props,
@@ -3406,7 +3222,7 @@ function WorkspaceFileMentionLink({
3406
3222
  ...props
3407
3223
  }) {
3408
3224
  "use memo";
3409
- return /* @__PURE__ */ jsxs5(
3225
+ return /* @__PURE__ */ jsxs4(
3410
3226
  "a",
3411
3227
  {
3412
3228
  ...props,
@@ -3433,8 +3249,8 @@ function WorkspaceFileMentionLink({
3433
3249
  activateMarkdownLinkFromKey(event, mention.href, onLinkClick);
3434
3250
  },
3435
3251
  children: [
3436
- /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__icon", "aria-hidden": "true" }),
3437
- /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__main", children: mention.label })
3252
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__icon", "aria-hidden": "true" }),
3253
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__main", children: mention.label })
3438
3254
  ]
3439
3255
  }
3440
3256
  );
@@ -3450,7 +3266,7 @@ function MentionLink({
3450
3266
  "use memo";
3451
3267
  const tooltipText = mention.label;
3452
3268
  const { ref: mainRef, overflowing } = useTextOverflow(tooltipText);
3453
- const link = /* @__PURE__ */ jsxs5(
3269
+ const link = /* @__PURE__ */ jsxs4(
3454
3270
  "a",
3455
3271
  {
3456
3272
  ...props,
@@ -3477,21 +3293,21 @@ function MentionLink({
3477
3293
  activateMarkdownLinkFromKey(event, href, onLinkClick);
3478
3294
  },
3479
3295
  children: [
3480
- mention.kind === "pasted-text" ? /* @__PURE__ */ jsx7(
3296
+ mention.kind === "pasted-text" ? /* @__PURE__ */ jsx6(
3481
3297
  "span",
3482
3298
  {
3483
3299
  className: "grid h-4 w-4 shrink-0 place-items-center text-[var(--text-tertiary)]",
3484
3300
  "aria-hidden": "true",
3485
- children: /* @__PURE__ */ jsx7(FileText, { size: 14, strokeWidth: 2 })
3301
+ children: /* @__PURE__ */ jsx6(FileText, { size: 14, strokeWidth: 2 })
3486
3302
  }
3487
- ) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */ jsx7(
3303
+ ) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */ jsx6(
3488
3304
  "span",
3489
3305
  {
3490
3306
  className: "grid h-4 w-4 shrink-0 place-items-center overflow-hidden rounded-[4px] bg-block",
3491
3307
  "aria-hidden": "true",
3492
3308
  "data-agent-mention-app-icon": "true",
3493
3309
  "data-workspace-app-icon": "true",
3494
- children: mention.iconUrl ? /* @__PURE__ */ jsx7(
3310
+ children: mention.iconUrl ? /* @__PURE__ */ jsx6(
3495
3311
  "img",
3496
3312
  {
3497
3313
  src: mention.iconUrl,
@@ -3501,37 +3317,37 @@ function MentionLink({
3501
3317
  loading: "lazy",
3502
3318
  draggable: false
3503
3319
  }
3504
- ) : /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__kind-icon h-4 w-4" })
3320
+ ) : /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__kind-icon h-4 w-4" })
3505
3321
  }
3506
- ) : /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
3322
+ ) : /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: /* @__PURE__ */ jsx6(
3507
3323
  "span",
3508
3324
  {
3509
3325
  className: "tsh-agent-object-token__kind-icon",
3510
3326
  "aria-hidden": "true"
3511
3327
  }
3512
3328
  ) }),
3513
- /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__main", ref: mainRef, children: mention.label })
3329
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__main", ref: mainRef, children: mention.label })
3514
3330
  ]
3515
3331
  }
3516
3332
  );
3517
3333
  if (previewMode) {
3518
3334
  return link;
3519
3335
  }
3520
- return /* @__PURE__ */ jsx7(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs5(Tooltip, { children: [
3521
- /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: link }),
3522
- overflowing ? /* @__PURE__ */ jsx7(TooltipContent, { className: "max-w-[min(420px,calc(100vw-32px))] whitespace-normal text-left [overflow-wrap:anywhere]", children: tooltipText }) : null
3336
+ return /* @__PURE__ */ jsx6(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs4(Tooltip, { children: [
3337
+ /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: link }),
3338
+ overflowing ? /* @__PURE__ */ jsx6(TooltipContent, { className: "max-w-[min(420px,calc(100vw-32px))] whitespace-normal text-left [overflow-wrap:anywhere]", children: tooltipText }) : null
3523
3339
  ] }) });
3524
3340
  }
3525
3341
 
3526
3342
  // app/renderer/components/ui/custom-scroll-area.tsx
3527
3343
  import {
3528
- forwardRef as forwardRef2,
3529
- useCallback as useCallback6,
3530
- useEffect as useEffect6,
3531
- useRef as useRef5,
3344
+ forwardRef,
3345
+ useCallback as useCallback5,
3346
+ useEffect as useEffect5,
3347
+ useRef as useRef4,
3532
3348
  useState as useState8
3533
3349
  } from "react";
3534
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3350
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
3535
3351
  var MIN_THUMB_HEIGHT = 24;
3536
3352
  function CustomScrollbar({
3537
3353
  getViewport,
@@ -3542,15 +3358,15 @@ function CustomScrollbar({
3542
3358
  syncKey
3543
3359
  }) {
3544
3360
  "use memo";
3545
- const trackRef = useRef5(null);
3546
- const dragStateRef = useRef5(null);
3361
+ const trackRef = useRef4(null);
3362
+ const dragStateRef = useRef4(null);
3547
3363
  const [scrollbarState, setScrollbarState] = useState8({
3548
3364
  scrollable: false,
3549
3365
  thumbHeight: 0,
3550
3366
  thumbTop: 0
3551
3367
  });
3552
3368
  const [dragging, setDragging] = useState8(false);
3553
- const syncScrollbarState = useCallback6(() => {
3369
+ const syncScrollbarState = useCallback5(() => {
3554
3370
  const viewport = getViewport();
3555
3371
  if (!viewport) {
3556
3372
  setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
@@ -3573,7 +3389,7 @@ function CustomScrollbar({
3573
3389
  (previous) => previous.scrollable && previous.thumbHeight === thumbHeight && previous.thumbTop === thumbTop ? previous : { scrollable: true, thumbHeight, thumbTop }
3574
3390
  );
3575
3391
  }, [getViewport]);
3576
- const scrollViewportToThumbTop = useCallback6(
3392
+ const scrollViewportToThumbTop = useCallback5(
3577
3393
  (thumbTop) => {
3578
3394
  const viewport = getViewport();
3579
3395
  const track = trackRef.current;
@@ -3596,7 +3412,7 @@ function CustomScrollbar({
3596
3412
  },
3597
3413
  [getViewport, scrollbarState.thumbHeight, syncScrollbarState]
3598
3414
  );
3599
- const handleTrackMouseDown = useCallback6(
3415
+ const handleTrackMouseDown = useCallback5(
3600
3416
  (event) => {
3601
3417
  if (event.button !== 0 || !scrollbarState.scrollable) {
3602
3418
  return;
@@ -3618,7 +3434,7 @@ function CustomScrollbar({
3618
3434
  scrollbarState.thumbHeight
3619
3435
  ]
3620
3436
  );
3621
- const handleThumbMouseDown = useCallback6(
3437
+ const handleThumbMouseDown = useCallback5(
3622
3438
  (event) => {
3623
3439
  if (event.button !== 0 || !scrollbarState.scrollable) {
3624
3440
  return;
@@ -3651,7 +3467,7 @@ function CustomScrollbar({
3651
3467
  },
3652
3468
  [getViewport, scrollbarState.scrollable, scrollbarState.thumbHeight]
3653
3469
  );
3654
- useEffect6(() => {
3470
+ useEffect5(() => {
3655
3471
  if (!dragging) {
3656
3472
  return;
3657
3473
  }
@@ -3676,7 +3492,7 @@ function CustomScrollbar({
3676
3492
  window.removeEventListener("mouseup", handleMouseUp);
3677
3493
  };
3678
3494
  }, [dragging, getViewport, syncScrollbarState]);
3679
- useEffect6(() => {
3495
+ useEffect5(() => {
3680
3496
  const viewport = getViewport();
3681
3497
  if (!viewport) {
3682
3498
  setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
@@ -3693,7 +3509,7 @@ function CustomScrollbar({
3693
3509
  resizeObserver?.disconnect();
3694
3510
  };
3695
3511
  }, [getViewport, syncKey, syncScrollbarState]);
3696
- return /* @__PURE__ */ jsx8(
3512
+ return /* @__PURE__ */ jsx7(
3697
3513
  "div",
3698
3514
  {
3699
3515
  ref: trackRef,
@@ -3703,7 +3519,7 @@ function CustomScrollbar({
3703
3519
  "data-testid": testId,
3704
3520
  "aria-hidden": "true",
3705
3521
  onMouseDown: handleTrackMouseDown,
3706
- children: /* @__PURE__ */ jsx8(
3522
+ children: /* @__PURE__ */ jsx7(
3707
3523
  "div",
3708
3524
  {
3709
3525
  className: cn("tsh-custom-scrollbar__thumb", thumbClassName),
@@ -3718,7 +3534,7 @@ function CustomScrollbar({
3718
3534
  }
3719
3535
  );
3720
3536
  }
3721
- var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3537
+ var CustomScrollArea = forwardRef(function CustomScrollArea2({
3722
3538
  children,
3723
3539
  className,
3724
3540
  viewportClassName,
@@ -3730,9 +3546,9 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3730
3546
  ...viewportProps
3731
3547
  }, forwardedRef) {
3732
3548
  "use memo";
3733
- const viewportRef = useRef5(null);
3734
- const getViewport = useCallback6(() => viewportRef.current, []);
3735
- return /* @__PURE__ */ jsxs6(
3549
+ const viewportRef = useRef4(null);
3550
+ const getViewport = useCallback5(() => viewportRef.current, []);
3551
+ return /* @__PURE__ */ jsxs5(
3736
3552
  "div",
3737
3553
  {
3738
3554
  className: cn(
@@ -3740,7 +3556,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3740
3556
  className
3741
3557
  ),
3742
3558
  children: [
3743
- /* @__PURE__ */ jsx8(
3559
+ /* @__PURE__ */ jsx7(
3744
3560
  "div",
3745
3561
  {
3746
3562
  ref: setRefs(viewportRef, forwardedRef),
@@ -3752,7 +3568,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3752
3568
  children
3753
3569
  }
3754
3570
  ),
3755
- /* @__PURE__ */ jsx8(
3571
+ /* @__PURE__ */ jsx7(
3756
3572
  CustomScrollbar,
3757
3573
  {
3758
3574
  getViewport,
@@ -3781,6 +3597,199 @@ function clamp(value, min, max) {
3781
3597
  return Math.min(max, Math.max(min, value));
3782
3598
  }
3783
3599
 
3600
+ // app/renderer/components/icons/MessageSquareMoreIcon.tsx
3601
+ import {
3602
+ forwardRef as forwardRef2,
3603
+ useCallback as useCallback6,
3604
+ useEffect as useEffect6,
3605
+ useImperativeHandle,
3606
+ useRef as useRef5
3607
+ } from "react";
3608
+ import {
3609
+ motion,
3610
+ useAnimation,
3611
+ useReducedMotion
3612
+ } from "framer-motion";
3613
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3614
+ var DOT_TRANSITION = {
3615
+ times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
3616
+ duration: 1.5
3617
+ };
3618
+ var DOT_VARIANTS = {
3619
+ normal: {
3620
+ opacity: 1
3621
+ },
3622
+ animate: (custom) => ({
3623
+ opacity: [1, 0, 0, 1, 1, 0, 0, 1],
3624
+ transition: {
3625
+ opacity: {
3626
+ ...DOT_TRANSITION,
3627
+ times: DOT_TRANSITION.times.map(
3628
+ (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
3629
+ )
3630
+ }
3631
+ }
3632
+ }),
3633
+ active: (custom) => ({
3634
+ opacity: [1, 0, 0, 1, 1, 0, 0, 1],
3635
+ transition: {
3636
+ opacity: {
3637
+ ...DOT_TRANSITION,
3638
+ repeat: Infinity,
3639
+ times: DOT_TRANSITION.times.map(
3640
+ (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
3641
+ )
3642
+ }
3643
+ }
3644
+ })
3645
+ };
3646
+ var MessageSquareMoreIcon = forwardRef2(
3647
+ ({
3648
+ active = false,
3649
+ onMouseEnter,
3650
+ onMouseLeave,
3651
+ className,
3652
+ size = 28,
3653
+ ...props
3654
+ }, ref) => {
3655
+ const controls = useAnimation();
3656
+ const reduceMotion = useReducedMotion();
3657
+ const isControlledRef = useRef5(false);
3658
+ const startAnimation = useCallback6(() => {
3659
+ if (reduceMotion) {
3660
+ return;
3661
+ }
3662
+ void controls.start(active ? "active" : "animate");
3663
+ }, [active, controls, reduceMotion]);
3664
+ const stopAnimation = useCallback6(() => {
3665
+ void controls.start("normal");
3666
+ }, [controls]);
3667
+ useImperativeHandle(ref, () => {
3668
+ isControlledRef.current = true;
3669
+ return {
3670
+ startAnimation,
3671
+ stopAnimation
3672
+ };
3673
+ });
3674
+ useEffect6(() => {
3675
+ if (active) {
3676
+ startAnimation();
3677
+ return;
3678
+ }
3679
+ stopAnimation();
3680
+ }, [active, startAnimation, stopAnimation]);
3681
+ const handleMouseEnter = useCallback6(
3682
+ (event) => {
3683
+ if (isControlledRef.current) {
3684
+ onMouseEnter?.(event);
3685
+ } else {
3686
+ startAnimation();
3687
+ }
3688
+ },
3689
+ [onMouseEnter, startAnimation]
3690
+ );
3691
+ const handleMouseLeave = useCallback6(
3692
+ (event) => {
3693
+ if (isControlledRef.current) {
3694
+ onMouseLeave?.(event);
3695
+ } else {
3696
+ stopAnimation();
3697
+ }
3698
+ },
3699
+ [onMouseLeave, stopAnimation]
3700
+ );
3701
+ return /* @__PURE__ */ jsx8(
3702
+ "div",
3703
+ {
3704
+ className: cn("inline-flex items-center justify-center", className),
3705
+ onMouseEnter: handleMouseEnter,
3706
+ onMouseLeave: handleMouseLeave,
3707
+ ...props,
3708
+ children: /* @__PURE__ */ jsxs6(
3709
+ "svg",
3710
+ {
3711
+ fill: "none",
3712
+ height: size,
3713
+ stroke: "currentColor",
3714
+ strokeLinecap: "round",
3715
+ strokeLinejoin: "round",
3716
+ strokeWidth: "2",
3717
+ viewBox: "0 0 24 24",
3718
+ width: size,
3719
+ xmlns: "http://www.w3.org/2000/svg",
3720
+ children: [
3721
+ /* @__PURE__ */ jsx8("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
3722
+ /* @__PURE__ */ jsx8(
3723
+ motion.path,
3724
+ {
3725
+ animate: controls,
3726
+ custom: 0,
3727
+ d: "M8 10h.01",
3728
+ variants: DOT_VARIANTS
3729
+ }
3730
+ ),
3731
+ /* @__PURE__ */ jsx8(
3732
+ motion.path,
3733
+ {
3734
+ animate: controls,
3735
+ custom: 1,
3736
+ d: "M12 10h.01",
3737
+ variants: DOT_VARIANTS
3738
+ }
3739
+ ),
3740
+ /* @__PURE__ */ jsx8(
3741
+ motion.path,
3742
+ {
3743
+ animate: controls,
3744
+ custom: 2,
3745
+ d: "M16 10h.01",
3746
+ variants: DOT_VARIANTS
3747
+ }
3748
+ )
3749
+ ]
3750
+ }
3751
+ )
3752
+ }
3753
+ );
3754
+ }
3755
+ );
3756
+ MessageSquareMoreIcon.displayName = "MessageSquareMoreIcon";
3757
+
3758
+ // agent-gui/agentGuiNode/AgentGUIConversation.styles.ts
3759
+ var styles = {
3760
+ interactivePrompt: "agent-gui-conversation__interactive-prompt",
3761
+ interactivePromptCard: "agent-gui-conversation__interactive-prompt-card",
3762
+ interactivePromptHeader: "agent-gui-conversation__interactive-prompt-header",
3763
+ interactivePromptLead: "agent-gui-conversation__interactive-prompt-lead",
3764
+ interactivePromptMeta: "agent-gui-conversation__interactive-prompt-meta",
3765
+ interactivePromptQuestion: "agent-gui-conversation__interactive-prompt-question",
3766
+ interactivePromptOptions: "agent-gui-conversation__interactive-prompt-options",
3767
+ interactiveOptionDisplay: "agent-gui-conversation__interactive-option-display",
3768
+ interactiveOptionButton: "agent-gui-conversation__interactive-option-button",
3769
+ interactiveOptionTitle: "agent-gui-conversation__interactive-option-title",
3770
+ interactiveOptionDescription: "agent-gui-conversation__interactive-option-description",
3771
+ interactiveOptionCommandDescription: "agent-gui-conversation__interactive-option-command-description",
3772
+ interactiveOptionCommandTooltip: "agent-gui-conversation__interactive-option-command-tooltip",
3773
+ interactiveOptionShortcut: "agent-gui-conversation__interactive-option-shortcut",
3774
+ interactiveOptionSpinner: "agent-gui-conversation__interactive-option-spinner",
3775
+ interactiveFeedbackComposer: "agent-gui-conversation__interactive-feedback-composer",
3776
+ interactivePromptTextarea: "agent-gui-conversation__interactive-prompt-textarea",
3777
+ interactiveFeedbackSendButton: "agent-gui-conversation__interactive-feedback-send-button",
3778
+ interactivePromptFooter: "agent-gui-conversation__interactive-prompt-footer",
3779
+ interactivePromptActions: "agent-gui-conversation__interactive-prompt-actions",
3780
+ userMessageFlow: "agent-gui-conversation__user-message-flow",
3781
+ assistantMessageFlow: "agent-gui-conversation__assistant-message-flow",
3782
+ messageGroup: "agent-gui-conversation__message-group",
3783
+ messageFooter: "agent-gui-conversation__message-footer",
3784
+ messageTimestamp: "agent-gui-conversation__message-timestamp",
3785
+ messageCopyButton: "agent-gui-conversation__message-copy-button",
3786
+ userImageGrid: "agent-gui-conversation__user-image-grid",
3787
+ userImageThumbnail: "agent-gui-conversation__user-image-thumbnail",
3788
+ userMessageBubble: "agent-gui-conversation__user-message-bubble",
3789
+ assistantMarkdown: "agent-gui-conversation__assistant-markdown"
3790
+ };
3791
+ var AgentGUIConversation_styles_default = styles;
3792
+
3784
3793
  export {
3785
3794
  cn,
3786
3795
  extractAgentMcpToolTarget,
@@ -3800,4 +3809,4 @@ export {
3800
3809
  AgentMessageMarkdown,
3801
3810
  CustomScrollArea
3802
3811
  };
3803
- //# sourceMappingURL=chunk-T6PEJFRP.js.map
3812
+ //# sourceMappingURL=chunk-MES7BQWI.js.map