@tutti-os/agent-gui 0.0.115 → 0.0.116

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 (78) hide show
  1. package/dist/{AgentGUI-D4jgPDg0.d.ts → AgentGUI-Be6O5di1.d.ts} +2 -2
  2. package/dist/{AgentRichTextReadonly-KNPDB5ZJ.js → AgentRichTextReadonly-AY36C7TV.js} +5 -5
  3. package/dist/agent-conversation/index.d.ts +2 -2
  4. package/dist/agent-conversation/index.js +9 -9
  5. package/dist/agent-env/ui.d.ts +19 -0
  6. package/dist/agent-env/ui.js +9 -0
  7. package/dist/agent-env/ui.js.map +1 -0
  8. package/dist/agent-gui.d.ts +3 -3
  9. package/dist/agent-gui.js +19 -18
  10. package/dist/agent-message-center/index.js +10 -10
  11. package/dist/{agentGuiNodeTypes-BebhwDeE.d.ts → agentGuiNodeTypes-C_H3DbXt.d.ts} +78 -2
  12. package/dist/agents.d.ts +1 -1
  13. package/dist/agents.js +1 -1
  14. package/dist/app/renderer/agentactivity.css +79 -3
  15. package/dist/{chunk-CTSKSYMM.js → chunk-5G3OFCWH.js} +2 -2
  16. package/dist/{chunk-JLRPIEIE.js → chunk-5HIF53K5.js} +44 -5
  17. package/dist/chunk-5HIF53K5.js.map +1 -0
  18. package/dist/{chunk-CY45OZEY.js → chunk-AMO3EB7V.js} +4 -4
  19. package/dist/{chunk-W4KHK5HK.js → chunk-DVXXZWYX.js} +95 -1
  20. package/dist/chunk-DVXXZWYX.js.map +1 -0
  21. package/dist/{chunk-FBPZXKQC.js → chunk-DXXKHL4G.js} +2 -2
  22. package/dist/{chunk-SFYWL6FT.js → chunk-EPNL55ZQ.js} +2 -2
  23. package/dist/{chunk-EM4RD5FQ.js → chunk-EYZSEPL7.js} +9 -9
  24. package/dist/chunk-EYZSEPL7.js.map +1 -0
  25. package/dist/{chunk-YKQAOIF2.js → chunk-I6Y4XQVR.js} +119 -8
  26. package/dist/chunk-I6Y4XQVR.js.map +1 -0
  27. package/dist/{chunk-ATDAII35.js → chunk-IIQSQNS4.js} +2960 -1527
  28. package/dist/chunk-IIQSQNS4.js.map +1 -0
  29. package/dist/{chunk-RATBQN2V.js → chunk-J26ZYCAH.js} +3 -2
  30. package/dist/{chunk-RATBQN2V.js.map → chunk-J26ZYCAH.js.map} +1 -1
  31. package/dist/{chunk-HFU3FYXP.js → chunk-JEXYDXFW.js} +4 -4
  32. package/dist/{chunk-MWN3AIQJ.js → chunk-LQJBDDZG.js} +4 -4
  33. package/dist/{chunk-UHBCM6RO.js → chunk-MHOYBRCY.js} +1 -1
  34. package/dist/{chunk-UHBCM6RO.js.map → chunk-MHOYBRCY.js.map} +1 -1
  35. package/dist/{chunk-BYE5CKEU.js → chunk-NNIXG27Q.js} +6 -6
  36. package/dist/{chunk-FRCZZ7ON.js → chunk-OXC5CPW7.js} +7 -7
  37. package/dist/{chunk-AY5AFMT2.js → chunk-TUWQV2MC.js} +5 -5
  38. package/dist/chunk-UP3ZDYTN.js +64 -0
  39. package/dist/chunk-UP3ZDYTN.js.map +1 -0
  40. package/dist/{chunk-7OYHDOGG.js → chunk-UV3UQAS2.js} +6 -4
  41. package/dist/chunk-UV3UQAS2.js.map +1 -0
  42. package/dist/{chunk-455YDWMS.js → chunk-VLPWO73G.js} +2 -2
  43. package/dist/context-mention-palette/index.js +7 -7
  44. package/dist/{contribution-C2LDwLA7.d.ts → contribution-BlemXneM.d.ts} +1 -1
  45. package/dist/i18n/index.d.ts +94 -0
  46. package/dist/i18n/index.js +2 -2
  47. package/dist/index.d.ts +6 -6
  48. package/dist/index.js +22 -21
  49. package/dist/index.js.map +1 -1
  50. package/dist/mention-search.js +5 -5
  51. package/dist/{types-yF_0mrNS.d.ts → types-COIp0SYP.d.ts} +2 -0
  52. package/dist/workbench/contribution.d.ts +2 -2
  53. package/dist/workbench/contribution.js +7 -7
  54. package/dist/workbench/index.d.ts +2 -2
  55. package/dist/workbench/index.js +10 -10
  56. package/dist/workbench/launch.js +3 -3
  57. package/dist/workbench/sessionTitle.js +2 -2
  58. package/dist/workbench/state.js +1 -1
  59. package/dist/workbench/types.d.ts +2 -0
  60. package/dist/workbench/types.js +1 -1
  61. package/package.json +19 -12
  62. package/dist/chunk-7OYHDOGG.js.map +0 -1
  63. package/dist/chunk-ATDAII35.js.map +0 -1
  64. package/dist/chunk-EM4RD5FQ.js.map +0 -1
  65. package/dist/chunk-JLRPIEIE.js.map +0 -1
  66. package/dist/chunk-W4KHK5HK.js.map +0 -1
  67. package/dist/chunk-YKQAOIF2.js.map +0 -1
  68. /package/dist/{AgentRichTextReadonly-KNPDB5ZJ.js.map → AgentRichTextReadonly-AY36C7TV.js.map} +0 -0
  69. /package/dist/{chunk-CTSKSYMM.js.map → chunk-5G3OFCWH.js.map} +0 -0
  70. /package/dist/{chunk-CY45OZEY.js.map → chunk-AMO3EB7V.js.map} +0 -0
  71. /package/dist/{chunk-FBPZXKQC.js.map → chunk-DXXKHL4G.js.map} +0 -0
  72. /package/dist/{chunk-SFYWL6FT.js.map → chunk-EPNL55ZQ.js.map} +0 -0
  73. /package/dist/{chunk-HFU3FYXP.js.map → chunk-JEXYDXFW.js.map} +0 -0
  74. /package/dist/{chunk-MWN3AIQJ.js.map → chunk-LQJBDDZG.js.map} +0 -0
  75. /package/dist/{chunk-BYE5CKEU.js.map → chunk-NNIXG27Q.js.map} +0 -0
  76. /package/dist/{chunk-FRCZZ7ON.js.map → chunk-OXC5CPW7.js.map} +0 -0
  77. /package/dist/{chunk-AY5AFMT2.js.map → chunk-TUWQV2MC.js.map} +0 -0
  78. /package/dist/{chunk-455YDWMS.js.map → chunk-VLPWO73G.js.map} +0 -0
