@tutti-os/agent-gui 0.0.36 → 0.0.38
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/{AgentMessageMarkdown-0sV8Biv3.d.ts → AgentMessageMarkdown-Cq-7DSV2.d.ts} +3 -2
- package/dist/agent-conversation/index.d.ts +4 -4
- package/dist/agent-conversation/index.js +4 -4
- package/dist/agent-message-center/index.d.ts +3 -2
- package/dist/agent-message-center/index.js +12 -5
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-xuzmD5IL.d.ts → agentConversationVM-1QgRwvwZ.d.ts} +1 -1
- package/dist/app/renderer/agentactivity.css +25 -7
- package/dist/{chunk-CMXRLF64.js → chunk-44YASHVW.js} +90 -95
- package/dist/chunk-44YASHVW.js.map +1 -0
- package/dist/{chunk-O56P2KSZ.js → chunk-7F4M55U3.js} +53 -16
- package/dist/chunk-7F4M55U3.js.map +1 -0
- package/dist/{chunk-KFMD33UD.js → chunk-JL2WNRYC.js} +7 -7
- package/dist/chunk-JL2WNRYC.js.map +1 -0
- package/dist/{chunk-JYH2ITNL.js → chunk-L7FBT3VR.js} +4 -4
- package/dist/{chunk-U3D7YI47.js → chunk-MKSRP5XS.js} +8 -7
- package/dist/{chunk-U3D7YI47.js.map → chunk-MKSRP5XS.js.map} +1 -1
- package/dist/{chunk-UN4XGHLQ.js → chunk-SS5YEVAI.js} +79 -107
- package/dist/chunk-SS5YEVAI.js.map +1 -0
- package/dist/{chunk-3LEUGNCT.js → chunk-WHWZZYBV.js} +2 -2
- package/dist/{chunk-VPC55T7P.js → chunk-XROBPALT.js} +2 -2
- package/dist/context-mention-palette/index.js +5 -5
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +413 -96
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +2 -2
- package/dist/{workspaceAgentActivityListViewModel-DwpbJGDx.d.ts → workspaceAgentActivityListViewModel-DLnMBMoh.d.ts} +3 -4
- package/package.json +12 -12
- package/dist/chunk-CMXRLF64.js.map +0 -1
- package/dist/chunk-KFMD33UD.js.map +0 -1
- package/dist/chunk-O56P2KSZ.js.map +0 -1
- package/dist/chunk-UN4XGHLQ.js.map +0 -1
- /package/dist/{chunk-JYH2ITNL.js.map → chunk-L7FBT3VR.js.map} +0 -0
- /package/dist/{chunk-3LEUGNCT.js.map → chunk-WHWZZYBV.js.map} +0 -0
- /package/dist/{chunk-VPC55T7P.js.map → chunk-XROBPALT.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-
|
|
1
|
+
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-DLnMBMoh.js';
|
|
2
2
|
|
|
3
3
|
interface WorkspaceAgentSessionDetailMessage {
|
|
4
4
|
id: string;
|
|
@@ -3346,6 +3346,10 @@ aside.workspace-agents-status-panel
|
|
|
3346
3346
|
box-shadow: none;
|
|
3347
3347
|
}
|
|
3348
3348
|
|
|
3349
|
+
.workspace-agents-status-panel__detail-user-message[data-agent-mention-only="true"].agent-gui-conversation__user-message-bubble {
|
|
3350
|
+
max-width: min(100%, calc(var(--agent-mention-max-width, 16rem) + 24px));
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3349
3353
|
.workspace-agents-status-panel__detail-user-message .tsh-agent-object-token {
|
|
3350
3354
|
font-size: inherit;
|
|
3351
3355
|
overflow: visible;
|
|
@@ -3359,15 +3363,19 @@ aside.workspace-agents-status-panel
|
|
|
3359
3363
|
.workspace-agents-status-panel__detail-user-message > div,
|
|
3360
3364
|
.workspace-agents-status-panel__detail-user-message > [contenteditable="false"],
|
|
3361
3365
|
.workspace-agents-status-panel__detail-user-message .ProseMirror {
|
|
3366
|
+
display: inline-block;
|
|
3362
3367
|
width: fit-content;
|
|
3363
3368
|
min-width: 0;
|
|
3364
3369
|
max-width: 100%;
|
|
3370
|
+
vertical-align: top;
|
|
3365
3371
|
font-size: inherit;
|
|
3366
3372
|
line-height: inherit;
|
|
3367
3373
|
}
|
|
3368
3374
|
|
|
3369
3375
|
.workspace-agents-status-panel__detail-user-message.agent-gui-conversation__user-message-bubble
|
|
3370
3376
|
p {
|
|
3377
|
+
width: fit-content;
|
|
3378
|
+
max-width: 100%;
|
|
3371
3379
|
margin: 0;
|
|
3372
3380
|
}
|
|
3373
3381
|
|
|
@@ -4782,13 +4790,18 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
4782
4790
|
|
|
4783
4791
|
.agent-gui-node__conversation-meta[data-kind="loading"],
|
|
4784
4792
|
.agent-gui-node__conversation-meta[data-kind="waiting"],
|
|
4785
|
-
.agent-gui-node__conversation-meta[data-kind="failed"]
|
|
4786
|
-
.agent-gui-node__conversation-meta[data-kind="unread-complete"] {
|
|
4793
|
+
.agent-gui-node__conversation-meta[data-kind="failed"] {
|
|
4787
4794
|
width: 28px;
|
|
4788
4795
|
min-width: 28px;
|
|
4789
4796
|
justify-content: center;
|
|
4790
4797
|
}
|
|
4791
4798
|
|
|
4799
|
+
.agent-gui-node__conversation-meta[data-kind="unread-complete"] {
|
|
4800
|
+
width: 10px;
|
|
4801
|
+
min-width: 10px;
|
|
4802
|
+
justify-content: center;
|
|
4803
|
+
}
|
|
4804
|
+
|
|
4792
4805
|
.agent-gui-node__conversation-meta[data-kind="time"] {
|
|
4793
4806
|
margin-right: 6px;
|
|
4794
4807
|
min-width: max-content;
|
|
@@ -5041,8 +5054,8 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5041
5054
|
}
|
|
5042
5055
|
|
|
5043
5056
|
.agent-gui-node__conversation-unread-lamp {
|
|
5044
|
-
width:
|
|
5045
|
-
height:
|
|
5057
|
+
width: 6px;
|
|
5058
|
+
height: 6px;
|
|
5046
5059
|
border-radius: 999px;
|
|
5047
5060
|
background: var(--agent-gui-accent);
|
|
5048
5061
|
}
|
|
@@ -5436,12 +5449,17 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5436
5449
|
.agent-gui-node__provider-setup-notice {
|
|
5437
5450
|
position: absolute;
|
|
5438
5451
|
top: 8px;
|
|
5439
|
-
left:
|
|
5452
|
+
left: 50%;
|
|
5453
|
+
transform: translateX(-50%);
|
|
5440
5454
|
z-index: 2;
|
|
5441
5455
|
box-sizing: border-box;
|
|
5442
5456
|
width: max-content;
|
|
5443
5457
|
max-width: min(calc(100% - (var(--agent-gui-detail-padding-x) * 2)), 420px);
|
|
5444
5458
|
margin: 0;
|
|
5459
|
+
/* The pill sizes to its content (width: max-content), so the action button's
|
|
5460
|
+
margin-left:auto has no free space to absorb and the message text would butt
|
|
5461
|
+
directly against "Set up". Space the message and action explicitly. */
|
|
5462
|
+
column-gap: 6px;
|
|
5445
5463
|
pointer-events: auto;
|
|
5446
5464
|
}
|
|
5447
5465
|
|
|
@@ -6908,9 +6926,9 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
|
|
|
6908
6926
|
margin: 0;
|
|
6909
6927
|
text-align: center;
|
|
6910
6928
|
color: var(--text-primary);
|
|
6911
|
-
font-size:
|
|
6929
|
+
font-size: 28px;
|
|
6912
6930
|
line-height: 1.3;
|
|
6913
|
-
font-weight:
|
|
6931
|
+
font-weight: 600;
|
|
6914
6932
|
animation: agent-gui-empty-hero-enter 280ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
6915
6933
|
110ms both;
|
|
6916
6934
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-2ADVHCST.js";
|
|
5
5
|
import {
|
|
6
6
|
useTranslation
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JL2WNRYC.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveAgentWorkspaceFileVisualKind
|
|
10
10
|
} from "./chunk-PJP5BUU6.js";
|
|
@@ -329,6 +329,14 @@ function resolveWorkspaceFilePathCandidate({
|
|
|
329
329
|
if (isStagedLocalAssetPath(normalizedPath)) {
|
|
330
330
|
return null;
|
|
331
331
|
}
|
|
332
|
+
if (isHomeRelativeWorkspaceFilePath(normalizedPath)) {
|
|
333
|
+
const directoryPath = dirnameForHomeRelativePath(normalizedPath);
|
|
334
|
+
return {
|
|
335
|
+
path: normalizedPath,
|
|
336
|
+
directoryPath,
|
|
337
|
+
workspaceRoot: normalizeWorkspaceFilePath(workspaceRoot?.trim() ?? "") || directoryPath
|
|
338
|
+
};
|
|
339
|
+
}
|
|
332
340
|
if (isAbsoluteLocalPath(normalizedPath) && (isDirectAgentGeneratedMediaPath(normalizedPath) || isDirectWorkspaceAppDataPath(normalizedPath))) {
|
|
333
341
|
const directoryPath = dirname(normalizedPath);
|
|
334
342
|
return {
|
|
@@ -529,6 +537,12 @@ function isUrlLikeWorkspaceFilePath(path) {
|
|
|
529
537
|
function isAbsoluteLocalPath(path) {
|
|
530
538
|
return path.startsWith("/") || isWindowsAbsolutePath(path);
|
|
531
539
|
}
|
|
540
|
+
function isHomeRelativeWorkspaceFilePath(path) {
|
|
541
|
+
return path === "~" || path.startsWith("~/");
|
|
542
|
+
}
|
|
543
|
+
function dirnameForHomeRelativePath(path) {
|
|
544
|
+
return path === "~" ? "~" : dirname(path);
|
|
545
|
+
}
|
|
532
546
|
function isWindowsAbsolutePath(path) {
|
|
533
547
|
return /^[A-Za-z]:\//.test(path);
|
|
534
548
|
}
|
|
@@ -941,11 +955,26 @@ var PLAIN_SESSION_MENTION_AGENT_LABELS = [
|
|
|
941
955
|
"Nexight",
|
|
942
956
|
"Codex"
|
|
943
957
|
];
|
|
958
|
+
var STANDARD_MARKDOWN_LINK_PROTOCOLS = [
|
|
959
|
+
"http",
|
|
960
|
+
"https",
|
|
961
|
+
"irc",
|
|
962
|
+
"ircs",
|
|
963
|
+
"mailto",
|
|
964
|
+
"tel",
|
|
965
|
+
"xmpp"
|
|
966
|
+
];
|
|
967
|
+
var WINDOWS_DRIVE_HREF_PROTOCOLS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
|
944
968
|
var MARKDOWN_SANITIZE_SCHEMA = {
|
|
945
969
|
...defaultSchema,
|
|
946
970
|
protocols: {
|
|
947
971
|
...defaultSchema.protocols,
|
|
948
|
-
href: [
|
|
972
|
+
href: [
|
|
973
|
+
...defaultSchema.protocols?.href ?? [],
|
|
974
|
+
"mention",
|
|
975
|
+
...STANDARD_MARKDOWN_LINK_PROTOCOLS,
|
|
976
|
+
...WINDOWS_DRIVE_HREF_PROTOCOLS
|
|
977
|
+
]
|
|
949
978
|
}
|
|
950
979
|
};
|
|
951
980
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
@@ -1011,12 +1040,8 @@ function AgentMessageMarkdown({
|
|
|
1011
1040
|
const handleLinkClick = useCallback(
|
|
1012
1041
|
(href) => {
|
|
1013
1042
|
if (workspaceLinkSource && onLinkAction && workspaceRoot) {
|
|
1014
|
-
const resolvedHref = resolveWorkspaceFileHrefFromMessage(href, stabilizedContent, {
|
|
1015
|
-
workspaceRoot,
|
|
1016
|
-
basePath
|
|
1017
|
-
}) ?? href;
|
|
1018
1043
|
const action = resolveWorkspaceLinkAction({
|
|
1019
|
-
href
|
|
1044
|
+
href,
|
|
1020
1045
|
workspaceRoot,
|
|
1021
1046
|
basePath,
|
|
1022
1047
|
source: workspaceLinkSource
|
|
@@ -1028,14 +1053,7 @@ function AgentMessageMarkdown({
|
|
|
1028
1053
|
}
|
|
1029
1054
|
onLinkClick?.(href);
|
|
1030
1055
|
},
|
|
1031
|
-
[
|
|
1032
|
-
basePath,
|
|
1033
|
-
onLinkAction,
|
|
1034
|
-
onLinkClick,
|
|
1035
|
-
stabilizedContent,
|
|
1036
|
-
workspaceLinkSource,
|
|
1037
|
-
workspaceRoot
|
|
1038
|
-
]
|
|
1056
|
+
[basePath, onLinkAction, onLinkClick, workspaceLinkSource, workspaceRoot]
|
|
1039
1057
|
);
|
|
1040
1058
|
const handleAnchorClickCapture = useCallback(
|
|
1041
1059
|
(event) => {
|
|
@@ -1060,31 +1078,14 @@ function AgentMessageMarkdown({
|
|
|
1060
1078
|
previewMode
|
|
1061
1079
|
}
|
|
1062
1080
|
),
|
|
1063
|
-
code: (props) => /* @__PURE__ */ jsx2(
|
|
1064
|
-
MarkdownCode,
|
|
1065
|
-
{
|
|
1066
|
-
...props,
|
|
1067
|
-
onLinkClick: handleLinkClick,
|
|
1068
|
-
workspaceFileLinksEnabled: Boolean(
|
|
1069
|
-
workspaceRoot && workspaceLinkSource
|
|
1070
|
-
)
|
|
1071
|
-
}
|
|
1072
|
-
),
|
|
1081
|
+
code: (props) => /* @__PURE__ */ jsx2(MarkdownCode, { ...props, onLinkClick: handleLinkClick }),
|
|
1073
1082
|
img: (props) => /* @__PURE__ */ jsx2(MarkdownMedia, { ...props, enableZoom: enableImageZoom }),
|
|
1074
1083
|
p: (props) => /* @__PURE__ */ jsx2(MarkdownParagraph, { ...props, inline }),
|
|
1075
1084
|
ul: MarkdownUnorderedList,
|
|
1076
1085
|
ol: MarkdownOrderedList,
|
|
1077
1086
|
li: MarkdownListItem
|
|
1078
1087
|
}),
|
|
1079
|
-
[
|
|
1080
|
-
enableImageZoom,
|
|
1081
|
-
handleLinkClick,
|
|
1082
|
-
inline,
|
|
1083
|
-
previewMode,
|
|
1084
|
-
workspaceAppIcons,
|
|
1085
|
-
workspaceLinkSource,
|
|
1086
|
-
workspaceRoot
|
|
1087
|
-
]
|
|
1088
|
+
[enableImageZoom, handleLinkClick, inline, previewMode, workspaceAppIcons]
|
|
1088
1089
|
);
|
|
1089
1090
|
return /* @__PURE__ */ jsxs2(
|
|
1090
1091
|
ContainerTag,
|
|
@@ -1392,6 +1393,9 @@ function MarkdownLink({
|
|
|
1392
1393
|
}
|
|
1393
1394
|
);
|
|
1394
1395
|
}
|
|
1396
|
+
if (!isClickableMarkdownHref(targetHref)) {
|
|
1397
|
+
return /* @__PURE__ */ jsx2(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx2("span", { className: props.className, title: props.title, children: props.children }) });
|
|
1398
|
+
}
|
|
1395
1399
|
return /* @__PURE__ */ jsx2(MarkdownLinkContext.Provider, { value: true, children: /* @__PURE__ */ jsx2(
|
|
1396
1400
|
"a",
|
|
1397
1401
|
{
|
|
@@ -1595,13 +1599,12 @@ function MarkdownCode({
|
|
|
1595
1599
|
children,
|
|
1596
1600
|
className,
|
|
1597
1601
|
onLinkClick,
|
|
1598
|
-
workspaceFileLinksEnabled = false,
|
|
1599
1602
|
...props
|
|
1600
1603
|
}) {
|
|
1601
1604
|
"use memo";
|
|
1602
1605
|
const isInsideLink = useContext(MarkdownLinkContext);
|
|
1603
1606
|
const text = textFromReactNode(children).trim();
|
|
1604
|
-
const isLinkablePath = !isInsideLink && onLinkClick && !className && (
|
|
1607
|
+
const isLinkablePath = !isInsideLink && onLinkClick && !className && (isExplicitWorkspaceFilePath(text) || isHttpUrl(text));
|
|
1605
1608
|
if (isLinkablePath) {
|
|
1606
1609
|
return /* @__PURE__ */ jsx2(PathLink, { href: text, onLinkClick, children });
|
|
1607
1610
|
}
|
|
@@ -1869,6 +1872,46 @@ function isLocalAbsolutePath(path) {
|
|
|
1869
1872
|
const candidate = path.trim();
|
|
1870
1873
|
return candidate.length > 1 && candidate.startsWith("/") && !candidate.startsWith("//") && !candidate.includes("://") && !/\s/.test(candidate);
|
|
1871
1874
|
}
|
|
1875
|
+
function isHomeRelativePath(path) {
|
|
1876
|
+
const candidate = path.trim();
|
|
1877
|
+
return candidate.length > 0 && !/\s/.test(candidate) && (candidate === "~" || candidate.startsWith("~/") || candidate.startsWith("~\\"));
|
|
1878
|
+
}
|
|
1879
|
+
function isWindowsAbsolutePath2(path) {
|
|
1880
|
+
const candidate = path.trim();
|
|
1881
|
+
return /^[A-Za-z]:[\\/]/.test(candidate) && !/\s/.test(candidate);
|
|
1882
|
+
}
|
|
1883
|
+
function isExplicitWorkspaceFilePath(path) {
|
|
1884
|
+
const candidate = path.trim();
|
|
1885
|
+
if (!candidate || candidate.includes("://")) {
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
return isLocalAbsolutePath(candidate) || isHomeRelativePath(candidate) || isWindowsAbsolutePath2(candidate);
|
|
1889
|
+
}
|
|
1890
|
+
function isClickableMarkdownHref(href) {
|
|
1891
|
+
const target = href.trim();
|
|
1892
|
+
return Boolean(
|
|
1893
|
+
target && (isStandardMarkdownLinkHref(target) || isRichTextMentionHref(target) || isExplicitWorkspaceFilePath(target))
|
|
1894
|
+
);
|
|
1895
|
+
}
|
|
1896
|
+
function isStandardMarkdownLinkHref(href) {
|
|
1897
|
+
const target = href.trim();
|
|
1898
|
+
if (!target || isExplicitWorkspaceFilePath(target)) {
|
|
1899
|
+
return false;
|
|
1900
|
+
}
|
|
1901
|
+
if (target.startsWith("#")) {
|
|
1902
|
+
return target.length > 1;
|
|
1903
|
+
}
|
|
1904
|
+
let url;
|
|
1905
|
+
try {
|
|
1906
|
+
url = new URL(target);
|
|
1907
|
+
} catch {
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
const protocol = url.protocol.replace(/:$/, "").toLowerCase();
|
|
1911
|
+
return STANDARD_MARKDOWN_LINK_PROTOCOLS.includes(
|
|
1912
|
+
protocol
|
|
1913
|
+
);
|
|
1914
|
+
}
|
|
1872
1915
|
function resolveRenderableMarkdownMediaSrc(src) {
|
|
1873
1916
|
const trimmed = src.trim();
|
|
1874
1917
|
if (!trimmed) {
|
|
@@ -1969,62 +2012,6 @@ function isHttpUrl(value) {
|
|
|
1969
2012
|
return false;
|
|
1970
2013
|
}
|
|
1971
2014
|
}
|
|
1972
|
-
function resolveWorkspaceFileHrefFromMessage(rawPath, messageContent, context) {
|
|
1973
|
-
const path = trimTrailingPathPunctuation(rawPath.trim());
|
|
1974
|
-
if (!path || isHttpUrl(path) || isLocalAbsolutePath(path) || !isLikelyWorkspaceRelativeFilePath(path)) {
|
|
1975
|
-
return null;
|
|
1976
|
-
}
|
|
1977
|
-
const directoryHrefs = extractWorkspaceDirectoryLinkHrefs(messageContent);
|
|
1978
|
-
const candidates = [];
|
|
1979
|
-
if (path.includes("/")) {
|
|
1980
|
-
candidates.push(path);
|
|
1981
|
-
} else {
|
|
1982
|
-
for (const directoryHref of directoryHrefs) {
|
|
1983
|
-
candidates.push(`${directoryHref}/${path}`);
|
|
1984
|
-
}
|
|
1985
|
-
candidates.push(path);
|
|
1986
|
-
}
|
|
1987
|
-
for (const candidate of candidates) {
|
|
1988
|
-
if (resolveWorkspaceFilePathCandidate({
|
|
1989
|
-
path: candidate,
|
|
1990
|
-
workspaceRoot: context.workspaceRoot,
|
|
1991
|
-
basePath: context.basePath
|
|
1992
|
-
})) {
|
|
1993
|
-
return candidate;
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
return null;
|
|
1997
|
-
}
|
|
1998
|
-
function extractWorkspaceDirectoryLinkHrefs(content) {
|
|
1999
|
-
const directories = [];
|
|
2000
|
-
let index = 0;
|
|
2001
|
-
while (index < content.length) {
|
|
2002
|
-
const linkEnd = markdownLinkEndIndex(content, index);
|
|
2003
|
-
if (linkEnd <= index) {
|
|
2004
|
-
index += 1;
|
|
2005
|
-
continue;
|
|
2006
|
-
}
|
|
2007
|
-
const slice = content.slice(index, linkEnd);
|
|
2008
|
-
const match = /^\[([^\]]*)\]\(([^)]+)\)$/.exec(slice);
|
|
2009
|
-
if (match) {
|
|
2010
|
-
const href = match[2]?.trim() ?? "";
|
|
2011
|
-
if (href && !isRichTextMentionHref(href) && !href.includes("://")) {
|
|
2012
|
-
const normalizedHref = href.replace(/\/+$/g, "");
|
|
2013
|
-
if (href.endsWith("/") || !normalizedHref.includes(".") && !normalizedHref.includes(" ")) {
|
|
2014
|
-
directories.push(normalizedHref);
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
index = linkEnd;
|
|
2019
|
-
}
|
|
2020
|
-
return [...new Set(directories)];
|
|
2021
|
-
}
|
|
2022
|
-
function isLikelyWorkspaceRelativeFilePath(path) {
|
|
2023
|
-
if (!path || /\s/.test(path) || path.includes("://")) {
|
|
2024
|
-
return false;
|
|
2025
|
-
}
|
|
2026
|
-
return path.includes("/") || /\.[A-Za-z0-9][A-Za-z0-9._-]{0,15}$/.test(path);
|
|
2027
|
-
}
|
|
2028
2015
|
function linkBareLocalAbsolutePaths(content) {
|
|
2029
2016
|
let out = "";
|
|
2030
2017
|
for (let index = 0; index < content.length; ) {
|
|
@@ -2102,7 +2089,8 @@ function normalizePlainSessionMentionTitle(content) {
|
|
|
2102
2089
|
return content;
|
|
2103
2090
|
}
|
|
2104
2091
|
function markdownUrlTransform(value) {
|
|
2105
|
-
|
|
2092
|
+
const target = value.trim();
|
|
2093
|
+
return isRichTextMentionHref(target) || isExplicitWorkspaceFilePath(target) || isStandardMarkdownLinkHref(target) ? target : defaultUrlTransform(value);
|
|
2106
2094
|
}
|
|
2107
2095
|
function parseMentionLink(href, rawLabel, workspaceAppIcons = [], appFactoryFallbackLabel = "Create app") {
|
|
2108
2096
|
const mention = parseRichTextMentionHref2(href, rawLabel);
|
|
@@ -2138,10 +2126,17 @@ function parseMentionLink(href, rawLabel, workspaceAppIcons = [], appFactoryFall
|
|
|
2138
2126
|
};
|
|
2139
2127
|
}
|
|
2140
2128
|
if (kind === "workspace-reference") {
|
|
2129
|
+
const source = mention.scope?.source?.trim() ?? "";
|
|
2130
|
+
const workspaceId = mention.scope?.workspaceId?.trim() || "";
|
|
2131
|
+
const appIconUrl = source === "app" ? resolveWorkspaceAppMentionIconUrl({
|
|
2132
|
+
appId: entityId,
|
|
2133
|
+
workspaceAppIcons,
|
|
2134
|
+
workspaceId
|
|
2135
|
+
}) : void 0;
|
|
2141
2136
|
return {
|
|
2142
2137
|
kind,
|
|
2143
2138
|
label,
|
|
2144
|
-
iconUrl: mention.scope?.icon?.trim() ||
|
|
2139
|
+
iconUrl: mention.scope?.icon?.trim() || appIconUrl,
|
|
2145
2140
|
fileCount: referenceFileCountFromParam(mention.scope?.count ?? null),
|
|
2146
2141
|
participant: label,
|
|
2147
2142
|
summary: ""
|
|
@@ -2740,4 +2735,4 @@ export {
|
|
|
2740
2735
|
CustomScrollArea,
|
|
2741
2736
|
MessageSquareMoreIcon
|
|
2742
2737
|
};
|
|
2743
|
-
//# sourceMappingURL=chunk-
|
|
2738
|
+
//# sourceMappingURL=chunk-44YASHVW.js.map
|