@tutti-os/agent-gui 0.0.99 → 0.0.101

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-FECh2x1p.d.ts} +19 -37
  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-BH3lz6gn.d.ts} +21 -5
  13. package/dist/app/renderer/agentactivity.css +142 -72
  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-MRRICFWA.js → chunk-D7HMQLBO.js} +159 -55
  23. package/dist/chunk-D7HMQLBO.js.map +1 -0
  24. package/dist/{chunk-OTRZBTFQ.js → chunk-DWUVRWXD.js} +2 -2
  25. package/dist/{chunk-RHTZAODZ.js → chunk-E5AD46HP.js} +2 -2
  26. package/dist/{chunk-3NOJFKDV.js → chunk-EUW6VPIK.js} +414 -49
  27. package/dist/chunk-EUW6VPIK.js.map +1 -0
  28. package/dist/{chunk-Y35GDLP2.js → chunk-F5UR6EJG.js} +2 -17
  29. package/dist/chunk-F5UR6EJG.js.map +1 -0
  30. package/dist/{chunk-J7ZYAUPC.js → chunk-FAE7CXZO.js} +8 -6
  31. package/dist/chunk-FAE7CXZO.js.map +1 -0
  32. package/dist/{chunk-CPUEPDF7.js → chunk-GCW57WYQ.js} +646 -595
  33. package/dist/chunk-GCW57WYQ.js.map +1 -0
  34. package/dist/{chunk-4ROALW3K.js → chunk-KAV2WHTG.js} +82 -61
  35. package/dist/chunk-KAV2WHTG.js.map +1 -0
  36. package/dist/chunk-MIJXEELH.js +96 -0
  37. package/dist/chunk-MIJXEELH.js.map +1 -0
  38. package/dist/{chunk-T6PEJFRP.js → chunk-MJOQP2ED.js} +392 -452
  39. package/dist/chunk-MJOQP2ED.js.map +1 -0
  40. package/dist/{chunk-QWGJ5TEG.js → chunk-QY22OBJS.js} +28 -30
  41. package/dist/chunk-QY22OBJS.js.map +1 -0
  42. package/dist/{chunk-SPZJCTBV.js → chunk-TDVYZEUI.js} +348 -322
  43. package/dist/chunk-TDVYZEUI.js.map +1 -0
  44. package/dist/{chunk-MASXZENX.js → chunk-UESYITH6.js} +21 -2
  45. package/dist/chunk-UESYITH6.js.map +1 -0
  46. package/dist/{chunk-PLCHNOXL.js → chunk-VQOPBBBI.js} +1288 -1141
  47. package/dist/chunk-VQOPBBBI.js.map +1 -0
  48. package/dist/{chunk-7M77BK6K.js → chunk-ZPKPIHMZ.js} +196 -156
  49. package/dist/chunk-ZPKPIHMZ.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 +14 -14
  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-CPUEPDF7.js.map +0 -1
  78. package/dist/chunk-FSKGEGGX.js.map +0 -1
  79. package/dist/chunk-GAD6Y3BF.js +0 -88
  80. package/dist/chunk-GAD6Y3BF.js.map +0 -1
  81. package/dist/chunk-GCBDIQDX.js +0 -22
  82. package/dist/chunk-GCBDIQDX.js.map +0 -1
  83. package/dist/chunk-IYEXLOUE.js.map +0 -1
  84. package/dist/chunk-J7ZYAUPC.js.map +0 -1
  85. package/dist/chunk-MASXZENX.js.map +0 -1
  86. package/dist/chunk-MRRICFWA.js.map +0 -1
  87. package/dist/chunk-PLCHNOXL.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,205 +253,12 @@ 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
- useState as useState7
261
+ useState as useState6
455
262
  } from "react";
456
263
  import { FileText } from "lucide-react";
457
264
  import ReactMarkdown from "react-markdown";
@@ -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);
@@ -1192,15 +999,8 @@ function resolveAgentTargetPresentation(input) {
1192
999
  }
1193
1000
 
1194
1001
  // shared/agentMessageMarkdownRuntime.ts
1195
- import {
1196
- startTransition as startTransition2,
1197
- useEffect as useEffect3,
1198
- useState as useState2
1199
- } from "react";
1200
1002
  var COLLAPSED_LINE_LIMIT = 8;
1201
1003
  var APPROX_CHARS_PER_LINE = 34;