@@ -6,17 +6,17 @@ import {
6
6
  import {
7
7
  getOptionalAgentHostApi,
8
8
  useOptionalAgentHostApi
9
- } from "./chunk-RATBQN2V.js";
9
+ } from "./chunk-J26ZYCAH.js";
10
10
  import {
11
11
  managedAgentRoundedIconUrl
12
12
  } from "./chunk-W6TO6K2X.js";
13
- import {
14
- resolveAgentWorkspaceFileVisualKind
15
- } from "./chunk-PJP5BUU6.js";
16
13
  import {
17
14
  translate,
18
15
  useTranslation
19
- } from "./chunk-CTSKSYMM.js";
16
+ } from "./chunk-5G3OFCWH.js";
17
+ import {
18
+ resolveAgentWorkspaceFileVisualKind
19
+ } from "./chunk-PJP5BUU6.js";
20
20
  import {
21
21
  getAgentCustomMentionKind
22
22
  } from "./chunk-D2JUDUYY.js";
@@ -2667,6 +2667,117 @@ function resolveMarkdownImageDownloadName(src, alt) {
2667
2667
  return typeof alt === "string" ? alt.trim() || void 0 : void 0;
2668
2668
  }
2669
2669
 
2670
+ // shared/remarkCjkAutolinkBoundary.ts
2671
+ var CJK_SENTENCE_BOUNDARY = /[,。;:!?、…)】》」』〉〕]}”’]/u;
2672
+ function remarkCjkAutolinkBoundary() {
2673
+ return (tree, file) => {
2674
+ if (!isMarkdownNode(tree)) {
2675
+ return;
2676
+ }
2677
+ const source = markdownSourceFromFile(file);
2678
+ if (source === null) {
2679
+ return;
2680
+ }
2681
+ splitCjkAutolinks(tree, source);
2682
+ };
2683
+ }
2684
+ function splitCjkAutolinks(parent, source) {
2685
+ if (!parent.children) {
2686
+ return;
2687
+ }
2688
+ for (let index = 0; index < parent.children.length; index += 1) {
2689
+ const child = parent.children[index];
2690
+ if (!child) {
2691
+ continue;
2692
+ }
2693
+ const split = splitLiteralAutolink(child, source);
2694
+ if (split) {
2695
+ parent.children.splice(index, 1, split.link, split.trailing);
2696
+ index += 1;
2697
+ continue;
2698
+ }
2699
+ splitCjkAutolinks(child, source);
2700
+ }
2701
+ }
2702
+ function splitLiteralAutolink(node, source) {
2703
+ const textNode = node.children?.[0];
2704
+ if (node.type !== "link" || typeof node.url !== "string" || node.children?.length !== 1 || textNode?.type !== "text" || typeof textNode.value !== "string" || !node.position) {
2705
+ return null;
2706
+ }
2707
+ const display = textNode.value;
2708
+ const sourceStart = node.position.start.offset;
2709
+ const sourceEnd = node.position.end.offset;
2710
+ if (sourceStart === void 0 || sourceEnd === void 0 || source.slice(sourceStart, sourceEnd) !== display) {
2711
+ return null;
2712
+ }
2713
+ const boundaryIndex = display.search(CJK_SENTENCE_BOUNDARY);
2714
+ if (boundaryIndex < 0) {
2715
+ return null;
2716
+ }
2717
+ const displayUrl = display.slice(0, boundaryIndex);
2718
+ const trailingText = display.slice(boundaryIndex);
2719
+ if (!node.url.endsWith(trailingText)) {
2720
+ return null;
2721
+ }
2722
+ const targetUrl = node.url.slice(0, -trailingText.length);
2723
+ if (!isHttpUrl(targetUrl)) {
2724
+ return null;
2725
+ }
2726
+ const boundaryPoint = advancePoint(node.position.start, displayUrl.length);
2727
+ return {
2728
+ link: {
2729
+ ...node,
2730
+ url: targetUrl,
2731
+ position: {
2732
+ start: node.position.start,
2733
+ end: boundaryPoint
2734
+ },
2735
+ children: [
2736
+ {
2737
+ ...textNode,
2738
+ value: displayUrl,
2739
+ position: textNode.position ? {
2740
+ start: textNode.position.start,
2741
+ end: boundaryPoint
2742
+ } : void 0
2743
+ }
2744
+ ]
2745
+ },
2746
+ trailing: {
2747
+ type: "text",
2748
+ value: trailingText,
2749
+ position: {
2750
+ start: boundaryPoint,
2751
+ end: node.position.end
2752
+ }
2753
+ }
2754
+ };
2755
+ }
2756
+ function isHttpUrl(value) {
2757
+ try {
2758
+ const url = new URL(value);
2759
+ return url.protocol === "http:" || url.protocol === "https:";
2760
+ } catch {
2761
+ return false;
2762
+ }
2763
+ }
2764
+ function advancePoint(point, characters) {
2765
+ return {
2766
+ line: point.line,
2767
+ column: point.column + characters,
2768
+ ...point.offset === void 0 ? {} : { offset: point.offset + characters }
2769
+ };
2770
+ }
2771
+ function markdownSourceFromFile(file) {
2772
+ if (typeof file !== "object" || file === null || !("value" in file) || typeof file.value !== "string") {
2773
+ return null;
2774
+ }
2775
+ return file.value;
2776
+ }
2777
+ function isMarkdownNode(value) {
2778
+ return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
2779
+ }
2780
+
2670
2781
  // shared/AgentMessageMarkdown.tsx
