@tutti-os/agent-gui 0.0.104 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentGUI-DQ9gVoXh.d.ts → AgentGUI-Do6py-T_.d.ts} +10 -5
- package/dist/AgentRichTextReadonly-F6PHC5SX.js +18 -0
- package/dist/AgentRichTextReadonly-F6PHC5SX.js.map +1 -0
- package/dist/agent-conversation/index.d.ts +3 -3
- package/dist/agent-conversation/index.js +11 -7
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-gui.d.ts +4 -4
- package/dist/agent-gui.js +18 -14
- package/dist/agent-message-center/index.d.ts +1 -1
- package/dist/agent-message-center/index.js +13 -9
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-CkcYM5Wg.d.ts → agentConversationVM-Bf3Zv3iI.d.ts} +9 -1
- package/dist/{agentFileMentionContracts-58IjMU-u.d.ts → agentFileMentionContracts-B70VnPWO.d.ts} +2 -0
- package/dist/{agentGuiNodeTypes-B9vcvjmR.d.ts → agentGuiNodeTypes-DbgQBiYz.d.ts} +4 -1
- package/dist/app/renderer/agentactivity.css +99 -0
- package/dist/{chunk-FJ4W2VC5.js → chunk-4ZWV57MF.js} +42 -10
- package/dist/chunk-4ZWV57MF.js.map +1 -0
- package/dist/{chunk-VAB7EIL5.js → chunk-6R7GHXRQ.js} +12 -6
- package/dist/chunk-6R7GHXRQ.js.map +1 -0
- package/dist/{chunk-TPV2SV6L.js → chunk-7MPN2JGL.js} +122 -154
- package/dist/chunk-7MPN2JGL.js.map +1 -0
- package/dist/{chunk-5X7YDOC6.js → chunk-D2JUDUYY.js} +1 -1
- package/dist/chunk-D2JUDUYY.js.map +1 -0
- package/dist/{chunk-HLVC4NNL.js → chunk-IR2CL2X2.js} +721 -1280
- package/dist/chunk-IR2CL2X2.js.map +1 -0
- package/dist/{chunk-NOXQOGT5.js → chunk-J2HG7UCP.js} +46 -22
- package/dist/chunk-J2HG7UCP.js.map +1 -0
- package/dist/{chunk-747L443E.js → chunk-JG7HGKZL.js} +595 -61
- package/dist/chunk-JG7HGKZL.js.map +1 -0
- package/dist/chunk-KPMQGPYU.js +43 -0
- package/dist/chunk-KPMQGPYU.js.map +1 -0
- package/dist/{chunk-OFSDOID4.js → chunk-LDZ6C3YV.js} +3 -39
- package/dist/chunk-LDZ6C3YV.js.map +1 -0
- package/dist/{chunk-7N524ZK7.js → chunk-N3HTEYLZ.js} +1308 -936
- package/dist/chunk-N3HTEYLZ.js.map +1 -0
- package/dist/{chunk-MUPZPISC.js → chunk-N4WVVCNI.js} +2 -2
- package/dist/{chunk-F5LFPORI.js → chunk-OWW7CU4U.js} +2 -2
- package/dist/chunk-SN6UYX54.js +42 -0
- package/dist/chunk-SN6UYX54.js.map +1 -0
- package/dist/{chunk-SKCLZXSW.js → chunk-TKBEVCHG.js} +5 -1
- package/dist/chunk-TKBEVCHG.js.map +1 -0
- package/dist/chunk-UFIEUC3Y.js +755 -0
- package/dist/chunk-UFIEUC3Y.js.map +1 -0
- package/dist/{chunk-AKKDP2LI.js → chunk-V5ROOS2O.js} +124 -2
- package/dist/chunk-V5ROOS2O.js.map +1 -0
- package/dist/chunk-XJ34OIEQ.js +18 -0
- package/dist/chunk-XJ34OIEQ.js.map +1 -0
- package/dist/{chunk-QI3JAO4J.js → chunk-ZSJBCZUH.js} +54 -7
- package/dist/chunk-ZSJBCZUH.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +1 -1
- package/dist/context-mention-palette/index.js +10 -8
- package/dist/{contribution-CTVBPN0R.d.ts → contribution-C6K5YfJ7.d.ts} +1 -0
- package/dist/custom-mention.d.ts +6 -0
- package/dist/custom-mention.js +1 -1
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +42 -6
- package/dist/mention-search.js +8 -6
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/contribution.js +3 -3
- package/dist/workbench/index.d.ts +3 -2
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/sessionTitle.js +2 -2
- package/package.json +12 -12
- package/dist/chunk-5X7YDOC6.js.map +0 -1
- package/dist/chunk-747L443E.js.map +0 -1
- package/dist/chunk-7N524ZK7.js.map +0 -1
- package/dist/chunk-AKKDP2LI.js.map +0 -1
- package/dist/chunk-FJ4W2VC5.js.map +0 -1
- package/dist/chunk-HLVC4NNL.js.map +0 -1
- package/dist/chunk-NOXQOGT5.js.map +0 -1
- package/dist/chunk-OFSDOID4.js.map +0 -1
- package/dist/chunk-QI3JAO4J.js.map +0 -1
- package/dist/chunk-SKCLZXSW.js.map +0 -1
- package/dist/chunk-TPV2SV6L.js.map +0 -1
- package/dist/chunk-VAB7EIL5.js.map +0 -1
- /package/dist/{chunk-MUPZPISC.js.map → chunk-N4WVVCNI.js.map} +0 -0
- /package/dist/{chunk-F5LFPORI.js.map → chunk-OWW7CU4U.js.map} +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn,
|
|
3
|
+
resolveAgentTargetPresentation,
|
|
4
|
+
useAgentTargetPresentations
|
|
5
|
+
} from "./chunk-KPMQGPYU.js";
|
|
1
6
|
import {
|
|
2
7
|
getOptionalAgentHostApi,
|
|
3
|
-
managedAgentRoundedIconUrl,
|
|
4
8
|
useOptionalAgentHostApi
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LDZ6C3YV.js";
|
|
10
|
+
import {
|
|
11
|
+
managedAgentRoundedIconUrl
|
|
12
|
+
} from "./chunk-SN6UYX54.js";
|
|
6
13
|
import {
|
|
7
14
|
resolveAgentWorkspaceFileVisualKind
|
|
8
15
|
} from "./chunk-PJP5BUU6.js";
|
|
9
16
|
import {
|
|
10
17
|
translate,
|
|
11
18
|
useTranslation
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OWW7CU4U.js";
|
|
13
20
|
import {
|
|
14
21
|
getAgentCustomMentionKind
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
|
|
17
|
-
// app/renderer/lib/utils.ts
|
|
18
|
-
import { clsx } from "clsx";
|
|
19
|
-
import { twMerge } from "tailwind-merge";
|
|
20
|
-
function cn(...inputs) {
|
|
21
|
-
return twMerge(clsx(inputs));
|
|
22
|
-
}
|
|
22
|
+
} from "./chunk-D2JUDUYY.js";
|
|
23
23
|
|
|
24
24
|
// shared/agentMcpToolTarget.ts
|
|
25
25
|
function extractAgentMcpToolTarget({
|
|
@@ -969,35 +969,6 @@ function clearStreamingVisibleTextTimer(timerRef) {
|
|
|
969
969
|
timerRef.current = null;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
// shared/AgentTargetPresentationContext.tsx
|
|
973
|
-
import { createContext, useContext } from "react";
|
|
974
|
-
import { jsx } from "react/jsx-runtime";
|
|
975
|
-
var EMPTY_AGENT_TARGETS = Object.freeze([]);
|
|
976
|
-
var AgentTargetPresentationContext = createContext(
|
|
977
|
-
EMPTY_AGENT_TARGETS
|
|
978
|
-
);
|
|
979
|
-
function AgentTargetPresentationProvider({
|
|
980
|
-
agentTargets,
|
|
981
|
-
children
|
|
982
|
-
}) {
|
|
983
|
-
return /* @__PURE__ */ jsx(AgentTargetPresentationContext.Provider, { value: agentTargets, children });
|
|
984
|
-
}
|
|
985
|
-
function useAgentTargetPresentations() {
|
|
986
|
-
return useContext(AgentTargetPresentationContext);
|
|
987
|
-
}
|
|
988
|
-
function resolveAgentTargetPresentation(input) {
|
|
989
|
-
const agentTargetId = input.agentTargetId.trim();
|
|
990
|
-
if (!agentTargetId) {
|
|
991
|
-
return null;
|
|
992
|
-
}
|
|
993
|
-
const workspaceId = input.workspaceId?.trim() ?? "";
|
|
994
|
-
return input.agentTargets.find(
|
|
995
|
-
(target) => target.agentTargetId.trim() === agentTargetId && (target.workspaceId?.trim() ?? "") === workspaceId
|
|
996
|
-
) ?? input.agentTargets.find(
|
|
997
|
-
(target) => target.agentTargetId.trim() === agentTargetId
|
|
998
|
-
) ?? null;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
972
|
// shared/agentMessageMarkdownRuntime.ts
|
|
1002
973
|
var COLLAPSED_LINE_LIMIT = 8;
|
|
1003
974
|
var APPROX_CHARS_PER_LINE = 34;
|
|
@@ -1137,7 +1108,7 @@ var STANDARD_MARKDOWN_LINK_PROTOCOLS = [
|
|
|
1137
1108
|
"tel",
|
|
1138
1109
|
"xmpp"
|
|
1139
1110
|
];
|
|
1140
|
-
var
|
|
1111
|
+
var EMPTY_AGENT_TARGETS = [];
|
|
1141
1112
|
var cachedMarkdownMedia = /* @__PURE__ */ new Map();
|
|
1142
1113
|
var CACHED_MARKDOWN_MEDIA_REVOKE_DELAY_MS = 250;
|
|
1143
1114
|
function isLocalAbsolutePath(path) {
|
|
@@ -1416,7 +1387,7 @@ function markdownUrlTransform(value) {
|
|
|
1416
1387
|
const target = value.trim();
|
|
1417
1388
|
return isRichTextMentionHref(target) || isExplicitWorkspaceFilePath(target) || isStandardMarkdownLinkHref(target) ? target : defaultUrlTransform(value);
|
|
1418
1389
|
}
|
|
1419
|
-
function parseMentionLink(href, rawLabel, workspaceAppIcons = [], agentTargets =
|
|
1390
|
+
function parseMentionLink(href, rawLabel, workspaceAppIcons = [], agentTargets = EMPTY_AGENT_TARGETS, appFactoryFallbackLabel = "Create app") {
|
|
1420
1391
|
const mention = parseRichTextMentionHref2(href, rawLabel);
|
|
1421
1392
|
if (!mention) {
|
|
1422
1393
|
return null;
|
|
@@ -1563,18 +1534,18 @@ function escapeMarkdownLinkLabel(label) {
|
|
|
1563
1534
|
}
|
|
1564
1535
|
|
|
1565
1536
|
// shared/agentMessageMarkdownContext.ts
|
|
1566
|
-
import { createContext
|
|
1567
|
-
var MarkdownLinkContext =
|
|
1537
|
+
import { createContext } from "react";
|
|
1538
|
+
var MarkdownLinkContext = createContext(false);
|
|
1568
1539
|
|
|
1569
1540
|
// shared/AgentMessageMarkdownRenderers.tsx
|
|
1570
1541
|
import {
|
|
1571
1542
|
useCallback,
|
|
1572
|
-
useContext
|
|
1543
|
+
useContext,
|
|
1573
1544
|
useRef as useRef2,
|
|
1574
1545
|
useState as useState2
|
|
1575
1546
|
} from "react";
|
|
1576
1547
|
import { Check, Copy } from "lucide-react";
|
|
1577
|
-
import { jsx
|
|
1548
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1578
1549
|
function MarkdownCode({
|
|
1579
1550
|
node: _node,
|
|
1580
1551
|
children,
|
|
@@ -1583,13 +1554,13 @@ function MarkdownCode({
|
|
|
1583
1554
|
...props
|
|
1584
1555
|
}) {
|
|
1585
1556
|
"use memo";
|
|
1586
|
-
const isInsideLink =
|
|
1557
|
+
const isInsideLink = useContext(MarkdownLinkContext);
|
|
1587
1558
|
const text = textFromReactNode(children).trim();
|
|
1588
1559
|
const isLinkablePath = !isInsideLink && onLinkClick && !className && (isExplicitWorkspaceFilePath(text) || isHttpUrl(text));
|
|
1589
1560
|
if (isLinkablePath) {
|
|
1590
|
-
return /* @__PURE__ */
|
|
1561
|
+
return /* @__PURE__ */ jsx(PathLink, { href: text, onLinkClick, children });
|
|
1591
1562
|
}
|
|
1592
|
-
return /* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ jsx("code", { ...props, className, children });
|
|
1593
1564
|
}
|
|
1594
1565
|
var MARKDOWN_ORDERED_LIST_STYLE = {
|
|
1595
1566
|
listStylePosition: "outside",
|
|
@@ -1611,7 +1582,7 @@ function MarkdownUnorderedList({
|
|
|
1611
1582
|
...props
|
|
1612
1583
|
}) {
|
|
1613
1584
|
"use memo";
|
|
1614
|
-
return /* @__PURE__ */
|
|
1585
|
+
return /* @__PURE__ */ jsx(
|
|
1615
1586
|
"ul",
|
|
1616
1587
|
{
|
|
1617
1588
|
...props,
|
|
@@ -1629,7 +1600,7 @@ function MarkdownOrderedList({
|
|
|
1629
1600
|
...props
|
|
1630
1601
|
}) {
|
|
1631
1602
|
"use memo";
|
|
1632
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ jsx(
|
|
1633
1604
|
"ol",
|
|
1634
1605
|
{
|
|
1635
1606
|
...props,
|
|
@@ -1647,7 +1618,7 @@ function MarkdownListItem({
|
|
|
1647
1618
|
...props
|
|
1648
1619
|
}) {
|
|
1649
1620
|
"use memo";
|
|
1650
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsx("li", { ...props, style: { ...MARKDOWN_LIST_ITEM_STYLE, ...style } });
|
|
1651
1622
|
}
|
|
1652
1623
|
function MarkdownParagraph({
|
|
1653
1624
|
node: _node,
|
|
@@ -1656,9 +1627,9 @@ function MarkdownParagraph({
|
|
|
1656
1627
|
}) {
|
|
1657
1628
|
"use memo";
|
|
1658
1629
|
if (inline) {
|
|
1659
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ jsx("span", { ...props });
|
|
1660
1631
|
}
|
|
1661
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ jsx("p", { ...props });
|
|
1662
1633
|
}
|
|
1663
1634
|
function PathLink({
|
|
1664
1635
|
href,
|
|
@@ -1666,7 +1637,7 @@ function PathLink({
|
|
|
1666
1637
|
onLinkClick
|
|
1667
1638
|
}) {
|
|
1668
1639
|
"use memo";
|
|
1669
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ jsx(
|
|
1670
1641
|
"a",
|
|
1671
1642
|
{
|
|
1672
1643
|
className: "cursor-pointer",
|
|
@@ -1717,7 +1688,7 @@ function MarkdownPre({
|
|
|
1717
1688
|
});
|
|
1718
1689
|
}, []);
|
|
1719
1690
|
return /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
|
|
1720
|
-
/* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ jsx(
|
|
1721
1692
|
"button",
|
|
1722
1693
|
{
|
|
1723
1694
|
type: "button",
|
|
@@ -1726,15 +1697,15 @@ function MarkdownPre({
|
|
|
1726
1697
|
"aria-label": translate("agentHost.agentGui.copyCode"),
|
|
1727
1698
|
title: translate("agentHost.agentGui.copyCode"),
|
|
1728
1699
|
onClick: handleCopy,
|
|
1729
|
-
children: copied ? /* @__PURE__ */
|
|
1700
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Copy, { size: 13, strokeWidth: 2, "aria-hidden": "true" })
|
|
1730
1701
|
}
|
|
1731
1702
|
),
|
|
1732
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ jsx("pre", { ...props, ref: preRef, children })
|
|
1733
1704
|
] });
|
|
1734
1705
|
}
|
|
1735
1706
|
|
|
1736
1707
|
// shared/AgentMessageMarkdownMedia.tsx
|
|
1737
|
-
import { useContext as
|
|
1708
|
+
import { useContext as useContext2, useEffect as useEffect3, useState as useState5 } from "react";
|
|
1738
1709
|
|
|
1739
1710
|
// app/renderer/components/ZoomableImage.tsx
|
|
1740
1711
|
import {
|
|
@@ -1841,7 +1812,7 @@ async function copyImageToClipboard(src, hostClipboard) {
|
|
|
1841
1812
|
}
|
|
1842
1813
|
|
|
1843
1814
|
// shared/agentConversation/components/ConversationImageContextMenu.tsx
|
|
1844
|
-
import { jsx as
|
|
1815
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1845
1816
|
function ConversationImageContextMenu({
|
|
1846
1817
|
src,
|
|
1847
1818
|
children,
|
|
@@ -1862,8 +1833,8 @@ function ConversationImageContextMenu({
|
|
|
1862
1833
|
});
|
|
1863
1834
|
}, [agentHostApi?.clipboard, src]);
|
|
1864
1835
|
return /* @__PURE__ */ jsxs2(ContextMenu, { children: [
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx2(ContextMenuTrigger, { asChild, children }),
|
|
1837
|
+
/* @__PURE__ */ jsx2(ContextMenuContent, { style: contentStyle, children: /* @__PURE__ */ jsx2(
|
|
1867
1838
|
ContextMenuItem,
|
|
1868
1839
|
{
|
|
1869
1840
|
onClick: copyAndClose,
|
|
@@ -1949,7 +1920,7 @@ function decodeURIComponentSafe(value) {
|
|
|
1949
1920
|
}
|
|
1950
1921
|
|
|
1951
1922
|
// app/renderer/components/ZoomableImage.tsx
|
|
1952
|
-
import { Fragment, jsx as
|
|
1923
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1953
1924
|
var IMAGE_PREVIEW_ZOOM_MIN = 0.5;
|
|
1954
1925
|
var IMAGE_PREVIEW_ZOOM_MAX = 3;
|
|
1955
1926
|
var IMAGE_PREVIEW_ZOOM_STEP = 0.25;
|
|
@@ -2111,7 +2082,7 @@ function ZoomableImage({
|
|
|
2111
2082
|
},
|
|
2112
2083
|
[]
|
|
2113
2084
|
);
|
|
2114
|
-
const actionButtons = hasImageActions ? /* @__PURE__ */
|
|
2085
|
+
const actionButtons = hasImageActions ? /* @__PURE__ */ jsx3(
|
|
2115
2086
|
ImageActionButtons,
|
|
2116
2087
|
{
|
|
2117
2088
|
copyLabel: t("common.copyImage"),
|
|
@@ -2120,7 +2091,7 @@ function ZoomableImage({
|
|
|
2120
2091
|
onDownload: handleDownloadImage
|
|
2121
2092
|
}
|
|
2122
2093
|
) : null;
|
|
2123
|
-
const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */
|
|
2094
|
+
const previewImage = (isImagePreviewOpen || isImagePreviewClosing) && actionSource ? /* @__PURE__ */ jsx3(
|
|
2124
2095
|
"img",
|
|
2125
2096
|
{
|
|
2126
2097
|
alt,
|
|
@@ -2148,7 +2119,7 @@ function ZoomableImage({
|
|
|
2148
2119
|
onWheel: handlePreviewImageWheel
|
|
2149
2120
|
}
|
|
2150
2121
|
) : null;
|
|
2151
|
-
const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */
|
|
2122
|
+
const previewContent = previewImage && !actionButtons && actionSource ? /* @__PURE__ */ jsx3(
|
|
2152
2123
|
ConversationImageContextMenu,
|
|
2153
2124
|
{
|
|
2154
2125
|
src: actionSource,
|
|
@@ -2167,7 +2138,7 @@ function ZoomableImage({
|
|
|
2167
2138
|
wrapElement === "div" && "tsh-zoomable-image--block"
|
|
2168
2139
|
),
|
|
2169
2140
|
children: [
|
|
2170
|
-
/* @__PURE__ */
|
|
2141
|
+
/* @__PURE__ */ jsx3(
|
|
2171
2142
|
"img",
|
|
2172
2143
|
{
|
|
2173
2144
|
...props,
|
|
@@ -2183,7 +2154,7 @@ function ZoomableImage({
|
|
|
2183
2154
|
className: cn("nodrag tsh-desktop-no-drag cursor-zoom-in", className)
|
|
2184
2155
|
}
|
|
2185
2156
|
),
|
|
2186
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx3(
|
|
2187
2158
|
"button",
|
|
2188
2159
|
{
|
|
2189
2160
|
type: "button",
|
|
@@ -2197,7 +2168,7 @@ function ZoomableImage({
|
|
|
2197
2168
|
}
|
|
2198
2169
|
),
|
|
2199
2170
|
contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ? createPortal(
|
|
2200
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ jsx3(
|
|
2201
2172
|
"div",
|
|
2202
2173
|
{
|
|
2203
2174
|
className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
|
|
@@ -2207,7 +2178,7 @@ function ZoomableImage({
|
|
|
2207
2178
|
},
|
|
2208
2179
|
role: "menu",
|
|
2209
2180
|
onClick: (event) => event.stopPropagation(),
|
|
2210
|
-
children: /* @__PURE__ */
|
|
2181
|
+
children: /* @__PURE__ */ jsx3(
|
|
2211
2182
|
ImageActionButtons,
|
|
2212
2183
|
{
|
|
2213
2184
|
copyLabel: t("common.copyImage"),
|
|
@@ -2238,15 +2209,15 @@ function ZoomableImage({
|
|
|
2238
2209
|
}
|
|
2239
2210
|
},
|
|
2240
2211
|
children: [
|
|
2241
|
-
/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ jsx3(
|
|
2242
2213
|
"div",
|
|
2243
2214
|
{
|
|
2244
2215
|
"data-rmiz-modal-overlay": "visible",
|
|
2245
2216
|
onClick: closePreviewImage
|
|
2246
2217
|
}
|
|
2247
2218
|
),
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx3("div", { "data-rmiz-modal-content": "true", children: previewContent }),
|
|
2220
|
+
/* @__PURE__ */ jsx3(
|
|
2250
2221
|
ImagePreviewZoomControls,
|
|
2251
2222
|
{
|
|
2252
2223
|
canZoomIn,
|
|
@@ -2265,8 +2236,8 @@ function ZoomableImage({
|
|
|
2265
2236
|
onWheel: handlePreviewImageWheel
|
|
2266
2237
|
}
|
|
2267
2238
|
),
|
|
2268
|
-
actionButtons ? /* @__PURE__ */
|
|
2269
|
-
contextMenuPosition?.inZoomDialog && actionButtons ? /* @__PURE__ */
|
|
2239
|
+
actionButtons ? /* @__PURE__ */ jsx3("div", { className: "tsh-zoom-dialog__image-actions nodrag tsh-desktop-no-drag", children: actionButtons }) : null,
|
|
2240
|
+
contextMenuPosition?.inZoomDialog && actionButtons ? /* @__PURE__ */ jsx3(
|
|
2270
2241
|
"div",
|
|
2271
2242
|
{
|
|
2272
2243
|
className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
|
|
@@ -2276,7 +2247,7 @@ function ZoomableImage({
|
|
|
2276
2247
|
},
|
|
2277
2248
|
role: "menu",
|
|
2278
2249
|
onClick: (event) => event.stopPropagation(),
|
|
2279
|
-
children: /* @__PURE__ */
|
|
2250
|
+
children: /* @__PURE__ */ jsx3(
|
|
2280
2251
|
ImageActionButtons,
|
|
2281
2252
|
{
|
|
2282
2253
|
copyLabel: t("common.copyImage"),
|
|
@@ -2288,7 +2259,7 @@ function ZoomableImage({
|
|
|
2288
2259
|
)
|
|
2289
2260
|
}
|
|
2290
2261
|
) : null,
|
|
2291
|
-
copyStatus ? /* @__PURE__ */
|
|
2262
|
+
copyStatus ? /* @__PURE__ */ jsx3(
|
|
2292
2263
|
ImageCopyStatusToast,
|
|
2293
2264
|
{
|
|
2294
2265
|
busy: copyStatus.busy,
|
|
@@ -2301,21 +2272,21 @@ function ZoomableImage({
|
|
|
2301
2272
|
}
|
|
2302
2273
|
}
|
|
2303
2274
|
) : null,
|
|
2304
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ jsx3(
|
|
2305
2276
|
Button,
|
|
2306
2277
|
{
|
|
2307
2278
|
asChild: true,
|
|
2308
2279
|
className: "tsh-zoom-dialog__icon-button nodrag tsh-desktop-no-drag",
|
|
2309
2280
|
size: "icon",
|
|
2310
2281
|
variant: "chrome",
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2282
|
+
children: /* @__PURE__ */ jsx3(
|
|
2312
2283
|
"button",
|
|
2313
2284
|
{
|
|
2314
2285
|
type: "button",
|
|
2315
2286
|
"aria-label": t("common.minimizeImage"),
|
|
2316
2287
|
"data-rmiz-btn-unzoom": "",
|
|
2317
2288
|
onClick: closePreviewImage,
|
|
2318
|
-
children: /* @__PURE__ */
|
|
2289
|
+
children: /* @__PURE__ */ jsx3(RestoreIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2319
2290
|
}
|
|
2320
2291
|
)
|
|
2321
2292
|
}
|
|
@@ -2326,7 +2297,7 @@ function ZoomableImage({
|
|
|
2326
2297
|
document.body
|
|
2327
2298
|
) : null,
|
|
2328
2299
|
copyStatus && !isImagePreviewOpen ? createPortal(
|
|
2329
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx3(
|
|
2330
2301
|
ImageCopyStatusToast,
|
|
2331
2302
|
{
|
|
2332
2303
|
busy: copyStatus.busy,
|
|
@@ -2350,7 +2321,7 @@ function ImageCopyStatusToast({
|
|
|
2350
2321
|
variant
|
|
2351
2322
|
}) {
|
|
2352
2323
|
return /* @__PURE__ */ jsxs3(ToastProvider, { duration: 1600, swipeDirection: "right", children: [
|
|
2353
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsx3(
|
|
2354
2325
|
ToastRoot,
|
|
2355
2326
|
{
|
|
2356
2327
|
open: true,
|
|
@@ -2360,10 +2331,10 @@ function ImageCopyStatusToast({
|
|
|
2360
2331
|
"data-tsh-image-copy-status": "true",
|
|
2361
2332
|
style: { zIndex: 100303 },
|
|
2362
2333
|
onOpenChange,
|
|
2363
|
-
children: /* @__PURE__ */
|
|
2334
|
+
children: /* @__PURE__ */ jsx3(ToastTitle, { children: message })
|
|
2364
2335
|
}
|
|
2365
2336
|
),
|
|
2366
|
-
/* @__PURE__ */
|
|
2337
|
+
/* @__PURE__ */ jsx3(
|
|
2367
2338
|
ToastViewport,
|
|
2368
2339
|
{
|
|
2369
2340
|
className: "nodrag tsh-desktop-no-drag",
|
|
@@ -2395,7 +2366,7 @@ function ImagePreviewZoomControls({
|
|
|
2395
2366
|
className: "tsh-zoom-dialog__zoom-controls nodrag tsh-desktop-no-drag",
|
|
2396
2367
|
onWheel,
|
|
2397
2368
|
children: [
|
|
2398
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx3(
|
|
2399
2370
|
"button",
|
|
2400
2371
|
{
|
|
2401
2372
|
type: "button",
|
|
@@ -2403,7 +2374,7 @@ function ImagePreviewZoomControls({
|
|
|
2403
2374
|
"aria-label": zoomOutLabel,
|
|
2404
2375
|
disabled: !canZoomOut,
|
|
2405
2376
|
onClick: onZoomOut,
|
|
2406
|
-
children: /* @__PURE__ */
|
|
2377
|
+
children: /* @__PURE__ */ jsx3(ZoomOutIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2407
2378
|
}
|
|
2408
2379
|
),
|
|
2409
2380
|
/* @__PURE__ */ jsxs3(
|
|
@@ -2417,17 +2388,17 @@ function ImagePreviewZoomControls({
|
|
|
2417
2388
|
]
|
|
2418
2389
|
}
|
|
2419
2390
|
),
|
|
2420
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsx3(
|
|
2421
2392
|
"button",
|
|
2422
2393
|
{
|
|
2423
2394
|
type: "button",
|
|
2424
2395
|
title: resetLabel,
|
|
2425
2396
|
"aria-label": resetLabel,
|
|
2426
2397
|
onClick: onReset,
|
|
2427
|
-
children: /* @__PURE__ */
|
|
2398
|
+
children: /* @__PURE__ */ jsx3(RotateCcwIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2428
2399
|
}
|
|
2429
2400
|
),
|
|
2430
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ jsx3(
|
|
2431
2402
|
"button",
|
|
2432
2403
|
{
|
|
2433
2404
|
type: "button",
|
|
@@ -2435,7 +2406,7 @@ function ImagePreviewZoomControls({
|
|
|
2435
2406
|
"aria-label": zoomInLabel,
|
|
2436
2407
|
disabled: !canZoomIn,
|
|
2437
2408
|
onClick: onZoomIn,
|
|
2438
|
-
children: /* @__PURE__ */
|
|
2409
|
+
children: /* @__PURE__ */ jsx3(ZoomInIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2439
2410
|
}
|
|
2440
2411
|
)
|
|
2441
2412
|
]
|
|
@@ -2451,7 +2422,7 @@ function ImageActionButtons({
|
|
|
2451
2422
|
}) {
|
|
2452
2423
|
if (!itemRole) {
|
|
2453
2424
|
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
2454
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx3(
|
|
2455
2426
|
Button,
|
|
2456
2427
|
{
|
|
2457
2428
|
"aria-label": copyLabel,
|
|
@@ -2465,10 +2436,10 @@ function ImageActionButtons({
|
|
|
2465
2436
|
event.stopPropagation();
|
|
2466
2437
|
onCopy();
|
|
2467
2438
|
},
|
|
2468
|
-
children: /* @__PURE__ */
|
|
2439
|
+
children: /* @__PURE__ */ jsx3(CopyIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2469
2440
|
}
|
|
2470
2441
|
),
|
|
2471
|
-
/* @__PURE__ */
|
|
2442
|
+
/* @__PURE__ */ jsx3(
|
|
2472
2443
|
Button,
|
|
2473
2444
|
{
|
|
2474
2445
|
"aria-label": downloadLabel,
|
|
@@ -2482,7 +2453,7 @@ function ImageActionButtons({
|
|
|
2482
2453
|
event.stopPropagation();
|
|
2483
2454
|
onDownload();
|
|
2484
2455
|
},
|
|
2485
|
-
children: /* @__PURE__ */
|
|
2456
|
+
children: /* @__PURE__ */ jsx3(DownloadIcon, { "aria-hidden": "true", className: "size-4" })
|
|
2486
2457
|
}
|
|
2487
2458
|
)
|
|
2488
2459
|
] });
|
|
@@ -2501,8 +2472,8 @@ function ImageActionButtons({
|
|
|
2501
2472
|
onCopy();
|
|
2502
2473
|
},
|
|
2503
2474
|
children: [
|
|
2504
|
-
/* @__PURE__ */
|
|
2505
|
-
/* @__PURE__ */
|
|
2475
|
+
/* @__PURE__ */ jsx3(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
2476
|
+
/* @__PURE__ */ jsx3("span", { children: copyLabel })
|
|
2506
2477
|
]
|
|
2507
2478
|
}
|
|
2508
2479
|
),
|
|
@@ -2519,8 +2490,8 @@ function ImageActionButtons({
|
|
|
2519
2490
|
onDownload();
|
|
2520
2491
|
},
|
|
2521
2492
|
children: [
|
|
2522
|
-
/* @__PURE__ */
|
|
2523
|
-
/* @__PURE__ */
|
|
2493
|
+
/* @__PURE__ */ jsx3(DownloadIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
2494
|
+
/* @__PURE__ */ jsx3("span", { children: downloadLabel })
|
|
2524
2495
|
]
|
|
2525
2496
|
}
|
|
2526
2497
|
)
|
|
@@ -2578,7 +2549,7 @@ function formatImagePreviewZoom(value) {
|
|
|
2578
2549
|
|
|
2579
2550
|
// shared/AgentMessageMarkdownMedia.tsx
|
|
2580
2551
|
import { workspaceFileName as basenameWorkspacePath } from "@tutti-os/workspace-file-manager/services";
|
|
2581
|
-
import { jsx as
|
|
2552
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
2582
2553
|
function MarkdownMedia({
|
|
2583
2554
|
node: _node,
|
|
2584
2555
|
src,
|
|
@@ -2590,7 +2561,7 @@ function MarkdownMedia({
|
|
|
2590
2561
|
}) {
|
|
2591
2562
|
"use memo";
|
|
2592
2563
|
const { t } = useTranslation();
|
|
2593
|
-
const isInsideLink =
|
|
2564
|
+
const isInsideLink = useContext2(MarkdownLinkContext);
|
|
2594
2565
|
const agentHostApi = useOptionalAgentHostApi() ?? getOptionalAgentHostApi();
|
|
2595
2566
|
const workspacePath = typeof src === "string" && isLocalAbsolutePath(src) ? src.trim() : null;
|
|
2596
2567
|
const readWorkspaceImage = workspacePath ? agentHostApi?.workspace?.readFile : void 0;
|
|
@@ -2668,9 +2639,9 @@ function MarkdownMedia({
|
|
|
2668
2639
|
if (!workspacePath || !readWorkspaceImage) {
|
|
2669
2640
|
if (fallbackMediaKind === "video") {
|
|
2670
2641
|
if (!canRenderMarkdownVideoFallback(src)) {
|
|
2671
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ jsx4(UnsupportedMarkdownMediaPreview, {});
|
|
2672
2643
|
}
|
|
2673
|
-
return /* @__PURE__ */
|
|
2644
|
+
return /* @__PURE__ */ jsx4(
|
|
2674
2645
|
"video",
|
|
2675
2646
|
{
|
|
2676
2647
|
src: resolvedSrc,
|
|
@@ -2687,7 +2658,7 @@ function MarkdownMedia({
|
|
|
2687
2658
|
);
|
|
2688
2659
|
}
|
|
2689
2660
|
if (!shouldEnableZoom) {
|
|
2690
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ jsx4(
|
|
2691
2662
|
"img",
|
|
2692
2663
|
{
|
|
2693
2664
|
...props,
|
|
@@ -2698,7 +2669,7 @@ function MarkdownMedia({
|
|
|
2698
2669
|
}
|
|
2699
2670
|
);
|
|
2700
2671
|
}
|
|
2701
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ jsx4(
|
|
2702
2673
|
ZoomableImage,
|
|
2703
2674
|
{
|
|
2704
2675
|
...props,
|
|
@@ -2713,7 +2684,7 @@ function MarkdownMedia({
|
|
|
2713
2684
|
}
|
|
2714
2685
|
if (state?.status === "ready") {
|
|
2715
2686
|
if (state.kind === "video") {
|
|
2716
|
-
return /* @__PURE__ */
|
|
2687
|
+
return /* @__PURE__ */ jsx4(
|
|
2717
2688
|
"video",
|
|
2718
2689
|
{
|
|
2719
2690
|
src: state.src,
|
|
@@ -2730,7 +2701,7 @@ function MarkdownMedia({
|
|
|
2730
2701
|
);
|
|
2731
2702
|
}
|
|
2732
2703
|
if (!shouldEnableZoom) {
|
|
2733
|
-
return /* @__PURE__ */
|
|
2704
|
+
return /* @__PURE__ */ jsx4(
|
|
2734
2705
|
"img",
|
|
2735
2706
|
{
|
|
2736
2707
|
...props,
|
|
@@ -2744,7 +2715,7 @@ function MarkdownMedia({
|
|
|
2744
2715
|
}
|
|
2745
2716
|
);
|
|
2746
2717
|
}
|
|
2747
|
-
return /* @__PURE__ */
|
|
2718
|
+
return /* @__PURE__ */ jsx4(
|
|
2748
2719
|
ZoomableImage,
|
|
2749
2720
|
{
|
|
2750
2721
|
...props,
|
|
@@ -2760,13 +2731,13 @@ function MarkdownMedia({
|
|
|
2760
2731
|
}
|
|
2761
2732
|
);
|
|
2762
2733
|
}
|
|
2763
|
-
return /* @__PURE__ */
|
|
2734
|
+
return /* @__PURE__ */ jsx4("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", {
|
|
2764
2735
|
message: state.detail ?? ""
|
|
2765
2736
|
}) : t("agentHost.workspaceFileManager.previewLoading") });
|
|
2766
2737
|
}
|
|
2767
2738
|
function UnsupportedMarkdownMediaPreview() {
|
|
2768
2739
|
const { t } = useTranslation();
|
|
2769
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsx4("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") });
|
|
2770
2741
|
}
|
|
2771
2742
|
function resolveMarkdownImageDownloadName(src, alt) {
|
|
2772
2743
|
if (typeof src === "string") {
|
|
@@ -2779,7 +2750,7 @@ function resolveMarkdownImageDownloadName(src, alt) {
|
|
|
2779
2750
|
}
|
|
2780
2751
|
|
|
2781
2752
|
// shared/AgentMessageMarkdown.tsx
|
|
2782
|
-
import { Fragment as Fragment2, jsx as
|
|
2753
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2783
2754
|
var STREAMING_MARKDOWN_FRAME_MS = 24;
|
|
2784
2755
|
var STREAMING_MARKDOWN_MAX_CHARS_PER_SECOND = 6e3;
|
|
2785
2756
|
var STREAMING_MARKDOWN_TAIL_FLUSH_CHARS = 0;
|
|
@@ -2806,7 +2777,7 @@ var MARKDOWN_SANITIZE_SCHEMA = {
|
|
|
2806
2777
|
}
|
|
2807
2778
|
};
|
|
2808
2779
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
2809
|
-
var
|
|
2780
|
+
var EMPTY_AGENT_TARGETS2 = [];
|
|
2810
2781
|
function AgentMessageMarkdown({
|
|
2811
2782
|
content,
|
|
2812
2783
|
onLinkClick,
|
|
@@ -2892,7 +2863,7 @@ function AgentMessageMarkdown({
|
|
|
2892
2863
|
);
|
|
2893
2864
|
const markdownComponents = useMemo(
|
|
2894
2865
|
() => ({
|
|
2895
|
-
a: (props) => /* @__PURE__ */
|
|
2866
|
+
a: (props) => /* @__PURE__ */ jsx5(
|
|
2896
2867
|
MarkdownLink,
|
|
2897
2868
|
{
|
|
2898
2869
|
...props,
|
|
@@ -2902,9 +2873,9 @@ function AgentMessageMarkdown({
|
|
|
2902
2873
|
previewMode
|
|
2903
2874
|
}
|
|
2904
2875
|
),
|
|
2905
|
-
code: (props) => /* @__PURE__ */
|
|
2906
|
-
img: (props) => /* @__PURE__ */
|
|
2907
|
-
p: (props) => /* @__PURE__ */
|
|
2876
|
+
code: (props) => /* @__PURE__ */ jsx5(MarkdownCode, { ...props, onLinkClick: handleLinkClick }),
|
|
2877
|
+
img: (props) => /* @__PURE__ */ jsx5(MarkdownMedia, { ...props, enableZoom: enableImageZoom }),
|
|
2878
|
+
p: (props) => /* @__PURE__ */ jsx5(MarkdownParagraph, { ...props, inline }),
|
|
2908
2879
|
ul: MarkdownUnorderedList,
|
|
2909
2880
|
ol: MarkdownOrderedList,
|
|
2910
2881
|
li: MarkdownListItem,
|
|
@@ -2925,7 +2896,7 @@ function AgentMessageMarkdown({
|
|
|
2925
2896
|
className: "flex w-full min-w-0 flex-col items-start gap-1",
|
|
2926
2897
|
"data-workspace-agent-markdown-shell": "true",
|
|
2927
2898
|
children: [
|
|
2928
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsx5(
|
|
2929
2900
|
ContainerTag,
|
|
2930
2901
|
{
|
|
2931
2902
|
className: cn(
|
|
@@ -2956,13 +2927,13 @@ function AgentMessageMarkdown({
|
|
|
2956
2927
|
"data-agent-mention-only": isMentionOnly ? "true" : void 0,
|
|
2957
2928
|
"data-collapsed": isCollapsed ? "true" : "false",
|
|
2958
2929
|
onClickCapture: handleAnchorClickCapture,
|
|
2959
|
-
children: streaming ? /* @__PURE__ */
|
|
2930
|
+
children: streaming ? /* @__PURE__ */ jsx5(
|
|
2960
2931
|
StreamingMarkdownBlocks,
|
|
2961
2932
|
{
|
|
2962
2933
|
content: normalizedContent,
|
|
2963
2934
|
components: markdownComponents
|
|
2964
2935
|
}
|
|
2965
|
-
) : /* @__PURE__ */
|
|
2936
|
+
) : /* @__PURE__ */ jsx5(
|
|
2966
2937
|
ReactMarkdown,
|
|
2967
2938
|
{
|
|
2968
2939
|
remarkPlugins: [remarkGfm],
|
|
@@ -2974,7 +2945,7 @@ function AgentMessageMarkdown({
|
|
|
2974
2945
|
)
|
|
2975
2946
|
}
|
|
2976
2947
|
),
|
|
2977
|
-
shouldCollapse && !isExpanded ? /* @__PURE__ */
|
|
2948
|
+
shouldCollapse && !isExpanded ? /* @__PURE__ */ jsx5(
|
|
2978
2949
|
"button",
|
|
2979
2950
|
{
|
|
2980
2951
|
type: "button",
|
|
@@ -2995,7 +2966,7 @@ function StreamingMarkdownBlocks({
|
|
|
2995
2966
|
() => splitStreamingMarkdownBlocks(content),
|
|
2996
2967
|
[content]
|
|
2997
2968
|
);
|
|
2998
|
-
return /* @__PURE__ */
|
|
2969
|
+
return /* @__PURE__ */ jsx5(Fragment2, { children: blocks.map((block, index) => /* @__PURE__ */ jsx5(
|
|
2999
2970
|
MemoizedMarkdownBlock,
|
|
3000
2971
|
{
|
|
3001
2972
|
content: block.content,
|
|
@@ -3008,7 +2979,7 @@ var MemoizedMarkdownBlock = memo(function MemoizedMarkdownBlock2({
|
|
|
3008
2979
|
content,
|
|
3009
2980
|
components
|
|
3010
2981
|
}) {
|
|
3011
|
-
return /* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ jsx5(
|
|
3012
2983
|
ReactMarkdown,
|
|
3013
2984
|
{
|
|
3014
2985
|
remarkPlugins: [remarkGfm],
|
|
@@ -3036,11 +3007,11 @@ function MarkdownLink({
|
|
|
3036
3007
|
targetHref,
|
|
3037
3008
|
textFromReactNode(props.children),
|
|
3038
3009
|
workspaceAppIcons ?? [],
|
|
3039
|
-
agentTargets ??
|
|
3010
|
+
agentTargets ?? EMPTY_AGENT_TARGETS2,
|
|
3040
3011
|
t("agentHost.agentGui.workspaceAppFactoryMentionFallback")
|
|
3041
3012
|
) : null;
|
|
3042
3013
|
if (mention) {
|
|
3043
|
-
return /* @__PURE__ */
|
|
3014
|
+
return /* @__PURE__ */ jsx5(
|
|
3044
3015
|
MentionLink,
|
|
3045
3016
|
{
|
|
3046
3017
|
...props,
|
|
@@ -3056,7 +3027,7 @@ function MarkdownLink({
|
|
|
3056
3027
|
textFromReactNode(props.children)
|
|
3057
3028
|
) : null;
|
|
3058
3029
|
if (fileMention) {
|
|
3059
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ jsx5(
|
|
3060
3031
|
WorkspaceFileMentionLink,
|
|
3061
3032
|
{
|
|
3062
3033
|
...props,
|
|
@@ -3067,9 +3038,9 @@ function MarkdownLink({
|
|
|
3067
3038
|
);
|
|
3068
3039
|
}
|
|
3069
3040
|
if (!isClickableMarkdownHref(targetHref)) {
|
|
3070
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx5(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx5("span", { className: props.className, title: props.title, children: props.children }) });
|
|
3071
3042
|
}
|
|
3072
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ jsx5(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx5(
|
|
3073
3044
|
"a",
|
|
3074
3045
|
{
|
|
3075
3046
|
...props,
|
|
@@ -3180,8 +3151,8 @@ function WorkspaceFileMentionLink({
|
|
|
3180
3151
|
activateMarkdownLinkFromKey(event, mention.href, onLinkClick);
|
|
3181
3152
|
},
|
|
3182
3153
|
children: [
|
|
3183
|
-
/* @__PURE__ */
|
|
3184
|
-
/* @__PURE__ */
|
|
3154
|
+
/* @__PURE__ */ jsx5("span", { className: "tsh-agent-object-token__icon", "aria-hidden": "true" }),
|
|
3155
|
+
/* @__PURE__ */ jsx5("span", { className: "tsh-agent-object-token__main", children: mention.label })
|
|
3185
3156
|
]
|
|
3186
3157
|
}
|
|
3187
3158
|
);
|
|
@@ -3224,21 +3195,21 @@ function MentionLink({
|
|
|
3224
3195
|
activateMarkdownLinkFromKey(event, href, onLinkClick);
|
|
3225
3196
|
},
|
|
3226
3197
|
children: [
|
|
3227
|
-
mention.kind === "pasted-text" ? /* @__PURE__ */
|
|
3198
|
+
mention.kind === "pasted-text" ? /* @__PURE__ */ jsx5(
|
|
3228
3199
|
"span",
|
|
3229
3200
|
{
|
|
3230
3201
|
className: "grid h-4 w-4 shrink-0 place-items-center text-[var(--text-tertiary)]",
|
|
3231
3202
|
"aria-hidden": "true",
|
|
3232
|
-
children: /* @__PURE__ */
|
|
3203
|
+
children: /* @__PURE__ */ jsx5(FileText, { size: 14, strokeWidth: 2 })
|
|
3233
3204
|
}
|
|
3234
|
-
) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */
|
|
3205
|
+
) : mention.kind === "workspace-app" || mention.kind === "workspace-reference" || mention.kind === "agent-target" ? /* @__PURE__ */ jsx5(
|
|
3235
3206
|
"span",
|
|
3236
3207
|
{
|
|
3237
3208
|
className: "grid h-4 w-4 shrink-0 place-items-center overflow-hidden rounded-[4px] bg-block",
|
|
3238
3209
|
"aria-hidden": "true",
|
|
3239
3210
|
"data-agent-mention-app-icon": "true",
|
|
3240
3211
|
"data-workspace-app-icon": "true",
|
|
3241
|
-
children: mention.iconUrl ? /* @__PURE__ */
|
|
3212
|
+
children: mention.iconUrl ? /* @__PURE__ */ jsx5(
|
|
3242
3213
|
"img",
|
|
3243
3214
|
{
|
|
3244
3215
|
src: mention.iconUrl,
|
|
@@ -3248,25 +3219,25 @@ function MentionLink({
|
|
|
3248
3219
|
loading: "lazy",
|
|
3249
3220
|
draggable: false
|
|
3250
3221
|
}
|
|
3251
|
-
) : /* @__PURE__ */
|
|
3222
|
+
) : /* @__PURE__ */ jsx5("span", { className: "tsh-agent-object-token__kind-icon h-4 w-4" })
|
|
3252
3223
|
}
|
|
3253
|
-
) : /* @__PURE__ */
|
|
3224
|
+
) : /* @__PURE__ */ jsx5("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: /* @__PURE__ */ jsx5(
|
|
3254
3225
|
"span",
|
|
3255
3226
|
{
|
|
3256
3227
|
className: "tsh-agent-object-token__kind-icon",
|
|
3257
3228
|
"aria-hidden": "true"
|
|
3258
3229
|
}
|
|
3259
3230
|
) }),
|
|
3260
|
-
/* @__PURE__ */
|
|
3231
|
+
/* @__PURE__ */ jsx5("span", { className: "tsh-agent-object-token__main", ref: mainRef, children: mention.label })
|
|
3261
3232
|
]
|
|
3262
3233
|
}
|
|
3263
3234
|
);
|
|
3264
3235
|
if (previewMode) {
|
|
3265
3236
|
return link;
|
|
3266
3237
|
}
|
|
3267
|
-
return /* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3269
|
-
overflowing ? /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsx5(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs4(Tooltip, { children: [
|
|
3239
|
+
/* @__PURE__ */ jsx5(TooltipTrigger, { asChild: true, children: link }),
|
|
3240
|
+
overflowing ? /* @__PURE__ */ jsx5(TooltipContent, { className: "max-w-[min(420px,calc(100vw-32px))] whitespace-normal text-left [overflow-wrap:anywhere]", children: tooltipText }) : null
|
|
3270
3241
|
] }) });
|
|
3271
3242
|
}
|
|
3272
3243
|
|
|
@@ -3278,7 +3249,7 @@ import {
|
|
|
3278
3249
|
useRef as useRef4,
|
|
3279
3250
|
useState as useState7
|
|
3280
3251
|
} from "react";
|
|
3281
|
-
import { jsx as
|
|
3252
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3282
3253
|
var MIN_THUMB_HEIGHT = 24;
|
|
3283
3254
|
function CustomScrollbar({
|
|
3284
3255
|
getViewport,
|
|
@@ -3440,7 +3411,7 @@ function CustomScrollbar({
|
|
|
3440
3411
|
resizeObserver?.disconnect();
|
|
3441
3412
|
};
|
|
3442
3413
|
}, [getViewport, syncKey, syncScrollbarState]);
|
|
3443
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ jsx6(
|
|
3444
3415
|
"div",
|
|
3445
3416
|
{
|
|
3446
3417
|
ref: trackRef,
|
|
@@ -3450,7 +3421,7 @@ function CustomScrollbar({
|
|
|
3450
3421
|
"data-testid": testId,
|
|
3451
3422
|
"aria-hidden": "true",
|
|
3452
3423
|
onMouseDown: handleTrackMouseDown,
|
|
3453
|
-
children: /* @__PURE__ */
|
|
3424
|
+
children: /* @__PURE__ */ jsx6(
|
|
3454
3425
|
"div",
|
|
3455
3426
|
{
|
|
3456
3427
|
className: cn("tsh-custom-scrollbar__thumb", thumbClassName),
|
|
@@ -3487,7 +3458,7 @@ var CustomScrollArea = forwardRef(function CustomScrollArea2({
|
|
|
3487
3458
|
className
|
|
3488
3459
|
),
|
|
3489
3460
|
children: [
|
|
3490
|
-
/* @__PURE__ */
|
|
3461
|
+
/* @__PURE__ */ jsx6(
|
|
3491
3462
|
"div",
|
|
3492
3463
|
{
|
|
3493
3464
|
ref: setRefs(viewportRef, forwardedRef),
|
|
@@ -3499,7 +3470,7 @@ var CustomScrollArea = forwardRef(function CustomScrollArea2({
|
|
|
3499
3470
|
children
|
|
3500
3471
|
}
|
|
3501
3472
|
),
|
|
3502
|
-
/* @__PURE__ */
|
|
3473
|
+
/* @__PURE__ */ jsx6(
|
|
3503
3474
|
CustomScrollbar,
|
|
3504
3475
|
{
|
|
3505
3476
|
getViewport,
|
|
@@ -3541,7 +3512,7 @@ import {
|
|
|
3541
3512
|
useAnimation,
|
|
3542
3513
|
useReducedMotion
|
|
3543
3514
|
} from "framer-motion";
|
|
3544
|
-
import { jsx as
|
|
3515
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3545
3516
|
var DOT_TRANSITION = {
|
|
3546
3517
|
times: [0, 0.1, 0.1, 0.2, 0.5, 0.6, 0.6, 0.7],
|
|
3547
3518
|
duration: 1.5
|
|
@@ -3629,7 +3600,7 @@ var MessageSquareMoreIcon = forwardRef2(
|
|
|
3629
3600
|
},
|
|
3630
3601
|
[onMouseLeave, stopAnimation]
|
|
3631
3602
|
);
|
|
3632
|
-
return /* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ jsx7(
|
|
3633
3604
|
"div",
|
|
3634
3605
|
{
|
|
3635
3606
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -3649,8 +3620,8 @@ var MessageSquareMoreIcon = forwardRef2(
|
|
|
3649
3620
|
width: size,
|
|
3650
3621
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3651
3622
|
children: [
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx7("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3624
|
+
/* @__PURE__ */ jsx7(
|
|
3654
3625
|
motion.path,
|
|
3655
3626
|
{
|
|
3656
3627
|
animate: controls,
|
|
@@ -3659,7 +3630,7 @@ var MessageSquareMoreIcon = forwardRef2(
|
|
|
3659
3630
|
variants: DOT_VARIANTS
|
|
3660
3631
|
}
|
|
3661
3632
|
),
|
|
3662
|
-
/* @__PURE__ */
|
|
3633
|
+
/* @__PURE__ */ jsx7(
|
|
3663
3634
|
motion.path,
|
|
3664
3635
|
{
|
|
3665
3636
|
animate: controls,
|
|
@@ -3668,7 +3639,7 @@ var MessageSquareMoreIcon = forwardRef2(
|
|
|
3668
3639
|
variants: DOT_VARIANTS
|
|
3669
3640
|
}
|
|
3670
3641
|
),
|
|
3671
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx7(
|
|
3672
3643
|
motion.path,
|
|
3673
3644
|
{
|
|
3674
3645
|
animate: controls,
|
|
@@ -3691,6 +3662,7 @@ var styles = {
|
|
|
3691
3662
|
interactivePrompt: "agent-gui-conversation__interactive-prompt",
|
|
3692
3663
|
interactivePromptCard: "agent-gui-conversation__interactive-prompt-card",
|
|
3693
3664
|
interactivePromptHeader: "agent-gui-conversation__interactive-prompt-header",
|
|
3665
|
+
interactivePromptLeadContent: "agent-gui-conversation__interactive-prompt-lead-content",
|
|
3694
3666
|
interactivePromptLead: "agent-gui-conversation__interactive-prompt-lead",
|
|
3695
3667
|
interactivePromptMeta: "agent-gui-conversation__interactive-prompt-meta",
|
|
3696
3668
|
interactivePromptQuestion: "agent-gui-conversation__interactive-prompt-question",
|
|
@@ -3722,7 +3694,6 @@ var styles = {
|
|
|
3722
3694
|
var AgentGUIConversation_styles_default = styles;
|
|
3723
3695
|
|
|
3724
3696
|
export {
|
|
3725
|
-
cn,
|
|
3726
3697
|
extractAgentMcpToolTarget,
|
|
3727
3698
|
isExitPlanSwitchModeInput,
|
|
3728
3699
|
extractExitPlanModeOptions,
|
|
@@ -3731,13 +3702,10 @@ export {
|
|
|
3731
3702
|
resolveWorkspaceFilePathCandidate,
|
|
3732
3703
|
resolveWorkspaceFileLinkAction,
|
|
3733
3704
|
resolveWorkspaceLinkAction,
|
|
3734
|
-
AgentTargetPresentationProvider,
|
|
3735
|
-
useAgentTargetPresentations,
|
|
3736
|
-
resolveAgentTargetPresentation,
|
|
3737
3705
|
ZoomableImage,
|
|
3738
3706
|
MessageSquareMoreIcon,
|
|
3739
3707
|
AgentGUIConversation_styles_default,
|
|
3740
3708
|
AgentMessageMarkdown,
|
|
3741
3709
|
CustomScrollArea
|
|
3742
3710
|
};
|
|
3743
|
-
//# sourceMappingURL=chunk-
|
|
3711
|
+
//# sourceMappingURL=chunk-7MPN2JGL.js.map
|