1202
- var DEFERRED_LONG_MARKDOWN_FALLBACK_DELAY_MS = 80;
1203
- var DEFERRED_LONG_MARKDOWN_IDLE_TIMEOUT_MS = 700;
1204
1004
  function splitStreamingMarkdownBlocks(content) {
1205
1005
  const normalized = content.replace(/\r\n?/g, "\n");
1206
1006
  if (!normalized) {
@@ -1293,49 +1093,6 @@ function activateMarkdownLinkFromPointer(event, href, onLinkClick) {
1293
1093
  }
1294
1094
  activateMarkdownLink(event, href, onLinkClick);
1295
1095
  }
1296
- function useDeferredMarkdownRenderReady(contentSignature, shouldDefer) {
1297
- const [readySignature, setReadySignature] = useState2(
1298
- shouldDefer ? null : contentSignature
1299
- );
1300
- const renderReady = !shouldDefer || readySignature === contentSignature;
1301
- useEffect3(() => {
1302
- if (!shouldDefer) {
1303
- setReadySignature(contentSignature);
1304
- return;
1305
- }
1306
- let canceled = false;
1307
- let timeoutId = null;
1308
- let idleCallbackId = null;
1309
- const markReady = () => {
1310
- if (canceled) {
1311
- return;
1312
- }
1313
- startTransition2(() => {
1314
- setReadySignature(contentSignature);
1315
- });
1316
- };
1317
- if ("requestIdleCallback" in window) {
1318
- idleCallbackId = window.requestIdleCallback(markReady, {
1319
- timeout: DEFERRED_LONG_MARKDOWN_IDLE_TIMEOUT_MS
1320
- });
1321
- } else {
1322
- timeoutId = setTimeout(
1323
- markReady,
1324
- DEFERRED_LONG_MARKDOWN_FALLBACK_DELAY_MS
1325
- );
1326
- }
1327
- return () => {
1328
- canceled = true;
1329
- if (idleCallbackId !== null) {
1330
- window.cancelIdleCallback(idleCallbackId);
1331
- }
1332
- if (timeoutId !== null) {
1333
- clearTimeout(timeoutId);
1334
- }
1335
- };
1336
- }, [contentSignature, shouldDefer]);
1337
- return renderReady;
1338
- }
1339
1096
  function hashMarkdownProfilerContent(content) {
1340
1097
  let hash = 0;
1341
1098
  for (let index = 0; index < content.length; index += 1) {
@@ -1811,13 +1568,13 @@ var MarkdownLinkContext = createContext2(false);
1811
1568
 
1812
1569
  // shared/AgentMessageMarkdownRenderers.tsx
1813
1570
  import {
1814
- useCallback as useCallback2,
1571
+ useCallback,
1815
1572
  useContext as useContext2,
1816
- useRef as useRef3,
1817
- useState as useState3
1573
+ useRef as useRef2,
1574
+ useState as useState2
1818
1575
  } from "react";
1819
1576
  import { Check, Copy } from "lucide-react";
1820
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1577
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
1821
1578
  function MarkdownCode({
1822
1579
  node: _node,
1823
1580
  children,
@@ -1830,9 +1587,9 @@ function MarkdownCode({
1830
1587
  const text = textFromReactNode(children).trim();
1831
1588
  const isLinkablePath = !isInsideLink && onLinkClick && !className && (isExplicitWorkspaceFilePath(text) || isHttpUrl(text));
1832
1589
  if (isLinkablePath) {
1833
- return /* @__PURE__ */ jsx3(PathLink, { href: text, onLinkClick, children });
1590
+ return /* @__PURE__ */ jsx2(PathLink, { href: text, onLinkClick, children });
1834
1591
  }
1835
- return /* @__PURE__ */ jsx3("code", { ...props, className, children });
1592
+ return /* @__PURE__ */ jsx2("code", { ...props, className, children });
1836
1593
  }
1837
1594
  var MARKDOWN_ORDERED_LIST_STYLE = {
1838
1595
  listStylePosition: "outside",
@@ -1854,7 +1611,7 @@ function MarkdownUnorderedList({
1854
1611
  ...props
1855
1612
  }) {
1856
1613
  "use memo";
1857
- return /* @__PURE__ */ jsx3(
1614
+ return /* @__PURE__ */ jsx2(
1858
1615
  "ul",
1859
1616
  {
1860
1617
  ...props,
@@ -1872,7 +1629,7 @@ function MarkdownOrderedList({
1872
1629
  ...props
1873
1630
  }) {
1874
1631
  "use memo";
1875
- return /* @__PURE__ */ jsx3(
1632
+ return /* @__PURE__ */ jsx2(
1876
1633
  "ol",
1877
1634
  {
1878
1635
  ...props,
@@ -1890,7 +1647,7 @@ function MarkdownListItem({
1890
1647
  ...props
1891
1648
  }) {
1892
1649
  "use memo";
1893
- return /* @__PURE__ */ jsx3("li", { ...props, style: { ...MARKDOWN_LIST_ITEM_STYLE, ...style } });
1650
+ return /* @__PURE__ */ jsx2("li", { ...props, style: { ...MARKDOWN_LIST_ITEM_STYLE, ...style } });
1894
1651
  }
1895
1652
  function MarkdownParagraph({
1896
1653
  node: _node,
@@ -1899,9 +1656,9 @@ function MarkdownParagraph({
1899
1656
  }) {
1900
1657
  "use memo";
1901
1658
  if (inline) {
1902
- return /* @__PURE__ */ jsx3("span", { ...props });
1659
+ return /* @__PURE__ */ jsx2("span", { ...props });
1903
1660
  }
1904
- return /* @__PURE__ */ jsx3("p", { ...props });
1661
+ return /* @__PURE__ */ jsx2("p", { ...props });
1905
1662
  }
1906
1663
  function PathLink({
1907
1664
  href,
@@ -1909,7 +1666,7 @@ function PathLink({
1909
1666
  onLinkClick
1910
1667
  }) {
1911
1668
  "use memo";
1912
- return /* @__PURE__ */ jsx3(
1669
+ return /* @__PURE__ */ jsx2(
1913
1670
  "a",
1914
1671
  {
1915
1672
  className: "cursor-pointer",
@@ -1943,10 +1700,10 @@ function MarkdownPre({
1943
1700
  ...props
1944
1701
  }) {
1945
1702
  "use memo";
1946
- const preRef = useRef3(null);
1947
- const [copied, setCopied] = useState3(false);
1948
- const copyResetRef = useRef3(null);
1949
- const handleCopy = useCallback2(() => {
1703
+ const preRef = useRef2(null);
1704
+ const [copied, setCopied] = useState2(false);
1705
+ const copyResetRef = useRef2(null);
1706
+ const handleCopy = useCallback(() => {
1950
1707
  const text = preRef.current?.textContent?.trim();
1951
1708
  if (!text) {
1952
1709
  return;
@@ -1959,8 +1716,8 @@ function MarkdownPre({
1959
1716
  copyResetRef.current = setTimeout(() => setCopied(false), 1500);
1960
1717
  });
1961
1718
  }, []);
1962
- return /* @__PURE__ */ jsxs2("div", { className: "group relative", children: [
1963
- /* @__PURE__ */ jsx3(
1719
+ return /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
1720
+ /* @__PURE__ */ jsx2(
1964
1721
  "button",
1965
1722
  {
1966
1723
  type: "button",
@@ -1969,21 +1726,21 @@ function MarkdownPre({
1969
1726
  "aria-label": translate("agentHost.agentGui.copyCode"),
1970
1727
  title: translate("agentHost.agentGui.copyCode"),
1971
1728
  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" })
1729
+ children: copied ? /* @__PURE__ */ jsx2(Check, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx2(Copy, { size: 13, strokeWidth: 2, "aria-hidden": "true" })
1973
1730
  }
1974
1731
  ),
1975
- /* @__PURE__ */ jsx3("pre", { ...props, ref: preRef, children })
1732
+ /* @__PURE__ */ jsx2("pre", { ...props, ref: preRef, children })
1976
1733
  ] });
1977
1734
  }
1978
1735
 
1979
1736
  // shared/AgentMessageMarkdownMedia.tsx
1980
- import { useContext as useContext3, useEffect as useEffect5, useState as useState6 } from "react";
1737
+ import { useContext as useContext3, useEffect as useEffect3, useState as useState5 } from "react";
1981
1738
 
1982
1739
  // app/renderer/components/ZoomableImage.tsx
1983
1740
  import {
1984
- useCallback as useCallback4,
1985
- useEffect as useEffect4,
1986
- useState as useState5
1741
+ useCallback as useCallback3,
1742
+ useEffect as useEffect2,
1743
+ useState as useState4
1987
1744
  } from "react";
1988
1745
  import { createPortal } from "react-dom";
1989
1746
  import {
@@ -2000,9 +1757,9 @@ import { RotateCcwIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
2000
1757
 
2001
1758
  // shared/agentConversation/components/ConversationImageContextMenu.tsx
2002
1759
  import {
2003
- useCallback as useCallback3,
2004
- useRef as useRef4,
2005
- useState as useState4
1760
+ useCallback as useCallback2,
1761
+ useRef as useRef3,
1762
+ useState as useState3
2006
1763
  } from "react";
2007
1764
  import {
2008
1765
  ContextMenu,
@@ -2084,7 +1841,7 @@ async function copyImageToClipboard(src, hostClipboard) {
2084
1841
  }
2085
1842
 
2086
1843
  // shared/agentConversation/components/ConversationImageContextMenu.tsx
2087
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1844
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
2088
1845
  function ConversationImageContextMenu({
2089
1846
  src,
2090
1847
  children,
@@ -2092,9 +1849,9 @@ function ConversationImageContextMenu({
2092
1849
  contentStyle
2093
1850
  }) {
2094
1851
  const agentHostApi = useOptionalAgentHostApi();
2095
- const copyStartedRef = useRef4(false);
2096
- const [menuResetKey, setMenuResetKey] = useState4(0);
2097
- const copyAndClose = useCallback3(() => {
1852
+ const copyStartedRef = useRef3(false);
1853
+ const [menuResetKey, setMenuResetKey] = useState3(0);
1854
+ const copyAndClose = useCallback2(() => {
2098
1855
  if (copyStartedRef.current) {
2099
1856
  return;
2100
1857
  }
@@ -2104,9 +1861,9 @@ function ConversationImageContextMenu({
2104
1861
  copyStartedRef.current = false;
2105
1862
  });
2106
1863
  }, [agentHostApi?.clipboard, src]);
2107
- return /* @__PURE__ */ jsxs3(ContextMenu, { children: [
2108
- /* @__PURE__ */ jsx4(ContextMenuTrigger, { asChild, children }),
2109
- /* @__PURE__ */ jsx4(ContextMenuContent, { style: contentStyle, children: /* @__PURE__ */ jsx4(
1864
+ return /* @__PURE__ */ jsxs2(ContextMenu, { children: [
1865
+ /* @__PURE__ */ jsx3(ContextMenuTrigger, { asChild, children }),
1866
+ /* @__PURE__ */ jsx3(ContextMenuContent, { style: contentStyle, children: /* @__PURE__ */ jsx3(
2110
1867
  ContextMenuItem,
2111
1868
  {
2112
1869
  onClick: copyAndClose,
@@ -2192,7 +1949,7 @@ function decodeURIComponentSafe(value) {
2192
1949
  }
2193
1950
 
2194
1951
  // app/renderer/components/ZoomableImage.tsx
2195
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1952
+ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
2196
1953
  var IMAGE_PREVIEW_ZOOM_MIN = 0.5;
2197
1954
  var IMAGE_PREVIEW_ZOOM_MAX = 3;
2198
1955
  var IMAGE_PREVIEW_ZOOM_STEP = 0.25;
@@ -2209,16 +1966,16 @@ function ZoomableImage({
2209
1966
  const agentHostApi = useOptionalAgentHostApi();
2210
1967
  const actionSource = typeof src === "string" && src.trim() ? src.trim() : null;
2211
1968
  const hasImageActions = Boolean(actionSource && downloadName !== void 0);
2212
- const [contextMenuPosition, setContextMenuPosition] = useState5(null);
2213
- const [copyStatus, setCopyStatus] = useState5(null);
2214
- const [imagePreviewZoom, setImagePreviewZoom] = useState5(1);
2215
- const [isWheelZooming, setIsWheelZooming] = useState5(false);
2216
- const [isImagePreviewOpen, setIsImagePreviewOpen] = useState5(false);
2217
- const [isImagePreviewClosing, setIsImagePreviewClosing] = useState5(false);
1969
+ const [contextMenuPosition, setContextMenuPosition] = useState4(null);
1970
+ const [copyStatus, setCopyStatus] = useState4(null);
1971
+ const [imagePreviewZoom, setImagePreviewZoom] = useState4(1);
1972
+ const [isWheelZooming, setIsWheelZooming] = useState4(false);
1973
+ const [isImagePreviewOpen, setIsImagePreviewOpen] = useState4(false);
1974
+ const [isImagePreviewClosing, setIsImagePreviewClosing] = useState4(false);
2218
1975
  const imagePreviewZoomPercent = Math.round(imagePreviewZoom * 100);
2219
1976
  const canZoomOut = imagePreviewZoom > IMAGE_PREVIEW_ZOOM_MIN;
2220
1977
  const canZoomIn = imagePreviewZoom < IMAGE_PREVIEW_ZOOM_MAX;
2221
- const closeContextMenu = useCallback4(() => {
1978
+ const closeContextMenu = useCallback3(() => {
2222
1979
  setContextMenuPosition(null);
2223
1980
  }, []);
2224
1981
  const finishClosePreviewImage = () => {
@@ -2244,18 +2001,32 @@ function ZoomableImage({
2244
2001
  setIsImagePreviewClosing(false);
2245
2002
  setIsImagePreviewOpen(true);
2246
2003
  };
2247
- useEffect4(() => {
2248
- if (!contextMenuPosition) {
2249
- return;
2004
+ useEffect2(() => {
2005
+ const handleWindowKeyDown = (event) => {
2006
+ if (!isImagePreviewOpen || event.key !== "Escape") {
2007
+ return;
2008
+ }
2009
+ event.preventDefault();
2010
+ event.stopPropagation();
2011
+ setIsImagePreviewClosing(true);
2012
+ setIsWheelZooming(false);
2013
+ setImagePreviewZoom(1);
2014
+ closeContextMenu();
2015
+ };
2016
+ if (contextMenuPosition) {
2017
+ document.addEventListener("click", closeContextMenu);
2018
+ document.addEventListener("scroll", closeContextMenu, true);
2019
+ }
2020
+ if (isImagePreviewOpen) {
2021
+ window.addEventListener("keydown", handleWindowKeyDown, true);
2250
2022
  }
2251
- document.addEventListener("click", closeContextMenu);
2252
- document.addEventListener("scroll", closeContextMenu, true);
2253
2023
  return () => {
2254
2024
  document.removeEventListener("click", closeContextMenu);
2255
2025
  document.removeEventListener("scroll", closeContextMenu, true);
2026
+ window.removeEventListener("keydown", handleWindowKeyDown, true);
2256
2027
  };
2257
- }, [closeContextMenu, contextMenuPosition]);
2258
- const handleContextMenu = useCallback4(
2028
+ }, [closeContextMenu, contextMenuPosition, isImagePreviewOpen]);
2029
+ const handleContextMenu = useCallback3(
2259
2030
  (event) => {
2260
2031
  onContextMenu?.(event);
2261
2032
  if (event.defaultPrevented || !actionSource || !hasImageActions) {
@@ -2271,7 +2042,7 @@ function ZoomableImage({
2271
2042
  },
2272
2043
  [actionSource, hasImageActions, onContextMenu]
2273
2044
  );
2274
- const handleCopyImage = useCallback4(async () => {
2045
+ const handleCopyImage = useCallback3(async () => {
2275
2046
  if (!actionSource) {
2276
2047
  return;
2277
2048
  }
@@ -2297,10 +2068,10 @@ function ZoomableImage({
2297
2068
  variant: copied ? "success" : "destructive"
2298
2069
  });
2299
2070
  }, [actionSource, agentHostApi?.clipboard, closeContextMenu, t]);
2300
- const handleCopyImageAction = useCallback4(() => {
2071
+ const handleCopyImageAction = useCallback3(() => {
2301
2072
  void handleCopyImage().catch(() => void 0);
2302
2073
  }, [handleCopyImage]);
2303
- const handleDownloadImage = useCallback4(() => {
2074
+ const handleDownloadImage = useCallback3(() => {
2304
2075
  if (!actionSource) {
2305
2076
  return;
2306
2077
  }
@@ -2310,23 +2081,23 @@ function ZoomableImage({
2310
2081
  resolveImageDownloadName(downloadName, actionSource, alt)
2311
2082
  );
2312
2083
  }, [actionSource, alt, closeContextMenu, downloadName]);
2313
- const zoomOutPreviewImage = useCallback4(() => {
2084
+ const zoomOutPreviewImage = useCallback3(() => {
2314
2085
  setIsWheelZooming(false);
2315
2086
  setImagePreviewZoom(
2316
2087
  (value) => clampSteppedImagePreviewZoom(value - IMAGE_PREVIEW_ZOOM_STEP)
2317
2088
  );
2318
2089
  }, []);
2319
- const zoomInPreviewImage = useCallback4(() => {
2090
+ const zoomInPreviewImage = useCallback3(() => {
2320
2091
  setIsWheelZooming(false);
2321
2092
  setImagePreviewZoom(
2322
2093
  (value) => clampSteppedImagePreviewZoom(value + IMAGE_PREVIEW_ZOOM_STEP)
2323
2094
  );
2324
2095
  }, []);
2325
- const resetPreviewImageZoom = useCallback4(() => {
2096
+ const resetPreviewImageZoom = useCallback3(() => {
2326
2097
  setIsWheelZooming(false);
2327
2098
  setImagePreviewZoom(1);
2328
2099
  }, []);
2329
- const handlePreviewImageWheel = useCallback4(
2100
+ const handlePreviewImageWheel = useCallback3(
2330
2101
  (event) => {
2331
2102
  event.preventDefault();
2332
2103
  event.stopPropagation();
@@ -2340,7 +2111,7 @@ function ZoomableImage({
2340
2111
  },
2341
2112
  []
2342
2113
  );
2343
- const actionButtons = hasImageActions ? /* @__PURE__ */ jsx5(
2114
+ const actionButtons = hasImageActions ? /* @__PURE__ */ jsx4(
2344
2115
  ImageActionButtons,
2345
2116
  {
2346
2117
  copyLabel: t("common.copyImage"),
@@ -2349,7 +2120,7 @@ function ZoomableImage({
2349
2120
  onDownload: handleDownloadImage
2350
2121
  }
2351
2122
  ) : null;
2352
- const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */ jsx5(
2123
+ const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */ jsx4(
2353
2124
  "img",
2354
2125
  {
2355
2126
  alt,
@@ -2377,7 +2148,7 @@ function ZoomableImage({
2377
2148
  onWheel: handlePreviewImageWheel
2378
2149
  }
2379
2150
  ) : null;
2380
- const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */ jsx5(
2151
+ const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */ jsx4(
2381
2152
  ConversationImageContextMenu,
2382
2153
  {
2383
2154
  src: actionSource,
@@ -2387,8 +2158,8 @@ function ZoomableImage({
2387
2158
  }
2388
2159
  ) : previewImage;
2389
2160
  const Wrapper = wrapElement;
2390
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2391
- /* @__PURE__ */ jsxs4(
2161
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2162
+ /* @__PURE__ */ jsxs3(
2392
2163
  Wrapper,
2393
2164
  {
2394
2165
  className: cn(
@@ -2396,7 +2167,7 @@ function ZoomableImage({
2396
2167
  wrapElement === "div" && "tsh-zoomable-image--block"
2397
2168
  ),
2398
2169
  children: [
2399
- /* @__PURE__ */ jsx5(
2170
+ /* @__PURE__ */ jsx4(
2400
2171
  "img",
2401
2172
  {
2402
2173
  ...props,
@@ -2412,7 +2183,7 @@ function ZoomableImage({
2412
2183
  className: cn("nodrag tsh-desktop-no-drag cursor-zoom-in", className)
2413
2184
  }
2414
2185
  ),
2415
- /* @__PURE__ */ jsx5(
2186
+ /* @__PURE__ */ jsx4(
2416
2187
  "button",
2417
2188
  {
2418
2189
  type: "button",
@@ -2426,7 +2197,7 @@ function ZoomableImage({
2426
2197
  }
2427
2198
  ),
2428
2199
  contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ? createPortal(
2429
- /* @__PURE__ */ jsx5(
2200
+ /* @__PURE__ */ jsx4(
2430
2201
  "div",
2431
2202
  {
2432
2203
  className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
@@ -2436,7 +2207,7 @@ function ZoomableImage({
2436
2207
  },
2437
2208
  role: "menu",
2438
2209
  onClick: (event) => event.stopPropagation(),
2439
- children: /* @__PURE__ */ jsx5(
2210
+ children: /* @__PURE__ */ jsx4(
2440
2211
  ImageActionButtons,
2441
2212
  {
2442
2213
  copyLabel: t("common.copyImage"),
@@ -2451,7 +2222,7 @@ function ZoomableImage({
2451
2222
  document.body
2452
2223
  ) : null,
2453
2224
  (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? createPortal(
2454
- /* @__PURE__ */ jsxs4(
2225
+ /* @__PURE__ */ jsxs3(
2455
2226
  "div",
2456
2227
  {
2457
2228
  "aria-modal": "true",
@@ -2466,21 +2237,16 @@ function ZoomableImage({
2466
2237
  finishClosePreviewImage();
2467
2238
  }
2468
2239
  },
2469
- onKeyDown: (event) => {
2470
- if (event.key === "Escape") {
2471
- closePreviewImage();
2472
- }
2473
- },
2474
2240
  children: [
2475
- /* @__PURE__ */ jsx5(
2241
+ /* @__PURE__ */ jsx4(
2476
2242
  "div",
2477
2243
  {
2478
2244
  "data-rmiz-modal-overlay": "visible",
2479
2245
  onClick: closePreviewImage
2480
2246
  }
2481
2247
  ),
2482
- /* @__PURE__ */ jsx5("div", { "data-rmiz-modal-content": "true", children: previewContent }),
2483
- /* @__PURE__ */ jsx5(
2248
+ /* @__PURE__ */ jsx4("div", { "data-rmiz-modal-content": "true", children: previewContent }),
2249
+ /* @__PURE__ */ jsx4(
2484
2250
  ImagePreviewZoomControls,
2485
2251
  {
2486
2252
  canZoomIn,
@@ -2499,8 +2265,8 @@ function ZoomableImage({
2499
2265
  onWheel: handlePreviewImageWheel
2500
2266
  }
2501
2267
  ),
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(
2268
+ actionButtons ? /* @__PURE__ */ jsx4("div", { className: "tsh-zoom-dialog__image-actions nodrag tsh-desktop-no-drag", children: actionButtons }) : null,
2269
+ contextMenuPosition?.inZoomDialog && actionButtons ? /* @__PURE__ */ jsx4(
2504
2270
  "div",
2505
2271
  {
2506
2272
  className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
@@ -2510,7 +2276,7 @@ function ZoomableImage({
2510
2276
  },
2511
2277
  role: "menu",
2512
2278
  onClick: (event) => event.stopPropagation(),
2513
- children: /* @__PURE__ */ jsx5(
2279
+ children: /* @__PURE__ */ jsx4(
2514
2280
  ImageActionButtons,
2515
2281
  {
2516
2282
  copyLabel: t("common.copyImage"),
@@ -2522,7 +2288,7 @@ function ZoomableImage({
2522
2288
  )
2523
2289
  }
2524
2290
  ) : null,
2525
- copyStatus ? /* @__PURE__ */ jsx5(
2291
+ copyStatus ? /* @__PURE__ */ jsx4(
2526
2292
  ImageCopyStatusToast,
2527
2293
  {
2528
2294
  busy: copyStatus.busy,
@@ -2535,21 +2301,21 @@ function ZoomableImage({
2535
2301
  }
2536
2302
  }
2537
2303
  ) : null,
2538
- /* @__PURE__ */ jsx5(
2304
+ /* @__PURE__ */ jsx4(
2539
2305
  Button,
2540
2306
  {
2541
2307
  asChild: true,
2542
2308
  className: "tsh-zoom-dialog__icon-button nodrag tsh-desktop-no-drag",
2543
2309
  size: "icon",
2544
2310
  variant: "chrome",
2545
- children: /* @__PURE__ */ jsx5(
2311
+ children: /* @__PURE__ */ jsx4(
2546
2312
  "button",
2547
2313
  {
2548
2314
  type: "button",
2549
2315
  "aria-label": t("common.minimizeImage"),
2550
2316
  "data-rmiz-btn-unzoom": "",
2551
2317
  onClick: closePreviewImage,
2552
- children: /* @__PURE__ */ jsx5(RestoreIcon, { "aria-hidden": "true", className: "size-4" })
2318
+ children: /* @__PURE__ */ jsx4(RestoreIcon, { "aria-hidden": "true", className: "size-4" })
2553
2319
  }
2554
2320
  )
2555
2321
  }
@@ -2560,7 +2326,7 @@ function ZoomableImage({
2560
2326
  document.body
2561
2327
  ) : null,
2562
2328
  copyStatus && !isImagePreviewOpen ? createPortal(
2563
- /* @__PURE__ */ jsx5(
2329
+ /* @__PURE__ */ jsx4(
2564
2330
  ImageCopyStatusToast,
2565
2331
  {
2566
2332
  busy: copyStatus.busy,
@@ -2583,8 +2349,8 @@ function ImageCopyStatusToast({
2583
2349
  onOpenChange,
2584
2350
  variant
2585
2351
  }) {
2586
- return /* @__PURE__ */ jsxs4(ToastProvider, { duration: 1600, swipeDirection: "right", children: [
2587
- /* @__PURE__ */ jsx5(
2352
+ return /* @__PURE__ */ jsxs3(ToastProvider, { duration: 1600, swipeDirection: "right", children: [
2353
+ /* @__PURE__ */ jsx4(
2588
2354
  ToastRoot,
2589
2355
  {
2590
2356
  open: true,
@@ -2594,10 +2360,10 @@ function ImageCopyStatusToast({
2594
2360
  "data-tsh-image-copy-status": "true",
2595
2361
  style: { zIndex: 100303 },
2596
2362
  onOpenChange,
2597
- children: /* @__PURE__ */ jsx5(ToastTitle, { children: message })
2363
+ children: /* @__PURE__ */ jsx4(ToastTitle, { children: message })
2598
2364
  }
2599
2365
  ),
2600
- /* @__PURE__ */ jsx5(
2366
+ /* @__PURE__ */ jsx4(
2601
2367
  ToastViewport,
2602
2368
  {
2603
2369
  className: "nodrag tsh-desktop-no-drag",
@@ -2623,13 +2389,13 @@ function ImagePreviewZoomControls({
2623
2389
  onZoomOut,
2624
2390
  onWheel
2625
2391
  }) {
2626
- return /* @__PURE__ */ jsxs4(
2392
+ return /* @__PURE__ */ jsxs3(
2627
2393
  "div",
2628
2394
  {
2629
2395
  className: "tsh-zoom-dialog__zoom-controls nodrag tsh-desktop-no-drag",
2630
2396
  onWheel,
2631
2397
  children: [
2632
- /* @__PURE__ */ jsx5(
2398
+ /* @__PURE__ */ jsx4(
2633
2399
  "button",
2634
2400
  {
2635
2401
  type: "button",
@@ -2637,10 +2403,10 @@ function ImagePreviewZoomControls({
2637
2403
  "aria-label": zoomOutLabel,
2638
2404
  disabled: !canZoomOut,
2639
2405
  onClick: onZoomOut,
2640
- children: /* @__PURE__ */ jsx5(ZoomOutIcon, { "aria-hidden": "true", className: "size-4" })
2406
+ children: /* @__PURE__ */ jsx4(ZoomOutIcon, { "aria-hidden": "true", className: "size-4" })
2641
2407
  }
2642
2408
  ),
2643
- /* @__PURE__ */ jsxs4(
2409
+ /* @__PURE__ */ jsxs3(
2644
2410
  "span",
2645
2411
  {
2646
2412
  "aria-label": percentLabel,
@@ -2651,17 +2417,17 @@ function ImagePreviewZoomControls({
2651
2417
  ]
2652
2418
  }
2653
2419
  ),
2654
- /* @__PURE__ */ jsx5(
2420
+ /* @__PURE__ */ jsx4(
2655
2421
  "button",
2656
2422
  {
2657
2423
  type: "button",
2658
2424
  title: resetLabel,
2659
2425
  "aria-label": resetLabel,
2660
2426
  onClick: onReset,
2661
- children: /* @__PURE__ */ jsx5(RotateCcwIcon, { "aria-hidden": "true", className: "size-4" })
2427
+ children: /* @__PURE__ */ jsx4(RotateCcwIcon, { "aria-hidden": "true", className: "size-4" })
2662
2428
  }
2663
2429
  ),
2664
- /* @__PURE__ */ jsx5(
2430
+ /* @__PURE__ */ jsx4(
2665
2431
  "button",
2666
2432
  {
2667
2433
  type: "button",
@@ -2669,7 +2435,7 @@ function ImagePreviewZoomControls({
2669
2435
  "aria-label": zoomInLabel,
2670
2436
  disabled: !canZoomIn,
2671
2437
  onClick: onZoomIn,
2672
- children: /* @__PURE__ */ jsx5(ZoomInIcon, { "aria-hidden": "true", className: "size-4" })
2438
+ children: /* @__PURE__ */ jsx4(ZoomInIcon, { "aria-hidden": "true", className: "size-4" })
2673
2439
  }
2674
2440
  )
2675
2441
  ]
@@ -2684,8 +2450,8 @@ function ImageActionButtons({
2684
2450
  onDownload
2685
2451
  }) {
2686
2452
  if (!itemRole) {
2687
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2688
- /* @__PURE__ */ jsx5(
2453
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2454
+ /* @__PURE__ */ jsx4(
2689
2455
  Button,
2690
2456
  {
2691
2457
  "aria-label": copyLabel,
@@ -2699,10 +2465,10 @@ function ImageActionButtons({
2699
2465
  event.stopPropagation();
2700
2466
  onCopy();
2701
2467
  },
2702
- children: /* @__PURE__ */ jsx5(CopyIcon, { "aria-hidden": "true", className: "size-4" })
2468
+ children: /* @__PURE__ */ jsx4(CopyIcon, { "aria-hidden": "true", className: "size-4" })
2703
2469
  }
2704
2470
  ),
2705
- /* @__PURE__ */ jsx5(
2471
+ /* @__PURE__ */ jsx4(
2706
2472
  Button,
2707
2473
  {
2708
2474
  "aria-label": downloadLabel,
@@ -2716,13 +2482,13 @@ function ImageActionButtons({
2716
2482
  event.stopPropagation();
2717
2483
  onDownload();
2718
2484
  },
2719
- children: /* @__PURE__ */ jsx5(DownloadIcon, { "aria-hidden": "true", className: "size-4" })
2485
+ children: /* @__PURE__ */ jsx4(DownloadIcon, { "aria-hidden": "true", className: "size-4" })
2720
2486
  }
2721
2487
  )
2722
2488
  ] });
2723
2489
  }
2724
- return /* @__PURE__ */ jsxs4(Fragment, { children: [
2725
- /* @__PURE__ */ jsxs4(
2490
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
2491
+ /* @__PURE__ */ jsxs3(
2726
2492
  "button",
2727
2493
  {
2728
2494
  type: "button",
@@ -2735,12 +2501,12 @@ function ImageActionButtons({
2735
2501
  onCopy();
2736
2502
  },
2737
2503
  children: [
2738
- /* @__PURE__ */ jsx5(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
2739
- /* @__PURE__ */ jsx5("span", { children: copyLabel })
2504
+ /* @__PURE__ */ jsx4(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
2505
+ /* @__PURE__ */ jsx4("span", { children: copyLabel })
2740
2506
  ]
2741
2507
  }
2742
2508
  ),
2743
- /* @__PURE__ */ jsxs4(
2509
+ /* @__PURE__ */ jsxs3(
2744
2510
  "button",
2745
2511
  {
2746
2512
  type: "button",
@@ -2753,8 +2519,8 @@ function ImageActionButtons({
2753
2519
  onDownload();
2754
2520
  },
2755
2521
  children: [
2756
- /* @__PURE__ */ jsx5(DownloadIcon, { "aria-hidden": "true", className: "size-4" }),
2757
- /* @__PURE__ */ jsx5("span", { children: downloadLabel })
2522
+ /* @__PURE__ */ jsx4(DownloadIcon, { "aria-hidden": "true", className: "size-4" }),
2523
+ /* @__PURE__ */ jsx4("span", { children: downloadLabel })
2758
2524
  ]
2759
2525
  }
2760
2526
  )
@@ -2812,7 +2578,7 @@ function formatImagePreviewZoom(value) {
2812
2578
 
2813
2579
  // shared/AgentMessageMarkdownMedia.tsx
2814
2580
  import { workspaceFileName as basenameWorkspacePath } from "@tutti-os/workspace-file-manager/services";
2815
- import { jsx as jsx6 } from "react/jsx-runtime";
2581
+ import { jsx as jsx5 } from "react/jsx-runtime";
2816
2582
  function MarkdownMedia({
2817
2583
  node: _node,
2818
2584
  src,
@@ -2832,10 +2598,10 @@ function MarkdownMedia({
2832
2598
  const shouldEnableZoom = enableZoom && !isInsideLink;
2833
2599
  const fallbackMediaKind = typeof src === "string" ? resolveMarkdownMediaKind(src) : null;
2834
2600
  const resolvedSrc = typeof src === "string" ? resolveRenderableMarkdownMediaSrc(src) : src;
2835
- const [state, setState] = useState6(
2601
+ const [state, setState] = useState5(
2836
2602
  () => canReadWorkspaceImage && workspacePath ? peekCachedMarkdownMediaState(workspacePath) ?? { status: "loading" } : null
2837
2603
  );
2838
- useEffect5(() => {
2604
+ useEffect3(() => {
2839
2605
  if (!workspacePath || !readWorkspaceImage) {
2840
2606
  setState(null);
2841
2607
  return;
@@ -2902,9 +2668,9 @@ function MarkdownMedia({
2902
2668
  if (!workspacePath || !readWorkspaceImage) {
2903
2669
  if (fallbackMediaKind === "video") {
2904
2670
  if (!canRenderMarkdownVideoFallback(src)) {
2905
- return /* @__PURE__ */ jsx6(UnsupportedMarkdownMediaPreview, {});
2671
+ return /* @__PURE__ */ jsx5(UnsupportedMarkdownMediaPreview, {});
2906
2672
  }
2907
- return /* @__PURE__ */ jsx6(
2673
+ return /* @__PURE__ */ jsx5(
2908
2674
  "video",
2909
2675
  {
2910
2676
  src: resolvedSrc,
@@ -2921,7 +2687,7 @@ function MarkdownMedia({
2921
2687
  );
2922
2688
  }
2923
2689
  if (!shouldEnableZoom) {
2924
- return /* @__PURE__ */ jsx6(
2690
+ return /* @__PURE__ */ jsx5(
2925
2691
  "img",
2926
2692
  {
2927
2693
  ...props,
@@ -2932,7 +2698,7 @@ function MarkdownMedia({
2932
2698
  }
2933
2699
  );
2934
2700
  }
2935
- return /* @__PURE__ */ jsx6(
2701
+ return /* @__PURE__ */ jsx5(
2936
2702
  ZoomableImage,
2937
2703
  {
2938
2704
  ...props,
@@ -2947,7 +2713,7 @@ function MarkdownMedia({
2947
2713
  }
2948
2714
  if (state?.status === "ready") {
2949
2715
  if (state.kind === "video") {
2950
- return /* @__PURE__ */ jsx6(
2716
+ return /* @__PURE__ */ jsx5(
2951
2717
  "video",
2952
2718
  {
2953
2719
  src: state.src,
@@ -2964,7 +2730,7 @@ function MarkdownMedia({
2964
2730
  );
2965
2731
  }
2966
2732
  if (!shouldEnableZoom) {
2967
- return /* @__PURE__ */ jsx6(
2733
+ return /* @__PURE__ */ jsx5(
2968
2734
  "img",
2969
2735
  {
2970
2736
  ...props,
@@ -2978,7 +2744,7 @@ function MarkdownMedia({
2978
2744
  }
2979
2745
  );
2980
2746
  }
2981
- return /* @__PURE__ */ jsx6(
2747
+ return /* @__PURE__ */ jsx5(
2982
2748
  ZoomableImage,
2983
2749
  {
2984
2750
  ...props,
@@ -2994,13 +2760,13 @@ function MarkdownMedia({
2994
2760
  }
2995
2761
  );
2996
2762
  }
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", {
2763
+ 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
2764
  message: state.detail ?? ""
2999
2765
  }) : t("agentHost.workspaceFileManager.previewLoading") });
3000
2766
  }
3001
2767
  function UnsupportedMarkdownMediaPreview() {
3002
2768
  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") });
2769
+ 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
2770
  }
3005
2771
  function resolveMarkdownImageDownloadName(src, alt) {
3006
2772
  if (typeof src === "string") {
@@ -3013,9 +2779,7 @@ function resolveMarkdownImageDownloadName(src, alt) {
3013
2779
  }
3014
2780
 
3015
2781
  // shared/AgentMessageMarkdown.tsx
3016
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
3017
- var DEFERRED_LONG_MARKDOWN_CHAR_THRESHOLD = 4096;
3018
- var STREAMING_MARKDOWN_EMERGENCY_PLAIN_CHAR_THRESHOLD = 96e3;
2782
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
3019
2783
  var STREAMING_MARKDOWN_FRAME_MS = 24;
3020
2784
  var STREAMING_MARKDOWN_MAX_CHARS_PER_SECOND = 6e3;
3021
2785
  var STREAMING_MARKDOWN_TAIL_FLUSH_CHARS = 0;
@@ -3055,7 +2819,6 @@ function AgentMessageMarkdown({
3055
2819
  className,
3056
2820
  inline = false,
3057
2821
  normalizePlainIssueMentionTitle = false,
3058
- deferLongContentRender = false,
3059
2822
  enableImageZoom = false,
3060
2823
  previewMode = false,
3061
2824
  streaming = false
@@ -3079,15 +2842,11 @@ function AgentMessageMarkdown({
3079
2842
  const workspaceRoot = workspaceLinkContext?.workspaceRoot ?? null;
3080
2843
  const basePath = workspaceLinkContext?.basePath ?? null;
3081
2844
  const workspaceLinkSource = workspaceLinkContext?.source ?? null;
3082
- const [isExpanded, setIsExpanded] = useState7(false);
2845
+ const [isExpanded, setIsExpanded] = useState6(false);
3083
2846
  const resolvedExpandLabel = expandLabel ?? t("agentHost.workspaceAgentMessageExpand");
3084
2847
  const shouldCollapse = collapsible && isLikelyLongerThanLineLimit(stabilizedContent);
3085
2848
  const isCollapsed = shouldCollapse && !isExpanded;
3086
2849
  const ContainerTag = inline ? "span" : "div";
3087
- const contentSignature = useMemo(
3088
- () => hashMarkdownProfilerContent(stabilizedContent),
3089
- [stabilizedContent]
3090
- );
3091
2850
  const normalizedContent = useMemo(
3092
2851
  () => linkBareLocalAbsolutePaths(
3093
2852
  normalizeLocalPathMarkdownLinks(
@@ -3101,12 +2860,7 @@ function AgentMessageMarkdown({
3101
2860
  [normalizePlainIssueMentionTitle, stabilizedContent]
3102
2861
  );
3103
2862
  const isMentionOnly = isMentionOnlyMarkdownContent(normalizedContent);
3104
- const shouldDeferMarkdownRender = deferLongContentRender && !inline && content.length >= (streaming ? STREAMING_MARKDOWN_EMERGENCY_PLAIN_CHAR_THRESHOLD : DEFERRED_LONG_MARKDOWN_CHAR_THRESHOLD) && !isExpanded;
3105
- const markdownRenderReady = useDeferredMarkdownRenderReady(
3106
- contentSignature,
3107
- shouldDeferMarkdownRender
3108
- );
3109
- const handleLinkClick = useCallback5(
2863
+ const handleLinkClick = useCallback4(
3110
2864
  (href) => {
3111
2865
  if (workspaceLinkSource && onLinkAction && (workspaceRoot || basePath)) {
3112
2866
  const action = resolveWorkspaceLinkAction({
@@ -3124,7 +2878,7 @@ function AgentMessageMarkdown({
3124
2878
  },
3125
2879
  [basePath, onLinkAction, onLinkClick, workspaceLinkSource, workspaceRoot]
3126
2880
  );
3127
- const handleAnchorClickCapture = useCallback5(
2881
+ const handleAnchorClickCapture = useCallback4(
3128
2882
  (event) => {
3129
2883
  const href = resolveMarkdownAnchorHref(event.target);
3130
2884
  if (!href) {
@@ -3138,7 +2892,7 @@ function AgentMessageMarkdown({
3138
2892
  );
3139
2893
  const markdownComponents = useMemo(
3140
2894
  () => ({
3141
- a: (props) => /* @__PURE__ */ jsx7(
2895
+ a: (props) => /* @__PURE__ */ jsx6(
3142
2896
  MarkdownLink,
3143
2897
  {
3144
2898
  ...props,
@@ -3148,9 +2902,9 @@ function AgentMessageMarkdown({
3148
2902
  previewMode
3149
2903
  }
3150
2904
  ),
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 }),
2905
+ code: (props) => /* @__PURE__ */ jsx6(MarkdownCode, { ...props, onLinkClick: handleLinkClick }),
2906
+ img: (props) => /* @__PURE__ */ jsx6(MarkdownMedia, { ...props, enableZoom: enableImageZoom }),
2907
+ p: (props) => /* @__PURE__ */ jsx6(MarkdownParagraph, { ...props, inline }),
3154
2908
  ul: MarkdownUnorderedList,
3155
2909
  ol: MarkdownOrderedList,
3156
2910
  li: MarkdownListItem,
@@ -3165,13 +2919,13 @@ function AgentMessageMarkdown({
3165
2919
  workspaceAppIcons
3166
2920
  ]
3167
2921
  );
3168
- return /* @__PURE__ */ jsxs5(
2922
+ return /* @__PURE__ */ jsxs4(
3169
2923
  ContainerTag,
3170
2924
  {
3171
2925
  className: "flex w-full min-w-0 flex-col items-start gap-1",
3172
2926
  "data-workspace-agent-markdown-shell": "true",
3173
2927
  children: [
3174
- /* @__PURE__ */ jsx7(
2928
+ /* @__PURE__ */ jsx6(
3175
2929
  ContainerTag,
3176
2930
  {
3177
2931
  className: cn(
@@ -3202,13 +2956,13 @@ function AgentMessageMarkdown({
3202
2956
  "data-agent-mention-only": isMentionOnly ? "true" : void 0,
3203
2957
  "data-collapsed": isCollapsed ? "true" : "false",
3204
2958
  onClickCapture: handleAnchorClickCapture,
3205
- children: markdownRenderReady ? streaming ? /* @__PURE__ */ jsx7(
2959
+ children: streaming ? /* @__PURE__ */ jsx6(
3206
2960
  StreamingMarkdownBlocks,
3207
2961
  {
3208
2962
  content: normalizedContent,
3209
2963
  components: markdownComponents
3210
2964
  }
3211
- ) : /* @__PURE__ */ jsx7(
2965
+ ) : /* @__PURE__ */ jsx6(
3212
2966
  ReactMarkdown,
3213
2967
  {
3214
2968
  remarkPlugins: [remarkGfm],
@@ -3217,17 +2971,10 @@ function AgentMessageMarkdown({
3217
2971
  components: markdownComponents,
3218
2972
  children: normalizedContent
3219
2973
  }
3220
- ) : /* @__PURE__ */ jsx7(
3221
- "div",
3222
- {
3223
- className: "whitespace-pre-wrap [overflow-wrap:anywhere]",
3224
- "data-workspace-agent-markdown-deferred": "true",
3225
- children: normalizedContent
3226
- }
3227
2974
  )
3228
2975
  }
3229
2976
  ),
3230
- shouldCollapse && !isExpanded ? /* @__PURE__ */ jsx7(
2977
+ shouldCollapse && !isExpanded ? /* @__PURE__ */ jsx6(
3231
2978
  "button",
3232
2979
  {
3233
2980
  type: "button",
@@ -3248,7 +2995,7 @@ function StreamingMarkdownBlocks({
3248
2995
  () => splitStreamingMarkdownBlocks(content),
3249
2996
  [content]
3250
2997
  );
3251
- return /* @__PURE__ */ jsx7(Fragment2, { children: blocks.map((block, index) => /* @__PURE__ */ jsx7(
2998
+ return /* @__PURE__ */ jsx6(Fragment2, { children: blocks.map((block, index) => /* @__PURE__ */ jsx6(
3252
2999
  MemoizedMarkdownBlock,
3253
3000
  {
3254
3001
  content: block.content,
@@ -3261,7 +3008,7 @@ var MemoizedMarkdownBlock = memo(function MemoizedMarkdownBlock2({
3261
3008
  content,
3262
3009
  components
3263
3010
  }) {
3264
- return /* @__PURE__ */ jsx7(
3011
+ return /* @__PURE__ */ jsx6(
3265
3012
  ReactMarkdown,
3266
3013
  {
3267
3014
  remarkPlugins: [remarkGfm],
@@ -3293,7 +3040,7 @@ function MarkdownLink({
3293
3040
  t("agentHost.agentGui.workspaceAppFactoryMentionFallback")
3294
3041
  ) : null;
3295
3042
  if (mention) {
3296
- return /* @__PURE__ */ jsx7(
3043
+ return /* @__PURE__ */ jsx6(
3297
3044
  MentionLink,
3298
3045
  {
3299
3046
  ...props,
@@ -3309,7 +3056,7 @@ function MarkdownLink({
3309
3056
  textFromReactNode(props.children)
3310
3057
  ) : null;
3311
3058
  if (fileMention) {
3312
- return /* @__PURE__ */ jsx7(
3059
+ return /* @__PURE__ */ jsx6(
3313
3060
  WorkspaceFileMentionLink,
3314
3061
  {
3315
3062
  ...props,
@@ -3320,9 +3067,9 @@ function MarkdownLink({
3320
3067
  );
3321
3068
  }
3322
3069
  if (!isClickableMarkdownHref(targetHref)) {
3323
- return /* @__PURE__ */ jsx7(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx7("span", { className: props.className, title: props.title, children: props.children }) });
3070
+ return /* @__PURE__ */ jsx6(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx6("span", { className: props.className, title: props.title, children: props.children }) });
3324
3071
  }
3325
- return /* @__PURE__ */ jsx7(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx7(
3072
+ return /* @__PURE__ */ jsx6(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx6(
3326
3073
  "a",
3327
3074
  {
3328
3075
  ...props,
@@ -3406,7 +3153,7 @@ function WorkspaceFileMentionLink({
3406
3153
  ...props
3407
3154
  }) {
3408
3155
  "use memo";
3409
- return /* @__PURE__ */ jsxs5(
3156
+ return /* @__PURE__ */ jsxs4(
3410
3157
  "a",
3411
3158
  {
3412
3159
  ...props,
@@ -3433,8 +3180,8 @@ function WorkspaceFileMentionLink({
3433
3180
  activateMarkdownLinkFromKey(event, mention.href, onLinkClick);
3434
3181
  },
3435
3182
  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 })
3183
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__icon", "aria-hidden": "true" }),
3184
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__main", children: mention.label })
3438
3185
  ]
3439
3186
  }
3440
3187
  );
@@ -3450,7 +3197,7 @@ function MentionLink({
3450
3197
  "use memo";
3451
3198
  const tooltipText = mention.label;
3452
3199
  const { ref: mainRef, overflowing } = useTextOverflow(tooltipText);
3453
- const link = /* @__PURE__ */ jsxs5(
3200
+ const link = /* @__PURE__ */ jsxs4(
3454
3201
  "a",
3455
3202
  {
3456
3203
  ...props,
@@ -3477,21 +3224,21 @@ function MentionLink({
3477
3224
  activateMarkdownLinkFromKey(event, href, onLinkClick);
3478
3225
  },
3479
3226
  children: [
3480
- mention.kind === "pasted-text" ? /* @__PURE__ */ jsx7(
3227
+ mention.kind === "pasted-text" ? /* @__PURE__ */ jsx6(
3481
3228
  "span",
3482
3229
  {
3483
3230
  className: "grid h-4 w-4 shrink-0 place-items-center text-[var(--text-tertiary)]",
3484
3231
  "aria-hidden": "true",
3485
- children: /* @__PURE__ */ jsx7(FileText, { size: 14, strokeWidth: 2 })
3232
+ children: /* @__PURE__ */ jsx6(FileText, { size: 14, strokeWidth: 2 })
3486
3233
  }
3487
- ) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */ jsx7(
3234
+ ) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */ jsx6(
3488
3235
  "span",
3489
3236
  {
3490
3237
  className: "grid h-4 w-4 shrink-0 place-items-center overflow-hidden rounded-[4px] bg-block",
3491
3238
  "aria-hidden": "true",
3492
3239
  "data-agent-mention-app-icon": "true",
3493
3240
  "data-workspace-app-icon": "true",
3494
- children: mention.iconUrl ? /* @__PURE__ */ jsx7(
3241
+ children: mention.iconUrl ? /* @__PURE__ */ jsx6(
3495
3242
  "img",
3496
3243
  {
3497
3244
  src: mention.iconUrl,
@@ -3501,37 +3248,37 @@ function MentionLink({
3501
3248
  loading: "lazy",
3502
3249
  draggable: false
3503
3250
  }
3504
- ) : /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__kind-icon h-4 w-4" })
3251
+ ) : /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__kind-icon h-4 w-4" })
3505
3252
  }
3506
- ) : /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
3253
+ ) : /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: /* @__PURE__ */ jsx6(
3507
3254
  "span",
3508
3255
  {
3509
3256
  className: "tsh-agent-object-token__kind-icon",
3510
3257
  "aria-hidden": "true"
3511
3258
  }
3512
3259
  ) }),
3513
- /* @__PURE__ */ jsx7("span", { className: "tsh-agent-object-token__main", ref: mainRef, children: mention.label })
3260
+ /* @__PURE__ */ jsx6("span", { className: "tsh-agent-object-token__main", ref: mainRef, children: mention.label })
3514
3261
  ]
3515
3262
  }
3516
3263
  );
3517
3264
  if (previewMode) {
3518
3265
  return link;
3519
3266
  }
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
3267
+ return /* @__PURE__ */ jsx6(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs4(Tooltip, { children: [
3268
+ /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: link }),
3269
+ overflowing ? /* @__PURE__ */ jsx6(TooltipContent, { className: "max-w-[min(420px,calc(100vw-32px))] whitespace-normal text-left [overflow-wrap:anywhere]", children: tooltipText }) : null
3523
3270
  ] }) });
3524
3271
  }
3525
3272
 
3526
3273
  // app/renderer/components/ui/custom-scroll-area.tsx
3527
3274
  import {
3528
- forwardRef as forwardRef2,
3529
- useCallback as useCallback6,
3530
- useEffect as useEffect6,
3531
- useRef as useRef5,
3532
- useState as useState8
3275
+ forwardRef,
3276
+ useCallback as useCallback5,
3277
+ useEffect as useEffect4,
3278
+ useRef as useRef4,
3279
+ useState as useState7
3533
3280
  } from "react";
3534
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3281
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
3535
3282
  var MIN_THUMB_HEIGHT = 24;
3536
3283
  function CustomScrollbar({
3537
3284
  getViewport,
@@ -3542,15 +3289,15 @@ function CustomScrollbar({
3542
3289
  syncKey
3543
3290
  }) {
3544
3291
  "use memo";
3545
- const trackRef = useRef5(null);
3546
- const dragStateRef = useRef5(null);
3547
- const [scrollbarState, setScrollbarState] = useState8({
3292
+ const trackRef = useRef4(null);
3293
+ const dragStateRef = useRef4(null);
3294
+ const [scrollbarState, setScrollbarState] = useState7({
3548
3295
  scrollable: false,
3549
3296
  thumbHeight: 0,
3550
3297
  thumbTop: 0
3551
3298
  });
3552
- const [dragging, setDragging] = useState8(false);
3553
- const syncScrollbarState = useCallback6(() => {
3299
+ const [dragging, setDragging] = useState7(false);
3300
+ const syncScrollbarState = useCallback5(() => {
3554
3301
  const viewport = getViewport();
3555
3302
  if (!viewport) {
3556
3303
  setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
@@ -3573,7 +3320,7 @@ function CustomScrollbar({
3573
3320
  (previous) => previous.scrollable && previous.thumbHeight === thumbHeight && previous.thumbTop === thumbTop ? previous : { scrollable: true, thumbHeight, thumbTop }
3574
3321
  );
3575
3322
  }, [getViewport]);
3576
- const scrollViewportToThumbTop = useCallback6(
3323
+ const scrollViewportToThumbTop = useCallback5(
3577
3324
  (thumbTop) => {
3578
3325
  const viewport = getViewport();
3579
3326
  const track = trackRef.current;
@@ -3596,7 +3343,7 @@ function CustomScrollbar({
3596
3343
  },
3597
3344
  [getViewport, scrollbarState.thumbHeight, syncScrollbarState]
3598
3345
  );
3599
- const handleTrackMouseDown = useCallback6(
3346
+ const handleTrackMouseDown = useCallback5(
3600
3347
  (event) => {
3601
3348
  if (event.button !== 0 || !scrollbarState.scrollable) {
3602
3349
  return;
@@ -3618,7 +3365,7 @@ function CustomScrollbar({
3618
3365
  scrollbarState.thumbHeight
3619
3366
  ]
3620
3367
  );
3621
- const handleThumbMouseDown = useCallback6(
3368
+ const handleThumbMouseDown = useCallback5(
3622
3369
  (event) => {
3623
3370
  if (event.button !== 0 || !scrollbarState.scrollable) {
3624
3371
  return;
@@ -3651,7 +3398,7 @@ function CustomScrollbar({
3651
3398
  },
3652
3399
  [getViewport, scrollbarState.scrollable, scrollbarState.thumbHeight]
3653
3400
  );
3654
- useEffect6(() => {
3401
+ useEffect4(() => {
3655
3402
  if (!dragging) {
3656
3403
  return;
3657
3404
  }
@@ -3676,7 +3423,7 @@ function CustomScrollbar({
3676
3423
  window.removeEventListener("mouseup", handleMouseUp);
3677
3424
  };
3678
3425
  }, [dragging, getViewport, syncScrollbarState]);
3679
- useEffect6(() => {
3426
+ useEffect4(() => {
3680
3427
  const viewport = getViewport();
3681
3428
  if (!viewport) {
3682
3429
  setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
@@ -3693,7 +3440,7 @@ function CustomScrollbar({
3693
3440
  resizeObserver?.disconnect();
3694
3441
  };
3695
3442
  }, [getViewport, syncKey, syncScrollbarState]);
3696
- return /* @__PURE__ */ jsx8(
3443
+ return /* @__PURE__ */ jsx7(
3697
3444
  "div",
3698
3445
  {
3699
3446
  ref: trackRef,
@@ -3703,7 +3450,7 @@ function CustomScrollbar({
3703
3450
  "data-testid": testId,
3704
3451
  "aria-hidden": "true",
3705
3452
  onMouseDown: handleTrackMouseDown,
3706
- children: /* @__PURE__ */ jsx8(
3453
+ children: /* @__PURE__ */ jsx7(
3707
3454
  "div",
3708
3455
  {
3709
3456
  className: cn("tsh-custom-scrollbar__thumb", thumbClassName),
@@ -3718,7 +3465,7 @@ function CustomScrollbar({
3718
3465
  }
3719
3466
  );
3720
3467
  }
3721
- var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3468
+ var CustomScrollArea = forwardRef(function CustomScrollArea2({
3722
3469
  children,
3723
3470
  className,
3724
3471
  viewportClassName,
@@ -3730,9 +3477,9 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3730
3477
  ...viewportProps
3731
3478
  }, forwardedRef) {
3732
3479
  "use memo";
3733
- const viewportRef = useRef5(null);
3734
- const getViewport = useCallback6(() => viewportRef.current, []);
3735
- return /* @__PURE__ */ jsxs6(
3480
+ const viewportRef = useRef4(null);
3481
+ const getViewport = useCallback5(() => viewportRef.current, []);
3482
+ return /* @__PURE__ */ jsxs5(
3736
3483
  "div",
3737
3484
  {
3738
3485
  className: cn(
@@ -3740,7 +3487,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3740
3487
  className
3741
3488
  ),
3742
3489
  children: [
3743
- /* @__PURE__ */ jsx8(
3490
+ /* @__PURE__ */ jsx7(
3744
3491
  "div",
3745
3492
  {
3746
3493
  ref: setRefs(viewportRef, forwardedRef),
@@ -3752,7 +3499,7 @@ var CustomScrollArea = forwardRef2(function CustomScrollArea2({
3752
3499
  children
3753
3500
  }
3754
3501
  ),
3755
- /* @__PURE__ */ jsx8(
3502
+ /* @__PURE__ */ jsx7(
3756
3503
  CustomScrollbar,
3757
3504
  {
3758
3505
  getViewport,
@@ -3781,6 +3528,199 @@ function clamp(value, min, max) {
3781
3528
  return Math.min(max, Math.max(min, value));
3782
3529
  }
3783
3530
 
3531
+ // app/renderer/components/icons/MessageSquareMoreIcon.tsx
3532
+ import {
3533
+ forwardRef as forwardRef2,
3534
+ useCallback as useCallback6,
3535
+ useEffect as useEffect5,
3536
+ useImperativeHandle,
3537
+ useRef as useRef5
3538
+ } from "react";
3539
+ import {
3540
+ motion,
3541
+ useAnimation,
3542
+ useReducedMotion
3543
+ } from "framer-motion";
3544
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3545
+ var DOT_TRANSITION = {
3546
+ times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
3547
+ duration: 1.5
3548
+ };
3549
+ var DOT_VARIANTS = {
3550
+ normal: {
3551
+ opacity: 1
3552
+ },
3553
+ animate: (custom) => ({
3554
+ opacity: [1, 0, 0, 1, 1, 0, 0, 1],
3555
+ transition: {
3556
+ opacity: {
3557
+ ...DOT_TRANSITION,
3558
+ times: DOT_TRANSITION.times.map(
3559
+ (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
3560
+ )
3561
+ }
3562
+ }
3563
+ }),
3564
+ active: (custom) => ({
3565
+ opacity: [1, 0, 0, 1, 1, 0, 0, 1],
3566
+ transition: {
3567
+ opacity: {
3568
+ ...DOT_TRANSITION,
3569
+ repeat: Infinity,
3570
+ times: DOT_TRANSITION.times.map(
3571
+ (time, index) => index === 2 || index === 3 || index === 6 || index === 7 ? time + custom * 0.1 : time
3572
+ )
3573
+ }
3574
+ }
3575
+ })
3576
+ };
3577
+ var MessageSquareMoreIcon = forwardRef2(
3578
+ ({
3579
+ active = false,
3580
+ onMouseEnter,
3581
+ onMouseLeave,
3582
+ className,
3583
+ size = 28,
3584
+ ...props
3585
+ }, ref) => {
3586
+ const controls = useAnimation();
3587
+ const reduceMotion = useReducedMotion();
3588
+ const isControlledRef = useRef5(false);
3589
+ const startAnimation = useCallback6(() => {
3590
+ if (reduceMotion) {
3591
+ return;
3592
+ }
3593
+ void controls.start(active ? "active" : "animate");
3594
+ }, [active, controls, reduceMotion]);
3595
+ const stopAnimation = useCallback6(() => {
3596
+ void controls.start("normal");
3597
+ }, [controls]);
3598
+ useImperativeHandle(ref, () => {
3599
+ isControlledRef.current = true;
3600
+ return {
3601
+ startAnimation,
3602
+ stopAnimation
3603
+ };
3604
+ });
3605
+ useEffect5(() => {
3606
+ if (active) {
3607
+ startAnimation();
3608
+ return;
3609
+ }
3610
+ stopAnimation();
3611
+ }, [active, startAnimation, stopAnimation]);
3612
+ const handleMouseEnter = useCallback6(
3613
+ (event) => {
3614
+ if (isControlledRef.current) {
3615
+ onMouseEnter?.(event);
3616
+ } else {
3617
+ startAnimation();
3618
+ }
3619
+ },
3620
+ [onMouseEnter, startAnimation]
3621
+ );
3622
+ const handleMouseLeave = useCallback6(
3623
+ (event) => {
3624
+ if (isControlledRef.current) {
3625
+ onMouseLeave?.(event);
3626
+ } else {
3627
+ stopAnimation();
3628
+ }
3629
+ },
3630
+ [onMouseLeave, stopAnimation]
3631
+ );
3632
+ return /* @__PURE__ */ jsx8(
3633
+ "div",
3634
+ {
3635
+ className: cn("inline-flex items-center justify-center", className),
3636
+ onMouseEnter: handleMouseEnter,
3637
+ onMouseLeave: handleMouseLeave,
3638
+ ...props,
3639
+ children: /* @__PURE__ */ jsxs6(
3640
+ "svg",
3641
+ {
3642
+ fill: "none",
3643
+ height: size,
3644
+ stroke: "currentColor",
3645
+ strokeLinecap: "round",
3646
+ strokeLinejoin: "round",
3647
+ strokeWidth: "2",
3648
+ viewBox: "0 0 24 24",
3649
+ width: size,
3650
+ xmlns: "http://www.w3.org/2000/svg",
3651
+ children: [
3652
+ /* @__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" }),
3653
+ /* @__PURE__ */ jsx8(
3654
+ motion.path,
3655
+ {
3656
+ animate: controls,
3657
+ custom: 0,
3658
+ d: "M8 10h.01",
3659
+ variants: DOT_VARIANTS
3660
+ }
3661
+ ),
3662
+ /* @__PURE__ */ jsx8(
3663
+ motion.path,
3664
+ {
3665
+ animate: controls,
3666
+ custom: 1,
3667
+ d: "M12 10h.01",
3668
+ variants: DOT_VARIANTS
3669
+ }
3670
+ ),
3671
+ /* @__PURE__ */ jsx8(
3672
+ motion.path,
3673
+ {
3674
+ animate: controls,
3675
+ custom: 2,
3676
+ d: "M16 10h.01",
3677
+ variants: DOT_VARIANTS
3678
+ }
3679
+ )
3680
+ ]
3681
+ }
3682
+ )
3683
+ }
3684
+ );
3685
+ }
3686
+ );
3687
+ MessageSquareMoreIcon.displayName = "MessageSquareMoreIcon";
3688
+
3689
+ // agent-gui/agentGuiNode/AgentGUIConversation.styles.ts
3690
+ var styles = {
3691
+ interactivePrompt: "agent-gui-conversation__interactive-prompt",
3692
+ interactivePromptCard: "agent-gui-conversation__interactive-prompt-card",
3693
+ interactivePromptHeader: "agent-gui-conversation__interactive-prompt-header",
3694
+ interactivePromptLead: "agent-gui-conversation__interactive-prompt-lead",
3695
+ interactivePromptMeta: "agent-gui-conversation__interactive-prompt-meta",
3696
+ interactivePromptQuestion: "agent-gui-conversation__interactive-prompt-question",
3697
+ interactivePromptOptions: "agent-gui-conversation__interactive-prompt-options",
3698
+ interactiveOptionDisplay: "agent-gui-conversation__interactive-option-display",
3699
+ interactiveOptionButton: "agent-gui-conversation__interactive-option-button",
3700
+ interactiveOptionTitle: "agent-gui-conversation__interactive-option-title",
3701
+ interactiveOptionDescription: "agent-gui-conversation__interactive-option-description",
3702
+ interactiveOptionCommandDescription: "agent-gui-conversation__interactive-option-command-description",
3703
+ interactiveOptionCommandTooltip: "agent-gui-conversation__interactive-option-command-tooltip",
3704
+ interactiveOptionShortcut: "agent-gui-conversation__interactive-option-shortcut",
3705
+ interactiveOptionSpinner: "agent-gui-conversation__interactive-option-spinner",
3706
+ interactiveFeedbackComposer: "agent-gui-conversation__interactive-feedback-composer",
3707
+ interactivePromptTextarea: "agent-gui-conversation__interactive-prompt-textarea",
3708
+ interactiveFeedbackSendButton: "agent-gui-conversation__interactive-feedback-send-button",
3709
+ interactivePromptFooter: "agent-gui-conversation__interactive-prompt-footer",
3710
+ interactivePromptActions: "agent-gui-conversation__interactive-prompt-actions",
3711
+ userMessageFlow: "agent-gui-conversation__user-message-flow",
3712
+ assistantMessageFlow: "agent-gui-conversation__assistant-message-flow",
3713
+ messageGroup: "agent-gui-conversation__message-group",
3714
+ messageFooter: "agent-gui-conversation__message-footer",
3715
+ messageTimestamp: "agent-gui-conversation__message-timestamp",
3716
+ messageCopyButton: "agent-gui-conversation__message-copy-button",
3717
+ userImageGrid: "agent-gui-conversation__user-image-grid",
3718
+ userImageThumbnail: "agent-gui-conversation__user-image-thumbnail",
3719
+ userMessageBubble: "agent-gui-conversation__user-message-bubble",
3720
+ assistantMarkdown: "agent-gui-conversation__assistant-markdown"
3721
+ };
3722
+ var AgentGUIConversation_styles_default = styles;
3723
+
3784
3724
  export {
3785
3725
  cn,
3786
3726
  extractAgentMcpToolTarget,
@@ -3800,4 +3740,4 @@ export {
3800
3740
  AgentMessageMarkdown,
3801
3741
  CustomScrollArea
3802
3742
  };
3803
- //# sourceMappingURL=chunk-T6PEJFRP.js.map
3743
+ //# sourceMappingURL=chunk-MJOQP2ED.js.map