2671
2782
  import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2672
2783
  var STREAMING_MARKDOWN_FRAME_MS = 24;
@@ -2852,7 +2963,7 @@ function AgentMessageMarkdown({
2852
2963
  ) : /* @__PURE__ */ jsx5(
2853
2964
  ReactMarkdown,
2854
2965
  {
2855
- remarkPlugins: [remarkGfm],
2966
+ remarkPlugins: [remarkGfm, remarkCjkAutolinkBoundary],
2856
2967
  rehypePlugins: [[rehypeSanitize, MARKDOWN_SANITIZE_SCHEMA]],
2857
2968
  urlTransform: markdownUrlTransform,
2858
2969
  components: markdownComponents,
@@ -2898,7 +3009,7 @@ var MemoizedMarkdownBlock = memo(function MemoizedMarkdownBlock2({
2898
3009
  return /* @__PURE__ */ jsx5(
2899
3010
  ReactMarkdown,
2900
3011
  {
2901
- remarkPlugins: [remarkGfm],
3012
+ remarkPlugins: [remarkGfm, remarkCjkAutolinkBoundary],
2902
3013
  rehypePlugins: [[rehypeSanitize, MARKDOWN_SANITIZE_SCHEMA]],
2903
3014
  urlTransform: markdownUrlTransform,
2904
3015
  components,
@@ -3626,4 +3737,4 @@ export {
3626
3737
  AgentMessageMarkdown,
3627
3738
  CustomScrollArea
3628
3739
  };
3629
- //# sourceMappingURL=chunk-YKQAOIF2.js.map
3740
+ //# sourceMappingURL=chunk-I6Y4XQVR.js.map