@tutti-os/agent-gui 0.0.11 → 0.0.13
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/agent-conversation/index.d.ts +5 -52
- package/dist/agent-conversation/index.js +4 -3
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-message-center/index.d.ts +15 -5
- package/dist/agent-message-center/index.js +49 -28
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-BtHYOTgv.d.ts → agentConversationVM-BVe64P2E.d.ts} +1 -1
- package/dist/app/renderer/agentactivity.css +136 -134
- package/dist/app/renderer/assets/icons/agents/manage-agent-tutti.png +0 -0
- package/dist/app/renderer/assets/icons/agents/tutti-doc-rounded.png +0 -0
- package/dist/app/renderer/assets/icons/agents/workspace-dock-agent-nexight.png +0 -0
- package/dist/chunk-3YZX5EUC.js +1993 -0
- package/dist/chunk-3YZX5EUC.js.map +1 -0
- package/dist/{chunk-QU4F2RSS.js → chunk-ASAZDEQE.js} +7 -7
- package/dist/chunk-ASAZDEQE.js.map +1 -0
- package/dist/{chunk-B7K776UD.js → chunk-FSTZDNRM.js} +51 -3
- package/dist/chunk-FSTZDNRM.js.map +1 -0
- package/dist/{chunk-ZEFETOTS.js → chunk-GZHQPPK2.js} +718 -2010
- package/dist/chunk-GZHQPPK2.js.map +1 -0
- package/dist/{chunk-CGBRAWTD.js → chunk-HSXDSFKB.js} +10 -1123
- package/dist/chunk-HSXDSFKB.js.map +1 -0
- package/dist/{chunk-ITMKZRCT.js → chunk-KEKPOVQD.js} +15 -8
- package/dist/chunk-KEKPOVQD.js.map +1 -0
- package/dist/{chunk-4ASBZ4X7.js → chunk-MTFSQWZ6.js} +2 -2
- package/dist/chunk-MU2LODEV.js +1211 -0
- package/dist/chunk-MU2LODEV.js.map +1 -0
- package/dist/{chunk-R5Q2UDDH.js → chunk-Q75AK47T.js} +2 -2
- package/dist/{chunk-QTZALZIV.js → chunk-RLPVFX7V.js} +140 -58
- package/dist/chunk-RLPVFX7V.js.map +1 -0
- package/dist/chunk-VDNMTW2E.js +9 -0
- package/dist/chunk-VDNMTW2E.js.map +1 -0
- package/dist/chunk-WME2V26J.js +1124 -0
- package/dist/chunk-WME2V26J.js.map +1 -0
- package/dist/chunk-YXSO4ITT.js +10 -0
- package/dist/chunk-YXSO4ITT.js.map +1 -0
- package/dist/{chunk-3735XYFZ.js → chunk-ZO3SZCIX.js} +54 -3
- package/dist/chunk-ZO3SZCIX.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +203 -0
- package/dist/context-mention-palette/index.js +30 -0
- package/dist/context-mention-provider.d.ts +51 -0
- package/dist/context-mention-provider.js +7 -0
- package/dist/context-mention-provider.js.map +1 -0
- package/dist/i18n/index.d.ts +50 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +33 -6
- package/dist/index.js +3466 -4473
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/workbench/contribution.js +5 -5
- package/dist/workbench/index.d.ts +2 -2
- package/dist/workbench/index.js +10 -6
- package/dist/workbench/launch.d.ts +19 -2
- package/dist/workbench/launch.js +7 -2
- package/dist/workbench/types.d.ts +6 -1
- package/dist/workbench/types.js +5 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +2 -2
- package/dist/{workspaceAgentActivityListViewModel-BLLYGuFO.d.ts → workspaceAgentActivityListViewModel-BK_J3aNX.d.ts} +8 -5
- package/dist/{workspaceLinkActions-Bwa-phu8.d.ts → workspaceLinkActions-BlLN8Pvz.d.ts} +7 -1
- package/package.json +24 -15
- package/dist/agent-rich-text-at-provider.d.ts +0 -63
- package/dist/agent-rich-text-at-provider.js +0 -7
- package/dist/chunk-3735XYFZ.js.map +0 -1
- package/dist/chunk-6AZ2KF6R.js +0 -7
- package/dist/chunk-6AZ2KF6R.js.map +0 -1
- package/dist/chunk-77HBKGHF.js +0 -13
- package/dist/chunk-77HBKGHF.js.map +0 -1
- package/dist/chunk-B7K776UD.js.map +0 -1
- package/dist/chunk-CGBRAWTD.js.map +0 -1
- package/dist/chunk-ITMKZRCT.js.map +0 -1
- package/dist/chunk-QTZALZIV.js.map +0 -1
- package/dist/chunk-QU4F2RSS.js.map +0 -1
- package/dist/chunk-ZEFETOTS.js.map +0 -1
- /package/dist/{chunk-4ASBZ4X7.js.map → chunk-MTFSQWZ6.js.map} +0 -0
- /package/dist/{chunk-R5Q2UDDH.js.map → chunk-Q75AK47T.js.map} +0 -0
- /package/dist/{agent-rich-text-at-provider.js.map → context-mention-palette/index.js.map} +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isWorkspaceAgentSyntheticControlMessage
|
|
3
|
-
} from "./chunk-XJ34OIEQ.js";
|
|
4
1
|
import {
|
|
5
2
|
AgentGUIConversation_styles_default,
|
|
6
3
|
AgentMessageMarkdown,
|
|
@@ -11,20 +8,26 @@ import {
|
|
|
11
8
|
extractAgentMcpToolTarget,
|
|
12
9
|
getOptionalAgentActivityRuntime,
|
|
13
10
|
normalizeAskUserQuestions,
|
|
14
|
-
|
|
11
|
+
resolveWorkspaceFileLinkAction,
|
|
12
|
+
resolveWorkspaceFilePathCandidate,
|
|
13
|
+
resolveWorkspaceLinkAction,
|
|
15
14
|
useOptionalAgentHostApi
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RLPVFX7V.js";
|
|
16
|
+
import {
|
|
17
|
+
attrsToMentionItem,
|
|
18
|
+
createAgentFileMentionExtension,
|
|
19
|
+
formatAgentMentionMarkdown,
|
|
20
|
+
parseAgentMentionMarkdown
|
|
21
|
+
} from "./chunk-MU2LODEV.js";
|
|
22
|
+
import {
|
|
23
|
+
isWorkspaceAgentSyntheticControlMessage
|
|
24
|
+
} from "./chunk-XJ34OIEQ.js";
|
|
17
25
|
import {
|
|
18
26
|
workspaceAgentProviderLabel
|
|
19
27
|
} from "./chunk-TYGL25EL.js";
|
|
20
28
|
import {
|
|
21
|
-
translate
|
|
22
|
-
|
|
23
|
-
} from "./chunk-B7K776UD.js";
|
|
24
|
-
import {
|
|
25
|
-
resolveAgentMentionFileThumbnailUrl,
|
|
26
|
-
resolveAgentMentionFileVisualKind
|
|
27
|
-
} from "./chunk-LUGELG5V.js";
|
|
29
|
+
translate
|
|
30
|
+
} from "./chunk-FSTZDNRM.js";
|
|
28
31
|
|
|
29
32
|
// shared/imageGenerationTool.ts
|
|
30
33
|
var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -1404,6 +1407,14 @@ function isPlaceholderThinkingBody(body) {
|
|
|
1404
1407
|
const normalized = body.trim();
|
|
1405
1408
|
return normalized === "..." || normalized === "\u2026";
|
|
1406
1409
|
}
|
|
1410
|
+
var reviewProcessSummaryTitlePattern = /^\*\*(.+?)\*\*(?:\r?\n\s*)?/;
|
|
1411
|
+
function stripReviewProcessSummaryTitle(body) {
|
|
1412
|
+
const match = body.match(reviewProcessSummaryTitlePattern);
|
|
1413
|
+
if (!match) {
|
|
1414
|
+
return body;
|
|
1415
|
+
}
|
|
1416
|
+
return body.slice(match[0].length).trimStart();
|
|
1417
|
+
}
|
|
1407
1418
|
function normalizedMessageBody(body) {
|
|
1408
1419
|
return body.trim().replace(/\s+/g, " ");
|
|
1409
1420
|
}
|
|
@@ -1506,6 +1517,28 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1506
1517
|
continue;
|
|
1507
1518
|
}
|
|
1508
1519
|
if (role === "thinking" && body) {
|
|
1520
|
+
const payload = normalizedPayload(item.payload);
|
|
1521
|
+
if (payload?.messageKind === "review-process") {
|
|
1522
|
+
const status = firstPresentString5(
|
|
1523
|
+
item.status,
|
|
1524
|
+
stringRecordValue5(payload, "status")
|
|
1525
|
+
);
|
|
1526
|
+
const statusKind2 = messageStatusKind(status);
|
|
1527
|
+
const message = withSourceTimelineItems(
|
|
1528
|
+
{
|
|
1529
|
+
id: itemId2(item),
|
|
1530
|
+
body: stripReviewProcessSummaryTitle(body),
|
|
1531
|
+
...status ? { status } : {},
|
|
1532
|
+
...statusKind2 ? { statusKind: statusKind2 } : {},
|
|
1533
|
+
turnId,
|
|
1534
|
+
occurredAtUnixMs: item.occurredAtUnixMs ?? item.createdAtUnixMs ?? null
|
|
1535
|
+
},
|
|
1536
|
+
[item]
|
|
1537
|
+
);
|
|
1538
|
+
turn.agentMessages.push(message);
|
|
1539
|
+
turn.agentItems.push({ kind: "message", message });
|
|
1540
|
+
continue;
|
|
1541
|
+
}
|
|
1509
1542
|
if (isPlaceholderThinkingBody(body)) {
|
|
1510
1543
|
continue;
|
|
1511
1544
|
}
|
|
@@ -1557,7 +1590,6 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1557
1590
|
const visibleTurns = [...turns.values()].filter(
|
|
1558
1591
|
(turn) => turn.userMessages.length > 0 || turn.agentItems.length > 0
|
|
1559
1592
|
);
|
|
1560
|
-
visibleTurns.forEach(collapseHookShadowToolCalls);
|
|
1561
1593
|
nestDelegatedToolCallsAcrossTurns(visibleTurns);
|
|
1562
1594
|
visibleTurns.forEach(mergeBackgroundTerminalContinuations);
|
|
1563
1595
|
const allowTrailingToolGrouping = !isSessionWorking(session);
|
|
@@ -1816,27 +1848,6 @@ function mergeBackgroundTerminalCall(primary, continuation) {
|
|
|
1816
1848
|
occurredAtUnixMs: continuation.occurredAtUnixMs ?? primary.occurredAtUnixMs
|
|
1817
1849
|
};
|
|
1818
1850
|
}
|
|
1819
|
-
function collapseHookShadowToolCalls(turn) {
|
|
1820
|
-
if (turn.toolCalls.length < 2) {
|
|
1821
|
-
return;
|
|
1822
|
-
}
|
|
1823
|
-
const removeIDs = /* @__PURE__ */ new Set();
|
|
1824
|
-
for (const call of turn.toolCalls) {
|
|
1825
|
-
if (!isSyntheticHookToolCallID(call.id)) {
|
|
1826
|
-
continue;
|
|
1827
|
-
}
|
|
1828
|
-
const shadowed = turn.toolCalls.some((candidate) => {
|
|
1829
|
-
if (candidate.id === call.id || isSyntheticHookToolCallID(candidate.id)) {
|
|
1830
|
-
return false;
|
|
1831
|
-
}
|
|
1832
|
-
return equivalentToolCallSignature(candidate) === equivalentToolCallSignature(call);
|
|
1833
|
-
});
|
|
1834
|
-
if (shadowed) {
|
|
1835
|
-
removeIDs.add(call.id);
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
pruneTurnToolCalls(turn, removeIDs);
|
|
1839
|
-
}
|
|
1840
1851
|
function nestDelegatedToolCallsAcrossTurns(turns) {
|
|
1841
1852
|
if (turns.length === 0) {
|
|
1842
1853
|
return;
|
|
@@ -2047,20 +2058,6 @@ function delegatedToolStepFromCall(call) {
|
|
|
2047
2058
|
function compareToolCallsAscending(left, right) {
|
|
2048
2059
|
return (left.occurredAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? 0) || left.id.localeCompare(right.id);
|
|
2049
2060
|
}
|
|
2050
|
-
function equivalentToolCallSignature(call) {
|
|
2051
|
-
return [
|
|
2052
|
-
normalizeToolName(call.toolName),
|
|
2053
|
-
normalizeToolName(call.callType),
|
|
2054
|
-
stableSerialize(
|
|
2055
|
-
normalizedPayload(
|
|
2056
|
-
call.payload?.input
|
|
2057
|
-
)
|
|
2058
|
-
)
|
|
2059
|
-
].join("\0");
|
|
2060
|
-
}
|
|
2061
|
-
function isSyntheticHookToolCallID(id) {
|
|
2062
|
-
return /^call:tool\./i.test(id);
|
|
2063
|
-
}
|
|
2064
2061
|
function toolCallView(item) {
|
|
2065
2062
|
const display = buildWorkspaceAgentToolCallDisplay(item);
|
|
2066
2063
|
const preserveTimelineTitle = item.itemType.trim().toLowerCase().startsWith("approval.") || item.itemType.trim().toLowerCase().startsWith("interactive.") || firstPresentString5(
|
|
@@ -2220,23 +2217,6 @@ function summarizeCallTarget(summary) {
|
|
|
2220
2217
|
function dedupeStrings(values) {
|
|
2221
2218
|
return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
2222
2219
|
}
|
|
2223
|
-
function stableSerialize(value) {
|
|
2224
|
-
if (value === null || value === void 0) {
|
|
2225
|
-
return "";
|
|
2226
|
-
}
|
|
2227
|
-
if (Array.isArray(value)) {
|
|
2228
|
-
return `[${value.map(stableSerialize).join(",")}]`;
|
|
2229
|
-
}
|
|
2230
|
-
if (typeof value === "object") {
|
|
2231
|
-
const entries = Object.entries(value).sort(
|
|
2232
|
-
([left], [right]) => left.localeCompare(right)
|
|
2233
|
-
);
|
|
2234
|
-
return `{${entries.map(
|
|
2235
|
-
([key, nested]) => `${JSON.stringify(key)}:${stableSerialize(nested)}`
|
|
2236
|
-
).join(",")}}`;
|
|
2237
|
-
}
|
|
2238
|
-
return JSON.stringify(value);
|
|
2239
|
-
}
|
|
2240
2220
|
function shouldShowProcessingIndicator(session, turns) {
|
|
2241
2221
|
if (!isSessionWorking(session)) {
|
|
2242
2222
|
return false;
|
|
@@ -3093,6 +3073,9 @@ function findActiveTailSuppressedToolIndices(sequence) {
|
|
|
3093
3073
|
return suppressedIndices;
|
|
3094
3074
|
}
|
|
3095
3075
|
function isSuppressingActiveTailTool(call) {
|
|
3076
|
+
if (call.statusKind !== "working" && call.statusKind !== "waiting") {
|
|
3077
|
+
return false;
|
|
3078
|
+
}
|
|
3096
3079
|
switch (call.rendererKind) {
|
|
3097
3080
|
case "approval":
|
|
3098
3081
|
case "ask-user":
|
|
@@ -3140,6 +3123,96 @@ function dedupeStrings2(values) {
|
|
|
3140
3123
|
return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
3141
3124
|
}
|
|
3142
3125
|
|
|
3126
|
+
// shared/agentConversation/projection/chunkBy.ts
|
|
3127
|
+
function chunkBy(items, sameRun) {
|
|
3128
|
+
const runs = [];
|
|
3129
|
+
for (const item of items) {
|
|
3130
|
+
const current = runs.at(-1);
|
|
3131
|
+
if (current && sameRun(current.at(-1), item)) {
|
|
3132
|
+
current.push(item);
|
|
3133
|
+
continue;
|
|
3134
|
+
}
|
|
3135
|
+
runs.push([item]);
|
|
3136
|
+
}
|
|
3137
|
+
return runs;
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
// shared/agentConversation/projection/agentTurnRowProjection.ts
|
|
3141
|
+
function thinkingAbsorbedByMessage(previous, current) {
|
|
3142
|
+
return previous.tag === "thinking" && current.tag === "message";
|
|
3143
|
+
}
|
|
3144
|
+
function toRenderUnits(sequence, groups, skippedIndices) {
|
|
3145
|
+
const units = [];
|
|
3146
|
+
for (let index = 0; index < sequence.length; index += 1) {
|
|
3147
|
+
const group = groups.get(index);
|
|
3148
|
+
if (group) {
|
|
3149
|
+
units.push({ tag: "tool-group", group });
|
|
3150
|
+
index = group.endIndex;
|
|
3151
|
+
continue;
|
|
3152
|
+
}
|
|
3153
|
+
if (skippedIndices.has(index)) {
|
|
3154
|
+
continue;
|
|
3155
|
+
}
|
|
3156
|
+
const item = sequence[index];
|
|
3157
|
+
if (!item) {
|
|
3158
|
+
continue;
|
|
3159
|
+
}
|
|
3160
|
+
switch (item.kind) {
|
|
3161
|
+
case "assistant-message":
|
|
3162
|
+
units.push({ tag: "message", message: item.message });
|
|
3163
|
+
break;
|
|
3164
|
+
case "thinking":
|
|
3165
|
+
units.push({ tag: "thinking", thinking: item.thinking });
|
|
3166
|
+
break;
|
|
3167
|
+
case "tool-call":
|
|
3168
|
+
units.push({ tag: "tool", call: item.call });
|
|
3169
|
+
break;
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
return units;
|
|
3173
|
+
}
|
|
3174
|
+
function renderRun(run, turnId) {
|
|
3175
|
+
const last = run.at(-1);
|
|
3176
|
+
if (!last) {
|
|
3177
|
+
throw new Error("renderRun received an empty run");
|
|
3178
|
+
}
|
|
3179
|
+
if (last.tag === "tool-group") {
|
|
3180
|
+
return projectAgentToolGroupRowFromGroup(turnId, last.group);
|
|
3181
|
+
}
|
|
3182
|
+
if (last.tag === "tool") {
|
|
3183
|
+
return projectAgentSingleToolRow(last.call, turnId);
|
|
3184
|
+
}
|
|
3185
|
+
const thinking = run.filter(
|
|
3186
|
+
(unit) => unit.tag === "thinking"
|
|
3187
|
+
).map((unit) => unit.thinking);
|
|
3188
|
+
if (last.tag === "message") {
|
|
3189
|
+
return {
|
|
3190
|
+
kind: "message",
|
|
3191
|
+
id: `message:assistant:${last.message.id}`,
|
|
3192
|
+
turnId: last.message.turnId,
|
|
3193
|
+
speaker: "assistant",
|
|
3194
|
+
messages: [last.message],
|
|
3195
|
+
thinking,
|
|
3196
|
+
occurredAtUnixMs: last.message.occurredAtUnixMs
|
|
3197
|
+
};
|
|
3198
|
+
}
|
|
3199
|
+
return {
|
|
3200
|
+
kind: "message",
|
|
3201
|
+
id: `message:thinking:${turnId}:${thinking.map((entry) => entry.id).join("+")}`,
|
|
3202
|
+
turnId,
|
|
3203
|
+
speaker: "assistant",
|
|
3204
|
+
messages: [],
|
|
3205
|
+
thinking,
|
|
3206
|
+
occurredAtUnixMs: thinking.at(-1)?.occurredAtUnixMs ?? thinking[0]?.occurredAtUnixMs ?? null
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3209
|
+
function projectTurnRows(sequence, groups, skippedIndices, turnId) {
|
|
3210
|
+
const units = toRenderUnits(sequence, groups, skippedIndices);
|
|
3211
|
+
return chunkBy(units, thinkingAbsorbedByMessage).map(
|
|
3212
|
+
(run) => renderRun(run, turnId)
|
|
3213
|
+
);
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3143
3216
|
// shared/agentConversation/projection/agentProcessingProjection.ts
|
|
3144
3217
|
function projectAgentProcessingRow(detail, rows) {
|
|
3145
3218
|
if (!detail.showProcessingIndicator) {
|
|
@@ -3173,235 +3246,6 @@ function hasSpecificProgressRow(rows) {
|
|
|
3173
3246
|
});
|
|
3174
3247
|
}
|
|
3175
3248
|
|
|
3176
|
-
// contexts/workspace/presentation/renderer/actions/workspaceLinkActions.ts
|
|
3177
|
-
import {
|
|
3178
|
-
parseWorkspaceIssueMentionHref
|
|
3179
|
-
} from "@tutti-os/workspace-issue-manager/core";
|
|
3180
|
-
var URL_LIKE_LINK_PATTERN = /^[a-zA-Z][a-zA-Z\d+.-]*:|^#/;
|
|
3181
|
-
function resolveWorkspaceFilePathCandidate({
|
|
3182
|
-
path,
|
|
3183
|
-
workspaceRoot,
|
|
3184
|
-
basePath
|
|
3185
|
-
}) {
|
|
3186
|
-
const rawPath = decodeWorkspaceLinkPath(path.trim());
|
|
3187
|
-
const root = normalizeWorkspaceFilePath(workspaceRoot?.trim() ?? "");
|
|
3188
|
-
if (!rawPath || !root || isUrlLikeWorkspaceFilePath(rawPath)) {
|
|
3189
|
-
return null;
|
|
3190
|
-
}
|
|
3191
|
-
const normalizedPath = normalizeWorkspaceFilePath(rawPath);
|
|
3192
|
-
const base = normalizeWorkspaceFilePath(basePath?.trim() || root);
|
|
3193
|
-
const resolvedPath = isAbsoluteLocalPath(normalizedPath) ? normalizedPath : normalizeWorkspaceFilePath(`${base}/${normalizedPath}`);
|
|
3194
|
-
if (!isInsideOrEqual(resolvedPath, root) && !isDirectAgentGeneratedImagePath(resolvedPath) && !isDirectWorkspaceAppFilePath(resolvedPath)) {
|
|
3195
|
-
return null;
|
|
3196
|
-
}
|
|
3197
|
-
return {
|
|
3198
|
-
path: resolvedPath,
|
|
3199
|
-
directoryPath: resolvedPath === root ? root : dirname(resolvedPath),
|
|
3200
|
-
workspaceRoot: root
|
|
3201
|
-
};
|
|
3202
|
-
}
|
|
3203
|
-
function resolveWorkspaceFileLinkAction({
|
|
3204
|
-
path,
|
|
3205
|
-
workspaceRoot,
|
|
3206
|
-
basePath,
|
|
3207
|
-
source
|
|
3208
|
-
}) {
|
|
3209
|
-
const candidate = resolveWorkspaceFilePathCandidate({
|
|
3210
|
-
path,
|
|
3211
|
-
workspaceRoot,
|
|
3212
|
-
basePath
|
|
3213
|
-
});
|
|
3214
|
-
if (!candidate) {
|
|
3215
|
-
return null;
|
|
3216
|
-
}
|
|
3217
|
-
return {
|
|
3218
|
-
type: "open-workspace-file",
|
|
3219
|
-
path: candidate.path,
|
|
3220
|
-
directoryPath: candidate.directoryPath,
|
|
3221
|
-
workspaceRoot: candidate.workspaceRoot,
|
|
3222
|
-
source
|
|
3223
|
-
};
|
|
3224
|
-
}
|
|
3225
|
-
function resolveWorkspaceUrlLinkAction({
|
|
3226
|
-
url,
|
|
3227
|
-
source
|
|
3228
|
-
}) {
|
|
3229
|
-
const resolved = resolveWebsiteNavigationUrl(url);
|
|
3230
|
-
if (!resolved.url || resolved.error) {
|
|
3231
|
-
return null;
|
|
3232
|
-
}
|
|
3233
|
-
return {
|
|
3234
|
-
type: "open-url",
|
|
3235
|
-
url: resolved.url,
|
|
3236
|
-
source
|
|
3237
|
-
};
|
|
3238
|
-
}
|
|
3239
|
-
function resolveWorkspaceMentionLinkAction({
|
|
3240
|
-
href,
|
|
3241
|
-
source
|
|
3242
|
-
}) {
|
|
3243
|
-
const rawHref = href.trim();
|
|
3244
|
-
if (!rawHref.toLowerCase().startsWith("mention://")) {
|
|
3245
|
-
return null;
|
|
3246
|
-
}
|
|
3247
|
-
let url;
|
|
3248
|
-
try {
|
|
3249
|
-
url = new URL(rawHref);
|
|
3250
|
-
} catch {
|
|
3251
|
-
return null;
|
|
3252
|
-
}
|
|
3253
|
-
const resource = url.hostname.trim().toLowerCase();
|
|
3254
|
-
const workspaceId = url.searchParams.get("workspaceId")?.trim() || "";
|
|
3255
|
-
const targetId = url.searchParams.get("id")?.trim() || "";
|
|
3256
|
-
if (!workspaceId || !targetId) {
|
|
3257
|
-
return null;
|
|
3258
|
-
}
|
|
3259
|
-
if (resource === "agent-session") {
|
|
3260
|
-
const provider = url.searchParams.get("provider")?.trim() || null;
|
|
3261
|
-
return {
|
|
3262
|
-
type: "open-agent-session",
|
|
3263
|
-
workspaceId,
|
|
3264
|
-
agentSessionId: targetId,
|
|
3265
|
-
...provider ? { provider } : {},
|
|
3266
|
-
source
|
|
3267
|
-
};
|
|
3268
|
-
}
|
|
3269
|
-
if (resource === "workspace-issue") {
|
|
3270
|
-
const parsedIssueMention = parseWorkspaceIssueMentionHref(rawHref);
|
|
3271
|
-
if (!parsedIssueMention) {
|
|
3272
|
-
return null;
|
|
3273
|
-
}
|
|
3274
|
-
return {
|
|
3275
|
-
type: "open-workspace-issue",
|
|
3276
|
-
workspaceId: parsedIssueMention.workspaceId,
|
|
3277
|
-
issueId: parsedIssueMention.issueId,
|
|
3278
|
-
...parsedIssueMention.mode ? { mode: parsedIssueMention.mode } : {},
|
|
3279
|
-
...parsedIssueMention.outputDir ? { outputDir: parsedIssueMention.outputDir } : {},
|
|
3280
|
-
...parsedIssueMention.runId ? { runId: parsedIssueMention.runId } : {},
|
|
3281
|
-
...parsedIssueMention.taskId ? { taskId: parsedIssueMention.taskId } : {},
|
|
3282
|
-
...parsedIssueMention.topicId ? { topicId: parsedIssueMention.topicId } : {},
|
|
3283
|
-
source
|
|
3284
|
-
};
|
|
3285
|
-
}
|
|
3286
|
-
return null;
|
|
3287
|
-
}
|
|
3288
|
-
function resolveWorkspaceLinkAction({
|
|
3289
|
-
href,
|
|
3290
|
-
workspaceRoot,
|
|
3291
|
-
basePath,
|
|
3292
|
-
source
|
|
3293
|
-
}) {
|
|
3294
|
-
return resolveWorkspaceMentionLinkAction({ href, source }) ?? resolveWorkspaceFileLinkAction({
|
|
3295
|
-
path: href,
|
|
3296
|
-
workspaceRoot,
|
|
3297
|
-
basePath,
|
|
3298
|
-
source
|
|
3299
|
-
}) ?? resolveWorkspaceUrlLinkAction({ url: href, source });
|
|
3300
|
-
}
|
|
3301
|
-
function normalizeWorkspaceFilePath(path) {
|
|
3302
|
-
const normalizedPath = path.trim().replaceAll("\\", "/");
|
|
3303
|
-
const drive = /^[A-Za-z]:/.exec(normalizedPath)?.[0] ?? "";
|
|
3304
|
-
const startsWithSlash = normalizedPath.startsWith("/");
|
|
3305
|
-
const pathBody = drive ? normalizedPath.slice(drive.length) : startsWithSlash ? normalizedPath.slice(1) : normalizedPath;
|
|
3306
|
-
const parts = [];
|
|
3307
|
-
for (const part of pathBody.split("/")) {
|
|
3308
|
-
if (!part || part === ".") {
|
|
3309
|
-
continue;
|
|
3310
|
-
}
|
|
3311
|
-
if (part === "..") {
|
|
3312
|
-
parts.pop();
|
|
3313
|
-
continue;
|
|
3314
|
-
}
|
|
3315
|
-
parts.push(part);
|
|
3316
|
-
}
|
|
3317
|
-
if (drive) {
|
|
3318
|
-
return parts.length > 0 ? `${drive}/${parts.join("/")}` : `${drive}/`;
|
|
3319
|
-
}
|
|
3320
|
-
if (startsWithSlash) {
|
|
3321
|
-
return parts.length > 0 ? `/${parts.join("/")}` : "/";
|
|
3322
|
-
}
|
|
3323
|
-
return parts.join("/");
|
|
3324
|
-
}
|
|
3325
|
-
function isUrlLikeWorkspaceFilePath(path) {
|
|
3326
|
-
if (path.startsWith("#")) {
|
|
3327
|
-
return true;
|
|
3328
|
-
}
|
|
3329
|
-
if (isWindowsAbsolutePath(path.trim().replaceAll("\\", "/"))) {
|
|
3330
|
-
return false;
|
|
3331
|
-
}
|
|
3332
|
-
return URL_LIKE_LINK_PATTERN.test(path);
|
|
3333
|
-
}
|
|
3334
|
-
function isAbsoluteLocalPath(path) {
|
|
3335
|
-
return path.startsWith("/") || isWindowsAbsolutePath(path);
|
|
3336
|
-
}
|
|
3337
|
-
function isWindowsAbsolutePath(path) {
|
|
3338
|
-
return /^[A-Za-z]:\//.test(path);
|
|
3339
|
-
}
|
|
3340
|
-
function decodeWorkspaceLinkPath(path) {
|
|
3341
|
-
if (!path.includes("%")) {
|
|
3342
|
-
return path;
|
|
3343
|
-
}
|
|
3344
|
-
try {
|
|
3345
|
-
return decodeURI(path);
|
|
3346
|
-
} catch {
|
|
3347
|
-
return path;
|
|
3348
|
-
}
|
|
3349
|
-
}
|
|
3350
|
-
function dirname(path) {
|
|
3351
|
-
const index = path.lastIndexOf("/");
|
|
3352
|
-
if (index <= 0) {
|
|
3353
|
-
return "/";
|
|
3354
|
-
}
|
|
3355
|
-
return path.slice(0, index);
|
|
3356
|
-
}
|
|
3357
|
-
function isInsideOrEqual(path, root) {
|
|
3358
|
-
if (root === "/") {
|
|
3359
|
-
return path.startsWith("/");
|
|
3360
|
-
}
|
|
3361
|
-
const comparison = isWindowsAbsolutePath(root) || isWindowsAbsolutePath(path) ? { path: path.toLowerCase(), root: root.toLowerCase() } : { path, root };
|
|
3362
|
-
return comparison.path === comparison.root || comparison.path.startsWith(`${comparison.root}/`);
|
|
3363
|
-
}
|
|
3364
|
-
function isDirectAgentGeneratedImagePath(path) {
|
|
3365
|
-
if (!isAbsoluteLocalPath(path)) {
|
|
3366
|
-
return false;
|
|
3367
|
-
}
|
|
3368
|
-
const segments = path.split("/").filter(Boolean);
|
|
3369
|
-
const stateRootIndex = segments.findIndex(
|
|
3370
|
-
(segment) => segment === ".tutti" || segment === ".tutti-dev"
|
|
3371
|
-
);
|
|
3372
|
-
if (stateRootIndex < 0) {
|
|
3373
|
-
return false;
|
|
3374
|
-
}
|
|
3375
|
-
const statePath = segments.slice(stateRootIndex);
|
|
3376
|
-
if (statePath[1] !== "agent" || statePath[2] !== "runs" || !statePath.includes("generated_images")) {
|
|
3377
|
-
return false;
|
|
3378
|
-
}
|
|
3379
|
-
return /\.(?:png|jpe?g|gif|webp|bmp)$/i.test(path);
|
|
3380
|
-
}
|
|
3381
|
-
function isDirectWorkspaceAppFilePath(path) {
|
|
3382
|
-
if (!isAbsoluteLocalPath(path)) {
|
|
3383
|
-
return false;
|
|
3384
|
-
}
|
|
3385
|
-
const segments = path.split("/").filter(Boolean);
|
|
3386
|
-
const stateRootIndex = segments.findIndex(
|
|
3387
|
-
(segment) => segment === ".tutti" || segment === ".tutti-dev"
|
|
3388
|
-
);
|
|
3389
|
-
if (stateRootIndex < 0) {
|
|
3390
|
-
return false;
|
|
3391
|
-
}
|
|
3392
|
-
const statePath = segments.slice(stateRootIndex);
|
|
3393
|
-
if (statePath[1] !== "apps") {
|
|
3394
|
-
return false;
|
|
3395
|
-
}
|
|
3396
|
-
if (statePath[2] === "workspaces") {
|
|
3397
|
-
return statePath.length > 6 && statePath[5] === "data";
|
|
3398
|
-
}
|
|
3399
|
-
if (statePath[2] === "packages") {
|
|
3400
|
-
return statePath.length > 5;
|
|
3401
|
-
}
|
|
3402
|
-
return false;
|
|
3403
|
-
}
|
|
3404
|
-
|
|
3405
3249
|
// shared/agentConversation/rules/agentPatchMetadata.ts
|
|
3406
3250
|
function normalizeAgentPatchText(text) {
|
|
3407
3251
|
if (!text) {
|
|
@@ -4573,12 +4417,20 @@ function userPromptContentBlocks(message, fallbackWorkspaceId) {
|
|
|
4573
4417
|
if (!content) {
|
|
4574
4418
|
return [];
|
|
4575
4419
|
}
|
|
4576
|
-
|
|
4420
|
+
const displayPrompt = firstString2(
|
|
4421
|
+
message.sourceTimelineItems?.map(
|
|
4422
|
+
(candidate) => typeof candidate.payload?.displayPrompt === "string" ? candidate.payload.displayPrompt : ""
|
|
4423
|
+
) ?? []
|
|
4424
|
+
);
|
|
4425
|
+
const blocks = content.flatMap((raw) => {
|
|
4577
4426
|
const block = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : null;
|
|
4578
4427
|
if (!block) {
|
|
4579
4428
|
return [];
|
|
4580
4429
|
}
|
|
4581
4430
|
if (block.type === "text" && typeof block.text === "string") {
|
|
4431
|
+
if (displayPrompt) {
|
|
4432
|
+
return [];
|
|
4433
|
+
}
|
|
4582
4434
|
return [{ type: "text", text: block.text }];
|
|
4583
4435
|
}
|
|
4584
4436
|
if (block.type !== "image") {
|
|
@@ -4600,6 +4452,19 @@ function userPromptContentBlocks(message, fallbackWorkspaceId) {
|
|
|
4600
4452
|
}
|
|
4601
4453
|
];
|
|
4602
4454
|
});
|
|
4455
|
+
if (!displayPrompt) {
|
|
4456
|
+
return blocks;
|
|
4457
|
+
}
|
|
4458
|
+
return [{ type: "text", text: displayPrompt }, ...blocks];
|
|
4459
|
+
}
|
|
4460
|
+
function firstString2(values) {
|
|
4461
|
+
for (const value of values) {
|
|
4462
|
+
const trimmed = value.trim();
|
|
4463
|
+
if (trimmed) {
|
|
4464
|
+
return trimmed;
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
return "";
|
|
4603
4468
|
}
|
|
4604
4469
|
function projectTurnAgentRows(turn, options) {
|
|
4605
4470
|
const sequence = buildAgentTurnSequenceItems(turn);
|
|
@@ -4608,79 +4473,7 @@ function projectTurnAgentRows(turn, options) {
|
|
|
4608
4473
|
options
|
|
4609
4474
|
);
|
|
4610
4475
|
const skippedIndices = /* @__PURE__ */ new Set([...groupedIndices, ...suppressedIndices]);
|
|
4611
|
-
|
|
4612
|
-
let pendingThinking = [];
|
|
4613
|
-
const flushThinking = () => {
|
|
4614
|
-
if (pendingThinking.length === 0) {
|
|
4615
|
-
return;
|
|
4616
|
-
}
|
|
4617
|
-
rows.push({
|
|
4618
|
-
kind: "message",
|
|
4619
|
-
id: `message:thinking:${turn.id}:${pendingThinking.map((thinking) => thinking.id).join("+")}`,
|
|
4620
|
-
turnId: turn.id,
|
|
4621
|
-
speaker: "assistant",
|
|
4622
|
-
messages: [],
|
|
4623
|
-
thinking: [...pendingThinking],
|
|
4624
|
-
occurredAtUnixMs: pendingThinking.at(-1)?.occurredAtUnixMs ?? pendingThinking[0]?.occurredAtUnixMs ?? null
|
|
4625
|
-
});
|
|
4626
|
-
pendingThinking = [];
|
|
4627
|
-
};
|
|
4628
|
-
for (let index = 0; index < sequence.length; index += 1) {
|
|
4629
|
-
const item = sequence[index];
|
|
4630
|
-
if (!item) {
|
|
4631
|
-
continue;
|
|
4632
|
-
}
|
|
4633
|
-
const group = groups.get(index);
|
|
4634
|
-
if (group) {
|
|
4635
|
-
flushThinking();
|
|
4636
|
-
rows.push(projectAgentToolGroupRowFromGroup(turn.id, group));
|
|
4637
|
-
index = group.endIndex;
|
|
4638
|
-
continue;
|
|
4639
|
-
}
|
|
4640
|
-
if (skippedIndices.has(index)) {
|
|
4641
|
-
continue;
|
|
4642
|
-
}
|
|
4643
|
-
if (item.kind === "thinking") {
|
|
4644
|
-
const next = nextUngroupedSequenceItem(
|
|
4645
|
-
sequence,
|
|
4646
|
-
skippedIndices,
|
|
4647
|
-
index + 1
|
|
4648
|
-
);
|
|
4649
|
-
if (next?.kind === "assistant-message") {
|
|
4650
|
-
pendingThinking.push(item.thinking);
|
|
4651
|
-
continue;
|
|
4652
|
-
}
|
|
4653
|
-
pendingThinking.push(item.thinking);
|
|
4654
|
-
flushThinking();
|
|
4655
|
-
continue;
|
|
4656
|
-
}
|
|
4657
|
-
if (item.kind === "assistant-message") {
|
|
4658
|
-
rows.push({
|
|
4659
|
-
kind: "message",
|
|
4660
|
-
id: `message:assistant:${item.message.id}`,
|
|
4661
|
-
turnId: item.message.turnId,
|
|
4662
|
-
speaker: "assistant",
|
|
4663
|
-
messages: [item.message],
|
|
4664
|
-
thinking: [...pendingThinking],
|
|
4665
|
-
occurredAtUnixMs: item.message.occurredAtUnixMs
|
|
4666
|
-
});
|
|
4667
|
-
pendingThinking = [];
|
|
4668
|
-
continue;
|
|
4669
|
-
}
|
|
4670
|
-
flushThinking();
|
|
4671
|
-
rows.push(projectAgentSingleToolRow(item.call, turn.id));
|
|
4672
|
-
}
|
|
4673
|
-
flushThinking();
|
|
4674
|
-
return rows;
|
|
4675
|
-
}
|
|
4676
|
-
function nextUngroupedSequenceItem(sequence, groupedIndices, startIndex) {
|
|
4677
|
-
for (let index = startIndex; index < sequence.length; index += 1) {
|
|
4678
|
-
if (groupedIndices.has(index)) {
|
|
4679
|
-
continue;
|
|
4680
|
-
}
|
|
4681
|
-
return sequence[index] ?? null;
|
|
4682
|
-
}
|
|
4683
|
-
return null;
|
|
4476
|
+
return projectTurnRows(sequence, groups, skippedIndices, turn.id);
|
|
4684
4477
|
}
|
|
4685
4478
|
function selectPendingApproval(rows) {
|
|
4686
4479
|
for (const row of [...rows].reverse()) {
|
|
@@ -4838,7 +4631,7 @@ import {
|
|
|
4838
4631
|
useLayoutEffect as useLayoutEffect2,
|
|
4839
4632
|
useMemo as useMemo6,
|
|
4840
4633
|
useRef as useRef8,
|
|
4841
|
-
useState as
|
|
4634
|
+
useState as useState17
|
|
4842
4635
|
} from "react";
|
|
4843
4636
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
4844
4637
|
|
|
@@ -4864,9 +4657,9 @@ function resolveAgentConversationLinkAction({
|
|
|
4864
4657
|
import {
|
|
4865
4658
|
Fragment as Fragment2,
|
|
4866
4659
|
useCallback as useCallback4,
|
|
4867
|
-
useEffect as
|
|
4660
|
+
useEffect as useEffect4,
|
|
4868
4661
|
useMemo,
|
|
4869
|
-
useState as
|
|
4662
|
+
useState as useState5
|
|
4870
4663
|
} from "react";
|
|
4871
4664
|
import { AlertTriangle, ChevronRight as ChevronRight3, Info } from "lucide-react";
|
|
4872
4665
|
import { CheckIcon, CopyIcon } from "@tutti-os/ui-system/icons";
|
|
@@ -5017,461 +4810,67 @@ function AgentPlanCard({
|
|
|
5017
4810
|
}
|
|
5018
4811
|
|
|
5019
4812
|
// shared/AgentRichTextReadonly.tsx
|
|
5020
|
-
import { useEffect
|
|
4813
|
+
import { useEffect } from "react";
|
|
5021
4814
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
5022
4815
|
|
|
5023
|
-
// agent-gui/agentGuiNode/agentRichText/
|
|
4816
|
+
// agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
|
|
5024
4817
|
import { mergeAttributes, Node } from "@tiptap/core";
|
|
5025
|
-
import { PluginKey } from "@tiptap/pm/state";
|
|
5026
|
-
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
5027
|
-
import Suggestion, { exitSuggestion } from "@tiptap/suggestion";
|
|
5028
|
-
import { buildWorkspaceIssueMentionHref as buildWorkspaceIssueMentionHref2 } from "@tutti-os/workspace-issue-manager/core";
|
|
5029
4818
|
|
|
5030
|
-
// agent-gui/agentGuiNode/
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
import { CloseIcon } from "@tutti-os/ui-system/icons";
|
|
5036
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
5037
|
-
function attrString(attrs, key) {
|
|
5038
|
-
const value = attrs[key];
|
|
5039
|
-
return typeof value === "string" ? value : "";
|
|
5040
|
-
}
|
|
5041
|
-
function normalizeKind(value) {
|
|
5042
|
-
if (value === "session" || value === "agent-session") {
|
|
5043
|
-
return "session";
|
|
5044
|
-
}
|
|
5045
|
-
if (value === "workspace-issue") {
|
|
5046
|
-
return "workspace-issue";
|
|
5047
|
-
}
|
|
5048
|
-
if (value === "workspace-app") {
|
|
5049
|
-
return "workspace-app";
|
|
5050
|
-
}
|
|
5051
|
-
if (value === "workspace-app-factory") {
|
|
5052
|
-
return "workspace-app-factory";
|
|
5053
|
-
}
|
|
5054
|
-
return "file";
|
|
5055
|
-
}
|
|
5056
|
-
function buildMentionHref(resource, attrs) {
|
|
5057
|
-
const workspaceId = attrString(attrs, "workspaceId").trim();
|
|
5058
|
-
const targetId = attrString(attrs, "targetId").trim();
|
|
5059
|
-
if (resource === "workspace-issue") {
|
|
5060
|
-
return buildWorkspaceIssueMentionHref({
|
|
5061
|
-
issueId: targetId,
|
|
5062
|
-
workspaceId
|
|
5063
|
-
});
|
|
4819
|
+
// agent-gui/agentGuiNode/model/agentSkillOptions.ts
|
|
4820
|
+
function skillTriggerForPrefix(skill, prefix) {
|
|
4821
|
+
const trigger = skill.trigger.trim();
|
|
4822
|
+
if (!trigger) {
|
|
4823
|
+
return "";
|
|
5064
4824
|
}
|
|
5065
|
-
if (
|
|
5066
|
-
|
|
5067
|
-
const params2 = new URLSearchParams({ workspaceId, appId });
|
|
5068
|
-
return `mention://${resource}?${params2.toString()}`;
|
|
4825
|
+
if (prefix === void 0 || trigger.startsWith(prefix)) {
|
|
4826
|
+
return trigger;
|
|
5069
4827
|
}
|
|
5070
|
-
if (
|
|
5071
|
-
|
|
5072
|
-
const params2 = new URLSearchParams();
|
|
5073
|
-
const action = attrString(attrs, "action").trim();
|
|
5074
|
-
const contextPath = attrString(attrs, "contextPath").trim();
|
|
5075
|
-
if (workspaceId) {
|
|
5076
|
-
params2.set("workspaceId", workspaceId);
|
|
5077
|
-
}
|
|
5078
|
-
if (jobId) {
|
|
5079
|
-
params2.set("jobId", jobId);
|
|
5080
|
-
}
|
|
5081
|
-
if (action) {
|
|
5082
|
-
params2.set("action", action);
|
|
5083
|
-
}
|
|
5084
|
-
if (contextPath) {
|
|
5085
|
-
params2.set("contextPath", contextPath);
|
|
5086
|
-
}
|
|
5087
|
-
const query = params2.toString();
|
|
5088
|
-
return query ? `mention://${resource}?${query}` : `mention://${resource}`;
|
|
4828
|
+
if (trigger.startsWith("$") || trigger.startsWith("/")) {
|
|
4829
|
+
return `${prefix}${trigger.slice(1)}`;
|
|
5089
4830
|
}
|
|
5090
|
-
|
|
5091
|
-
return `mention://${resource}?${params.toString()}`;
|
|
5092
|
-
}
|
|
5093
|
-
function normalizeSessionTitle(value) {
|
|
5094
|
-
const trimmed = value.trim();
|
|
5095
|
-
const withoutMentionPrefix = trimmed.replace(/^@+/, "").trim();
|
|
5096
|
-
return withoutMentionPrefix || trimmed;
|
|
5097
|
-
}
|
|
5098
|
-
function parseDottedSessionText(value) {
|
|
5099
|
-
const parts = value.split("\xB7").map((part) => part.trim()).filter(Boolean);
|
|
5100
|
-
if (parts.length < 3) {
|
|
5101
|
-
return null;
|
|
5102
|
-
}
|
|
5103
|
-
return {
|
|
5104
|
-
participant: `${parts[0]} & ${parts[1]}`,
|
|
5105
|
-
summary: normalizeSessionTitle(parts.slice(2).join(" "))
|
|
5106
|
-
};
|
|
5107
|
-
}
|
|
5108
|
-
function sessionPresentation(attrs) {
|
|
5109
|
-
const name = attrString(attrs, "name").trim();
|
|
5110
|
-
const initiatorName = attrString(attrs, "initiatorName").trim();
|
|
5111
|
-
const agentName = attrString(attrs, "agentName").trim();
|
|
5112
|
-
const title = normalizeSessionTitle(attrString(attrs, "title") || name);
|
|
5113
|
-
const inputPreview = attrString(attrs, "inputPreview").trim();
|
|
5114
|
-
if (initiatorName && agentName) {
|
|
5115
|
-
const dottedTitle = parseDottedSessionText(title);
|
|
5116
|
-
return {
|
|
5117
|
-
// i18n-check-ignore: Dynamic participant display names.
|
|
5118
|
-
label: `${initiatorName} & ${agentName}`,
|
|
5119
|
-
summary: dottedTitle?.summary || (title && title !== name ? title : inputPreview)
|
|
5120
|
-
};
|
|
5121
|
-
}
|
|
5122
|
-
const dottedName = parseDottedSessionText(name);
|
|
5123
|
-
if (dottedName) {
|
|
5124
|
-
return {
|
|
5125
|
-
label: dottedName.participant,
|
|
5126
|
-
summary: dottedName.summary
|
|
5127
|
-
};
|
|
5128
|
-
}
|
|
5129
|
-
return {
|
|
5130
|
-
label: name,
|
|
5131
|
-
summary: title && title !== name ? title : inputPreview
|
|
5132
|
-
};
|
|
4831
|
+
return `${prefix}${trigger}`;
|
|
5133
4832
|
}
|
|
5134
|
-
function
|
|
5135
|
-
|
|
5136
|
-
if (parts.length <= 1) {
|
|
5137
|
-
return path.startsWith("/") ? "/" : "";
|
|
5138
|
-
}
|
|
5139
|
-
return `/${parts.slice(0, -1).join("/")}`;
|
|
4833
|
+
function labelForProviderSkill(skill, prefix) {
|
|
4834
|
+
return stripSkillTriggerPrefix(skillTriggerForPrefix(skill, prefix));
|
|
5140
4835
|
}
|
|
5141
|
-
function
|
|
5142
|
-
const
|
|
5143
|
-
|
|
5144
|
-
const
|
|
5145
|
-
|
|
5146
|
-
const
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
href: href || buildMentionHref("agent-session", attrs),
|
|
5153
|
-
kind,
|
|
5154
|
-
label: presentation.label,
|
|
5155
|
-
summary: presentation.summary
|
|
5156
|
-
};
|
|
5157
|
-
}
|
|
5158
|
-
if (kind === "workspace-issue") {
|
|
5159
|
-
return {
|
|
5160
|
-
ariaLabel: `${t("agentHost.agentGui.mentionKindIssue")} ${name}`.trim(),
|
|
5161
|
-
directoryPath: "",
|
|
5162
|
-
entryKind: "",
|
|
5163
|
-
href: href || buildMentionHref("workspace-issue", attrs),
|
|
5164
|
-
kind,
|
|
5165
|
-
label: name
|
|
5166
|
-
};
|
|
5167
|
-
}
|
|
5168
|
-
if (kind === "workspace-app") {
|
|
5169
|
-
return {
|
|
5170
|
-
ariaLabel: `${t("agentHost.agentGui.mentionKindApp")} ${name}`.trim(),
|
|
5171
|
-
directoryPath: "",
|
|
5172
|
-
entryKind: "",
|
|
5173
|
-
href: href || buildMentionHref("workspace-app", attrs),
|
|
5174
|
-
iconUrl: attrString(attrs, "iconUrl").trim() || void 0,
|
|
5175
|
-
kind,
|
|
5176
|
-
label: name
|
|
5177
|
-
};
|
|
5178
|
-
}
|
|
5179
|
-
if (kind === "workspace-app-factory") {
|
|
5180
|
-
return {
|
|
5181
|
-
ariaLabel: `${t("agentHost.agentGui.mentionKindAppFactory")} ${name}`.trim(),
|
|
5182
|
-
directoryPath: "",
|
|
5183
|
-
entryKind: "",
|
|
5184
|
-
href: href || buildMentionHref("workspace-app-factory", attrs),
|
|
5185
|
-
kind,
|
|
5186
|
-
label: name
|
|
5187
|
-
};
|
|
4836
|
+
function promptForProviderSkills(input) {
|
|
4837
|
+
const nativePrefix = input.provider.trim() === "codex" ? "$" : "/";
|
|
4838
|
+
let prompt = input.prompt;
|
|
4839
|
+
for (const skill of input.skills) {
|
|
4840
|
+
const nativeTrigger = skillTriggerForPrefix(skill, nativePrefix);
|
|
4841
|
+
const aliasPrefix = nativePrefix === "$" ? "/" : "$";
|
|
4842
|
+
const aliasTrigger = skillTriggerForPrefix(skill, aliasPrefix);
|
|
4843
|
+
if (!nativeTrigger || !aliasTrigger || nativeTrigger === aliasTrigger) {
|
|
4844
|
+
continue;
|
|
4845
|
+
}
|
|
4846
|
+
prompt = replaceSkillTriggerToken(prompt, aliasTrigger, nativeTrigger);
|
|
5188
4847
|
}
|
|
5189
|
-
|
|
5190
|
-
const entryKind = attrString(attrs, "entryKind") || "unknown";
|
|
5191
|
-
return {
|
|
5192
|
-
ariaLabel: name,
|
|
5193
|
-
directoryPath: attrString(attrs, "directoryPath") || dirnameFromPath(path),
|
|
5194
|
-
entryKind,
|
|
5195
|
-
href: href || path,
|
|
5196
|
-
kind,
|
|
5197
|
-
label: name,
|
|
5198
|
-
thumbnailUrl: resolveAgentMentionFileThumbnailUrl({
|
|
5199
|
-
entryKind,
|
|
5200
|
-
href: href || path,
|
|
5201
|
-
name,
|
|
5202
|
-
path,
|
|
5203
|
-
thumbnailUrl: attrString(attrs, "thumbnailUrl")
|
|
5204
|
-
})
|
|
5205
|
-
};
|
|
4848
|
+
return prompt;
|
|
5206
4849
|
}
|
|
5207
|
-
function
|
|
5208
|
-
|
|
4850
|
+
function skillDescriptionForDisplay(description) {
|
|
4851
|
+
const line = description?.split(/\r?\n/).map((part) => part.trim()).find((part) => part !== "");
|
|
4852
|
+
return line || void 0;
|
|
5209
4853
|
}
|
|
5210
|
-
function
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
return false;
|
|
5215
|
-
}
|
|
5216
|
-
if (node.type.name === "agentFileMention") {
|
|
5217
|
-
hasContent = true;
|
|
5218
|
-
return false;
|
|
5219
|
-
}
|
|
5220
|
-
if (node.isText && node.textContent.trim().length > 0) {
|
|
5221
|
-
hasContent = true;
|
|
5222
|
-
return false;
|
|
5223
|
-
}
|
|
5224
|
-
return true;
|
|
5225
|
-
});
|
|
5226
|
-
return hasContent;
|
|
5227
|
-
}
|
|
5228
|
-
function AgentMentionLegacyFileNodeView({
|
|
5229
|
-
deleteNode,
|
|
5230
|
-
editor,
|
|
5231
|
-
extension,
|
|
5232
|
-
node,
|
|
5233
|
-
selected
|
|
5234
|
-
}) {
|
|
5235
|
-
const mention = mentionViewModel(node.attrs ?? {}, () => "");
|
|
5236
|
-
const [isEditable, setIsEditable] = useState2(editor.isEditable);
|
|
5237
|
-
const extensionOptions = extension.options;
|
|
5238
|
-
const removeActionAriaLabel = typeof extensionOptions.removeActionAriaLabel === "string" ? extensionOptions.removeActionAriaLabel : void 0;
|
|
5239
|
-
useEffect(() => {
|
|
5240
|
-
const syncEditable = () => {
|
|
5241
|
-
setIsEditable(editor.isEditable);
|
|
5242
|
-
};
|
|
5243
|
-
syncEditable();
|
|
5244
|
-
editor.on("transaction", syncEditable);
|
|
5245
|
-
editor.on("update", syncEditable);
|
|
5246
|
-
return () => {
|
|
5247
|
-
editor.off("transaction", syncEditable);
|
|
5248
|
-
editor.off("update", syncEditable);
|
|
5249
|
-
};
|
|
5250
|
-
}, [editor]);
|
|
5251
|
-
const handleRemove = (event) => {
|
|
5252
|
-
event.preventDefault();
|
|
5253
|
-
event.stopPropagation();
|
|
5254
|
-
if (!editor.isEditable) {
|
|
5255
|
-
return;
|
|
5256
|
-
}
|
|
5257
|
-
deleteNode();
|
|
5258
|
-
if (!hasPromptContentAfterMentionRemoval(editor.state.doc)) {
|
|
5259
|
-
editor.commands.clearContent();
|
|
5260
|
-
}
|
|
5261
|
-
};
|
|
5262
|
-
return /* @__PURE__ */ jsxs3(
|
|
5263
|
-
NodeViewWrapper,
|
|
5264
|
-
{
|
|
5265
|
-
as: "span",
|
|
5266
|
-
"aria-label": mention.ariaLabel,
|
|
5267
|
-
className: `group tsh-agent-object-token tsh-agent-object-token--file ${selected ? "is-selected" : ""}`,
|
|
5268
|
-
contentEditable: false,
|
|
5269
|
-
"data-agent-file-directory-path": mention.directoryPath,
|
|
5270
|
-
"data-agent-file-entry-kind": mention.entryKind,
|
|
5271
|
-
"data-agent-file-mention": "true",
|
|
5272
|
-
...mention.thumbnailUrl ? {} : {
|
|
5273
|
-
"data-agent-file-visual-kind": fileVisualKind(
|
|
5274
|
-
mention.entryKind,
|
|
5275
|
-
mention.href || mention.label
|
|
5276
|
-
)
|
|
5277
|
-
},
|
|
5278
|
-
"data-agent-mention-href": mention.href,
|
|
5279
|
-
"data-agent-mention-kind": mention.kind,
|
|
5280
|
-
...mention.thumbnailUrl ? { "data-agent-mention-thumbnail-url": mention.thumbnailUrl } : {},
|
|
5281
|
-
children: [
|
|
5282
|
-
mention.thumbnailUrl ? /* @__PURE__ */ jsxs3(
|
|
5283
|
-
"span",
|
|
5284
|
-
{
|
|
5285
|
-
className: "agent-gui-node__mention-file-thumb relative",
|
|
5286
|
-
"data-agent-mention-file-thumb": "true",
|
|
5287
|
-
"aria-hidden": isEditable ? void 0 : true,
|
|
5288
|
-
children: [
|
|
5289
|
-
/* @__PURE__ */ jsx4(
|
|
5290
|
-
"img",
|
|
5291
|
-
{
|
|
5292
|
-
src: mention.thumbnailUrl,
|
|
5293
|
-
alt: "",
|
|
5294
|
-
className: `h-full w-full object-cover transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
|
|
5295
|
-
decoding: "async",
|
|
5296
|
-
loading: "lazy",
|
|
5297
|
-
draggable: false
|
|
5298
|
-
}
|
|
5299
|
-
),
|
|
5300
|
-
isEditable ? /* @__PURE__ */ jsx4(
|
|
5301
|
-
"button",
|
|
5302
|
-
{
|
|
5303
|
-
"aria-label": removeActionAriaLabel,
|
|
5304
|
-
className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
|
|
5305
|
-
type: "button",
|
|
5306
|
-
onMouseDown: handleRemove,
|
|
5307
|
-
children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
|
|
5308
|
-
}
|
|
5309
|
-
) : null
|
|
5310
|
-
]
|
|
5311
|
-
}
|
|
5312
|
-
) : /* @__PURE__ */ jsxs3(
|
|
5313
|
-
"span",
|
|
5314
|
-
{
|
|
5315
|
-
className: "relative grid size-4 shrink-0 place-items-center",
|
|
5316
|
-
"aria-hidden": isEditable ? void 0 : true,
|
|
5317
|
-
children: [
|
|
5318
|
-
/* @__PURE__ */ jsx4(
|
|
5319
|
-
"span",
|
|
5320
|
-
{
|
|
5321
|
-
className: `tsh-agent-object-token__icon transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
|
|
5322
|
-
"aria-hidden": "true"
|
|
5323
|
-
}
|
|
5324
|
-
),
|
|
5325
|
-
isEditable ? /* @__PURE__ */ jsx4(
|
|
5326
|
-
"button",
|
|
5327
|
-
{
|
|
5328
|
-
"aria-label": removeActionAriaLabel,
|
|
5329
|
-
className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
|
|
5330
|
-
type: "button",
|
|
5331
|
-
onMouseDown: handleRemove,
|
|
5332
|
-
children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
|
|
5333
|
-
}
|
|
5334
|
-
) : null
|
|
5335
|
-
]
|
|
5336
|
-
}
|
|
5337
|
-
),
|
|
5338
|
-
/* @__PURE__ */ jsx4("span", { className: "tsh-agent-object-token__main", children: mention.label })
|
|
5339
|
-
]
|
|
5340
|
-
}
|
|
4854
|
+
function replaceSkillTriggerToken(prompt, from, to) {
|
|
4855
|
+
return prompt.replace(
|
|
4856
|
+
new RegExp(`(^|\\s)${escapeRegExp(from)}(?=$|\\s)`, "g"),
|
|
4857
|
+
(_match, separator) => `${separator}${to}`
|
|
5341
4858
|
);
|
|
5342
4859
|
}
|
|
5343
|
-
function
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
const removeActionAriaLabel = typeof extensionOptions.removeActionAriaLabel === "string" ? extensionOptions.removeActionAriaLabel : void 0;
|
|
5350
|
-
useEffect(() => {
|
|
5351
|
-
const syncEditable = () => {
|
|
5352
|
-
setIsEditable(editor.isEditable);
|
|
5353
|
-
};
|
|
5354
|
-
syncEditable();
|
|
5355
|
-
editor.on("transaction", syncEditable);
|
|
5356
|
-
editor.on("update", syncEditable);
|
|
5357
|
-
return () => {
|
|
5358
|
-
editor.off("transaction", syncEditable);
|
|
5359
|
-
editor.off("update", syncEditable);
|
|
5360
|
-
};
|
|
5361
|
-
}, [editor]);
|
|
5362
|
-
const handleRemove = (event) => {
|
|
5363
|
-
event.preventDefault();
|
|
5364
|
-
event.stopPropagation();
|
|
5365
|
-
if (!editor.isEditable) {
|
|
5366
|
-
return;
|
|
5367
|
-
}
|
|
5368
|
-
deleteNode();
|
|
5369
|
-
if (!hasPromptContentAfterMentionRemoval(editor.state.doc)) {
|
|
5370
|
-
editor.commands.clearContent();
|
|
5371
|
-
}
|
|
5372
|
-
};
|
|
5373
|
-
if (mention.kind === "file") {
|
|
5374
|
-
return /* @__PURE__ */ jsx4(AgentMentionLegacyFileNodeView, { ...props });
|
|
5375
|
-
}
|
|
5376
|
-
if (mention.kind === "workspace-app") {
|
|
5377
|
-
return /* @__PURE__ */ jsx4(
|
|
5378
|
-
NodeViewWrapper,
|
|
5379
|
-
{
|
|
5380
|
-
as: "span",
|
|
5381
|
-
"aria-label": mention.ariaLabel,
|
|
5382
|
-
className: `inline-flex max-w-full align-baseline ${selected ? "is-selected" : ""}`,
|
|
5383
|
-
contentEditable: false,
|
|
5384
|
-
"data-agent-file-mention": "true",
|
|
5385
|
-
"data-agent-mention-href": mention.href,
|
|
5386
|
-
"data-agent-mention-icon-url": mention.iconUrl,
|
|
5387
|
-
"data-agent-mention-kind": mention.kind,
|
|
5388
|
-
children: /* @__PURE__ */ jsxs3(
|
|
5389
|
-
"span",
|
|
5390
|
-
{
|
|
5391
|
-
className: "group relative top-[3px] inline-flex max-w-full cursor-default items-center gap-1 overflow-hidden rounded-[4px] border border-transparent bg-transparent px-1 py-0.5 align-baseline text-[13px] font-medium leading-5 text-[var(--accent)] no-underline transition-colors hover:border-transparent hover:bg-[color-mix(in_srgb,currentColor_12%,transparent)]",
|
|
5392
|
-
"data-agent-mention-kind": mention.kind,
|
|
5393
|
-
"data-slot": "mention-pill",
|
|
5394
|
-
children: [
|
|
5395
|
-
/* @__PURE__ */ jsxs3(
|
|
5396
|
-
"span",
|
|
5397
|
-
{
|
|
5398
|
-
"aria-hidden": isEditable ? void 0 : true,
|
|
5399
|
-
className: "relative grid size-4 shrink-0 place-items-center overflow-hidden rounded-[4px] bg-block",
|
|
5400
|
-
"data-agent-mention-app-icon": "true",
|
|
5401
|
-
"data-workspace-app-icon": "true",
|
|
5402
|
-
children: [
|
|
5403
|
-
mention.iconUrl ? /* @__PURE__ */ jsx4(
|
|
5404
|
-
"img",
|
|
5405
|
-
{
|
|
5406
|
-
src: mention.iconUrl,
|
|
5407
|
-
alt: "",
|
|
5408
|
-
className: `size-full object-cover transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
|
|
5409
|
-
decoding: "async",
|
|
5410
|
-
loading: "lazy",
|
|
5411
|
-
draggable: false
|
|
5412
|
-
}
|
|
5413
|
-
) : /* @__PURE__ */ jsx4(
|
|
5414
|
-
"span",
|
|
5415
|
-
{
|
|
5416
|
-
className: `tsh-agent-object-token__kind-icon size-4 transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`
|
|
5417
|
-
}
|
|
5418
|
-
),
|
|
5419
|
-
isEditable ? /* @__PURE__ */ jsx4(
|
|
5420
|
-
"button",
|
|
5421
|
-
{
|
|
5422
|
-
"aria-label": removeActionAriaLabel,
|
|
5423
|
-
className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
|
|
5424
|
-
type: "button",
|
|
5425
|
-
onMouseDown: handleRemove,
|
|
5426
|
-
children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
|
|
5427
|
-
}
|
|
5428
|
-
) : null
|
|
5429
|
-
]
|
|
5430
|
-
}
|
|
5431
|
-
),
|
|
5432
|
-
/* @__PURE__ */ jsx4("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: mention.label })
|
|
5433
|
-
]
|
|
5434
|
-
}
|
|
5435
|
-
)
|
|
5436
|
-
}
|
|
5437
|
-
);
|
|
4860
|
+
function escapeRegExp(value) {
|
|
4861
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4862
|
+
}
|
|
4863
|
+
function stripSkillTriggerPrefix(trigger) {
|
|
4864
|
+
if (trigger.startsWith("$") || trigger.startsWith("/")) {
|
|
4865
|
+
return trigger.slice(1);
|
|
5438
4866
|
}
|
|
5439
|
-
return
|
|
5440
|
-
NodeViewWrapper,
|
|
5441
|
-
{
|
|
5442
|
-
as: "span",
|
|
5443
|
-
className: `inline-flex max-w-full align-baseline ${selected ? "is-selected" : ""}`,
|
|
5444
|
-
contentEditable: false,
|
|
5445
|
-
children: /* @__PURE__ */ jsx4(
|
|
5446
|
-
MentionPill,
|
|
5447
|
-
{
|
|
5448
|
-
"aria-label": mention.ariaLabel,
|
|
5449
|
-
"data-agent-mention-href": mention.href,
|
|
5450
|
-
"data-agent-mention-kind": mention.kind,
|
|
5451
|
-
kind: mention.kind === "session" ? "session" : "issue",
|
|
5452
|
-
label: mention.label,
|
|
5453
|
-
removable: isEditable,
|
|
5454
|
-
removeButtonProps: isEditable ? {
|
|
5455
|
-
"aria-label": removeActionAriaLabel,
|
|
5456
|
-
onMouseDown: handleRemove
|
|
5457
|
-
} : void 0,
|
|
5458
|
-
summary: mention.summary
|
|
5459
|
-
}
|
|
5460
|
-
)
|
|
5461
|
-
}
|
|
5462
|
-
);
|
|
4867
|
+
return trigger;
|
|
5463
4868
|
}
|
|
5464
4869
|
|
|
5465
|
-
// agent-gui/agentGuiNode/agentRichText/
|
|
5466
|
-
|
|
5467
|
-
"agentFileMentionSuggestion"
|
|
5468
|
-
);
|
|
5469
|
-
function exitAgentFileMentionSuggestion(editor) {
|
|
5470
|
-
exitSuggestion(editor.view, agentFileMentionPluginKey);
|
|
5471
|
-
}
|
|
5472
|
-
function createAgentFileMentionExtension(options = {}) {
|
|
4870
|
+
// agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
|
|
4871
|
+
function createAgentSkillTokenExtension(options = {}) {
|
|
5473
4872
|
return Node.create({
|
|
5474
|
-
name: "
|
|
4873
|
+
name: "agentSkillToken",
|
|
5475
4874
|
group: "inline",
|
|
5476
4875
|
inline: true,
|
|
5477
4876
|
atom: true,
|
|
@@ -5481,804 +4880,103 @@ function createAgentFileMentionExtension(options = {}) {
|
|
|
5481
4880
|
},
|
|
5482
4881
|
addAttributes() {
|
|
5483
4882
|
return {
|
|
4883
|
+
label: { default: "" },
|
|
5484
4884
|
name: { default: "" },
|
|
5485
|
-
|
|
5486
|
-
href: { default: "" },
|
|
5487
|
-
path: { default: "" },
|
|
5488
|
-
entryKind: { default: "unknown" },
|
|
5489
|
-
directoryPath: { default: "" },
|
|
5490
|
-
workspaceId: { default: "" },
|
|
5491
|
-
targetId: { default: "" },
|
|
5492
|
-
scope: { default: "" },
|
|
5493
|
-
title: { default: "" },
|
|
5494
|
-
initiatorName: { default: "" },
|
|
5495
|
-
agentName: { default: "" },
|
|
5496
|
-
status: { default: "" },
|
|
5497
|
-
inputPreview: { default: "" },
|
|
5498
|
-
summaryPreview: { default: "" },
|
|
5499
|
-
creatorName: { default: "" },
|
|
5500
|
-
appId: { default: "" },
|
|
5501
|
-
jobId: { default: "" },
|
|
5502
|
-
action: { default: "" },
|
|
5503
|
-
contextPath: { default: "" },
|
|
5504
|
-
description: { default: "" },
|
|
5505
|
-
iconUrl: { default: "" },
|
|
5506
|
-
contentPreview: { default: "" },
|
|
5507
|
-
thumbnailUrl: { default: "" }
|
|
4885
|
+
trigger: { default: "" }
|
|
5508
4886
|
};
|
|
5509
4887
|
},
|
|
5510
4888
|
parseHTML() {
|
|
5511
|
-
return [
|
|
5512
|
-
{
|
|
5513
|
-
tag: "span[data-agent-file-mention]",
|
|
5514
|
-
getAttrs: parseAgentMentionHTMLElementAttrs
|
|
5515
|
-
},
|
|
5516
|
-
{
|
|
5517
|
-
tag: "a[data-agent-file-mention]",
|
|
5518
|
-
getAttrs: parseAgentMentionHTMLElementAttrs
|
|
5519
|
-
}
|
|
5520
|
-
];
|
|
4889
|
+
return [{ tag: "span[data-agent-skill-token]" }];
|
|
5521
4890
|
},
|
|
5522
4891
|
renderHTML({ HTMLAttributes }) {
|
|
5523
|
-
const
|
|
5524
|
-
const fileThumbnailUrl = item.kind === "file" ? resolveAgentMentionFileThumbnailUrl(item) : void 0;
|
|
5525
|
-
const href = item.href;
|
|
5526
|
-
const tagName = options.renderAsLink ? "a" : "span";
|
|
5527
|
-
const visual = mentionVisual(item);
|
|
5528
|
-
const sessionVisual = item.kind === "session" ? sessionMentionVisual(item) : null;
|
|
5529
|
-
const sharedAttributes = {
|
|
5530
|
-
"data-agent-file-mention": "true",
|
|
5531
|
-
"data-agent-mention-href": href,
|
|
5532
|
-
"data-agent-mention-kind": item.kind,
|
|
5533
|
-
"aria-label": item.kind === "file" ? visual.primary : `${visual.kindLabel} ${visual.primary}`.trim()
|
|
5534
|
-
};
|
|
4892
|
+
const attrs = attrsToSkillTokenAttrs(HTMLAttributes);
|
|
5535
4893
|
return [
|
|
5536
|
-
|
|
4894
|
+
"span",
|
|
5537
4895
|
mergeAttributes(HTMLAttributes, {
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
...options.renderAsLink ? { href } : {},
|
|
5545
|
-
...item.kind === "workspace-app" && item.iconUrl ? { "data-agent-mention-icon-url": item.iconUrl } : {},
|
|
5546
|
-
...fileThumbnailUrl ? { "data-agent-mention-thumbnail-url": fileThumbnailUrl } : {},
|
|
5547
|
-
class: item.kind === "file" ? "tsh-agent-object-token tsh-agent-object-token--file" : "tsh-agent-object-token tsh-agent-object-token--entity"
|
|
4896
|
+
"aria-label": attrs.label,
|
|
4897
|
+
contenteditable: "false",
|
|
4898
|
+
"data-agent-skill-token": "true",
|
|
4899
|
+
"data-agent-skill-trigger": attrs.trigger,
|
|
4900
|
+
"data-agent-mention-kind": "skill",
|
|
4901
|
+
class: "tsh-agent-object-token tsh-agent-object-token--entity"
|
|
5548
4902
|
}),
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
"aria-hidden": "true"
|
|
5556
|
-
},
|
|
5557
|
-
[
|
|
5558
|
-
"img",
|
|
5559
|
-
{
|
|
5560
|
-
src: fileThumbnailUrl,
|
|
5561
|
-
alt: "",
|
|
5562
|
-
decoding: "async",
|
|
5563
|
-
loading: "lazy",
|
|
5564
|
-
draggable: "false"
|
|
5565
|
-
}
|
|
5566
|
-
]
|
|
5567
|
-
] : [
|
|
5568
|
-
"span",
|
|
5569
|
-
{
|
|
5570
|
-
class: "tsh-agent-object-token__icon",
|
|
5571
|
-
"aria-hidden": "true"
|
|
5572
|
-
},
|
|
5573
|
-
""
|
|
5574
|
-
],
|
|
5575
|
-
[
|
|
5576
|
-
"span",
|
|
5577
|
-
{ class: "tsh-agent-object-token__main" },
|
|
5578
|
-
visual.primary
|
|
5579
|
-
]
|
|
5580
|
-
] : item.kind === "session" ? [
|
|
5581
|
-
[
|
|
5582
|
-
"span",
|
|
5583
|
-
{
|
|
5584
|
-
class: "tsh-agent-object-token__kind",
|
|
5585
|
-
"aria-hidden": "true"
|
|
5586
|
-
},
|
|
5587
|
-
[
|
|
5588
|
-
"span",
|
|
5589
|
-
{
|
|
5590
|
-
class: "tsh-agent-object-token__kind-icon",
|
|
5591
|
-
"aria-hidden": "true"
|
|
5592
|
-
},
|
|
5593
|
-
""
|
|
5594
|
-
]
|
|
5595
|
-
],
|
|
5596
|
-
[
|
|
5597
|
-
"span",
|
|
5598
|
-
{ class: "tsh-agent-object-token__main" },
|
|
5599
|
-
[
|
|
5600
|
-
"span",
|
|
5601
|
-
{ class: "tsh-agent-object-token__participant" },
|
|
5602
|
-
sessionVisual?.participant ?? ""
|
|
5603
|
-
],
|
|
5604
|
-
[
|
|
5605
|
-
"span",
|
|
5606
|
-
{ class: "tsh-agent-object-token__summary" },
|
|
5607
|
-
sessionVisual?.summary ? ` ${sessionVisual.summary}` : ""
|
|
5608
|
-
]
|
|
5609
|
-
]
|
|
5610
|
-
] : [
|
|
4903
|
+
[
|
|
4904
|
+
"span",
|
|
4905
|
+
{
|
|
4906
|
+
class: "tsh-agent-object-token__kind",
|
|
4907
|
+
"aria-hidden": "true"
|
|
4908
|
+
},
|
|
5611
4909
|
[
|
|
5612
4910
|
"span",
|
|
5613
4911
|
{
|
|
5614
|
-
class: "tsh-agent-object-token__kind",
|
|
4912
|
+
class: "tsh-agent-object-token__kind-icon",
|
|
5615
4913
|
"aria-hidden": "true"
|
|
5616
4914
|
},
|
|
5617
|
-
|
|
5618
|
-
"span",
|
|
5619
|
-
{
|
|
5620
|
-
class: "tsh-agent-object-token__kind-icon",
|
|
5621
|
-
"aria-hidden": "true"
|
|
5622
|
-
},
|
|
5623
|
-
""
|
|
5624
|
-
]
|
|
5625
|
-
],
|
|
5626
|
-
[
|
|
5627
|
-
"span",
|
|
5628
|
-
{ class: "tsh-agent-object-token__main" },
|
|
5629
|
-
visual.primary
|
|
4915
|
+
""
|
|
5630
4916
|
]
|
|
5631
|
-
]
|
|
4917
|
+
],
|
|
4918
|
+
["span", { class: "tsh-agent-object-token__main" }, attrs.label]
|
|
5632
4919
|
];
|
|
5633
4920
|
},
|
|
5634
4921
|
renderText({ node }) {
|
|
5635
|
-
return
|
|
5636
|
-
},
|
|
5637
|
-
addNodeView() {
|
|
5638
|
-
return ReactNodeViewRenderer(AgentMentionNodeView);
|
|
5639
|
-
},
|
|
5640
|
-
addProseMirrorPlugins() {
|
|
5641
|
-
if (options.enableSuggestions === false) {
|
|
5642
|
-
return [];
|
|
5643
|
-
}
|
|
5644
|
-
return [
|
|
5645
|
-
Suggestion({
|
|
5646
|
-
editor: this.editor,
|
|
5647
|
-
pluginKey: agentFileMentionPluginKey,
|
|
5648
|
-
char: "@",
|
|
5649
|
-
allowedPrefixes: [" ", "\n", " "],
|
|
5650
|
-
allowSpaces: true,
|
|
5651
|
-
items: () => [],
|
|
5652
|
-
allow: ({ state, range }) => {
|
|
5653
|
-
if (range.from <= 1) {
|
|
5654
|
-
return true;
|
|
5655
|
-
}
|
|
5656
|
-
const previous = state.doc.textBetween(
|
|
5657
|
-
range.from - 1,
|
|
5658
|
-
range.from,
|
|
5659
|
-
"\n",
|
|
5660
|
-
"\n"
|
|
5661
|
-
);
|
|
5662
|
-
return previous === " " || previous === "\n" || previous === " ";
|
|
5663
|
-
},
|
|
5664
|
-
command: ({ editor, range, props }) => {
|
|
5665
|
-
editor.chain().focus().insertContentAt(range, [
|
|
5666
|
-
{
|
|
5667
|
-
type: this.name,
|
|
5668
|
-
attrs: mentionItemToAttrs(props)
|
|
5669
|
-
},
|
|
5670
|
-
{ type: "text", text: " " }
|
|
5671
|
-
]).run();
|
|
5672
|
-
},
|
|
5673
|
-
render: () => ({
|
|
5674
|
-
onStart: (props) => {
|
|
5675
|
-
options.onSuggestionChange?.({
|
|
5676
|
-
editor: props.editor,
|
|
5677
|
-
range: props.range,
|
|
5678
|
-
query: props.query,
|
|
5679
|
-
text: props.text,
|
|
5680
|
-
command: props.command,
|
|
5681
|
-
clientRect: props.clientRect
|
|
5682
|
-
});
|
|
5683
|
-
},
|
|
5684
|
-
onUpdate: (props) => {
|
|
5685
|
-
options.onSuggestionChange?.({
|
|
5686
|
-
editor: props.editor,
|
|
5687
|
-
range: props.range,
|
|
5688
|
-
query: props.query,
|
|
5689
|
-
text: props.text,
|
|
5690
|
-
command: props.command,
|
|
5691
|
-
clientRect: props.clientRect
|
|
5692
|
-
});
|
|
5693
|
-
},
|
|
5694
|
-
onExit: () => {
|
|
5695
|
-
options.onSuggestionChange?.(null);
|
|
5696
|
-
},
|
|
5697
|
-
onKeyDown: (props) => options.onSuggestionKeyDown?.(props.event) ?? false
|
|
5698
|
-
})
|
|
5699
|
-
})
|
|
5700
|
-
];
|
|
4922
|
+
return attrsToSkillTokenAttrs(node.attrs ?? {}).trigger;
|
|
5701
4923
|
}
|
|
5702
4924
|
});
|
|
5703
4925
|
}
|
|
5704
|
-
function
|
|
5705
|
-
|
|
5706
|
-
const normalizedProvider = provider?.trim() ?? "";
|
|
5707
|
-
if (normalizedProvider) {
|
|
5708
|
-
params.set("provider", normalizedProvider);
|
|
5709
|
-
}
|
|
5710
|
-
return `mention://agent-session?${params.toString()}`;
|
|
5711
|
-
}
|
|
5712
|
-
function buildAgentWorkspaceIssueMentionHref(workspaceId, issueId, input) {
|
|
5713
|
-
return buildWorkspaceIssueMentionHref2({
|
|
5714
|
-
issueId,
|
|
5715
|
-
mode: input?.mode,
|
|
5716
|
-
outputDir: input?.outputDir,
|
|
5717
|
-
runId: input?.runId,
|
|
5718
|
-
taskId: input?.taskId,
|
|
5719
|
-
topicId: input?.topicId,
|
|
5720
|
-
workspaceId
|
|
5721
|
-
});
|
|
5722
|
-
}
|
|
5723
|
-
function buildAgentWorkspaceAppMentionHref(workspaceId, appId) {
|
|
5724
|
-
const params = new URLSearchParams({
|
|
5725
|
-
workspaceId: workspaceId.trim(),
|
|
5726
|
-
appId: appId.trim()
|
|
5727
|
-
});
|
|
5728
|
-
return `mention://workspace-app?${params.toString()}`;
|
|
5729
|
-
}
|
|
5730
|
-
function buildAgentWorkspaceAppFactoryMentionHref(workspaceId, jobId, input) {
|
|
5731
|
-
const params = new URLSearchParams();
|
|
5732
|
-
const trimmedWorkspaceId = workspaceId?.trim() ?? "";
|
|
5733
|
-
const trimmedJobId = jobId?.trim() ?? "";
|
|
5734
|
-
const action = input?.action?.trim() ?? "";
|
|
5735
|
-
const contextPath = input?.contextPath?.trim() ?? "";
|
|
5736
|
-
if (trimmedWorkspaceId) {
|
|
5737
|
-
params.set("workspaceId", trimmedWorkspaceId);
|
|
5738
|
-
}
|
|
5739
|
-
if (trimmedJobId) {
|
|
5740
|
-
params.set("jobId", trimmedJobId);
|
|
5741
|
-
}
|
|
5742
|
-
if (action) {
|
|
5743
|
-
params.set("action", action);
|
|
5744
|
-
}
|
|
5745
|
-
if (contextPath) {
|
|
5746
|
-
params.set("contextPath", contextPath);
|
|
5747
|
-
}
|
|
5748
|
-
const query = params.toString();
|
|
5749
|
-
return query ? `mention://workspace-app-factory?${query}` : "mention://workspace-app-factory";
|
|
5750
|
-
}
|
|
5751
|
-
function normalizeAgentSessionMentionTitle(value) {
|
|
5752
|
-
const trimmed = value.trim();
|
|
5753
|
-
const withoutMentionPrefix = trimmed.replace(/^@+/, "").trim();
|
|
5754
|
-
return withoutMentionPrefix || trimmed;
|
|
5755
|
-
}
|
|
5756
|
-
function formatAgentMentionMarkdown(item) {
|
|
5757
|
-
const labelPrefix = "@";
|
|
5758
|
-
return `[${labelPrefix}${escapeMarkdownLinkLabel(item.name)}](${escapeMarkdownLinkTarget(item.href)})`;
|
|
5759
|
-
}
|
|
5760
|
-
function parseAgentMentionMarkdown(value, start = 0) {
|
|
5761
|
-
if (!value.startsWith("[", start)) {
|
|
5762
|
-
return null;
|
|
5763
|
-
}
|
|
5764
|
-
let index = start + 1;
|
|
5765
|
-
const prefixedMention = value[index] === "@";
|
|
5766
|
-
if (prefixedMention) {
|
|
5767
|
-
index += 1;
|
|
5768
|
-
}
|
|
5769
|
-
let name = "";
|
|
5770
|
-
while (index < value.length) {
|
|
5771
|
-
const current = value[index];
|
|
5772
|
-
if (current === "\\") {
|
|
5773
|
-
const escaped = value[index + 1];
|
|
5774
|
-
if (escaped === "\\" || escaped === "[" || escaped === "]") {
|
|
5775
|
-
name += escaped;
|
|
5776
|
-
index += 2;
|
|
5777
|
-
continue;
|
|
5778
|
-
}
|
|
5779
|
-
name += current;
|
|
5780
|
-
index += 1;
|
|
5781
|
-
continue;
|
|
5782
|
-
}
|
|
5783
|
-
if (current === "]") {
|
|
5784
|
-
break;
|
|
5785
|
-
}
|
|
5786
|
-
name += current;
|
|
5787
|
-
index += 1;
|
|
5788
|
-
}
|
|
5789
|
-
if (value[index] !== "]" || value[index + 1] !== "(") {
|
|
4926
|
+
function parseAgentSkillToken(text, start, skills = []) {
|
|
4927
|
+
if (!isSkillTokenBoundary(text[start - 1] ?? "")) {
|
|
5790
4928
|
return null;
|
|
5791
4929
|
}
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
while (index < value.length) {
|
|
5795
|
-
const current = value[index];
|
|
5796
|
-
if (current === "\\") {
|
|
5797
|
-
const escaped = value[index + 1];
|
|
5798
|
-
if (escaped === "\\" || escaped === ")") {
|
|
5799
|
-
href += escaped;
|
|
5800
|
-
index += 2;
|
|
5801
|
-
continue;
|
|
5802
|
-
}
|
|
5803
|
-
href += current;
|
|
5804
|
-
index += 1;
|
|
4930
|
+
for (const candidate of skillTokenCandidates(skills)) {
|
|
4931
|
+
if (!text.startsWith(candidate.trigger, start)) {
|
|
5805
4932
|
continue;
|
|
5806
4933
|
}
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
if (!item) {
|
|
5810
|
-
return null;
|
|
5811
|
-
}
|
|
5812
|
-
if (item.kind !== "file" && !prefixedMention) {
|
|
5813
|
-
return null;
|
|
5814
|
-
}
|
|
5815
|
-
return {
|
|
5816
|
-
item,
|
|
5817
|
-
end: index + 1
|
|
5818
|
-
};
|
|
5819
|
-
}
|
|
5820
|
-
href += current;
|
|
5821
|
-
index += 1;
|
|
5822
|
-
}
|
|
5823
|
-
return null;
|
|
5824
|
-
}
|
|
5825
|
-
function parseMentionItemFromHref(input) {
|
|
5826
|
-
const href = input.href.trim();
|
|
5827
|
-
if (!href) {
|
|
5828
|
-
return null;
|
|
5829
|
-
}
|
|
5830
|
-
if (!href.startsWith("mention://")) {
|
|
5831
|
-
return {
|
|
5832
|
-
kind: "file",
|
|
5833
|
-
href,
|
|
5834
|
-
path: href,
|
|
5835
|
-
name: input.name,
|
|
5836
|
-
entryKind: isLocalDirectoryMentionHref(href) ? "directory" : "unknown",
|
|
5837
|
-
directoryPath: dirnameFromPath2(href)
|
|
5838
|
-
};
|
|
5839
|
-
}
|
|
5840
|
-
let url;
|
|
5841
|
-
try {
|
|
5842
|
-
url = new URL(href);
|
|
5843
|
-
} catch {
|
|
5844
|
-
return null;
|
|
5845
|
-
}
|
|
5846
|
-
const resource = url.hostname.trim().toLowerCase();
|
|
5847
|
-
const workspaceId = workspaceIdFromMentionUrl(url);
|
|
5848
|
-
const targetId = resource === "workspace-app" ? url.searchParams.get("appId")?.trim() ?? "" : resource === "workspace-app-factory" ? url.searchParams.get("jobId")?.trim() ?? "" : url.searchParams.get("id")?.trim() ?? "";
|
|
5849
|
-
if (resource !== "workspace-app-factory" && (!workspaceId || !targetId)) {
|
|
5850
|
-
return null;
|
|
5851
|
-
}
|
|
5852
|
-
if (resource === "agent-session") {
|
|
5853
|
-
return {
|
|
5854
|
-
kind: "session",
|
|
5855
|
-
href,
|
|
5856
|
-
workspaceId,
|
|
5857
|
-
targetId,
|
|
5858
|
-
name: input.name,
|
|
5859
|
-
title: input.name,
|
|
5860
|
-
scope: "collab_sessions",
|
|
5861
|
-
initiatorName: "",
|
|
5862
|
-
agentName: ""
|
|
5863
|
-
};
|
|
5864
|
-
}
|
|
5865
|
-
if (resource === "workspace-issue") {
|
|
5866
|
-
return {
|
|
5867
|
-
kind: "workspace-issue",
|
|
5868
|
-
href,
|
|
5869
|
-
workspaceId,
|
|
5870
|
-
targetId,
|
|
5871
|
-
name: input.name,
|
|
5872
|
-
title: input.name
|
|
5873
|
-
};
|
|
5874
|
-
}
|
|
5875
|
-
if (resource === "workspace-app") {
|
|
5876
|
-
return {
|
|
5877
|
-
kind: "workspace-app",
|
|
5878
|
-
href,
|
|
5879
|
-
workspaceId,
|
|
5880
|
-
targetId,
|
|
5881
|
-
appId: targetId,
|
|
5882
|
-
name: input.name
|
|
5883
|
-
};
|
|
5884
|
-
}
|
|
5885
|
-
if (resource === "workspace-app-factory") {
|
|
5886
|
-
return {
|
|
5887
|
-
kind: "workspace-app-factory",
|
|
5888
|
-
href,
|
|
5889
|
-
workspaceId,
|
|
5890
|
-
targetId,
|
|
5891
|
-
jobId: targetId,
|
|
5892
|
-
name: input.name || translate("agentHost.agentGui.workspaceAppFactoryMentionFallback"),
|
|
5893
|
-
action: url.searchParams.get("action")?.trim() || void 0,
|
|
5894
|
-
contextPath: url.searchParams.get("contextPath")?.trim() || void 0
|
|
5895
|
-
};
|
|
5896
|
-
}
|
|
5897
|
-
return null;
|
|
5898
|
-
}
|
|
5899
|
-
function isLocalDirectoryMentionHref(href) {
|
|
5900
|
-
return href.endsWith("/") && !/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(href);
|
|
5901
|
-
}
|
|
5902
|
-
function mentionItemToAttrs(item) {
|
|
5903
|
-
if (item.kind === "file") {
|
|
5904
|
-
return {
|
|
5905
|
-
name: item.name,
|
|
5906
|
-
kind: item.kind,
|
|
5907
|
-
href: item.href,
|
|
5908
|
-
path: item.path,
|
|
5909
|
-
entryKind: item.entryKind,
|
|
5910
|
-
directoryPath: item.directoryPath,
|
|
5911
|
-
thumbnailUrl: resolveAgentMentionFileThumbnailUrl(item) ?? ""
|
|
5912
|
-
};
|
|
5913
|
-
}
|
|
5914
|
-
if (item.kind === "session") {
|
|
5915
|
-
return {
|
|
5916
|
-
name: item.name,
|
|
5917
|
-
kind: item.kind,
|
|
5918
|
-
href: item.href,
|
|
5919
|
-
...workspaceMentionAttrs(item.workspaceId),
|
|
5920
|
-
targetId: item.targetId,
|
|
5921
|
-
scope: item.scope,
|
|
5922
|
-
title: item.title,
|
|
5923
|
-
initiatorName: item.initiatorName,
|
|
5924
|
-
agentName: item.agentName,
|
|
5925
|
-
status: item.status ?? "",
|
|
5926
|
-
inputPreview: item.inputPreview ?? "",
|
|
5927
|
-
summaryPreview: item.summaryPreview ?? ""
|
|
5928
|
-
};
|
|
5929
|
-
}
|
|
5930
|
-
if (item.kind === "workspace-app") {
|
|
5931
|
-
return {
|
|
5932
|
-
name: item.name,
|
|
5933
|
-
kind: item.kind,
|
|
5934
|
-
href: item.href,
|
|
5935
|
-
...workspaceMentionAttrs(item.workspaceId),
|
|
5936
|
-
targetId: item.targetId,
|
|
5937
|
-
appId: item.appId,
|
|
5938
|
-
description: item.description ?? "",
|
|
5939
|
-
iconUrl: item.iconUrl ?? ""
|
|
5940
|
-
};
|
|
5941
|
-
}
|
|
5942
|
-
if (item.kind === "workspace-app-factory") {
|
|
5943
|
-
return {
|
|
5944
|
-
name: item.name,
|
|
5945
|
-
kind: item.kind,
|
|
5946
|
-
href: item.href,
|
|
5947
|
-
...workspaceMentionAttrs(item.workspaceId),
|
|
5948
|
-
targetId: item.targetId,
|
|
5949
|
-
jobId: item.jobId,
|
|
5950
|
-
action: item.action ?? "",
|
|
5951
|
-
contextPath: item.contextPath ?? ""
|
|
5952
|
-
};
|
|
5953
|
-
}
|
|
5954
|
-
return {
|
|
5955
|
-
name: item.name,
|
|
5956
|
-
kind: item.kind,
|
|
5957
|
-
href: item.href,
|
|
5958
|
-
...workspaceMentionAttrs(item.workspaceId),
|
|
5959
|
-
targetId: item.targetId,
|
|
5960
|
-
title: item.title,
|
|
5961
|
-
creatorName: item.creatorName ?? "",
|
|
5962
|
-
status: item.status ?? "",
|
|
5963
|
-
contentPreview: item.contentPreview ?? ""
|
|
5964
|
-
};
|
|
5965
|
-
}
|
|
5966
|
-
function workspaceMentionSearchParams(workspaceId, targetId) {
|
|
5967
|
-
const normalizedWorkspaceId = workspaceId.trim();
|
|
5968
|
-
return new URLSearchParams({
|
|
5969
|
-
workspaceId: normalizedWorkspaceId,
|
|
5970
|
-
id: targetId
|
|
5971
|
-
});
|
|
5972
|
-
}
|
|
5973
|
-
function workspaceMentionAttrs(workspaceId) {
|
|
5974
|
-
const normalizedWorkspaceId = workspaceId.trim();
|
|
5975
|
-
return {
|
|
5976
|
-
workspaceId: normalizedWorkspaceId
|
|
5977
|
-
};
|
|
5978
|
-
}
|
|
5979
|
-
function attrsToMentionItem(attrs) {
|
|
5980
|
-
const kind = normalizeMentionKind(attrs.kind);
|
|
5981
|
-
const name = typeof attrs.name === "string" ? attrs.name : "";
|
|
5982
|
-
const href = typeof attrs.href === "string" && attrs.href.trim() ? attrs.href : "";
|
|
5983
|
-
if (kind === "session") {
|
|
5984
|
-
const workspaceId = workspaceIdFromMentionAttrs(attrs);
|
|
5985
|
-
const targetId = typeof attrs.targetId === "string" ? attrs.targetId : "";
|
|
5986
|
-
return {
|
|
5987
|
-
kind,
|
|
5988
|
-
href: href || buildAgentSessionMentionHref(workspaceId, targetId),
|
|
5989
|
-
workspaceId,
|
|
5990
|
-
targetId,
|
|
5991
|
-
name,
|
|
5992
|
-
title: typeof attrs.title === "string" && attrs.title.trim() ? attrs.title : name,
|
|
5993
|
-
scope: attrs.scope === "my_sessions" || attrs.scope === "collab_sessions" ? attrs.scope : "collab_sessions",
|
|
5994
|
-
initiatorName: typeof attrs.initiatorName === "string" ? attrs.initiatorName : "",
|
|
5995
|
-
agentName: typeof attrs.agentName === "string" ? attrs.agentName : "",
|
|
5996
|
-
status: typeof attrs.status === "string" ? attrs.status : void 0,
|
|
5997
|
-
inputPreview: typeof attrs.inputPreview === "string" ? attrs.inputPreview : void 0,
|
|
5998
|
-
summaryPreview: typeof attrs.summaryPreview === "string" ? attrs.summaryPreview : void 0
|
|
5999
|
-
};
|
|
6000
|
-
}
|
|
6001
|
-
if (kind === "workspace-issue") {
|
|
6002
|
-
const workspaceId = workspaceIdFromMentionAttrs(attrs);
|
|
6003
|
-
const targetId = typeof attrs.targetId === "string" ? attrs.targetId : "";
|
|
6004
|
-
return {
|
|
6005
|
-
kind,
|
|
6006
|
-
href: href || buildAgentWorkspaceIssueMentionHref(workspaceId, targetId),
|
|
6007
|
-
workspaceId,
|
|
6008
|
-
targetId,
|
|
6009
|
-
name,
|
|
6010
|
-
title: typeof attrs.title === "string" && attrs.title.trim() ? attrs.title : name,
|
|
6011
|
-
creatorName: typeof attrs.creatorName === "string" ? attrs.creatorName : void 0,
|
|
6012
|
-
status: typeof attrs.status === "string" ? attrs.status : void 0,
|
|
6013
|
-
contentPreview: typeof attrs.contentPreview === "string" ? attrs.contentPreview : void 0
|
|
6014
|
-
};
|
|
6015
|
-
}
|
|
6016
|
-
if (kind === "workspace-app") {
|
|
6017
|
-
const workspaceId = workspaceIdFromMentionAttrs(attrs);
|
|
6018
|
-
const appId = typeof attrs.appId === "string" && attrs.appId.trim() ? attrs.appId.trim() : typeof attrs.targetId === "string" ? attrs.targetId.trim() : "";
|
|
6019
|
-
return {
|
|
6020
|
-
kind,
|
|
6021
|
-
href: href || buildAgentWorkspaceAppMentionHref(workspaceId, appId),
|
|
6022
|
-
workspaceId,
|
|
6023
|
-
targetId: appId,
|
|
6024
|
-
appId,
|
|
6025
|
-
name,
|
|
6026
|
-
description: typeof attrs.description === "string" ? attrs.description : void 0,
|
|
6027
|
-
iconUrl: typeof attrs.iconUrl === "string" && attrs.iconUrl.trim() ? attrs.iconUrl.trim() : void 0
|
|
6028
|
-
};
|
|
6029
|
-
}
|
|
6030
|
-
if (kind === "workspace-app-factory") {
|
|
6031
|
-
const workspaceId = workspaceIdFromMentionAttrs(attrs);
|
|
6032
|
-
const jobId = typeof attrs.jobId === "string" && attrs.jobId.trim() ? attrs.jobId.trim() : typeof attrs.targetId === "string" ? attrs.targetId.trim() : "";
|
|
6033
|
-
const action = typeof attrs.action === "string" && attrs.action.trim() ? attrs.action.trim() : void 0;
|
|
6034
|
-
const contextPath = typeof attrs.contextPath === "string" && attrs.contextPath.trim() ? attrs.contextPath.trim() : void 0;
|
|
6035
|
-
return {
|
|
6036
|
-
kind,
|
|
6037
|
-
href: href || buildAgentWorkspaceAppFactoryMentionHref(workspaceId, jobId, {
|
|
6038
|
-
action,
|
|
6039
|
-
contextPath
|
|
6040
|
-
}),
|
|
6041
|
-
workspaceId,
|
|
6042
|
-
targetId: jobId,
|
|
6043
|
-
jobId,
|
|
6044
|
-
name,
|
|
6045
|
-
action,
|
|
6046
|
-
contextPath
|
|
6047
|
-
};
|
|
6048
|
-
}
|
|
6049
|
-
const path = typeof attrs.path === "string" && attrs.path.trim() ? attrs.path : typeof attrs.href === "string" ? attrs.href : "";
|
|
6050
|
-
return {
|
|
6051
|
-
kind: "file",
|
|
6052
|
-
href: href || path,
|
|
6053
|
-
path,
|
|
6054
|
-
name,
|
|
6055
|
-
entryKind: normalizeEntryKind(attrs.entryKind),
|
|
6056
|
-
directoryPath: typeof attrs.directoryPath === "string" && attrs.directoryPath.trim() ? attrs.directoryPath : dirnameFromPath2(path),
|
|
6057
|
-
thumbnailUrl: resolveAgentMentionFileThumbnailUrl({
|
|
6058
|
-
entryKind: normalizeEntryKind(attrs.entryKind),
|
|
6059
|
-
href: href || path,
|
|
6060
|
-
name,
|
|
6061
|
-
path,
|
|
6062
|
-
thumbnailUrl: typeof attrs.thumbnailUrl === "string" ? attrs.thumbnailUrl : void 0
|
|
6063
|
-
})
|
|
6064
|
-
};
|
|
6065
|
-
}
|
|
6066
|
-
function workspaceIdFromMentionAttrs(attrs) {
|
|
6067
|
-
return typeof attrs.workspaceId === "string" ? attrs.workspaceId.trim() : "";
|
|
6068
|
-
}
|
|
6069
|
-
function parseAgentMentionHTMLElementAttrs(node) {
|
|
6070
|
-
if (typeof node === "string") {
|
|
6071
|
-
return false;
|
|
6072
|
-
}
|
|
6073
|
-
const href = node.getAttribute("data-agent-mention-href") || node.getAttribute("data-agent-link-href") || node.getAttribute("href") || "";
|
|
6074
|
-
const name = node.getAttribute("name") || (node.textContent ?? "").replace(/^@+/, "").trim();
|
|
6075
|
-
const parsedItem = href ? parseMentionItemFromHref({ name, href }) : null;
|
|
6076
|
-
const parsedAttrs = parsedItem ? mentionItemToAttrs(parsedItem) : {};
|
|
6077
|
-
const iconUrl = node.getAttribute("data-agent-mention-icon-url") || "";
|
|
6078
|
-
return {
|
|
6079
|
-
...parsedAttrs,
|
|
6080
|
-
name,
|
|
6081
|
-
kind: node.getAttribute("data-agent-mention-kind") || node.getAttribute("kind") || parsedAttrs.kind || "file",
|
|
6082
|
-
href,
|
|
6083
|
-
...iconUrl ? { iconUrl } : {}
|
|
6084
|
-
};
|
|
6085
|
-
}
|
|
6086
|
-
function workspaceIdFromMentionUrl(url) {
|
|
6087
|
-
return url.searchParams.get("workspaceId")?.trim() ?? "";
|
|
6088
|
-
}
|
|
6089
|
-
function normalizeMentionKind(value) {
|
|
6090
|
-
if (value === "session" || value === "agent-session") {
|
|
6091
|
-
return "session";
|
|
6092
|
-
}
|
|
6093
|
-
if (value === "workspace-issue") {
|
|
6094
|
-
return "workspace-issue";
|
|
6095
|
-
}
|
|
6096
|
-
if (value === "workspace-app") {
|
|
6097
|
-
return "workspace-app";
|
|
6098
|
-
}
|
|
6099
|
-
if (value === "workspace-app-factory") {
|
|
6100
|
-
return "workspace-app-factory";
|
|
6101
|
-
}
|
|
6102
|
-
return "file";
|
|
6103
|
-
}
|
|
6104
|
-
function normalizeEntryKind(value) {
|
|
6105
|
-
return value === "directory" || value === "file" ? value : "unknown";
|
|
6106
|
-
}
|
|
6107
|
-
function mentionVisual(item) {
|
|
6108
|
-
if (item.kind === "file") {
|
|
6109
|
-
return {
|
|
6110
|
-
kindLabel: "File",
|
|
6111
|
-
primary: item.name
|
|
6112
|
-
};
|
|
6113
|
-
}
|
|
6114
|
-
if (item.kind === "session") {
|
|
6115
|
-
const visual = sessionMentionVisual(item);
|
|
6116
|
-
return {
|
|
6117
|
-
kindLabel: "Session",
|
|
6118
|
-
primary: `${visual.participant} ${visual.summary}`.trim()
|
|
6119
|
-
};
|
|
6120
|
-
}
|
|
6121
|
-
if (item.kind === "workspace-app") {
|
|
6122
|
-
return {
|
|
6123
|
-
kindLabel: "App",
|
|
6124
|
-
primary: item.name
|
|
6125
|
-
};
|
|
6126
|
-
}
|
|
6127
|
-
if (item.kind === "workspace-app-factory") {
|
|
6128
|
-
return {
|
|
6129
|
-
kindLabel: "App Factory",
|
|
6130
|
-
primary: item.name
|
|
6131
|
-
};
|
|
6132
|
-
}
|
|
6133
|
-
return {
|
|
6134
|
-
kindLabel: "Issue",
|
|
6135
|
-
primary: item.name
|
|
6136
|
-
};
|
|
6137
|
-
}
|
|
6138
|
-
function sessionMentionVisual(item) {
|
|
6139
|
-
const initiatorName = item.initiatorName.trim();
|
|
6140
|
-
const agentName = item.agentName.trim();
|
|
6141
|
-
const title = normalizeAgentSessionMentionTitle(item.title);
|
|
6142
|
-
if (initiatorName && agentName) {
|
|
6143
|
-
const dottedTitle = parseDottedSessionMentionText(title);
|
|
6144
|
-
return {
|
|
6145
|
-
participant: `${initiatorName} & ${agentName}`,
|
|
6146
|
-
summary: dottedTitle?.summary || (title && title !== item.name.trim() ? title : item.inputPreview?.trim() || "")
|
|
6147
|
-
};
|
|
6148
|
-
}
|
|
6149
|
-
const dottedName = parseDottedSessionMentionText(item.name);
|
|
6150
|
-
if (dottedName) {
|
|
6151
|
-
return {
|
|
6152
|
-
participant: dottedName.participant,
|
|
6153
|
-
summary: dottedName.summary
|
|
6154
|
-
};
|
|
6155
|
-
}
|
|
6156
|
-
return {
|
|
6157
|
-
participant: item.name.trim(),
|
|
6158
|
-
summary: title && title !== item.name.trim() ? title : item.inputPreview?.trim() || ""
|
|
6159
|
-
};
|
|
6160
|
-
}
|
|
6161
|
-
function parseDottedSessionMentionText(value) {
|
|
6162
|
-
const parts = value.split("\xB7").map((part) => part.trim()).filter(Boolean);
|
|
6163
|
-
if (parts.length < 3) {
|
|
6164
|
-
return null;
|
|
6165
|
-
}
|
|
6166
|
-
return {
|
|
6167
|
-
participant: `${parts[0]} & ${parts[1]}`,
|
|
6168
|
-
summary: normalizeAgentSessionMentionTitle(parts.slice(2).join(" "))
|
|
6169
|
-
};
|
|
6170
|
-
}
|
|
6171
|
-
function dirnameFromPath2(path) {
|
|
6172
|
-
const parts = path.split("/").filter(Boolean);
|
|
6173
|
-
if (parts.length <= 1) {
|
|
6174
|
-
return path.startsWith("/") ? "/" : "";
|
|
6175
|
-
}
|
|
6176
|
-
return `/${parts.slice(0, -1).join("/")}`;
|
|
6177
|
-
}
|
|
6178
|
-
function escapeMarkdownLinkLabel(value) {
|
|
6179
|
-
return value.replace(/([\\[\]])/g, "\\$1");
|
|
6180
|
-
}
|
|
6181
|
-
function escapeMarkdownLinkTarget(value) {
|
|
6182
|
-
return value.replace(/\\/g, "\\\\").replace(/\)/g, "\\)");
|
|
6183
|
-
}
|
|
6184
|
-
|
|
6185
|
-
// agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
|
|
6186
|
-
import { mergeAttributes as mergeAttributes2, Node as Node2 } from "@tiptap/core";
|
|
6187
|
-
|
|
6188
|
-
// agent-gui/agentGuiNode/model/agentSkillOptions.ts
|
|
6189
|
-
function getProviderSkillQueryMatch(input) {
|
|
6190
|
-
const match = /(^|[ \n\t])([$/])([^\s]*)$/.exec(input.draft);
|
|
6191
|
-
if (!match) {
|
|
6192
|
-
return null;
|
|
6193
|
-
}
|
|
6194
|
-
const separator = match[1] ?? "";
|
|
6195
|
-
return {
|
|
6196
|
-
end: input.draft.length,
|
|
6197
|
-
query: match[3] ?? "",
|
|
6198
|
-
prefix: match[2] === "$" ? "$" : "/",
|
|
6199
|
-
start: match.index + separator.length
|
|
6200
|
-
};
|
|
6201
|
-
}
|
|
6202
|
-
function filterProviderSkills(input) {
|
|
6203
|
-
const normalizedQuery = input.query.trim().toLowerCase();
|
|
6204
|
-
return input.skills.filter((skill) => {
|
|
6205
|
-
const trigger = skillTriggerForPrefix(skill, input.triggerPrefix);
|
|
6206
|
-
if (!normalizedQuery) {
|
|
6207
|
-
return true;
|
|
6208
|
-
}
|
|
6209
|
-
const name = skill.name.trim().toLowerCase();
|
|
6210
|
-
const normalizedTrigger = trigger.trim().toLowerCase();
|
|
6211
|
-
const description = skill.description?.trim().toLowerCase() ?? "";
|
|
6212
|
-
return name.startsWith(normalizedQuery) || normalizedTrigger.slice(1).startsWith(normalizedQuery) || description.includes(normalizedQuery);
|
|
6213
|
-
});
|
|
6214
|
-
}
|
|
6215
|
-
function draftForProviderSkill(skill, currentDraft = "", match = getProviderSkillQueryMatch({
|
|
6216
|
-
draft: currentDraft,
|
|
6217
|
-
provider: skill.trigger.startsWith("$") ? "codex" : ""
|
|
6218
|
-
})) {
|
|
6219
|
-
const trigger = skillTriggerForPrefix(skill, match?.prefix);
|
|
6220
|
-
if (!trigger) {
|
|
6221
|
-
return currentDraft;
|
|
6222
|
-
}
|
|
6223
|
-
if (!match) {
|
|
6224
|
-
return `${trigger} `;
|
|
6225
|
-
}
|
|
6226
|
-
return `${currentDraft.slice(0, match.start)}${trigger} ${currentDraft.slice(match.end)}`;
|
|
6227
|
-
}
|
|
6228
|
-
function skillTriggerForPrefix(skill, prefix) {
|
|
6229
|
-
const trigger = skill.trigger.trim();
|
|
6230
|
-
if (!trigger) {
|
|
6231
|
-
return "";
|
|
6232
|
-
}
|
|
6233
|
-
if (prefix === void 0 || trigger.startsWith(prefix)) {
|
|
6234
|
-
return trigger;
|
|
6235
|
-
}
|
|
6236
|
-
if (trigger.startsWith("$") || trigger.startsWith("/")) {
|
|
6237
|
-
return `${prefix}${trigger.slice(1)}`;
|
|
6238
|
-
}
|
|
6239
|
-
return `${prefix}${trigger}`;
|
|
6240
|
-
}
|
|
6241
|
-
function labelForProviderSkill(skill, prefix) {
|
|
6242
|
-
return stripSkillTriggerPrefix(skillTriggerForPrefix(skill, prefix));
|
|
6243
|
-
}
|
|
6244
|
-
function promptForProviderSkills(input) {
|
|
6245
|
-
const nativePrefix = input.provider.trim() === "codex" ? "$" : "/";
|
|
6246
|
-
let prompt = input.prompt;
|
|
6247
|
-
for (const skill of input.skills) {
|
|
6248
|
-
const nativeTrigger = skillTriggerForPrefix(skill, nativePrefix);
|
|
6249
|
-
const aliasPrefix = nativePrefix === "$" ? "/" : "$";
|
|
6250
|
-
const aliasTrigger = skillTriggerForPrefix(skill, aliasPrefix);
|
|
6251
|
-
if (!nativeTrigger || !aliasTrigger || nativeTrigger === aliasTrigger) {
|
|
4934
|
+
const end = start + candidate.trigger.length;
|
|
4935
|
+
if (!isSkillTokenBoundary(text[end] ?? "")) {
|
|
6252
4936
|
continue;
|
|
6253
4937
|
}
|
|
6254
|
-
|
|
4938
|
+
return {
|
|
4939
|
+
attrs: candidate,
|
|
4940
|
+
end
|
|
4941
|
+
};
|
|
6255
4942
|
}
|
|
6256
|
-
return
|
|
6257
|
-
}
|
|
6258
|
-
function skillDescriptionForDisplay(description) {
|
|
6259
|
-
const line = description?.split(/\r?\n/).map((part) => part.trim()).find((part) => part !== "");
|
|
6260
|
-
return line || void 0;
|
|
4943
|
+
return null;
|
|
6261
4944
|
}
|
|
6262
|
-
function
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
(
|
|
4945
|
+
function skillTokenCandidates(skills) {
|
|
4946
|
+
const candidates = /* @__PURE__ */ new Map();
|
|
4947
|
+
for (const skill of skills) {
|
|
4948
|
+
for (const prefix of ["$", "/"]) {
|
|
4949
|
+
const trigger = skillTriggerForPrefix(skill, prefix);
|
|
4950
|
+
if (!trigger || candidates.has(trigger)) {
|
|
4951
|
+
continue;
|
|
4952
|
+
}
|
|
4953
|
+
candidates.set(trigger, {
|
|
4954
|
+
label: labelForProviderSkill(skill, prefix),
|
|
4955
|
+
name: skill.name.trim(),
|
|
4956
|
+
trigger
|
|
4957
|
+
});
|
|
4958
|
+
}
|
|
4959
|
+
}
|
|
4960
|
+
return [...candidates.values()].sort(
|
|
4961
|
+
(left, right) => right.trigger.length - left.trigger.length
|
|
6266
4962
|
);
|
|
6267
4963
|
}
|
|
6268
|
-
function
|
|
6269
|
-
return value
|
|
4964
|
+
function isSkillTokenBoundary(value) {
|
|
4965
|
+
return value === "" || value === " " || value === "\n" || value === " ";
|
|
6270
4966
|
}
|
|
6271
|
-
function
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
4967
|
+
function attrsToSkillTokenAttrs(attrs) {
|
|
4968
|
+
return {
|
|
4969
|
+
label: typeof attrs.label === "string" ? attrs.label : "",
|
|
4970
|
+
name: typeof attrs.name === "string" ? attrs.name : "",
|
|
4971
|
+
trigger: typeof attrs.trigger === "string" ? attrs.trigger : ""
|
|
4972
|
+
};
|
|
6276
4973
|
}
|
|
6277
4974
|
|
|
6278
|
-
// agent-gui/agentGuiNode/agentRichText/
|
|
6279
|
-
|
|
4975
|
+
// agent-gui/agentGuiNode/agentRichText/agentCapabilityTokenExtension.ts
|
|
4976
|
+
import { mergeAttributes as mergeAttributes2, Node as Node2 } from "@tiptap/core";
|
|
4977
|
+
function createAgentCapabilityTokenExtension(options = {}) {
|
|
6280
4978
|
return Node2.create({
|
|
6281
|
-
name: "
|
|
4979
|
+
name: "agentCapabilityToken",
|
|
6282
4980
|
group: "inline",
|
|
6283
4981
|
inline: true,
|
|
6284
4982
|
atom: true,
|
|
@@ -6288,24 +4986,25 @@ function createAgentSkillTokenExtension(options = {}) {
|
|
|
6288
4986
|
},
|
|
6289
4987
|
addAttributes() {
|
|
6290
4988
|
return {
|
|
4989
|
+
capability: { default: "" },
|
|
6291
4990
|
label: { default: "" },
|
|
6292
4991
|
name: { default: "" },
|
|
6293
4992
|
trigger: { default: "" }
|
|
6294
4993
|
};
|
|
6295
4994
|
},
|
|
6296
4995
|
parseHTML() {
|
|
6297
|
-
return [{ tag: "span[data-agent-
|
|
4996
|
+
return [{ tag: "span[data-agent-capability-token]" }];
|
|
6298
4997
|
},
|
|
6299
4998
|
renderHTML({ HTMLAttributes }) {
|
|
6300
|
-
const attrs =
|
|
4999
|
+
const attrs = attrsToCapabilityTokenAttrs(HTMLAttributes);
|
|
6301
5000
|
return [
|
|
6302
5001
|
"span",
|
|
6303
5002
|
mergeAttributes2(HTMLAttributes, {
|
|
6304
5003
|
"aria-label": attrs.label,
|
|
6305
5004
|
contenteditable: "false",
|
|
6306
|
-
"data-agent-
|
|
6307
|
-
"data-agent-
|
|
6308
|
-
"data-agent-mention-kind": "
|
|
5005
|
+
"data-agent-capability-token": "true",
|
|
5006
|
+
"data-agent-capability-trigger": attrs.trigger,
|
|
5007
|
+
"data-agent-mention-kind": "capability",
|
|
6309
5008
|
class: "tsh-agent-object-token tsh-agent-object-token--entity"
|
|
6310
5009
|
}),
|
|
6311
5010
|
[
|
|
@@ -6327,20 +5026,20 @@ function createAgentSkillTokenExtension(options = {}) {
|
|
|
6327
5026
|
];
|
|
6328
5027
|
},
|
|
6329
5028
|
renderText({ node }) {
|
|
6330
|
-
return
|
|
5029
|
+
return attrsToCapabilityTokenAttrs(node.attrs ?? {}).trigger;
|
|
6331
5030
|
}
|
|
6332
5031
|
});
|
|
6333
5032
|
}
|
|
6334
|
-
function
|
|
6335
|
-
if (!
|
|
5033
|
+
function parseAgentCapabilityToken(text, start, capabilities = []) {
|
|
5034
|
+
if (!isCapabilityTokenBoundary(text[start - 1] ?? "")) {
|
|
6336
5035
|
return null;
|
|
6337
5036
|
}
|
|
6338
|
-
for (const candidate of
|
|
5037
|
+
for (const candidate of capabilityTokenCandidates(capabilities)) {
|
|
6339
5038
|
if (!text.startsWith(candidate.trigger, start)) {
|
|
6340
5039
|
continue;
|
|
6341
5040
|
}
|
|
6342
5041
|
const end = start + candidate.trigger.length;
|
|
6343
|
-
if (!
|
|
5042
|
+
if (!isCapabilityTokenBoundary(text[end] ?? "")) {
|
|
6344
5043
|
continue;
|
|
6345
5044
|
}
|
|
6346
5045
|
return {
|
|
@@ -6350,30 +5049,30 @@ function parseAgentSkillToken(text, start, skills = []) {
|
|
|
6350
5049
|
}
|
|
6351
5050
|
return null;
|
|
6352
5051
|
}
|
|
6353
|
-
function
|
|
5052
|
+
function capabilityTokenCandidates(capabilities) {
|
|
6354
5053
|
const candidates = /* @__PURE__ */ new Map();
|
|
6355
|
-
for (const
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
continue;
|
|
6360
|
-
}
|
|
6361
|
-
candidates.set(trigger, {
|
|
6362
|
-
label: labelForProviderSkill(skill, prefix),
|
|
6363
|
-
name: skill.name.trim(),
|
|
6364
|
-
trigger
|
|
6365
|
-
});
|
|
5054
|
+
for (const capability of capabilities) {
|
|
5055
|
+
const trigger = capability.trigger.trim();
|
|
5056
|
+
if (!trigger || candidates.has(trigger)) {
|
|
5057
|
+
continue;
|
|
6366
5058
|
}
|
|
5059
|
+
candidates.set(trigger, {
|
|
5060
|
+
capability: capability.capability.trim(),
|
|
5061
|
+
label: capability.label.trim(),
|
|
5062
|
+
name: capability.name.trim(),
|
|
5063
|
+
trigger
|
|
5064
|
+
});
|
|
6367
5065
|
}
|
|
6368
5066
|
return [...candidates.values()].sort(
|
|
6369
5067
|
(left, right) => right.trigger.length - left.trigger.length
|
|
6370
5068
|
);
|
|
6371
5069
|
}
|
|
6372
|
-
function
|
|
5070
|
+
function isCapabilityTokenBoundary(value) {
|
|
6373
5071
|
return value === "" || value === " " || value === "\n" || value === " ";
|
|
6374
5072
|
}
|
|
6375
|
-
function
|
|
5073
|
+
function attrsToCapabilityTokenAttrs(attrs) {
|
|
6376
5074
|
return {
|
|
5075
|
+
capability: typeof attrs.capability === "string" ? attrs.capability : "",
|
|
6377
5076
|
label: typeof attrs.label === "string" ? attrs.label : "",
|
|
6378
5077
|
name: typeof attrs.name === "string" ? attrs.name : "",
|
|
6379
5078
|
trigger: typeof attrs.trigger === "string" ? attrs.trigger : ""
|
|
@@ -6416,6 +5115,20 @@ function createParagraphFromText(text, options = {}) {
|
|
|
6416
5115
|
index = parsedMention.end;
|
|
6417
5116
|
continue;
|
|
6418
5117
|
}
|
|
5118
|
+
const parsedCapabilityToken = parseAgentCapabilityToken(
|
|
5119
|
+
text,
|
|
5120
|
+
index,
|
|
5121
|
+
options.capabilities
|
|
5122
|
+
);
|
|
5123
|
+
if (parsedCapabilityToken) {
|
|
5124
|
+
flushTextBuffer();
|
|
5125
|
+
content.push({
|
|
5126
|
+
type: "agentCapabilityToken",
|
|
5127
|
+
attrs: parsedCapabilityToken.attrs
|
|
5128
|
+
});
|
|
5129
|
+
index = parsedCapabilityToken.end;
|
|
5130
|
+
continue;
|
|
5131
|
+
}
|
|
6419
5132
|
const parsedSkillToken = parseAgentSkillToken(text, index, options.skills);
|
|
6420
5133
|
if (parsedSkillToken) {
|
|
6421
5134
|
flushTextBuffer();
|
|
@@ -6472,6 +5185,9 @@ function nodeToPromptText(node) {
|
|
|
6472
5185
|
if (node.type === "agentSkillToken") {
|
|
6473
5186
|
return typeof node.attrs?.trigger === "string" ? node.attrs.trigger : "";
|
|
6474
5187
|
}
|
|
5188
|
+
if (node.type === "agentCapabilityToken") {
|
|
5189
|
+
return typeof node.attrs?.trigger === "string" ? node.attrs.trigger : "";
|
|
5190
|
+
}
|
|
6475
5191
|
if (node.type === "hardBreak") {
|
|
6476
5192
|
return "\n";
|
|
6477
5193
|
}
|
|
@@ -6504,26 +5220,28 @@ function createAgentPromptStarterKit() {
|
|
|
6504
5220
|
underline: false
|
|
6505
5221
|
});
|
|
6506
5222
|
}
|
|
6507
|
-
function createAgentRichTextInputExtensions(fileMentionOptions, skillTokenOptions) {
|
|
5223
|
+
function createAgentRichTextInputExtensions(fileMentionOptions, skillTokenOptions, capabilityTokenOptions) {
|
|
6508
5224
|
return [
|
|
6509
5225
|
createAgentPromptStarterKit(),
|
|
6510
5226
|
createAgentFileMentionExtension(fileMentionOptions),
|
|
5227
|
+
createAgentCapabilityTokenExtension(capabilityTokenOptions),
|
|
6511
5228
|
createAgentSkillTokenExtension(skillTokenOptions)
|
|
6512
5229
|
];
|
|
6513
5230
|
}
|
|
6514
|
-
function createAgentRichTextReadonlyExtensions(skillTokenOptions) {
|
|
5231
|
+
function createAgentRichTextReadonlyExtensions(skillTokenOptions, capabilityTokenOptions) {
|
|
6515
5232
|
return [
|
|
6516
5233
|
createAgentPromptStarterKit(),
|
|
6517
5234
|
createAgentFileMentionExtension({
|
|
6518
5235
|
enableSuggestions: false,
|
|
6519
5236
|
renderAsLink: true
|
|
6520
5237
|
}),
|
|
5238
|
+
createAgentCapabilityTokenExtension(capabilityTokenOptions),
|
|
6521
5239
|
createAgentSkillTokenExtension(skillTokenOptions)
|
|
6522
5240
|
];
|
|
6523
5241
|
}
|
|
6524
5242
|
|
|
6525
5243
|
// shared/AgentRichTextReadonly.tsx
|
|
6526
|
-
import { jsx as
|
|
5244
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
6527
5245
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
6528
5246
|
function AgentRichTextReadonly({
|
|
6529
5247
|
value,
|
|
@@ -6575,7 +5293,7 @@ function AgentRichTextReadonly({
|
|
|
6575
5293
|
}
|
|
6576
5294
|
}
|
|
6577
5295
|
});
|
|
6578
|
-
|
|
5296
|
+
useEffect(() => {
|
|
6579
5297
|
if (!editor || editor.isDestroyed) {
|
|
6580
5298
|
return;
|
|
6581
5299
|
}
|
|
@@ -6590,9 +5308,9 @@ function AgentRichTextReadonly({
|
|
|
6590
5308
|
editor.commands.setContent(nextDoc, { emitUpdate: false });
|
|
6591
5309
|
}, [availableSkills, editor, value, workspaceAppIcons]);
|
|
6592
5310
|
if (!editor) {
|
|
6593
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx4("div", { className });
|
|
6594
5312
|
}
|
|
6595
|
-
return /* @__PURE__ */
|
|
5313
|
+
return /* @__PURE__ */ jsx4("div", { className, children: /* @__PURE__ */ jsx4(EditorContent, { editor }) });
|
|
6596
5314
|
}
|
|
6597
5315
|
function plainTextToAgentRichTextDocWithWorkspaceAppIcons(value, availableSkills, workspaceAppIcons) {
|
|
6598
5316
|
const doc = plainTextToAgentRichTextDoc(value, { skills: availableSkills });
|
|
@@ -6643,12 +5361,12 @@ function resolveWorkspaceAppIconUrl(input) {
|
|
|
6643
5361
|
// shared/agentConversation/components/CollapsibleReveal.tsx
|
|
6644
5362
|
import {
|
|
6645
5363
|
useCallback as useCallback2,
|
|
6646
|
-
useEffect as
|
|
5364
|
+
useEffect as useEffect2,
|
|
6647
5365
|
useLayoutEffect,
|
|
6648
5366
|
useRef as useRef2,
|
|
6649
|
-
useState as
|
|
5367
|
+
useState as useState2
|
|
6650
5368
|
} from "react";
|
|
6651
|
-
import { jsx as
|
|
5369
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
6652
5370
|
function CollapsibleReveal({
|
|
6653
5371
|
expanded,
|
|
6654
5372
|
children,
|
|
@@ -6656,9 +5374,9 @@ function CollapsibleReveal({
|
|
|
6656
5374
|
preMountOnIdle = false
|
|
6657
5375
|
}) {
|
|
6658
5376
|
"use memo";
|
|
6659
|
-
const [mounted, setMounted] =
|
|
6660
|
-
const [visible, setVisible] =
|
|
6661
|
-
const [height, setHeight] =
|
|
5377
|
+
const [mounted, setMounted] = useState2(expanded);
|
|
5378
|
+
const [visible, setVisible] = useState2(expanded);
|
|
5379
|
+
const [height, setHeight] = useState2(expanded ? "auto" : "0px");
|
|
6662
5380
|
const rootRef = useRef2(null);
|
|
6663
5381
|
const innerRef = useRef2(null);
|
|
6664
5382
|
const heightRef = useRef2(height);
|
|
@@ -6681,7 +5399,7 @@ function CollapsibleReveal({
|
|
|
6681
5399
|
});
|
|
6682
5400
|
return () => cancelAnimationFrame(animationFrame);
|
|
6683
5401
|
}, [expanded, mounted, preMountOnIdle]);
|
|
6684
|
-
|
|
5402
|
+
useEffect2(() => {
|
|
6685
5403
|
if (!preMountOnIdle || mounted || expanded) {
|
|
6686
5404
|
return void 0;
|
|
6687
5405
|
}
|
|
@@ -6788,7 +5506,7 @@ function CollapsibleReveal({
|
|
|
6788
5506
|
}
|
|
6789
5507
|
};
|
|
6790
5508
|
const rootStyle = { height };
|
|
6791
|
-
return /* @__PURE__ */
|
|
5509
|
+
return /* @__PURE__ */ jsx5(
|
|
6792
5510
|
"div",
|
|
6793
5511
|
{
|
|
6794
5512
|
ref: rootRef,
|
|
@@ -6797,20 +5515,20 @@ function CollapsibleReveal({
|
|
|
6797
5515
|
"aria-hidden": visible ? void 0 : true,
|
|
6798
5516
|
style: rootStyle,
|
|
6799
5517
|
onTransitionEnd: handleTransitionEnd,
|
|
6800
|
-
children: /* @__PURE__ */
|
|
5518
|
+
children: /* @__PURE__ */ jsx5("div", { ref: innerRef, className: "agent-collapsible-reveal__inner", children })
|
|
6801
5519
|
}
|
|
6802
5520
|
);
|
|
6803
5521
|
}
|
|
6804
5522
|
|
|
6805
5523
|
// shared/WorkspaceAgentSessionThinkingDisclosure.tsx
|
|
6806
|
-
import { useState as
|
|
5524
|
+
import { useState as useState3 } from "react";
|
|
6807
5525
|
import { ChevronDown as ChevronDown2, ChevronRight } from "lucide-react";
|
|
6808
5526
|
|
|
6809
5527
|
// app/renderer/components/icons/BrainIcon.tsx
|
|
6810
5528
|
import {
|
|
6811
5529
|
forwardRef as forwardRef2,
|
|
6812
5530
|
useCallback as useCallback3,
|
|
6813
|
-
useEffect as
|
|
5531
|
+
useEffect as useEffect3,
|
|
6814
5532
|
useImperativeHandle,
|
|
6815
5533
|
useRef as useRef3
|
|
6816
5534
|
} from "react";
|
|
@@ -6819,7 +5537,7 @@ import {
|
|
|
6819
5537
|
useAnimation,
|
|
6820
5538
|
useReducedMotion
|
|
6821
5539
|
} from "framer-motion";
|
|
6822
|
-
import { jsx as
|
|
5540
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6823
5541
|
var brainTransition = {
|
|
6824
5542
|
duration: 1.4,
|
|
6825
5543
|
repeat: Number.POSITIVE_INFINITY,
|
|
@@ -6886,7 +5604,7 @@ var BrainIcon = forwardRef2(
|
|
|
6886
5604
|
stopAnimation
|
|
6887
5605
|
};
|
|
6888
5606
|
});
|
|
6889
|
-
|
|
5607
|
+
useEffect3(() => {
|
|
6890
5608
|
if (active) {
|
|
6891
5609
|
startAnimation();
|
|
6892
5610
|
return;
|
|
@@ -6913,14 +5631,14 @@ var BrainIcon = forwardRef2(
|
|
|
6913
5631
|
},
|
|
6914
5632
|
[onMouseLeave, stopAnimation]
|
|
6915
5633
|
);
|
|
6916
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ jsx6(
|
|
6917
5635
|
"div",
|
|
6918
5636
|
{
|
|
6919
5637
|
className: cn("inline-flex items-center justify-center", className),
|
|
6920
5638
|
onMouseEnter: handleMouseEnter,
|
|
6921
5639
|
onMouseLeave: handleMouseLeave,
|
|
6922
5640
|
...props,
|
|
6923
|
-
children: /* @__PURE__ */
|
|
5641
|
+
children: /* @__PURE__ */ jsxs3(
|
|
6924
5642
|
motion.svg,
|
|
6925
5643
|
{
|
|
6926
5644
|
animate: controls,
|
|
@@ -6945,7 +5663,7 @@ var BrainIcon = forwardRef2(
|
|
|
6945
5663
|
width: size,
|
|
6946
5664
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6947
5665
|
children: [
|
|
6948
|
-
/* @__PURE__ */
|
|
5666
|
+
/* @__PURE__ */ jsx6(
|
|
6949
5667
|
motion.path,
|
|
6950
5668
|
{
|
|
6951
5669
|
animate: controls,
|
|
@@ -6953,7 +5671,7 @@ var BrainIcon = forwardRef2(
|
|
|
6953
5671
|
variants: BRAIN_STEM_VARIANTS
|
|
6954
5672
|
}
|
|
6955
5673
|
),
|
|
6956
|
-
/* @__PURE__ */
|
|
5674
|
+
/* @__PURE__ */ jsx6(
|
|
6957
5675
|
motion.path,
|
|
6958
5676
|
{
|
|
6959
5677
|
animate: controls,
|
|
@@ -6961,7 +5679,7 @@ var BrainIcon = forwardRef2(
|
|
|
6961
5679
|
variants: BRAIN_SIDE_VARIANTS
|
|
6962
5680
|
}
|
|
6963
5681
|
),
|
|
6964
|
-
/* @__PURE__ */
|
|
5682
|
+
/* @__PURE__ */ jsx6(
|
|
6965
5683
|
motion.path,
|
|
6966
5684
|
{
|
|
6967
5685
|
animate: controls,
|
|
@@ -6969,7 +5687,7 @@ var BrainIcon = forwardRef2(
|
|
|
6969
5687
|
variants: BRAIN_TOP_ARC_VARIANTS
|
|
6970
5688
|
}
|
|
6971
5689
|
),
|
|
6972
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx6(
|
|
6973
5691
|
motion.path,
|
|
6974
5692
|
{
|
|
6975
5693
|
animate: controls,
|
|
@@ -6977,8 +5695,8 @@ var BrainIcon = forwardRef2(
|
|
|
6977
5695
|
variants: BRAIN_TOP_ARC_VARIANTS
|
|
6978
5696
|
}
|
|
6979
5697
|
),
|
|
6980
|
-
/* @__PURE__ */
|
|
6981
|
-
/* @__PURE__ */
|
|
5698
|
+
/* @__PURE__ */ jsx6("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
|
|
5699
|
+
/* @__PURE__ */ jsx6(
|
|
6982
5700
|
motion.path,
|
|
6983
5701
|
{
|
|
6984
5702
|
animate: controls,
|
|
@@ -6986,8 +5704,8 @@ var BrainIcon = forwardRef2(
|
|
|
6986
5704
|
variants: BRAIN_LOWER_ARC_VARIANTS
|
|
6987
5705
|
}
|
|
6988
5706
|
),
|
|
6989
|
-
/* @__PURE__ */
|
|
6990
|
-
/* @__PURE__ */
|
|
5707
|
+
/* @__PURE__ */ jsx6("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
|
|
5708
|
+
/* @__PURE__ */ jsx6(
|
|
6991
5709
|
motion.path,
|
|
6992
5710
|
{
|
|
6993
5711
|
animate: controls,
|
|
@@ -6995,7 +5713,7 @@ var BrainIcon = forwardRef2(
|
|
|
6995
5713
|
variants: BRAIN_LOWER_ARC_VARIANTS
|
|
6996
5714
|
}
|
|
6997
5715
|
),
|
|
6998
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx6("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
|
|
6999
5717
|
]
|
|
7000
5718
|
}
|
|
7001
5719
|
)
|
|
@@ -7006,10 +5724,10 @@ var BrainIcon = forwardRef2(
|
|
|
7006
5724
|
BrainIcon.displayName = "BrainIcon";
|
|
7007
5725
|
|
|
7008
5726
|
// shared/toolActivityKindIcons.tsx
|
|
7009
|
-
import { jsx as
|
|
5727
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
7010
5728
|
function IconProductDoc(props) {
|
|
7011
5729
|
"use memo";
|
|
7012
|
-
return /* @__PURE__ */
|
|
5730
|
+
return /* @__PURE__ */ jsx7(
|
|
7013
5731
|
"svg",
|
|
7014
5732
|
{
|
|
7015
5733
|
viewBox: "0 0 24 24",
|
|
@@ -7017,7 +5735,7 @@ function IconProductDoc(props) {
|
|
|
7017
5735
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7018
5736
|
"aria-hidden": true,
|
|
7019
5737
|
...props,
|
|
7020
|
-
children: /* @__PURE__ */
|
|
5738
|
+
children: /* @__PURE__ */ jsx7(
|
|
7021
5739
|
"path",
|
|
7022
5740
|
{
|
|
7023
5741
|
d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM16 16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17C7 16.4477 7.44772 16 8 16H16ZM16 12C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13C7 12.4477 7.44772 12 8 12H16ZM10 8C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9C7 8.44772 7.44772 8 8 8H10ZM15 7H18.584L15 3.41602V7Z",
|
|
@@ -7029,7 +5747,7 @@ function IconProductDoc(props) {
|
|
|
7029
5747
|
}
|
|
7030
5748
|
function IconBuild(props) {
|
|
7031
5749
|
"use memo";
|
|
7032
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx7(
|
|
7033
5751
|
"svg",
|
|
7034
5752
|
{
|
|
7035
5753
|
viewBox: "0 0 24 24",
|
|
@@ -7037,7 +5755,7 @@ function IconBuild(props) {
|
|
|
7037
5755
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7038
5756
|
"aria-hidden": true,
|
|
7039
5757
|
...props,
|
|
7040
|
-
children: /* @__PURE__ */
|
|
5758
|
+
children: /* @__PURE__ */ jsx7(
|
|
7041
5759
|
"path",
|
|
7042
5760
|
{
|
|
7043
5761
|
d: "M12.5166 2C14.3722 2.0005 16.1516 2.73783 17.4639 4.0498L19.1211 5.70703L19.3203 5.92676C19.7578 6.46048 19.9999 7.13198 20 7.82812V8.17188L20.0049 8.27051C20.0276 8.49945 20.1288 8.71482 20.293 8.87891L21.5303 10.1162C21.9083 9.9151 22.3885 9.97443 22.707 10.293C23.0976 10.6835 23.0976 11.3165 22.707 11.707L18.707 15.707C18.3165 16.0976 17.6835 16.0976 17.293 15.707C16.9744 15.3885 16.9151 14.9083 17.1162 14.5303L15.8789 13.293C15.7431 13.1571 15.5715 13.0672 15.3867 13.0264L6.33398 22.0801C6.0442 22.3699 5.69992 22.5999 5.32129 22.7568C4.94266 22.9137 4.53679 22.995 4.12695 22.9951C3.29924 22.9952 2.50538 22.6661 1.91992 22.0811C1.3344 21.4957 1.00502 20.701 1.00488 19.873C1.00487 19.0453 1.33373 18.2514 1.91895 17.666L11 8.58496V8.48535C10.9999 7.1596 10.4734 5.88777 9.53613 4.9502L8.29297 3.70703C8.00697 3.42103 7.92139 2.99086 8.07617 2.61719C8.23098 2.24359 8.59558 2 9 2H12.5166ZM3.33301 19.0801C3.12284 19.2904 3.00487 19.5757 3.00488 19.873C3.00493 20.1705 3.12359 20.4557 3.33398 20.666C3.54437 20.8763 3.82951 20.9952 4.12695 20.9951C4.27409 20.9951 4.41972 20.9655 4.55566 20.9092C4.69174 20.8528 4.81578 20.7702 4.91992 20.666L13.0859 12.5L11.499 10.9131L3.33301 19.0801ZM11.3721 4C12.4187 5.2535 12.9999 6.83919 13 8.48535V9.58594L14.4141 11H15.1719C15.9674 11.0002 16.7305 11.3164 17.293 11.8789L18.5 13.0859L20.0859 11.5L18.8789 10.293C18.3164 9.73051 18.0002 8.96738 18 8.17188V7.82812C17.9999 7.56296 17.8946 7.30857 17.707 7.12109L16.0498 5.46387C15.1124 4.52677 13.8411 4.00028 12.5156 4H11.3721Z",
|
|
@@ -7049,7 +5767,7 @@ function IconBuild(props) {
|
|
|
7049
5767
|
}
|
|
7050
5768
|
function IconBrush(props) {
|
|
7051
5769
|
"use memo";
|
|
7052
|
-
return /* @__PURE__ */
|
|
5770
|
+
return /* @__PURE__ */ jsx7(
|
|
7053
5771
|
"svg",
|
|
7054
5772
|
{
|
|
7055
5773
|
viewBox: "0 0 24 24",
|
|
@@ -7057,7 +5775,7 @@ function IconBrush(props) {
|
|
|
7057
5775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7058
5776
|
"aria-hidden": true,
|
|
7059
5777
|
...props,
|
|
7060
|
-
children: /* @__PURE__ */
|
|
5778
|
+
children: /* @__PURE__ */ jsx7(
|
|
7061
5779
|
"path",
|
|
7062
5780
|
{
|
|
7063
5781
|
d: "M19.1816 1C20.1944 1.00019 21.1658 1.40292 21.8818 2.11914C22.5976 2.83537 23.0001 3.8067 23 4.81934C22.9998 5.7688 22.6461 6.68243 22.0117 7.38281L21.8808 7.51953L19.79 9.60937C19.7641 9.6428 19.7377 9.67636 19.707 9.70703C19.6763 9.7377 19.6428 9.76419 19.6093 9.79004L8.53414 20.8682L8.53317 20.8691C8.1855 21.2156 7.75766 21.4724 7.28805 21.6152H7.28707L2.93454 22.9355L2.93161 22.9365C2.67255 23.0143 2.39705 23.02 2.13473 22.9541C1.87235 22.8881 1.63194 22.7526 1.44039 22.5615C1.24885 22.3703 1.11234 22.1296 1.04586 21.8672C0.979582 21.605 0.985166 21.3294 1.06246 21.0703L1.06442 21.0664L2.38473 16.7139L2.38571 16.7109C2.52986 16.2409 2.78761 15.813 3.13571 15.4658L14.2089 4.38867C14.2346 4.35552 14.2625 4.32341 14.2929 4.29297C14.3234 4.26252 14.3555 4.23468 14.3886 4.20898L16.4804 2.11816C17.1967 1.40209 18.1688 0.999896 19.1816 1ZM4.54879 16.8818L4.54782 16.8828C4.43196 16.9985 4.34581 17.1413 4.29782 17.2978L3.24899 20.749L6.70602 19.7012L6.82028 19.6592C6.93185 19.6097 7.0341 19.5397 7.12106 19.4531L17.5791 8.99316L15.0068 6.4209L4.54879 16.8818ZM19.1816 3C18.6995 2.99996 18.2366 3.19147 17.8955 3.53223L16.4209 5.00683L18.9931 7.5791L20.4668 6.10547L20.5879 5.97168C20.8529 5.64823 20.9998 5.24116 21 4.81934C21 4.33701 20.8077 3.87434 20.4668 3.5332C20.1258 3.19221 19.6638 3.00019 19.1816 3Z",
|
|
@@ -7069,7 +5787,7 @@ function IconBrush(props) {
|
|
|
7069
5787
|
}
|
|
7070
5788
|
function IconNetwork(props) {
|
|
7071
5789
|
"use memo";
|
|
7072
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsx7(
|
|
7073
5791
|
"svg",
|
|
7074
5792
|
{
|
|
7075
5793
|
viewBox: "0 0 24 24",
|
|
@@ -7077,7 +5795,7 @@ function IconNetwork(props) {
|
|
|
7077
5795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7078
5796
|
"aria-hidden": true,
|
|
7079
5797
|
...props,
|
|
7080
|
-
children: /* @__PURE__ */
|
|
5798
|
+
children: /* @__PURE__ */ jsx7(
|
|
7081
5799
|
"path",
|
|
7082
5800
|
{
|
|
7083
5801
|
d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM3.05664 13C3.46745 16.7156 6.13893 19.7477 9.66602 20.6924C8.12455 18.4164 7.21164 15.7616 7.0332 13H3.05664ZM16.9668 13C16.7883 15.7618 15.8747 18.4163 14.333 20.6924C17.8605 19.748 20.5325 16.7159 20.9434 13H16.9668ZM9.04004 13C9.24354 15.738 10.2754 18.3489 12 20.4834C13.7246 18.3489 14.7565 15.738 14.96 13H9.04004ZM9.66602 3.30664C6.13881 4.25125 3.46746 7.28435 3.05664 11H7.0332C7.21166 8.23812 8.12427 5.58281 9.66602 3.30664ZM12 3.51562C10.2751 5.65021 9.24348 8.26166 9.04004 11H14.96C14.7565 8.26166 13.7249 5.65021 12 3.51562ZM14.333 3.30664C15.8749 5.58292 16.7883 8.23793 16.9668 11H20.9434C20.5325 7.28403 17.8607 4.25097 14.333 3.30664Z",
|
|
@@ -7089,7 +5807,7 @@ function IconNetwork(props) {
|
|
|
7089
5807
|
}
|
|
7090
5808
|
function IconCapability(props) {
|
|
7091
5809
|
"use memo";
|
|
7092
|
-
return /* @__PURE__ */
|
|
5810
|
+
return /* @__PURE__ */ jsx7(
|
|
7093
5811
|
"svg",
|
|
7094
5812
|
{
|
|
7095
5813
|
viewBox: "0 0 24 24",
|
|
@@ -7097,7 +5815,7 @@ function IconCapability(props) {
|
|
|
7097
5815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7098
5816
|
"aria-hidden": true,
|
|
7099
5817
|
...props,
|
|
7100
|
-
children: /* @__PURE__ */
|
|
5818
|
+
children: /* @__PURE__ */ jsx7(
|
|
7101
5819
|
"path",
|
|
7102
5820
|
{
|
|
7103
5821
|
d: "M9.9994 1C11.0602 1 12.0784 1.42185 12.8285 2.17188C13.5784 2.92198 13.9994 3.93932 13.9994 5C13.9994 5.79565 13.6831 6.55849 13.1205 7.12109C12.5579 7.68352 11.7949 8 10.9994 8C10.7316 7.99997 10.4793 7.97795 10.2416 7.93555C10.1632 8.06833 10.0871 8.26075 10.0209 8.53906C9.88898 9.09327 9.84537 9.79653 9.81483 10.6309C9.79404 11.1989 9.77711 11.8293 9.72987 12.4463C9.97013 12.3481 10.2169 12.2638 10.4691 12.1973C10.9061 12.0821 11.3533 12.0166 11.8021 12.002C12.3709 11.0149 13.211 10.2051 14.2299 9.6748C15.4546 9.03749 16.8622 8.84264 18.2142 9.12207C19.5664 9.40164 20.781 10.1391 21.6527 11.21C22.5243 12.2808 23 13.6193 22.9994 15C22.9994 19.6358 18.3055 23 12.9994 23C10.8986 23 8.78485 22.7894 6.89588 22.3604C5.0205 21.9343 3.29732 21.2773 2.03358 20.3418L2.0326 20.3408C1.29831 19.7958 0.992816 18.9434 1.00917 18.1553C1.06353 15.4363 1.21559 11.2582 2.32655 7.74219C2.88372 5.97897 3.7061 4.30115 4.94764 3.05469C6.21544 1.78207 7.88237 1.00014 9.9994 1ZM9.9994 3C8.43065 3.00014 7.26908 3.55883 6.36463 4.4668C5.4339 5.40127 4.73903 6.74579 4.23378 8.34473C3.34681 11.1518 3.11601 14.4956 3.03553 17.1191L3.00819 18.1963C3.00256 18.4674 3.107 18.6472 3.22401 18.7344L3.4076 18.8652C4.35656 19.5118 5.71073 20.0394 7.33827 20.4092C9.06058 20.8004 11.0238 21 12.9994 21C17.5463 21 20.791 18.2751 20.9896 15.29L20.9994 15C20.9998 14.0795 20.683 13.1866 20.1019 12.4727C19.5209 11.7589 18.7112 11.2665 17.8099 11.0801C16.9085 10.8938 15.9692 11.0243 15.1527 11.4492C14.7154 11.6769 14.3294 11.9838 14.0072 12.3477C14.5766 12.55 15.115 12.8355 15.601 13.2002C16.0421 13.5316 16.1311 14.1581 15.8002 14.5996C15.4687 15.0413 14.8415 15.1312 14.3998 14.7998C13.9171 14.4376 13.3582 14.189 12.766 14.0732C12.6241 14.0455 12.4807 14.0259 12.3373 14.0137C12.323 14.0126 12.3087 14.0114 12.2943 14.0098C11.8533 13.977 11.4086 14.0176 10.9789 14.1309C10.3955 14.2848 9.85404 14.5693 9.39588 14.9619C9.18332 15.1441 8.99158 15.3483 8.82264 15.5693C8.81507 15.5797 8.80788 15.5903 8.80018 15.6006C8.79478 15.6078 8.78816 15.6141 8.7826 15.6211C8.60462 15.862 8.45397 16.1231 8.33338 16.3994C8.11263 16.9055 7.52309 17.1365 7.01698 16.916C6.51076 16.6952 6.27858 16.1058 6.4994 15.5996C6.68858 15.166 6.92793 14.7579 7.21131 14.3828C7.42382 14.0896 7.58136 13.6141 7.67518 12.9092C7.76955 12.2 7.78452 11.4136 7.81581 10.5586C7.84563 9.7437 7.89048 8.84999 8.0746 8.07617C8.16126 7.71213 8.28971 7.32979 8.48866 6.97559C8.3626 6.8338 8.25388 6.68808 8.16053 6.54395C7.86057 6.08046 7.99311 5.46035 8.45643 5.16016C8.91985 4.86043 9.53908 4.99291 9.83924 5.45605C9.96076 5.64373 10.0773 5.7612 10.2152 5.83984C10.3527 5.91812 10.5849 5.99992 10.9994 6C11.2645 6 11.5189 5.89438 11.7064 5.70703C11.894 5.51949 11.9994 5.26522 11.9994 5C11.9994 4.46957 11.7885 3.96101 11.4135 3.58594C11.0384 3.21105 10.5297 3 9.9994 3Z",
|
|
@@ -7109,7 +5827,7 @@ function IconCapability(props) {
|
|
|
7109
5827
|
}
|
|
7110
5828
|
function IconTask(props) {
|
|
7111
5829
|
"use memo";
|
|
7112
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ jsx7(
|
|
7113
5831
|
"svg",
|
|
7114
5832
|
{
|
|
7115
5833
|
viewBox: "0 0 24 24",
|
|
@@ -7117,7 +5835,7 @@ function IconTask(props) {
|
|
|
7117
5835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7118
5836
|
"aria-hidden": true,
|
|
7119
5837
|
...props,
|
|
7120
|
-
children: /* @__PURE__ */
|
|
5838
|
+
children: /* @__PURE__ */ jsx7(
|
|
7121
5839
|
"path",
|
|
7122
5840
|
{
|
|
7123
5841
|
d: "M8.29297 14.793C8.68349 14.4025 9.31651 14.4025 9.70703 14.793C10.0976 15.1835 10.0976 15.8166 9.70703 16.2071L5.70703 20.2071C5.31651 20.5976 4.68349 20.5976 4.29297 20.2071L2.29297 18.2071C1.90244 17.8166 1.90244 17.1836 2.29297 16.793C2.68349 16.4025 3.31651 16.4025 3.70703 16.793L5 18.086L8.29297 14.793ZM21 18.0001C21.5523 18.0001 22 18.4478 22 19.0001C22 19.5524 21.5523 20.0001 21 20.0001H13C12.4477 20.0001 12 19.5524 12 19.0001C12 18.4478 12.4477 18.0001 13 18.0001H21ZM21 11C21.5523 11 22 11.4478 22 12C22 12.5523 21.5523 13 21 13H13C12.4477 13 12 12.5523 12 12C12 11.4478 12.4477 11 13 11H21ZM8 3.5C9.10457 3.5 10 4.39543 10 5.50001V9.50003C10 10.6046 9.10457 11.5 8 11.5H4C2.89543 11.5 2 10.6046 2 9.50003V5.50001C2 4.39543 2.89543 3.5 4 3.5H8ZM4 9.50003H8V5.50001H4V9.50003ZM21 4C21.5523 4 22 4.44772 22 5.00001C22 5.55229 21.5523 6.00001 21 6.00001H13C12.4477 6.00001 12 5.55229 12 5.00001C12 4.44772 12.4477 4 13 4H21Z",
|
|
@@ -7129,7 +5847,7 @@ function IconTask(props) {
|
|
|
7129
5847
|
}
|
|
7130
5848
|
function IconThinking(props) {
|
|
7131
5849
|
"use memo";
|
|
7132
|
-
return /* @__PURE__ */
|
|
5850
|
+
return /* @__PURE__ */ jsx7(
|
|
7133
5851
|
"svg",
|
|
7134
5852
|
{
|
|
7135
5853
|
viewBox: "0 0 24 24",
|
|
@@ -7137,7 +5855,7 @@ function IconThinking(props) {
|
|
|
7137
5855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7138
5856
|
"aria-hidden": true,
|
|
7139
5857
|
...props,
|
|
7140
|
-
children: /* @__PURE__ */
|
|
5858
|
+
children: /* @__PURE__ */ jsx7(
|
|
7141
5859
|
"path",
|
|
7142
5860
|
{
|
|
7143
5861
|
d: "M14.2196 1.07688C14.8213 0.957197 15.4424 0.977694 16.035 1.13645C16.6276 1.29523 17.1763 1.5884 17.6375 1.99289C18.0986 2.39735 18.4604 2.90282 18.6952 3.46945C18.8188 3.76806 18.9045 4.07981 18.953 4.39719C19.4186 4.59467 19.8537 4.86066 20.2411 5.19016C20.8188 5.68166 21.2767 6.29905 21.5809 6.99387C21.885 7.6887 22.0276 8.44402 21.9969 9.20188C21.9767 9.69961 21.8801 10.1897 21.7157 10.657C22.0929 11.0764 22.4002 11.5585 22.619 12.0866C23.0401 13.1034 23.1137 14.2306 22.8289 15.2937C22.5441 16.3567 21.9169 17.2965 21.0438 17.9665C21.0288 17.978 21.013 17.9884 20.9979 17.9997C20.9973 18.4648 20.9337 18.9287 20.8045 19.3777C20.6156 20.0344 20.2945 20.646 19.8602 21.1736C19.4258 21.7011 18.8873 22.1344 18.2791 22.446C17.6712 22.7574 17.0057 22.9408 16.3241 22.9851C15.6421 23.0293 14.9577 22.9332 14.3143 22.7029C13.6711 22.4725 13.0816 22.1131 12.5828 21.6462C12.3689 21.4459 12.1747 21.2263 11.9998 20.9929C11.825 21.2262 11.6308 21.4459 11.4168 21.6462C10.918 22.1131 10.3286 22.4725 9.68539 22.7029C9.042 22.9332 8.35756 23.0293 7.67562 22.9851C6.99397 22.9408 6.32852 22.7574 5.72054 22.446C5.11231 22.1344 4.57383 21.7012 4.13949 21.1736C3.70518 20.6459 3.38408 20.0344 3.19515 19.3777C3.06602 18.9287 3.00239 18.4648 3.00179 17.9997C2.98677 17.9885 2.9708 17.978 2.95589 17.9665C2.08287 17.2965 1.4546 16.3567 1.16976 15.2937C0.885081 14.2307 0.959612 13.1033 1.3807 12.0866C1.59937 11.5587 1.90602 11.0763 2.28304 10.657C2.1187 10.1898 2.023 9.69947 2.00277 9.20188C1.97203 8.44402 2.11464 7.68869 2.41879 6.99387C2.723 6.29902 3.1809 5.68168 3.75863 5.19016C4.14595 4.86066 4.58112 4.59469 5.04671 4.39719C5.09514 4.07979 5.18087 3.76807 5.30453 3.46945C5.53925 2.90278 5.90106 2.39737 6.36214 1.99289C6.82342 1.58835 7.37206 1.29526 7.96468 1.13645C8.55726 0.977667 9.17842 0.957222 9.78011 1.07688C10.3818 1.19657 10.9487 1.45244 11.4354 1.8259C11.6413 1.98391 11.8293 2.16269 11.9998 2.35617C12.1704 2.16264 12.3583 1.98395 12.5643 1.8259C13.051 1.4524 13.6178 1.19659 14.2196 1.07688ZM9.39046 3.03781C9.08963 2.978 8.77853 2.9887 8.48226 3.06809C8.18611 3.14746 7.91204 3.29371 7.68148 3.49582C7.45094 3.69801 7.26958 3.95083 7.15218 4.2341C7.03482 4.51747 6.98371 4.82453 7.00375 5.13059C7.02381 5.43655 7.11416 5.73416 7.26742 5.99973C7.54355 6.47794 7.38032 7.08972 6.90218 7.36594C6.42391 7.64207 5.81213 7.47799 5.53597 6.99973C5.4474 6.8463 5.37072 6.68703 5.30355 6.52414C5.21761 6.58295 5.13419 6.64582 5.05453 6.71359C4.70797 7.00847 4.43333 7.3788 4.25082 7.79563C4.06831 8.21252 3.98337 8.66611 4.00179 9.12082C4.00751 9.2611 4.02461 9.40046 4.04964 9.53781C4.37718 9.55443 4.68985 9.73089 4.86605 10.0359C5.14206 10.5141 4.97805 11.1259 4.49984 11.4021C3.92803 11.7323 3.48104 12.2422 3.22836 12.8523C2.9758 13.4622 2.93159 14.1384 3.10238 14.7761C3.27327 15.4139 3.6499 15.9776 4.17367 16.3796C4.6975 16.7816 5.33955 16.9996 5.99984 16.9997C6.55196 16.9998 6.99969 17.4476 6.99984 17.9997C6.99982 18.5519 6.55202 18.9996 5.99984 18.9997C5.71286 18.9997 5.42816 18.9739 5.14828 18.9255C5.26423 19.2812 5.44532 19.6127 5.68343 19.9021C5.94396 20.2185 6.26688 20.4788 6.63168 20.6657C6.99658 20.8527 7.39637 20.9634 7.8055 20.99C8.21465 21.0165 8.62555 20.9582 9.01156 20.82C9.39738 20.6818 9.75142 20.4663 10.0506 20.1863C10.3499 19.9061 10.5885 19.5671 10.7518 19.1911C10.8947 18.862 10.9773 18.5097 10.9959 18.1521L10.9998 17.9988V13.0798C10.4898 13.4758 9.90763 13.7763 9.28011 13.9597C8.75012 14.1144 8.1948 13.81 8.03988 13.28C7.88534 12.7501 8.18971 12.1947 8.71957 12.0398C9.37716 11.8475 9.95497 11.4472 10.3661 10.8991C10.7771 10.351 10.9994 9.68388 10.9998 8.99875V4.99973C10.9998 4.69303 10.9294 4.39004 10.7938 4.11496C10.6581 3.83995 10.4609 3.5995 10.2176 3.41281C9.97436 3.22619 9.69116 3.09768 9.39046 3.03781ZM15.5174 3.06809C15.2211 2.98873 14.91 2.97797 14.6092 3.03781C14.3085 3.09771 14.0253 3.22615 13.7821 3.41281C13.5388 3.59953 13.3416 3.83991 13.2059 4.11496C13.0703 4.39004 12.9999 4.69303 12.9998 4.99973V8.99875C13.0003 9.68382 13.2227 10.351 13.6336 10.8991C14.0447 11.4472 14.6226 11.8474 15.2801 12.0398C15.81 12.1947 16.1144 12.7501 15.9598 13.28C15.8049 13.81 15.2496 14.1144 14.7196 13.9597C14.0921 13.7762 13.5098 13.4759 12.9998 13.0798V17.9988L13.0037 18.1521C13.0224 18.5097 13.1049 18.862 13.2479 19.1911C13.4112 19.5671 13.6498 19.9061 13.9491 20.1863C14.2483 20.4664 14.6023 20.6818 14.9881 20.82C15.3741 20.9583 15.785 21.0165 16.1942 20.99C16.6033 20.9634 17.0031 20.8527 17.368 20.6657C17.7328 20.4788 18.0557 20.2185 18.3162 19.9021C18.5543 19.6128 18.7345 19.2811 18.8504 18.9255C18.5709 18.9738 18.2865 18.9997 17.9998 18.9997C17.4476 18.9996 16.9999 18.552 16.9998 17.9997C17 17.4476 17.4477 16.9998 17.9998 16.9997C18.6602 16.9997 19.3021 16.7816 19.826 16.3796C20.3498 15.9776 20.7264 15.4139 20.8973 14.7761C21.0681 14.1384 21.0239 13.4622 20.7713 12.8523C20.5186 12.2423 20.0716 11.7323 19.4998 11.4021C19.0217 11.1259 18.8576 10.5141 19.1336 10.0359C19.3098 9.73087 19.6226 9.55356 19.95 9.53684C19.975 9.39977 19.9922 9.2608 19.9979 9.12082C20.0163 8.6661 19.9314 8.21252 19.7489 7.79563C19.5664 7.37884 19.2917 7.00845 18.9452 6.71359C18.8653 6.64564 18.7813 6.58308 18.6952 6.52414C18.628 6.68692 18.5522 6.84641 18.4637 6.99973C18.1875 7.47801 17.5758 7.64211 17.0975 7.36594C16.6195 7.08967 16.4562 6.47789 16.7323 5.99973C16.8856 5.73413 16.9759 5.4366 16.9959 5.13059C17.016 4.82452 16.9649 4.51748 16.8475 4.2341C16.7301 3.95087 16.5487 3.69799 16.3182 3.49582C16.0876 3.29376 15.8135 3.14743 15.5174 3.06809Z",
|
|
@@ -7149,7 +5867,7 @@ function IconThinking(props) {
|
|
|
7149
5867
|
}
|
|
7150
5868
|
function IconWebScrape(props) {
|
|
7151
5869
|
"use memo";
|
|
7152
|
-
return /* @__PURE__ */
|
|
5870
|
+
return /* @__PURE__ */ jsx7(
|
|
7153
5871
|
"svg",
|
|
7154
5872
|
{
|
|
7155
5873
|
viewBox: "0 0 24 24",
|
|
@@ -7157,7 +5875,7 @@ function IconWebScrape(props) {
|
|
|
7157
5875
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7158
5876
|
"aria-hidden": true,
|
|
7159
5877
|
...props,
|
|
7160
|
-
children: /* @__PURE__ */
|
|
5878
|
+
children: /* @__PURE__ */ jsx7(
|
|
7161
5879
|
"path",
|
|
7162
5880
|
{
|
|
7163
5881
|
d: "M19 3C20.6569 3 22 4.34315 22 6V18L21.9961 18.1543C21.9184 19.6883 20.6883 20.9184 19.1543 20.9961L19 21H5L4.8457 20.9961C3.31166 20.9184 2.08163 19.6883 2.00391 18.1543L2 18V6C2 4.34315 3.34315 3 5 3H19ZM4 18C4 18.5523 4.44772 19 5 19H19C19.5523 19 20 18.5523 20 18V9H4V18ZM14.5 15C14.7761 15 15 15.2239 15 15.5V16.5C15 16.7761 14.7761 17 14.5 17H6.5C6.22386 17 6 16.7761 6 16.5V15.5C6 15.2239 6.22386 15 6.5 15H14.5ZM9.5 11C9.77614 11 10 11.2239 10 11.5V12.5C10 12.7761 9.77614 13 9.5 13H6.5C6.22386 13 6 12.7761 6 12.5V11.5C6 11.2239 6.22386 11 6.5 11H9.5ZM5 5C4.44772 5 4 5.44772 4 6V7H6V5H5ZM12 7H20V6C20 5.44771 19.5523 5 19 5H12V7ZM8 7H10V5H8V7Z",
|
|
@@ -7169,7 +5887,7 @@ function IconWebScrape(props) {
|
|
|
7169
5887
|
}
|
|
7170
5888
|
function IconChat(props) {
|
|
7171
5889
|
"use memo";
|
|
7172
|
-
return /* @__PURE__ */
|
|
5890
|
+
return /* @__PURE__ */ jsx7(
|
|
7173
5891
|
"svg",
|
|
7174
5892
|
{
|
|
7175
5893
|
viewBox: "0 0 24 24",
|
|
@@ -7177,7 +5895,7 @@ function IconChat(props) {
|
|
|
7177
5895
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7178
5896
|
"aria-hidden": true,
|
|
7179
5897
|
...props,
|
|
7180
|
-
children: /* @__PURE__ */
|
|
5898
|
+
children: /* @__PURE__ */ jsx7(
|
|
7181
5899
|
"path",
|
|
7182
5900
|
{
|
|
7183
5901
|
d: "M12 1C12.5523 1 13 1.44772 13 2V5H18C18.7956 5 19.5585 5.3163 20.1211 5.87891C20.6837 6.44151 21 7.20435 21 8V11H22C22.5523 11 23 11.4477 23 12C23 12.5523 22.5523 13 22 13H21V16C21 16.7957 20.6837 17.5585 20.1211 18.1211C19.5585 18.6837 18.7957 19 18 19H8.82812C8.56296 19.0001 8.30857 19.1054 8.12109 19.293L5.91895 21.4951C5.6799 21.7341 5.37545 21.8969 5.04395 21.9629C4.71233 22.0288 4.36805 21.9956 4.05566 21.8662C3.74327 21.7368 3.47598 21.5174 3.28809 21.2363C3.10019 20.9552 3.00004 20.6243 3 20.2861V13H2C1.44772 13 1 12.5523 1 12C1 11.4477 1.44772 11 2 11H3V8C3 7.20435 3.3163 6.44152 3.87891 5.87891C4.44152 5.3163 5.20435 5 6 5H11V3H8C7.44772 3 7 2.55228 7 2C7 1.44772 7.44772 1 8 1H12ZM6 7C5.73478 7 5.4805 7.10543 5.29297 7.29297C5.10543 7.4805 5 7.73478 5 8V19.5859L6.70703 17.8789L6.92676 17.6797C7.46048 17.2422 8.13198 17.0001 8.82812 17H18C18.2652 17 18.5195 16.8946 18.707 16.707C18.8946 16.5195 19 16.2652 19 16V8C19 7.73478 18.8946 7.48051 18.707 7.29297C18.5195 7.10543 18.2652 7 18 7H6ZM9 10C9.55229 10 10 10.4477 10 11V13C10 13.5523 9.55229 14 9 14C8.44772 14 8 13.5523 8 13V11C8 10.4477 8.44772 10 9 10ZM15 10C15.5523 10 16 10.4477 16 11V13C16 13.5523 15.5523 14 15 14C14.4477 14 14 13.5523 14 13V11C14 10.4477 14.4477 10 15 10Z",
|
|
@@ -7189,7 +5907,7 @@ function IconChat(props) {
|
|
|
7189
5907
|
}
|
|
7190
5908
|
function IconImageGeneration(props) {
|
|
7191
5909
|
"use memo";
|
|
7192
|
-
return /* @__PURE__ */
|
|
5910
|
+
return /* @__PURE__ */ jsx7(
|
|
7193
5911
|
"svg",
|
|
7194
5912
|
{
|
|
7195
5913
|
viewBox: "0 0 24 24",
|
|
@@ -7197,7 +5915,7 @@ function IconImageGeneration(props) {
|
|
|
7197
5915
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7198
5916
|
"aria-hidden": true,
|
|
7199
5917
|
...props,
|
|
7200
|
-
children: /* @__PURE__ */
|
|
5918
|
+
children: /* @__PURE__ */ jsx7(
|
|
7201
5919
|
"path",
|
|
7202
5920
|
{
|
|
7203
5921
|
d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM17 15.998C16.6261 15.998 16.2673 16.1468 16.0029 16.4111L11.4141 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V17.4141L17.9971 16.4111C17.7327 16.1468 17.3739 15.998 17 15.998ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H8.58594L14.5889 14.9971C15.2283 14.3577 16.0957 13.998 17 13.998C17.7229 13.998 18.4218 14.2286 19 14.6475V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM10 9C11.6569 9 13 10.3431 13 12C13 13.6569 11.6569 15 10 15C8.34315 15 7 13.6569 7 12C7 10.3431 8.34315 9 10 9ZM10 11C9.44772 11 9 11.4477 9 12C9 12.5523 9.44772 13 10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11ZM15 7H18.584L15 3.41602V7Z",
|
|
@@ -7235,7 +5953,7 @@ function ToolActivityKindIcon({
|
|
|
7235
5953
|
}) {
|
|
7236
5954
|
"use memo";
|
|
7237
5955
|
const Icon = kind ? TOOL_ACTIVITY_KIND_ICONS[kind] : IconCapability;
|
|
7238
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ jsx7(Icon, { ...props });
|
|
7239
5957
|
}
|
|
7240
5958
|
function ToolNameIcon({
|
|
7241
5959
|
toolName,
|
|
@@ -7249,34 +5967,34 @@ function ToolNameIcon({
|
|
|
7249
5967
|
case "generatingimage":
|
|
7250
5968
|
case "imagegenerate":
|
|
7251
5969
|
case "imagegenerator":
|
|
7252
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx7(IconImageGeneration, { ...props });
|
|
7253
5971
|
case "read":
|
|
7254
5972
|
case "readfile":
|
|
7255
5973
|
case "glob":
|
|
7256
|
-
return /* @__PURE__ */
|
|
5974
|
+
return /* @__PURE__ */ jsx7(IconProductDoc, { ...props });
|
|
7257
5975
|
case "write":
|
|
7258
5976
|
case "writefile":
|
|
7259
5977
|
case "edit":
|
|
7260
5978
|
case "editfile":
|
|
7261
5979
|
case "multiedit":
|
|
7262
|
-
return /* @__PURE__ */
|
|
5980
|
+
return /* @__PURE__ */ jsx7(IconBrush, { ...props });
|
|
7263
5981
|
case "bash":
|
|
7264
5982
|
case "shell":
|
|
7265
5983
|
case "exec":
|
|
7266
5984
|
case "execcommand":
|
|
7267
5985
|
case "grep":
|
|
7268
|
-
return /* @__PURE__ */
|
|
5986
|
+
return /* @__PURE__ */ jsx7(IconBuild, { ...props });
|
|
7269
5987
|
case "writestdin":
|
|
7270
|
-
return /* @__PURE__ */
|
|
5988
|
+
return /* @__PURE__ */ jsx7(IconBrush, { ...props });
|
|
7271
5989
|
case "websearch":
|
|
7272
5990
|
case "webfetch":
|
|
7273
|
-
return /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ jsx7(IconNetwork, { ...props });
|
|
7274
5992
|
case "todowrite":
|
|
7275
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsx7(IconTask, { ...props });
|
|
7276
5994
|
case "think":
|
|
7277
|
-
return /* @__PURE__ */
|
|
5995
|
+
return /* @__PURE__ */ jsx7(IconThinking, { ...props });
|
|
7278
5996
|
default:
|
|
7279
|
-
return /* @__PURE__ */
|
|
5997
|
+
return /* @__PURE__ */ jsx7(IconCapability, { ...props });
|
|
7280
5998
|
}
|
|
7281
5999
|
}
|
|
7282
6000
|
function normalizeToolName5(value) {
|
|
@@ -7284,18 +6002,18 @@ function normalizeToolName5(value) {
|
|
|
7284
6002
|
}
|
|
7285
6003
|
|
|
7286
6004
|
// shared/WorkspaceAgentSessionThinkingDisclosure.tsx
|
|
7287
|
-
import { jsx as
|
|
6005
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
7288
6006
|
function WorkspaceAgentSessionThinkingDisclosure({
|
|
7289
6007
|
thinking,
|
|
7290
6008
|
label,
|
|
7291
6009
|
onLinkClick
|
|
7292
6010
|
}) {
|
|
7293
6011
|
"use memo";
|
|
7294
|
-
const [expanded, setExpanded] =
|
|
6012
|
+
const [expanded, setExpanded] = useState3(false);
|
|
7295
6013
|
const isActive = thinking.statusKind === "working" || thinking.statusKind === "waiting";
|
|
7296
6014
|
const statusLabel = thinking.statusKind === "working" ? null : thinkingStatusLabel(thinking.statusKind);
|
|
7297
|
-
return /* @__PURE__ */
|
|
7298
|
-
/* @__PURE__ */
|
|
6015
|
+
return /* @__PURE__ */ jsxs4("div", { className: "workspace-agents-status-panel__detail-thinking-disclosure flex w-full min-w-0 flex-col items-start gap-[7px]", children: [
|
|
6016
|
+
/* @__PURE__ */ jsxs4(
|
|
7299
6017
|
"button",
|
|
7300
6018
|
{
|
|
7301
6019
|
type: "button",
|
|
@@ -7309,7 +6027,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7309
6027
|
setExpanded((value) => !value);
|
|
7310
6028
|
},
|
|
7311
6029
|
children: [
|
|
7312
|
-
isActive ? /* @__PURE__ */
|
|
6030
|
+
isActive ? /* @__PURE__ */ jsx8(
|
|
7313
6031
|
BrainIcon,
|
|
7314
6032
|
{
|
|
7315
6033
|
size: 16,
|
|
@@ -7317,7 +6035,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7317
6035
|
"aria-hidden": "true",
|
|
7318
6036
|
className: "tsh-inline-scanlight-icon shrink-0 opacity-[0.86]"
|
|
7319
6037
|
}
|
|
7320
|
-
) : /* @__PURE__ */
|
|
6038
|
+
) : /* @__PURE__ */ jsx8(
|
|
7321
6039
|
ToolActivityKindIcon,
|
|
7322
6040
|
{
|
|
7323
6041
|
kind: "thinking",
|
|
@@ -7326,12 +6044,12 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7326
6044
|
className: "tsh-inline-scanlight-icon shrink-0 opacity-[0.72]"
|
|
7327
6045
|
}
|
|
7328
6046
|
),
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
/* @__PURE__ */
|
|
7331
|
-
statusLabel ? /* @__PURE__ */
|
|
7332
|
-
isActive ? /* @__PURE__ */
|
|
6047
|
+
/* @__PURE__ */ jsxs4("span", { className: isActive ? "tsh-inline-scanlight-line" : void 0, children: [
|
|
6048
|
+
/* @__PURE__ */ jsx8("span", { className: "font-semibold", children: label }),
|
|
6049
|
+
statusLabel ? /* @__PURE__ */ jsx8("span", { className: "ml-1.5", children: formatInlineStatusLabel(statusLabel) }) : null,
|
|
6050
|
+
isActive ? /* @__PURE__ */ jsx8(LoadingEllipsis, {}) : null
|
|
7333
6051
|
] }),
|
|
7334
|
-
expanded ? /* @__PURE__ */
|
|
6052
|
+
expanded ? /* @__PURE__ */ jsx8(
|
|
7335
6053
|
ChevronDown2,
|
|
7336
6054
|
{
|
|
7337
6055
|
size: 12,
|
|
@@ -7339,7 +6057,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7339
6057
|
"aria-hidden": "true",
|
|
7340
6058
|
className: "shrink-0 text-[var(--text-tertiary)] opacity-0 transition-opacity duration-150 group-hover/thinking-disclosure:opacity-100 group-focus-visible/thinking-disclosure:opacity-100"
|
|
7341
6059
|
}
|
|
7342
|
-
) : /* @__PURE__ */
|
|
6060
|
+
) : /* @__PURE__ */ jsx8(
|
|
7343
6061
|
ChevronRight,
|
|
7344
6062
|
{
|
|
7345
6063
|
size: 12,
|
|
@@ -7351,7 +6069,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7351
6069
|
]
|
|
7352
6070
|
}
|
|
7353
6071
|
),
|
|
7354
|
-
/* @__PURE__ */
|
|
6072
|
+
/* @__PURE__ */ jsx8(CollapsibleReveal, { expanded, className: "w-full", children: /* @__PURE__ */ jsx8("div", { className: "box-border w-full min-w-0 rounded-[6px] bg-[var(--transparency-block)] p-3", children: /* @__PURE__ */ jsx8(
|
|
7355
6073
|
AgentMessageMarkdown,
|
|
7356
6074
|
{
|
|
7357
6075
|
content: thinking.body,
|
|
@@ -7364,10 +6082,10 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
7364
6082
|
}
|
|
7365
6083
|
function LoadingEllipsis() {
|
|
7366
6084
|
"use memo";
|
|
7367
|
-
return /* @__PURE__ */
|
|
7368
|
-
/* @__PURE__ */
|
|
7369
|
-
/* @__PURE__ */
|
|
7370
|
-
/* @__PURE__ */
|
|
6085
|
+
return /* @__PURE__ */ jsxs4("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
6086
|
+
/* @__PURE__ */ jsx8("span", {}),
|
|
6087
|
+
/* @__PURE__ */ jsx8("span", {}),
|
|
6088
|
+
/* @__PURE__ */ jsx8("span", {})
|
|
7371
6089
|
] });
|
|
7372
6090
|
}
|
|
7373
6091
|
function thinkingStatusLabel(statusKind) {
|
|
@@ -7391,21 +6109,21 @@ function formatInlineStatusLabel(label) {
|
|
|
7391
6109
|
}
|
|
7392
6110
|
|
|
7393
6111
|
// shared/agentConversation/components/RawTimelineJsonDisclosure.tsx
|
|
7394
|
-
import { useState as
|
|
6112
|
+
import { useState as useState4 } from "react";
|
|
7395
6113
|
import { ChevronDown as ChevronDown3, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
7396
|
-
import { jsx as
|
|
6114
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
7397
6115
|
function RawTimelineJsonDisclosure({
|
|
7398
6116
|
items,
|
|
7399
6117
|
label
|
|
7400
6118
|
}) {
|
|
7401
6119
|
"use memo";
|
|
7402
|
-
const [expanded, setExpanded] =
|
|
6120
|
+
const [expanded, setExpanded] = useState4(false);
|
|
7403
6121
|
const json = rawTimelineJson(items);
|
|
7404
6122
|
if (!json) {
|
|
7405
6123
|
return null;
|
|
7406
6124
|
}
|
|
7407
|
-
return /* @__PURE__ */
|
|
7408
|
-
/* @__PURE__ */
|
|
6125
|
+
return /* @__PURE__ */ jsxs5("div", { className: "mt-2 rounded-md border border-[color:color-mix(in_srgb,var(--state-danger)_18%,transparent)] bg-[color:color-mix(in_srgb,var(--background-fronted)_92%,var(--state-danger))] px-2 py-1.5 text-[11px] text-[var(--state-danger)]", children: [
|
|
6126
|
+
/* @__PURE__ */ jsxs5(
|
|
7409
6127
|
"button",
|
|
7410
6128
|
{
|
|
7411
6129
|
type: "button",
|
|
@@ -7413,12 +6131,12 @@ function RawTimelineJsonDisclosure({
|
|
|
7413
6131
|
"aria-expanded": expanded,
|
|
7414
6132
|
onClick: () => setExpanded((value) => !value),
|
|
7415
6133
|
children: [
|
|
7416
|
-
expanded ? /* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
6134
|
+
expanded ? /* @__PURE__ */ jsx9(ChevronDown3, { size: 13, strokeWidth: 2.2, "aria-hidden": true }) : /* @__PURE__ */ jsx9(ChevronRight2, { size: 13, strokeWidth: 2.2, "aria-hidden": true }),
|
|
6135
|
+
/* @__PURE__ */ jsx9("span", { children: label })
|
|
7418
6136
|
]
|
|
7419
6137
|
}
|
|
7420
6138
|
),
|
|
7421
|
-
/* @__PURE__ */
|
|
6139
|
+
/* @__PURE__ */ jsx9(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx9("pre", { className: "mt-2 max-h-[320px] overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line-2)] bg-[var(--background-fronted)] px-3 py-2 font-mono text-[11px] leading-5 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx9("code", { children: json }) }) })
|
|
7422
6140
|
] });
|
|
7423
6141
|
}
|
|
7424
6142
|
function rawTimelineJson(items) {
|
|
@@ -7433,7 +6151,7 @@ function rawTimelineJson(items) {
|
|
|
7433
6151
|
}
|
|
7434
6152
|
|
|
7435
6153
|
// shared/agentConversation/components/AgentThinkingDisclosure.tsx
|
|
7436
|
-
import { Fragment, jsx as
|
|
6154
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7437
6155
|
function AgentThinkingDisclosure({
|
|
7438
6156
|
thinking,
|
|
7439
6157
|
label,
|
|
@@ -7442,8 +6160,8 @@ function AgentThinkingDisclosure({
|
|
|
7442
6160
|
rawTimelineJsonLabel = ""
|
|
7443
6161
|
}) {
|
|
7444
6162
|
"use memo";
|
|
7445
|
-
return /* @__PURE__ */
|
|
7446
|
-
/* @__PURE__ */
|
|
6163
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
6164
|
+
/* @__PURE__ */ jsx10(
|
|
7447
6165
|
WorkspaceAgentSessionThinkingDisclosure,
|
|
7448
6166
|
{
|
|
7449
6167
|
thinking,
|
|
@@ -7451,7 +6169,7 @@ function AgentThinkingDisclosure({
|
|
|
7451
6169
|
onLinkClick
|
|
7452
6170
|
}
|
|
7453
6171
|
),
|
|
7454
|
-
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */
|
|
6172
|
+
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx10(
|
|
7455
6173
|
RawTimelineJsonDisclosure,
|
|
7456
6174
|
{
|
|
7457
6175
|
items: thinking.sourceTimelineItems,
|
|
@@ -7461,8 +6179,54 @@ function AgentThinkingDisclosure({
|
|
|
7461
6179
|
] });
|
|
7462
6180
|
}
|
|
7463
6181
|
|
|
6182
|
+
// contexts/workspace/presentation/renderer/components/shared/CanvasNodeGhostIconButton.tsx
|
|
6183
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
6184
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6185
|
+
var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2({
|
|
6186
|
+
className,
|
|
6187
|
+
children,
|
|
6188
|
+
onPointerDown,
|
|
6189
|
+
onMouseDown,
|
|
6190
|
+
onClick,
|
|
6191
|
+
stopsEventPropagation = true,
|
|
6192
|
+
...rest
|
|
6193
|
+
}, ref) {
|
|
6194
|
+
"use memo";
|
|
6195
|
+
return /* @__PURE__ */ jsx11(
|
|
6196
|
+
"button",
|
|
6197
|
+
{
|
|
6198
|
+
ref,
|
|
6199
|
+
...rest,
|
|
6200
|
+
type: "button",
|
|
6201
|
+
className: cn(
|
|
6202
|
+
"nodrag inline-flex h-7 min-h-7 w-7 min-w-7 shrink-0 items-center justify-center rounded-[4px] border border-transparent bg-transparent p-0 text-[var(--cove-canvas-control-text)] transition-[background-color,color,border-color,opacity] duration-200 ease-in-out [-webkit-app-region:no-drag] hover:border-transparent hover:bg-[var(--transparency-block)] hover:text-[var(--cove-canvas-control-text-hover)] active:bg-[var(--transparency-block-active)] active:text-[var(--cove-canvas-control-text-hover)] disabled:cursor-not-allowed disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-[color:color-mix(in_srgb,var(--tsh-shell-accent)_80%,white)] focus-visible:outline-offset-2 [&_svg]:block [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:fill-none [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:stroke-current data-[menu-open=true]:border-transparent data-[menu-open=true]:bg-[var(--transparency-block)] data-[menu-open=true]:text-[var(--cove-canvas-control-text-hover)] data-[menu-open=true]:hover:bg-[var(--transparency-block-active)]",
|
|
6203
|
+
className
|
|
6204
|
+
),
|
|
6205
|
+
onPointerDown: (event) => {
|
|
6206
|
+
if (stopsEventPropagation) {
|
|
6207
|
+
event.stopPropagation();
|
|
6208
|
+
}
|
|
6209
|
+
onPointerDown?.(event);
|
|
6210
|
+
},
|
|
6211
|
+
onMouseDown: (event) => {
|
|
6212
|
+
if (stopsEventPropagation) {
|
|
6213
|
+
event.stopPropagation();
|
|
6214
|
+
}
|
|
6215
|
+
onMouseDown?.(event);
|
|
6216
|
+
},
|
|
6217
|
+
onClick: (event) => {
|
|
6218
|
+
if (stopsEventPropagation) {
|
|
6219
|
+
event.stopPropagation();
|
|
6220
|
+
}
|
|
6221
|
+
onClick?.(event);
|
|
6222
|
+
},
|
|
6223
|
+
children
|
|
6224
|
+
}
|
|
6225
|
+
);
|
|
6226
|
+
});
|
|
6227
|
+
|
|
7464
6228
|
// shared/agentConversation/components/AgentMessageBlock.tsx
|
|
7465
|
-
import { jsx as jsx12, jsxs as
|
|
6229
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
7466
6230
|
var MESSAGE_COPY_FEEDBACK_MS = 1400;
|
|
7467
6231
|
function AgentMessageBlock({
|
|
7468
6232
|
workspaceRoot,
|
|
@@ -7526,7 +6290,7 @@ function AgentMessageBlock({
|
|
|
7526
6290
|
},
|
|
7527
6291
|
thinking.id
|
|
7528
6292
|
)) : null;
|
|
7529
|
-
return /* @__PURE__ */
|
|
6293
|
+
return /* @__PURE__ */ jsxs7(
|
|
7530
6294
|
"div",
|
|
7531
6295
|
{
|
|
7532
6296
|
className: isUser ? AgentGUIConversation_styles_default.userMessageFlow : AgentGUIConversation_styles_default.assistantMessageFlow,
|
|
@@ -7583,7 +6347,7 @@ function AgentMessageBlock({
|
|
|
7583
6347
|
}
|
|
7584
6348
|
);
|
|
7585
6349
|
if (rawTimelineJson2) {
|
|
7586
|
-
return /* @__PURE__ */
|
|
6350
|
+
return /* @__PURE__ */ jsxs7(
|
|
7587
6351
|
AgentCopyableMessageGroup,
|
|
7588
6352
|
{
|
|
7589
6353
|
copyText: message.copyText ?? null,
|
|
@@ -7623,7 +6387,7 @@ function AgentCopyableMessageGroup({
|
|
|
7623
6387
|
speaker
|
|
7624
6388
|
}) {
|
|
7625
6389
|
"use memo";
|
|
7626
|
-
return /* @__PURE__ */
|
|
6390
|
+
return /* @__PURE__ */ jsxs7("div", { className: AgentGUIConversation_styles_default.messageGroup, "data-agent-message-speaker": speaker, children: [
|
|
7627
6391
|
children,
|
|
7628
6392
|
copyText ? /* @__PURE__ */ jsx12(
|
|
7629
6393
|
AgentMessageCopyButton,
|
|
@@ -7639,8 +6403,8 @@ function AgentMessageCopyButton({
|
|
|
7639
6403
|
onCopyMessageText
|
|
7640
6404
|
}) {
|
|
7641
6405
|
"use memo";
|
|
7642
|
-
const [copied, setCopied] =
|
|
7643
|
-
|
|
6406
|
+
const [copied, setCopied] = useState5(false);
|
|
6407
|
+
useEffect4(() => {
|
|
7644
6408
|
if (!copied) {
|
|
7645
6409
|
return;
|
|
7646
6410
|
}
|
|
@@ -7656,9 +6420,8 @@ function AgentMessageCopyButton({
|
|
|
7656
6420
|
}, [copyText, onCopyMessageText]);
|
|
7657
6421
|
const label = copied ? translate("agentHost.agentGui.messageCopied") : translate("agentHost.agentGui.copyMessage");
|
|
7658
6422
|
return /* @__PURE__ */ jsx12(
|
|
7659
|
-
|
|
6423
|
+
CanvasNodeGhostIconButton,
|
|
7660
6424
|
{
|
|
7661
|
-
type: "button",
|
|
7662
6425
|
className: AgentGUIConversation_styles_default.messageCopyButton,
|
|
7663
6426
|
"aria-label": label,
|
|
7664
6427
|
"data-copied": copied ? "true" : "false",
|
|
@@ -7703,14 +6466,14 @@ function AgentUserImageGrid({
|
|
|
7703
6466
|
}
|
|
7704
6467
|
function useAgentMessageImageSources(images) {
|
|
7705
6468
|
const runtime = getOptionalAgentActivityRuntime();
|
|
7706
|
-
const [sources, setSources] =
|
|
6469
|
+
const [sources, setSources] = useState5(() => /* @__PURE__ */ new Map());
|
|
7707
6470
|
const missingImages = useMemo(
|
|
7708
6471
|
() => images.filter(
|
|
7709
6472
|
(image) => !imageDataUrl(image) && !sources.has(image.id) && image.workspaceId && image.agentSessionId && image.attachmentId
|
|
7710
6473
|
),
|
|
7711
6474
|
[images, sources]
|
|
7712
6475
|
);
|
|
7713
|
-
|
|
6476
|
+
useEffect4(() => {
|
|
7714
6477
|
if (!runtime?.readSessionAttachment || missingImages.length === 0) {
|
|
7715
6478
|
return;
|
|
7716
6479
|
}
|
|
@@ -7765,7 +6528,7 @@ function AgentSystemNoticeMessage({
|
|
|
7765
6528
|
{
|
|
7766
6529
|
role: isWarning ? "status" : void 0,
|
|
7767
6530
|
className: "box-border w-full min-w-0 rounded-[8px] border border-[color-mix(in_srgb,var(--state-warning)_14%,transparent)] bg-[color-mix(in_srgb,var(--background-fronted)_100%,var(--state-warning)_6%)] p-3 text-[13px] leading-5 text-[var(--text-primary)]",
|
|
7768
|
-
children: /* @__PURE__ */
|
|
6531
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
7769
6532
|
/* @__PURE__ */ jsx12(
|
|
7770
6533
|
Icon,
|
|
7771
6534
|
{
|
|
@@ -7775,7 +6538,7 @@ function AgentSystemNoticeMessage({
|
|
|
7775
6538
|
className: "mt-0.5 shrink-0 text-[var(--state-warning)]"
|
|
7776
6539
|
}
|
|
7777
6540
|
),
|
|
7778
|
-
/* @__PURE__ */
|
|
6541
|
+
/* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
|
|
7779
6542
|
/* @__PURE__ */ jsx12("div", { className: "font-medium text-[var(--text-primary)]", children: systemNoticeTitle(message) }),
|
|
7780
6543
|
detail ? /* @__PURE__ */ jsx12(AgentMessageDetailsDisclosure, { detail, className: "mt-1" }) : null
|
|
7781
6544
|
] })
|
|
@@ -7836,8 +6599,8 @@ function AgentVisibleErrorMessage({
|
|
|
7836
6599
|
{
|
|
7837
6600
|
role: "alert",
|
|
7838
6601
|
className: "box-border w-full min-w-0 rounded-[8px] border border-[var(--on-danger-hover)] bg-[var(--on-danger)] p-3 text-[13px] leading-5 text-[var(--state-danger)]",
|
|
7839
|
-
children: /* @__PURE__ */
|
|
7840
|
-
/* @__PURE__ */
|
|
6602
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
6603
|
+
/* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
|
|
7841
6604
|
/* @__PURE__ */ jsx12("div", { className: "font-medium text-[var(--text-primary)]", children: title }),
|
|
7842
6605
|
hint ? /* @__PURE__ */ jsx12("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: hint }) : null,
|
|
7843
6606
|
detail ? /* @__PURE__ */ jsx12(AgentMessageDetailsDisclosure, { detail, className: "mt-1" }) : null
|
|
@@ -7862,9 +6625,9 @@ function AgentMessageDetailsDisclosure({
|
|
|
7862
6625
|
className = ""
|
|
7863
6626
|
}) {
|
|
7864
6627
|
"use memo";
|
|
7865
|
-
const [expanded, setExpanded] =
|
|
7866
|
-
return /* @__PURE__ */
|
|
7867
|
-
/* @__PURE__ */
|
|
6628
|
+
const [expanded, setExpanded] = useState5(false);
|
|
6629
|
+
return /* @__PURE__ */ jsxs7("div", { className: `${className} text-[11px] text-[var(--state-danger)]`, children: [
|
|
6630
|
+
/* @__PURE__ */ jsxs7(
|
|
7868
6631
|
"button",
|
|
7869
6632
|
{
|
|
7870
6633
|
type: "button",
|
|
@@ -7937,7 +6700,7 @@ function visibleErrorHint(message) {
|
|
|
7937
6700
|
}
|
|
7938
6701
|
|
|
7939
6702
|
// shared/agentConversation/components/AgentProcessingRow.tsx
|
|
7940
|
-
import { jsx as jsx13, jsxs as
|
|
6703
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7941
6704
|
function AgentProcessingRow({
|
|
7942
6705
|
row,
|
|
7943
6706
|
label
|
|
@@ -7948,7 +6711,7 @@ function AgentProcessingRow({
|
|
|
7948
6711
|
{
|
|
7949
6712
|
"data-row-id": row.id,
|
|
7950
6713
|
className: "workspace-agents-status-panel__detail-processing tsh-inline-scanlight-group inline-flex items-center gap-1.5",
|
|
7951
|
-
children: /* @__PURE__ */
|
|
6714
|
+
children: /* @__PURE__ */ jsxs8("span", { className: "tsh-inline-scanlight-line font-semibold", children: [
|
|
7952
6715
|
processingLabel(row, label),
|
|
7953
6716
|
/* @__PURE__ */ jsx13(LoadingEllipsis2, {})
|
|
7954
6717
|
] })
|
|
@@ -7963,7 +6726,7 @@ function processingLabel(row, fallback) {
|
|
|
7963
6726
|
}
|
|
7964
6727
|
function LoadingEllipsis2() {
|
|
7965
6728
|
"use memo";
|
|
7966
|
-
return /* @__PURE__ */
|
|
6729
|
+
return /* @__PURE__ */ jsxs8(
|
|
7967
6730
|
"span",
|
|
7968
6731
|
{
|
|
7969
6732
|
className: "tsh-inline-loading-ellipsis tsh-inline-loading-ellipsis--entry-timing",
|
|
@@ -7978,20 +6741,20 @@ function LoadingEllipsis2() {
|
|
|
7978
6741
|
}
|
|
7979
6742
|
|
|
7980
6743
|
// shared/agentConversation/components/AgentToolGroupRow.tsx
|
|
7981
|
-
import { memo, useState as
|
|
6744
|
+
import { memo, useState as useState15 } from "react";
|
|
7982
6745
|
import { ChevronDown as ChevronDown6, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
7983
6746
|
|
|
7984
6747
|
// shared/agentConversation/components/AgentAskUserQuestionCard.tsx
|
|
7985
|
-
import { useState as
|
|
6748
|
+
import { useState as useState12 } from "react";
|
|
7986
6749
|
|
|
7987
6750
|
// shared/agentConversation/components/AgentToolCallHeader.tsx
|
|
7988
6751
|
import { AlertCircle, ChevronDown as ChevronDown4, ChevronRight as ChevronRight4 } from "lucide-react";
|
|
7989
6752
|
|
|
7990
6753
|
// app/renderer/components/icons/FilePenLineIcon.tsx
|
|
7991
6754
|
import {
|
|
7992
|
-
forwardRef as
|
|
6755
|
+
forwardRef as forwardRef4,
|
|
7993
6756
|
useCallback as useCallback5,
|
|
7994
|
-
useEffect as
|
|
6757
|
+
useEffect as useEffect5,
|
|
7995
6758
|
useImperativeHandle as useImperativeHandle2,
|
|
7996
6759
|
useRef as useRef4
|
|
7997
6760
|
} from "react";
|
|
@@ -8000,7 +6763,7 @@ import {
|
|
|
8000
6763
|
useAnimation as useAnimation2,
|
|
8001
6764
|
useReducedMotion as useReducedMotion2
|
|
8002
6765
|
} from "framer-motion";
|
|
8003
|
-
import { jsx as jsx14, jsxs as
|
|
6766
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8004
6767
|
var PEN_VARIANTS = {
|
|
8005
6768
|
normal: {
|
|
8006
6769
|
rotate: 0,
|
|
@@ -8045,7 +6808,7 @@ var LINE_VARIANTS = {
|
|
|
8045
6808
|
}
|
|
8046
6809
|
}
|
|
8047
6810
|
};
|
|
8048
|
-
var FilePenLineIcon =
|
|
6811
|
+
var FilePenLineIcon = forwardRef4(
|
|
8049
6812
|
({
|
|
8050
6813
|
active = false,
|
|
8051
6814
|
onMouseEnter,
|
|
@@ -8073,7 +6836,7 @@ var FilePenLineIcon = forwardRef3(
|
|
|
8073
6836
|
stopAnimation
|
|
8074
6837
|
};
|
|
8075
6838
|
});
|
|
8076
|
-
|
|
6839
|
+
useEffect5(() => {
|
|
8077
6840
|
if (active) {
|
|
8078
6841
|
startAnimation();
|
|
8079
6842
|
return;
|
|
@@ -8107,7 +6870,7 @@ var FilePenLineIcon = forwardRef3(
|
|
|
8107
6870
|
onMouseEnter: handleMouseEnter,
|
|
8108
6871
|
onMouseLeave: handleMouseLeave,
|
|
8109
6872
|
...props,
|
|
8110
|
-
children: /* @__PURE__ */
|
|
6873
|
+
children: /* @__PURE__ */ jsxs9(
|
|
8111
6874
|
"svg",
|
|
8112
6875
|
{
|
|
8113
6876
|
fill: "none",
|
|
@@ -8150,9 +6913,9 @@ FilePenLineIcon.displayName = "FilePenLineIcon";
|
|
|
8150
6913
|
|
|
8151
6914
|
// app/renderer/components/icons/FileTextIcon.tsx
|
|
8152
6915
|
import {
|
|
8153
|
-
forwardRef as
|
|
6916
|
+
forwardRef as forwardRef5,
|
|
8154
6917
|
useCallback as useCallback6,
|
|
8155
|
-
useEffect as
|
|
6918
|
+
useEffect as useEffect6,
|
|
8156
6919
|
useImperativeHandle as useImperativeHandle3,
|
|
8157
6920
|
useRef as useRef5
|
|
8158
6921
|
} from "react";
|
|
@@ -8161,7 +6924,7 @@ import {
|
|
|
8161
6924
|
useAnimation as useAnimation3,
|
|
8162
6925
|
useReducedMotion as useReducedMotion3
|
|
8163
6926
|
} from "framer-motion";
|
|
8164
|
-
import { jsx as jsx15, jsxs as
|
|
6927
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
8165
6928
|
var FILE_TEXT_LINE_VARIANTS = {
|
|
8166
6929
|
normal: {
|
|
8167
6930
|
pathLength: 1,
|
|
@@ -8188,7 +6951,7 @@ var FILE_TEXT_LINE_VARIANTS = {
|
|
|
8188
6951
|
}
|
|
8189
6952
|
})
|
|
8190
6953
|
};
|
|
8191
|
-
var FileTextIcon =
|
|
6954
|
+
var FileTextIcon = forwardRef5(
|
|
8192
6955
|
({
|
|
8193
6956
|
active = false,
|
|
8194
6957
|
onMouseEnter,
|
|
@@ -8216,7 +6979,7 @@ var FileTextIcon = forwardRef4(
|
|
|
8216
6979
|
stopAnimation
|
|
8217
6980
|
};
|
|
8218
6981
|
});
|
|
8219
|
-
|
|
6982
|
+
useEffect6(() => {
|
|
8220
6983
|
if (active) {
|
|
8221
6984
|
startAnimation();
|
|
8222
6985
|
return;
|
|
@@ -8250,7 +7013,7 @@ var FileTextIcon = forwardRef4(
|
|
|
8250
7013
|
onMouseEnter: handleMouseEnter,
|
|
8251
7014
|
onMouseLeave: handleMouseLeave,
|
|
8252
7015
|
...props,
|
|
8253
|
-
children: /* @__PURE__ */
|
|
7016
|
+
children: /* @__PURE__ */ jsxs10(
|
|
8254
7017
|
motion3.svg,
|
|
8255
7018
|
{
|
|
8256
7019
|
animate: controls,
|
|
@@ -8324,9 +7087,9 @@ FileTextIcon.displayName = "FileTextIcon";
|
|
|
8324
7087
|
|
|
8325
7088
|
// app/renderer/components/icons/HammerIcon.tsx
|
|
8326
7089
|
import {
|
|
8327
|
-
forwardRef as
|
|
7090
|
+
forwardRef as forwardRef6,
|
|
8328
7091
|
useCallback as useCallback7,
|
|
8329
|
-
useEffect as
|
|
7092
|
+
useEffect as useEffect7,
|
|
8330
7093
|
useImperativeHandle as useImperativeHandle4,
|
|
8331
7094
|
useRef as useRef6
|
|
8332
7095
|
} from "react";
|
|
@@ -8335,7 +7098,7 @@ import {
|
|
|
8335
7098
|
useAnimation as useAnimation4,
|
|
8336
7099
|
useReducedMotion as useReducedMotion4
|
|
8337
7100
|
} from "framer-motion";
|
|
8338
|
-
import { jsx as jsx16, jsxs as
|
|
7101
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
8339
7102
|
var HAMMER_VARIANTS = {
|
|
8340
7103
|
normal: {
|
|
8341
7104
|
rotate: 0,
|
|
@@ -8363,7 +7126,7 @@ var HAMMER_VARIANTS = {
|
|
|
8363
7126
|
}
|
|
8364
7127
|
}
|
|
8365
7128
|
};
|
|
8366
|
-
var HammerIcon =
|
|
7129
|
+
var HammerIcon = forwardRef6(
|
|
8367
7130
|
({
|
|
8368
7131
|
active = false,
|
|
8369
7132
|
onMouseEnter,
|
|
@@ -8391,7 +7154,7 @@ var HammerIcon = forwardRef5(
|
|
|
8391
7154
|
stopAnimation
|
|
8392
7155
|
};
|
|
8393
7156
|
});
|
|
8394
|
-
|
|
7157
|
+
useEffect7(() => {
|
|
8395
7158
|
if (active) {
|
|
8396
7159
|
startAnimation();
|
|
8397
7160
|
return;
|
|
@@ -8425,7 +7188,7 @@ var HammerIcon = forwardRef5(
|
|
|
8425
7188
|
onMouseEnter: handleMouseEnter,
|
|
8426
7189
|
onMouseLeave: handleMouseLeave,
|
|
8427
7190
|
...props,
|
|
8428
|
-
children: /* @__PURE__ */
|
|
7191
|
+
children: /* @__PURE__ */ jsxs11(
|
|
8429
7192
|
motion4.svg,
|
|
8430
7193
|
{
|
|
8431
7194
|
animate: controls,
|
|
@@ -8537,7 +7300,7 @@ function getFileChangeRenderData(call) {
|
|
|
8537
7300
|
if (fromContentDiff.length > 0) {
|
|
8538
7301
|
return fromContentDiff;
|
|
8539
7302
|
}
|
|
8540
|
-
const inputPath =
|
|
7303
|
+
const inputPath = firstString3(
|
|
8541
7304
|
stringValue7(call.input?.file_path),
|
|
8542
7305
|
stringValue7(call.input?.filePath),
|
|
8543
7306
|
stringValue7(call.input?.path),
|
|
@@ -8546,31 +7309,31 @@ function getFileChangeRenderData(call) {
|
|
|
8546
7309
|
stringValue7(payloadInput?.path),
|
|
8547
7310
|
firstLocationPath2(inputLocations)
|
|
8548
7311
|
);
|
|
8549
|
-
const unifiedDiff =
|
|
7312
|
+
const unifiedDiff = firstString3(
|
|
8550
7313
|
stringValue7(call.output?.patch),
|
|
8551
7314
|
stringValue7(payloadOutput?.patch),
|
|
8552
7315
|
stringValue7(call.output?.diff),
|
|
8553
7316
|
stringValue7(payloadOutput?.diff)
|
|
8554
7317
|
);
|
|
8555
|
-
const path =
|
|
7318
|
+
const path = firstString3(
|
|
8556
7319
|
inputPath,
|
|
8557
7320
|
unifiedDiff ? extractAgentPatchPath(unifiedDiff) : null
|
|
8558
7321
|
);
|
|
8559
7322
|
if (!path) {
|
|
8560
7323
|
return [];
|
|
8561
7324
|
}
|
|
8562
|
-
const content =
|
|
7325
|
+
const content = firstString3(
|
|
8563
7326
|
stringValue7(call.input?.content),
|
|
8564
7327
|
stringValue7(payloadInput?.content),
|
|
8565
7328
|
stringValue7(rawInput?.content)
|
|
8566
7329
|
);
|
|
8567
|
-
const oldString =
|
|
7330
|
+
const oldString = firstString3(
|
|
8568
7331
|
stringValue7(call.input?.old_string),
|
|
8569
7332
|
stringValue7(payloadInput?.old_string),
|
|
8570
7333
|
stringValue7(call.output?.oldString),
|
|
8571
7334
|
stringValue7(payloadOutput?.oldString)
|
|
8572
7335
|
);
|
|
8573
|
-
const newString =
|
|
7336
|
+
const newString = firstString3(
|
|
8574
7337
|
stringValue7(call.input?.new_string),
|
|
8575
7338
|
stringValue7(payloadInput?.new_string),
|
|
8576
7339
|
stringValue7(call.output?.newString),
|
|
@@ -8612,26 +7375,26 @@ function structuredPatchFiles(value) {
|
|
|
8612
7375
|
}
|
|
8613
7376
|
return patches.flatMap((item) => {
|
|
8614
7377
|
const patch = recordValue4(item);
|
|
8615
|
-
const path =
|
|
7378
|
+
const path = firstString3(
|
|
8616
7379
|
stringValue7(patch?.filePath),
|
|
8617
7380
|
stringValue7(patch?.path)
|
|
8618
7381
|
);
|
|
8619
|
-
const diff =
|
|
7382
|
+
const diff = firstString3(
|
|
8620
7383
|
stringValue7(patch?.diff),
|
|
8621
7384
|
stringValue7(patch?.patch)
|
|
8622
7385
|
);
|
|
8623
7386
|
if (!path) {
|
|
8624
7387
|
return [];
|
|
8625
7388
|
}
|
|
8626
|
-
const oldString =
|
|
7389
|
+
const oldString = firstString3(
|
|
8627
7390
|
stringValue7(patch?.oldString),
|
|
8628
7391
|
stringValue7(patch?.old_string)
|
|
8629
7392
|
);
|
|
8630
|
-
const newString =
|
|
7393
|
+
const newString = firstString3(
|
|
8631
7394
|
stringValue7(patch?.newString),
|
|
8632
7395
|
stringValue7(patch?.new_string)
|
|
8633
7396
|
);
|
|
8634
|
-
const content =
|
|
7397
|
+
const content = firstString3(stringValue7(patch?.content), newString);
|
|
8635
7398
|
if (!diff && !oldString && !newString && !content) {
|
|
8636
7399
|
return [];
|
|
8637
7400
|
}
|
|
@@ -8699,16 +7462,16 @@ function fileChangesFiles(value) {
|
|
|
8699
7462
|
if (!path) {
|
|
8700
7463
|
return [];
|
|
8701
7464
|
}
|
|
8702
|
-
const diff =
|
|
8703
|
-
const oldString =
|
|
7465
|
+
const diff = firstString3(stringValue7(file?.diff), stringValue7(file?.patch));
|
|
7466
|
+
const oldString = firstString3(
|
|
8704
7467
|
stringValue7(file?.oldString),
|
|
8705
7468
|
stringValue7(file?.old_string)
|
|
8706
7469
|
);
|
|
8707
|
-
const newString =
|
|
7470
|
+
const newString = firstString3(
|
|
8708
7471
|
stringValue7(file?.newString),
|
|
8709
7472
|
stringValue7(file?.new_string)
|
|
8710
7473
|
);
|
|
8711
|
-
const content =
|
|
7474
|
+
const content = firstString3(stringValue7(file?.content), newString);
|
|
8712
7475
|
const changeType = firstKnownChangeType(
|
|
8713
7476
|
normalizeChangeType2(stringValue7(file?.change)),
|
|
8714
7477
|
normalizeChangeType2(stringValue7(file?.kind)),
|
|
@@ -8747,7 +7510,7 @@ function changeMapFiles(value) {
|
|
|
8747
7510
|
if (!normalizedPath || !change) {
|
|
8748
7511
|
return [];
|
|
8749
7512
|
}
|
|
8750
|
-
const unifiedDiff =
|
|
7513
|
+
const unifiedDiff = firstString3(
|
|
8751
7514
|
stringValue7(change.unified_diff),
|
|
8752
7515
|
stringValue7(change.unifiedDiff),
|
|
8753
7516
|
stringValue7(change.diff),
|
|
@@ -8755,11 +7518,11 @@ function changeMapFiles(value) {
|
|
|
8755
7518
|
);
|
|
8756
7519
|
const explicitContent = stringValue7(change.content);
|
|
8757
7520
|
const normalizedType = normalizeChangeType2(stringValue7(change.type));
|
|
8758
|
-
let oldString =
|
|
7521
|
+
let oldString = firstString3(
|
|
8759
7522
|
stringValue7(change.old_string),
|
|
8760
7523
|
stringValue7(change.oldString)
|
|
8761
7524
|
);
|
|
8762
|
-
let newString =
|
|
7525
|
+
let newString = firstString3(
|
|
8763
7526
|
stringValue7(change.new_string),
|
|
8764
7527
|
stringValue7(change.newString),
|
|
8765
7528
|
explicitContent
|
|
@@ -8774,7 +7537,7 @@ function changeMapFiles(value) {
|
|
|
8774
7537
|
if (normalizedType === "deleted" && newString === null && oldString !== null) {
|
|
8775
7538
|
newString = "";
|
|
8776
7539
|
}
|
|
8777
|
-
const content =
|
|
7540
|
+
const content = firstString3(
|
|
8778
7541
|
normalizedType === "deleted" ? null : explicitContent,
|
|
8779
7542
|
normalizedType === "created" ? newString : null
|
|
8780
7543
|
);
|
|
@@ -8828,7 +7591,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8828
7591
|
return [];
|
|
8829
7592
|
}
|
|
8830
7593
|
const relatedChange = recordValue4(changes?.[path]);
|
|
8831
|
-
const unifiedDiff =
|
|
7594
|
+
const unifiedDiff = firstString3(
|
|
8832
7595
|
stringValue7(record.diff),
|
|
8833
7596
|
stringValue7(record.patch),
|
|
8834
7597
|
stringValue7(relatedChange?.unified_diff),
|
|
@@ -8837,13 +7600,13 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8837
7600
|
const normalizedType = normalizeChangeType2(
|
|
8838
7601
|
stringValue7(relatedChange?.type)
|
|
8839
7602
|
);
|
|
8840
|
-
let oldString =
|
|
7603
|
+
let oldString = firstString3(
|
|
8841
7604
|
stringValue7(record.oldText),
|
|
8842
7605
|
stringValue7(record.oldString),
|
|
8843
7606
|
stringValue7(relatedChange?.old_string),
|
|
8844
7607
|
stringValue7(relatedChange?.oldString)
|
|
8845
7608
|
);
|
|
8846
|
-
let newString =
|
|
7609
|
+
let newString = firstString3(
|
|
8847
7610
|
stringValue7(record.newText),
|
|
8848
7611
|
stringValue7(record.newString),
|
|
8849
7612
|
stringValue7(relatedChange?.new_string),
|
|
@@ -8860,7 +7623,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8860
7623
|
if (normalizedType === "deleted" && newString === null && oldString !== null) {
|
|
8861
7624
|
newString = "";
|
|
8862
7625
|
}
|
|
8863
|
-
const explicitContent =
|
|
7626
|
+
const explicitContent = firstString3(
|
|
8864
7627
|
stringValue7(record.content),
|
|
8865
7628
|
stringValue7(relatedChange?.content)
|
|
8866
7629
|
);
|
|
@@ -8877,7 +7640,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8877
7640
|
if (changeType === "created" && oldString === null && newString !== null) {
|
|
8878
7641
|
oldString = "";
|
|
8879
7642
|
}
|
|
8880
|
-
const content =
|
|
7643
|
+
const content = firstString3(
|
|
8881
7644
|
changeType === "deleted" ? null : explicitContent,
|
|
8882
7645
|
changeType === "created" ? newString : null
|
|
8883
7646
|
);
|
|
@@ -9057,7 +7820,7 @@ function languageForPath(path) {
|
|
|
9057
7820
|
function normalizeToolName6(value) {
|
|
9058
7821
|
return (value ?? "").trim().replace(/[_\s-]+/g, "").toLowerCase();
|
|
9059
7822
|
}
|
|
9060
|
-
function
|
|
7823
|
+
function firstString3(...values) {
|
|
9061
7824
|
for (const value of values) {
|
|
9062
7825
|
if (typeof value === "string" && value.trim()) {
|
|
9063
7826
|
return value.trim();
|
|
@@ -9096,7 +7859,7 @@ function getCommandRenderData(call) {
|
|
|
9096
7859
|
const outputRawOutput = recordValue5(call.output?.rawOutput);
|
|
9097
7860
|
const errorRawOutput = recordValue5(call.error?.rawOutput);
|
|
9098
7861
|
return {
|
|
9099
|
-
command:
|
|
7862
|
+
command: firstString4(
|
|
9100
7863
|
stringValue8(call.input?.command),
|
|
9101
7864
|
stringValue8(call.input?.cmd),
|
|
9102
7865
|
commandArrayToString(call.input?.command),
|
|
@@ -9107,7 +7870,7 @@ function getCommandRenderData(call) {
|
|
|
9107
7870
|
stringValue8(payloadInputRawInput?.command),
|
|
9108
7871
|
stringValue8(payloadInputRawInput?.cmd)
|
|
9109
7872
|
),
|
|
9110
|
-
cwd:
|
|
7873
|
+
cwd: firstString4(
|
|
9111
7874
|
stringValue8(call.input?.cwd),
|
|
9112
7875
|
stringValue8(inputRawInput?.cwd),
|
|
9113
7876
|
stringValue8(payloadInput?.cwd),
|
|
@@ -9146,7 +7909,7 @@ function getCommandRenderData(call) {
|
|
|
9146
7909
|
function getSearchRenderData(call) {
|
|
9147
7910
|
const canonicalContent = contentText(call.content);
|
|
9148
7911
|
const canonicalFiles = locationPaths(call.locations);
|
|
9149
|
-
const output =
|
|
7912
|
+
const output = firstString4(
|
|
9150
7913
|
canonicalContent,
|
|
9151
7914
|
contentText(call.output?.content),
|
|
9152
7915
|
stringValue8(call.output?.content),
|
|
@@ -9161,14 +7924,14 @@ function getSearchRenderData(call) {
|
|
|
9161
7924
|
const mode = canonicalFiles.length > 0 && !output ? "list_files" : searchMode(call.output, output);
|
|
9162
7925
|
const filenames = canonicalFiles.length > 0 ? canonicalFiles : stringArray(call.output?.filenames);
|
|
9163
7926
|
return {
|
|
9164
|
-
query:
|
|
7927
|
+
query: firstString4(
|
|
9165
7928
|
stringValue8(call.input?.pattern),
|
|
9166
7929
|
stringValue8(call.input?.query),
|
|
9167
7930
|
stringValue8(call.input?.search_query),
|
|
9168
7931
|
stringValue8(call.input?.searchQuery),
|
|
9169
7932
|
stringValue8(call.input?.glob)
|
|
9170
7933
|
),
|
|
9171
|
-
scope:
|
|
7934
|
+
scope: firstString4(
|
|
9172
7935
|
stringValue8(call.input?.path),
|
|
9173
7936
|
stringValue8(call.input?.file_path),
|
|
9174
7937
|
stringValue8(call.input?.glob)
|
|
@@ -9177,7 +7940,7 @@ function getSearchRenderData(call) {
|
|
|
9177
7940
|
files: filenames.length > 0 ? filenames : mode === "list_files" ? outputLines : [],
|
|
9178
7941
|
lines: outputLines,
|
|
9179
7942
|
output,
|
|
9180
|
-
error:
|
|
7943
|
+
error: firstString4(
|
|
9181
7944
|
stringValue8(call.error?.aggregated_output),
|
|
9182
7945
|
stringValue8(call.error?.stdout),
|
|
9183
7946
|
stringValue8(call.error?.formatted_output),
|
|
@@ -9194,23 +7957,23 @@ function getWebSearchRenderData(call) {
|
|
|
9194
7957
|
recordValue5(call.input?.action)?.searchQuery
|
|
9195
7958
|
);
|
|
9196
7959
|
return {
|
|
9197
|
-
query:
|
|
7960
|
+
query: firstString4(
|
|
9198
7961
|
stringValue8(call.input?.query),
|
|
9199
7962
|
stringValue8(recordValue5(call.input?.action)?.query),
|
|
9200
7963
|
queries[0] ?? null
|
|
9201
7964
|
),
|
|
9202
7965
|
queries,
|
|
9203
|
-
url:
|
|
7966
|
+
url: firstString4(
|
|
9204
7967
|
stringValue8(call.input?.url),
|
|
9205
7968
|
stringValue8(recordValue5(call.input?.action)?.url)
|
|
9206
7969
|
),
|
|
9207
|
-
output:
|
|
7970
|
+
output: firstString4(
|
|
9208
7971
|
stringValue8(call.output?.stdout),
|
|
9209
7972
|
stringValue8(call.output?.output),
|
|
9210
7973
|
stringValue8(call.output?.content),
|
|
9211
7974
|
""
|
|
9212
7975
|
),
|
|
9213
|
-
error:
|
|
7976
|
+
error: firstString4(
|
|
9214
7977
|
stringValue8(call.error?.message),
|
|
9215
7978
|
stringValue8(call.error?.stdout),
|
|
9216
7979
|
""
|
|
@@ -9218,11 +7981,11 @@ function getWebSearchRenderData(call) {
|
|
|
9218
7981
|
};
|
|
9219
7982
|
}
|
|
9220
7983
|
function getWebFetchRenderData(call, maxContentLength = 3e3) {
|
|
9221
|
-
const url =
|
|
7984
|
+
const url = firstString4(
|
|
9222
7985
|
stringValue8(call.input?.url),
|
|
9223
7986
|
stringValue8(recordValue5(call.input?.action)?.url)
|
|
9224
7987
|
);
|
|
9225
|
-
const content =
|
|
7988
|
+
const content = firstString4(
|
|
9226
7989
|
contentText(call.content),
|
|
9227
7990
|
contentText(call.output?.content),
|
|
9228
7991
|
stringValue8(call.output?.output),
|
|
@@ -9245,7 +8008,7 @@ function getTodoRenderData(call) {
|
|
|
9245
8008
|
}
|
|
9246
8009
|
return todos.flatMap((todo) => {
|
|
9247
8010
|
const record = recordValue5(todo);
|
|
9248
|
-
const content =
|
|
8011
|
+
const content = firstString4(
|
|
9249
8012
|
stringValue8(record?.content),
|
|
9250
8013
|
stringValue8(record?.text)
|
|
9251
8014
|
);
|
|
@@ -9270,20 +8033,20 @@ function getToolSearchRenderData(call) {
|
|
|
9270
8033
|
};
|
|
9271
8034
|
}
|
|
9272
8035
|
function getPlanModeRenderData(call) {
|
|
9273
|
-
const enterText = call.rendererKind === "plan-enter" ?
|
|
8036
|
+
const enterText = call.rendererKind === "plan-enter" ? firstString4(
|
|
9274
8037
|
stringValue8(call.planMode?.plan),
|
|
9275
8038
|
stringValue8(call.output?.text),
|
|
9276
8039
|
stringValue8(call.input?.content),
|
|
9277
8040
|
nonEmpty(call.summary),
|
|
9278
8041
|
"Exploring codebase and designing implementation approach."
|
|
9279
8042
|
) : null;
|
|
9280
|
-
const filePath =
|
|
8043
|
+
const filePath = firstString4(
|
|
9281
8044
|
stringValue8(call.input?.filePath),
|
|
9282
8045
|
stringValue8(call.input?.file_path)
|
|
9283
8046
|
);
|
|
9284
8047
|
return {
|
|
9285
8048
|
enterText,
|
|
9286
|
-
plan: call.rendererKind === "plan-enter" ? null :
|
|
8049
|
+
plan: call.rendererKind === "plan-enter" ? null : firstString4(
|
|
9287
8050
|
stringValue8(call.input?.plan),
|
|
9288
8051
|
stringValue8(call.payload?.plan),
|
|
9289
8052
|
nonEmpty(call.summary)
|
|
@@ -9300,13 +8063,13 @@ function getTaskRenderData(call) {
|
|
|
9300
8063
|
status: task?.status ?? null,
|
|
9301
8064
|
durationText: typeof task?.durationMs === "number" && Number.isFinite(task.durationMs) ? formatDuration(task.durationMs) : null,
|
|
9302
8065
|
latestStepSummary: task?.status === "running" ? steps.at(-1)?.summary ?? null : null,
|
|
9303
|
-
prompt:
|
|
8066
|
+
prompt: firstString4(
|
|
9304
8067
|
stringValue8(task?.prompt),
|
|
9305
8068
|
stringValue8(call.input?.prompt),
|
|
9306
8069
|
stringValue8(call.input?.description),
|
|
9307
8070
|
stringValue8(call.payload?.description)
|
|
9308
8071
|
),
|
|
9309
|
-
childSessionId:
|
|
8072
|
+
childSessionId: firstString4(
|
|
9310
8073
|
stringValue8(task?.delegateSessionId),
|
|
9311
8074
|
stringValue8(call.metadata?.childSessionID),
|
|
9312
8075
|
stringValue8(call.metadata?.child_session_id),
|
|
@@ -9314,7 +8077,7 @@ function getTaskRenderData(call) {
|
|
|
9314
8077
|
stringValue8(call.metadata?.subagent_session_id)
|
|
9315
8078
|
),
|
|
9316
8079
|
steps,
|
|
9317
|
-
resultMarkdown:
|
|
8080
|
+
resultMarkdown: firstString4(
|
|
9318
8081
|
stringValue8(task?.resultMarkdown),
|
|
9319
8082
|
firstNonEmptyStructuredText(call.output, call.error),
|
|
9320
8083
|
nonEmpty(call.summary)
|
|
@@ -9326,14 +8089,14 @@ function getSkillRenderData(call) {
|
|
|
9326
8089
|
const outputRawOutput = call.output?.rawOutput;
|
|
9327
8090
|
const success = booleanValue(call.output?.success) ?? legacySkillSuccess(outputRawOutput) ?? booleanValue(recordValue5(outputRawOutput)?.success);
|
|
9328
8091
|
return {
|
|
9329
|
-
skill:
|
|
8092
|
+
skill: firstString4(
|
|
9330
8093
|
stringValue8(call.input?.skill),
|
|
9331
8094
|
stringValue8(inputRawInput?.skill),
|
|
9332
8095
|
stringValue8(call.output?.commandName),
|
|
9333
8096
|
stringValue8(recordValue5(outputRawOutput)?.commandName),
|
|
9334
8097
|
nonEmpty(call.summary)
|
|
9335
8098
|
),
|
|
9336
|
-
args:
|
|
8099
|
+
args: firstString4(
|
|
9337
8100
|
stringValue8(call.input?.args),
|
|
9338
8101
|
stringValue8(inputRawInput?.args)
|
|
9339
8102
|
),
|
|
@@ -9510,7 +8273,7 @@ function contentText(value) {
|
|
|
9510
8273
|
return [];
|
|
9511
8274
|
}
|
|
9512
8275
|
return [
|
|
9513
|
-
|
|
8276
|
+
firstString4(
|
|
9514
8277
|
stringValue8(record.text),
|
|
9515
8278
|
stringValue8(record.content),
|
|
9516
8279
|
stringValue8(recordValue5(record.content)?.text)
|
|
@@ -9530,7 +8293,7 @@ function structuredText(value) {
|
|
|
9530
8293
|
if (!record) {
|
|
9531
8294
|
return null;
|
|
9532
8295
|
}
|
|
9533
|
-
const preferred =
|
|
8296
|
+
const preferred = firstString4(
|
|
9534
8297
|
stringValue8(record.plan),
|
|
9535
8298
|
stringValue8(record.text),
|
|
9536
8299
|
stringValue8(record.output),
|
|
@@ -9557,7 +8320,7 @@ function structuredText(value) {
|
|
|
9557
8320
|
}
|
|
9558
8321
|
return null;
|
|
9559
8322
|
}
|
|
9560
|
-
function
|
|
8323
|
+
function firstString4(...values) {
|
|
9561
8324
|
for (const value of values) {
|
|
9562
8325
|
if (typeof value === "string" && value.trim()) {
|
|
9563
8326
|
return value.trim();
|
|
@@ -9627,7 +8390,7 @@ function locationPaths(value) {
|
|
|
9627
8390
|
return [];
|
|
9628
8391
|
}
|
|
9629
8392
|
return [
|
|
9630
|
-
|
|
8393
|
+
firstString4(
|
|
9631
8394
|
stringValue8(record.path),
|
|
9632
8395
|
stringValue8(record.filePath),
|
|
9633
8396
|
stringValue8(record.file_path)
|
|
@@ -9638,7 +8401,7 @@ function locationPaths(value) {
|
|
|
9638
8401
|
}
|
|
9639
8402
|
|
|
9640
8403
|
// shared/agentConversation/components/AgentToolCallHeader.tsx
|
|
9641
|
-
import { jsx as jsx19, jsxs as
|
|
8404
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9642
8405
|
var TOOL_ROW_ICON_SIZE = 16;
|
|
9643
8406
|
function AgentToolCallHeader({
|
|
9644
8407
|
call,
|
|
@@ -9648,7 +8411,7 @@ function AgentToolCallHeader({
|
|
|
9648
8411
|
"use memo";
|
|
9649
8412
|
const diffStats = diffStatsForCall(call);
|
|
9650
8413
|
const isActive = call.statusKind === "working" || call.statusKind === "waiting";
|
|
9651
|
-
return /* @__PURE__ */
|
|
8414
|
+
return /* @__PURE__ */ jsxs12(
|
|
9652
8415
|
"div",
|
|
9653
8416
|
{
|
|
9654
8417
|
"data-active": isActive ? "true" : void 0,
|
|
@@ -9750,7 +8513,7 @@ function AgentToolCallHeader({
|
|
|
9750
8513
|
"aria-hidden": "true"
|
|
9751
8514
|
}
|
|
9752
8515
|
) }),
|
|
9753
|
-
/* @__PURE__ */
|
|
8516
|
+
/* @__PURE__ */ jsxs12(
|
|
9754
8517
|
"div",
|
|
9755
8518
|
{
|
|
9756
8519
|
className: [
|
|
@@ -9761,12 +8524,12 @@ function AgentToolCallHeader({
|
|
|
9761
8524
|
/* @__PURE__ */ jsx19("strong", { className: "workspace-agents-status-panel__detail-tool-row-title", children: formatInlineTitleLabel(call.name) }),
|
|
9762
8525
|
call.status ? /* @__PURE__ */ jsx19("span", { className: "workspace-agents-status-panel__detail-tool-status", children: formatInlineStatusLabel2(call.status) }) : null,
|
|
9763
8526
|
isActive ? /* @__PURE__ */ jsx19(LoadingEllipsis3, {}) : null,
|
|
9764
|
-
diffStats ? /* @__PURE__ */
|
|
9765
|
-
diffStats.added > 0 ? /* @__PURE__ */
|
|
8527
|
+
diffStats ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-stats", children: [
|
|
8528
|
+
diffStats.added > 0 ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
9766
8529
|
"+",
|
|
9767
8530
|
diffStats.added
|
|
9768
8531
|
] }) : null,
|
|
9769
|
-
diffStats.removed > 0 ? /* @__PURE__ */
|
|
8532
|
+
diffStats.removed > 0 ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
|
|
9770
8533
|
"-",
|
|
9771
8534
|
diffStats.removed
|
|
9772
8535
|
] }) : null
|
|
@@ -9816,7 +8579,7 @@ function formatInlineTitleLabel(label) {
|
|
|
9816
8579
|
}
|
|
9817
8580
|
function LoadingEllipsis3() {
|
|
9818
8581
|
"use memo";
|
|
9819
|
-
return /* @__PURE__ */
|
|
8582
|
+
return /* @__PURE__ */ jsxs12("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
9820
8583
|
/* @__PURE__ */ jsx19("span", {}),
|
|
9821
8584
|
/* @__PURE__ */ jsx19("span", {}),
|
|
9822
8585
|
/* @__PURE__ */ jsx19("span", {})
|
|
@@ -9886,8 +8649,8 @@ function normalizeToolName7(value) {
|
|
|
9886
8649
|
}
|
|
9887
8650
|
|
|
9888
8651
|
// shared/agentConversation/components/tool-renderers/code/AgentCodeBlock.tsx
|
|
9889
|
-
import { useMemo as useMemo2, useState as
|
|
9890
|
-
import { Fragment as Fragment3, jsx as jsx20, jsxs as
|
|
8652
|
+
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
8653
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9891
8654
|
var MAX_VISIBLE_LINES = 120;
|
|
9892
8655
|
function AgentCodeBlock({
|
|
9893
8656
|
path,
|
|
@@ -9898,7 +8661,7 @@ function AgentCodeBlock({
|
|
|
9898
8661
|
flat = false
|
|
9899
8662
|
}) {
|
|
9900
8663
|
"use memo";
|
|
9901
|
-
const [expanded, setExpanded] =
|
|
8664
|
+
const [expanded, setExpanded] = useState6(false);
|
|
9902
8665
|
const normalized = content.trimEnd();
|
|
9903
8666
|
const lines = useMemo2(
|
|
9904
8667
|
() => normalized ? normalized.split("\n") : [],
|
|
@@ -9937,8 +8700,8 @@ function AgentCodeBlock({
|
|
|
9937
8700
|
"div",
|
|
9938
8701
|
{
|
|
9939
8702
|
className: `workspace-agents-status-panel__detail-tool-code overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-code--flat" : ""}`,
|
|
9940
|
-
children: flat ? /* @__PURE__ */
|
|
9941
|
-
showHeader ? /* @__PURE__ */
|
|
8703
|
+
children: flat ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
8704
|
+
showHeader ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px]", children: [
|
|
9942
8705
|
/* @__PURE__ */ jsx20(
|
|
9943
8706
|
"span",
|
|
9944
8707
|
{
|
|
@@ -9947,13 +8710,13 @@ function AgentCodeBlock({
|
|
|
9947
8710
|
children: fileLabel
|
|
9948
8711
|
}
|
|
9949
8712
|
),
|
|
9950
|
-
/* @__PURE__ */
|
|
8713
|
+
/* @__PURE__ */ jsxs13("span", { className: "shrink-0 font-semibold text-[var(--state-success)]", children: [
|
|
9951
8714
|
"+",
|
|
9952
8715
|
addedCount
|
|
9953
8716
|
] })
|
|
9954
8717
|
] }) : null,
|
|
9955
|
-
/* @__PURE__ */
|
|
9956
|
-
visibleLines.map((line) => /* @__PURE__ */
|
|
8718
|
+
/* @__PURE__ */ jsxs13("div", { className: "workspace-agents-status-panel__detail-scroll-region max-h-[240px] overflow-auto bg-[var(--background-panel)]", children: [
|
|
8719
|
+
visibleLines.map((line) => /* @__PURE__ */ jsxs13(
|
|
9957
8720
|
"div",
|
|
9958
8721
|
{
|
|
9959
8722
|
className: "grid grid-cols-[56px_minmax(0,1fr)] border-l-[3px] border-l-[var(--state-success)] font-[var(--tsh-font-mono)] text-[11px] leading-6",
|
|
@@ -9966,10 +8729,10 @@ function AgentCodeBlock({
|
|
|
9966
8729
|
)),
|
|
9967
8730
|
disclosureButton
|
|
9968
8731
|
] })
|
|
9969
|
-
] }) : /* @__PURE__ */
|
|
9970
|
-
showHeader ? /* @__PURE__ */
|
|
8732
|
+
] }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
8733
|
+
showHeader ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]", children: [
|
|
9971
8734
|
/* @__PURE__ */ jsx20("span", { className: "truncate font-[var(--tsh-font-mono)]", children: path || "Code" }),
|
|
9972
|
-
/* @__PURE__ */
|
|
8735
|
+
/* @__PURE__ */ jsxs13("span", { className: "shrink-0", children: [
|
|
9973
8736
|
language ? `${language} \xB7 ` : "",
|
|
9974
8737
|
lineCount,
|
|
9975
8738
|
" lines"
|
|
@@ -9998,9 +8761,9 @@ import { lazy, Suspense } from "react";
|
|
|
9998
8761
|
|
|
9999
8762
|
// app/renderer/components/icons/AtomIcon.tsx
|
|
10000
8763
|
import {
|
|
10001
|
-
forwardRef as
|
|
8764
|
+
forwardRef as forwardRef7,
|
|
10002
8765
|
useCallback as useCallback8,
|
|
10003
|
-
useEffect as
|
|
8766
|
+
useEffect as useEffect8,
|
|
10004
8767
|
useImperativeHandle as useImperativeHandle5,
|
|
10005
8768
|
useRef as useRef7
|
|
10006
8769
|
} from "react";
|
|
@@ -10009,7 +8772,7 @@ import {
|
|
|
10009
8772
|
useAnimation as useAnimation5,
|
|
10010
8773
|
useReducedMotion as useReducedMotion5
|
|
10011
8774
|
} from "framer-motion";
|
|
10012
|
-
import { jsx as jsx21, jsxs as
|
|
8775
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10013
8776
|
var ATOM_ICON_ANIMATION_DURATION = 0.75;
|
|
10014
8777
|
var ATOM_ICON_REPEAT_DELAY = 1.5;
|
|
10015
8778
|
var PATH_VARIANTS = {
|
|
@@ -10046,7 +8809,7 @@ var PATH_VARIANTS = {
|
|
|
10046
8809
|
}
|
|
10047
8810
|
})
|
|
10048
8811
|
};
|
|
10049
|
-
var AtomIcon =
|
|
8812
|
+
var AtomIcon = forwardRef7(
|
|
10050
8813
|
({
|
|
10051
8814
|
active = false,
|
|
10052
8815
|
onMouseEnter,
|
|
@@ -10074,7 +8837,7 @@ var AtomIcon = forwardRef6(
|
|
|
10074
8837
|
stopAnimation
|
|
10075
8838
|
};
|
|
10076
8839
|
});
|
|
10077
|
-
|
|
8840
|
+
useEffect8(() => {
|
|
10078
8841
|
if (active) {
|
|
10079
8842
|
startAnimation();
|
|
10080
8843
|
return;
|
|
@@ -10108,7 +8871,7 @@ var AtomIcon = forwardRef6(
|
|
|
10108
8871
|
onMouseEnter: handleMouseEnter,
|
|
10109
8872
|
onMouseLeave: handleMouseLeave,
|
|
10110
8873
|
...props,
|
|
10111
|
-
children: /* @__PURE__ */
|
|
8874
|
+
children: /* @__PURE__ */ jsxs14(
|
|
10112
8875
|
"svg",
|
|
10113
8876
|
{
|
|
10114
8877
|
fill: "none",
|
|
@@ -10160,7 +8923,7 @@ var AtomIcon = forwardRef6(
|
|
|
10160
8923
|
AtomIcon.displayName = "AtomIcon";
|
|
10161
8924
|
|
|
10162
8925
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentMonacoDiffViewer.tsx
|
|
10163
|
-
import { jsx as jsx22, jsxs as
|
|
8926
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10164
8927
|
var MonacoDiffEditor = lazy(async () => {
|
|
10165
8928
|
const module = await import("@monaco-editor/react");
|
|
10166
8929
|
return { default: module.DiffEditor };
|
|
@@ -10173,7 +8936,7 @@ function AgentMonacoDiffViewer({
|
|
|
10173
8936
|
showHeader = true
|
|
10174
8937
|
}) {
|
|
10175
8938
|
"use memo";
|
|
10176
|
-
return /* @__PURE__ */
|
|
8939
|
+
return /* @__PURE__ */ jsxs15(
|
|
10177
8940
|
"div",
|
|
10178
8941
|
{
|
|
10179
8942
|
className: `overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-monaco--flat" : ""}`,
|
|
@@ -10189,7 +8952,7 @@ function AgentMonacoDiffViewer({
|
|
|
10189
8952
|
/* @__PURE__ */ jsx22("div", { className: "h-[220px] bg-[var(--background-panel)]", children: /* @__PURE__ */ jsx22(
|
|
10190
8953
|
Suspense,
|
|
10191
8954
|
{
|
|
10192
|
-
fallback: /* @__PURE__ */
|
|
8955
|
+
fallback: /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5 px-3 py-2.5 text-[11px] text-[var(--text-secondary)]", children: [
|
|
10193
8956
|
/* @__PURE__ */ jsx22(
|
|
10194
8957
|
AtomIcon,
|
|
10195
8958
|
{
|
|
@@ -10244,7 +9007,7 @@ function languageForPath2(path) {
|
|
|
10244
9007
|
}
|
|
10245
9008
|
|
|
10246
9009
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
|
|
10247
|
-
import { useMemo as useMemo3, useState as
|
|
9010
|
+
import { useMemo as useMemo3, useState as useState7 } from "react";
|
|
10248
9011
|
|
|
10249
9012
|
// shared/agentConversation/components/tool-renderers/AgentToolScrollArea.tsx
|
|
10250
9013
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
@@ -10360,7 +9123,7 @@ function parseAgentUnifiedDiffStats(diffText) {
|
|
|
10360
9123
|
}
|
|
10361
9124
|
|
|
10362
9125
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
|
|
10363
|
-
import { Fragment as Fragment4, jsx as jsx24, jsxs as
|
|
9126
|
+
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10364
9127
|
var MAX_VISIBLE_LINES2 = 120;
|
|
10365
9128
|
function AgentUnifiedPatchViewer({
|
|
10366
9129
|
path,
|
|
@@ -10371,7 +9134,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10371
9134
|
flat = false
|
|
10372
9135
|
}) {
|
|
10373
9136
|
"use memo";
|
|
10374
|
-
const [expanded, setExpanded] =
|
|
9137
|
+
const [expanded, setExpanded] = useState7(false);
|
|
10375
9138
|
const normalized = diffText.trimEnd();
|
|
10376
9139
|
const lines = useMemo3(
|
|
10377
9140
|
() => normalized ? visiblePatchLines(normalized, compact) : [],
|
|
@@ -10421,8 +9184,8 @@ function AgentUnifiedPatchViewer({
|
|
|
10421
9184
|
"div",
|
|
10422
9185
|
{
|
|
10423
9186
|
className: `workspace-agents-status-panel__detail-tool-diff overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-diff--flat" : ""}`,
|
|
10424
|
-
children: flat ? /* @__PURE__ */
|
|
10425
|
-
showHeader ? /* @__PURE__ */
|
|
9187
|
+
children: flat ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
9188
|
+
showHeader ? /* @__PURE__ */ jsxs16(
|
|
10426
9189
|
"div",
|
|
10427
9190
|
{
|
|
10428
9191
|
className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px]",
|
|
@@ -10436,12 +9199,12 @@ function AgentUnifiedPatchViewer({
|
|
|
10436
9199
|
children: fileLabel
|
|
10437
9200
|
}
|
|
10438
9201
|
),
|
|
10439
|
-
/* @__PURE__ */
|
|
10440
|
-
/* @__PURE__ */
|
|
9202
|
+
/* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-2 text-[11px] font-semibold", children: [
|
|
9203
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-[var(--state-success)]", children: [
|
|
10441
9204
|
"+",
|
|
10442
9205
|
stats.added
|
|
10443
9206
|
] }),
|
|
10444
|
-
/* @__PURE__ */
|
|
9207
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-[var(--state-danger)]", children: [
|
|
10445
9208
|
"-",
|
|
10446
9209
|
stats.removed
|
|
10447
9210
|
] })
|
|
@@ -10449,14 +9212,14 @@ function AgentUnifiedPatchViewer({
|
|
|
10449
9212
|
]
|
|
10450
9213
|
}
|
|
10451
9214
|
) : null,
|
|
10452
|
-
/* @__PURE__ */
|
|
10453
|
-
visibleDiffLines.map(({ key, line }) => /* @__PURE__ */
|
|
9215
|
+
/* @__PURE__ */ jsxs16(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport", children: [
|
|
9216
|
+
visibleDiffLines.map(({ key, line }) => /* @__PURE__ */ jsxs16("div", { className: flatLineClassName(line.kind), children: [
|
|
10454
9217
|
/* @__PURE__ */ jsx24("div", { className: "select-none px-2.5 text-right text-[var(--text-tertiary)]", children: line.newLineNumber ?? line.oldLineNumber ?? "" }),
|
|
10455
9218
|
/* @__PURE__ */ jsx24("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx24("code", { children: line.text || " " }) })
|
|
10456
9219
|
] }, key)),
|
|
10457
9220
|
disclosureButton
|
|
10458
9221
|
] })
|
|
10459
|
-
] }) : /* @__PURE__ */
|
|
9222
|
+
] }) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
10460
9223
|
showHeader ? /* @__PURE__ */ jsx24(
|
|
10461
9224
|
"div",
|
|
10462
9225
|
{
|
|
@@ -10519,11 +9282,11 @@ function lineClassName(line) {
|
|
|
10519
9282
|
}
|
|
10520
9283
|
|
|
10521
9284
|
// shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
|
|
10522
|
-
import { useState as
|
|
9285
|
+
import { useState as useState8 } from "react";
|
|
10523
9286
|
import { ChevronDown as ChevronDown5, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
10524
9287
|
|
|
10525
9288
|
// shared/agentConversation/components/tool-renderers/AgentReadContent.tsx
|
|
10526
|
-
import { jsx as jsx25, jsxs as
|
|
9289
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10527
9290
|
function AgentReadContent({
|
|
10528
9291
|
call
|
|
10529
9292
|
}) {
|
|
@@ -10540,7 +9303,7 @@ function AgentReadContent({
|
|
|
10540
9303
|
content: outputText,
|
|
10541
9304
|
language: languageForPath3(path)
|
|
10542
9305
|
}
|
|
10543
|
-
) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */
|
|
9306
|
+
) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsxs17("div", { className: "rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] px-3 py-2", children: [
|
|
10544
9307
|
path ? /* @__PURE__ */ jsx25("div", { className: "font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-secondary)]", children: path }) : null,
|
|
10545
9308
|
fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsx25("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: [
|
|
10546
9309
|
fileLineRange,
|
|
@@ -10606,7 +9369,7 @@ function languageForPath3(path) {
|
|
|
10606
9369
|
}
|
|
10607
9370
|
|
|
10608
9371
|
// shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
|
|
10609
|
-
import { jsx as jsx26, jsxs as
|
|
9372
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10610
9373
|
function ToolSection({
|
|
10611
9374
|
title,
|
|
10612
9375
|
children
|
|
@@ -10615,7 +9378,7 @@ function ToolSection({
|
|
|
10615
9378
|
if (!children) {
|
|
10616
9379
|
return null;
|
|
10617
9380
|
}
|
|
10618
|
-
return /* @__PURE__ */
|
|
9381
|
+
return /* @__PURE__ */ jsxs18("section", { className: "workspace-agents-status-panel__detail-tool-section-block", children: [
|
|
10619
9382
|
/* @__PURE__ */ jsx26("div", { className: "workspace-agents-status-panel__detail-tool-section-title", children: title }),
|
|
10620
9383
|
children
|
|
10621
9384
|
] });
|
|
@@ -10688,7 +9451,7 @@ function AgentDefaultToolContent({
|
|
|
10688
9451
|
if (sections.length === 0 && !rawPayload) {
|
|
10689
9452
|
return null;
|
|
10690
9453
|
}
|
|
10691
|
-
return /* @__PURE__ */
|
|
9454
|
+
return /* @__PURE__ */ jsxs18("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10692
9455
|
sections.map((section) => /* @__PURE__ */ jsx26(ToolSection, { title: section.title, children: /* @__PURE__ */ jsx26(
|
|
10693
9456
|
ToolMarkdownBlock,
|
|
10694
9457
|
{
|
|
@@ -10812,13 +9575,13 @@ function RawPayloadSection({
|
|
|
10812
9575
|
payload
|
|
10813
9576
|
}) {
|
|
10814
9577
|
"use memo";
|
|
10815
|
-
const [expanded, setExpanded] =
|
|
9578
|
+
const [expanded, setExpanded] = useState8(false);
|
|
10816
9579
|
const rawJson = rawPayloadJson(payload);
|
|
10817
9580
|
if (!rawJson) {
|
|
10818
9581
|
return null;
|
|
10819
9582
|
}
|
|
10820
|
-
return /* @__PURE__ */
|
|
10821
|
-
/* @__PURE__ */
|
|
9583
|
+
return /* @__PURE__ */ jsxs18("div", { className: "workspace-agents-status-panel__detail-tool-raw", children: [
|
|
9584
|
+
/* @__PURE__ */ jsxs18(
|
|
10822
9585
|
"button",
|
|
10823
9586
|
{
|
|
10824
9587
|
type: "button",
|
|
@@ -10891,7 +9654,7 @@ function normalizeWhitespace(value) {
|
|
|
10891
9654
|
}
|
|
10892
9655
|
|
|
10893
9656
|
// shared/agentConversation/components/tool-renderers/AgentEditContent.tsx
|
|
10894
|
-
import { jsx as jsx27, jsxs as
|
|
9657
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10895
9658
|
function AgentEditContent({
|
|
10896
9659
|
call,
|
|
10897
9660
|
onLinkClick
|
|
@@ -10911,7 +9674,7 @@ function AgentEditContent({
|
|
|
10911
9674
|
if (!hasRenderableContent) {
|
|
10912
9675
|
return null;
|
|
10913
9676
|
}
|
|
10914
|
-
return /* @__PURE__ */
|
|
9677
|
+
return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
10915
9678
|
path && files.length === 0 ? /* @__PURE__ */ jsx27(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
10916
9679
|
patchFiles.map((candidate) => /* @__PURE__ */ jsx27(
|
|
10917
9680
|
AgentUnifiedPatchViewer,
|
|
@@ -11013,7 +9776,7 @@ function normalizeToolKind(value) {
|
|
|
11013
9776
|
}
|
|
11014
9777
|
|
|
11015
9778
|
// shared/agentConversation/components/tool-renderers/AgentAskUserQuestionContent.tsx
|
|
11016
|
-
import { jsx as jsx29, jsxs as
|
|
9779
|
+
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11017
9780
|
function AgentAskUserQuestionContent({
|
|
11018
9781
|
call
|
|
11019
9782
|
}) {
|
|
@@ -11026,13 +9789,13 @@ function AgentAskUserQuestionContent({
|
|
|
11026
9789
|
const body = question.question || question.header || translate("agentHost.agentTool.details.questionFallback");
|
|
11027
9790
|
const answer = formatAnswer(question.answer);
|
|
11028
9791
|
const questionKey = question.id.trim() || `${question.header}:${question.question}:${question.options.map((option) => option.label).join("|")}`;
|
|
11029
|
-
return /* @__PURE__ */
|
|
9792
|
+
return /* @__PURE__ */ jsxs20(
|
|
11030
9793
|
"div",
|
|
11031
9794
|
{
|
|
11032
9795
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
11033
9796
|
children: [
|
|
11034
9797
|
/* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
|
|
11035
|
-
question.options.length > 0 ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */
|
|
9798
|
+
question.options.length > 0 ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs20(
|
|
11036
9799
|
"div",
|
|
11037
9800
|
{
|
|
11038
9801
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
@@ -11045,7 +9808,7 @@ function AgentAskUserQuestionContent({
|
|
|
11045
9808
|
)) }) : null,
|
|
11046
9809
|
answer ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
|
|
11047
9810
|
answer
|
|
11048
|
-
}) }) : /* @__PURE__ */
|
|
9811
|
+
}) }) : /* @__PURE__ */ jsxs20("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted inline-flex items-center gap-1.5", children: [
|
|
11049
9812
|
/* @__PURE__ */ jsx29(
|
|
11050
9813
|
MessageSquareMoreIcon,
|
|
11051
9814
|
{
|
|
@@ -11071,8 +9834,8 @@ function formatAnswer(answer) {
|
|
|
11071
9834
|
}
|
|
11072
9835
|
|
|
11073
9836
|
// shared/agentConversation/components/tool-renderers/terminal/AgentTerminalBlock.tsx
|
|
11074
|
-
import { useMemo as useMemo4, useState as
|
|
11075
|
-
import { jsx as jsx30, jsxs as
|
|
9837
|
+
import { useMemo as useMemo4, useState as useState9 } from "react";
|
|
9838
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
11076
9839
|
var MAX_OUTPUT_LINES = 200;
|
|
11077
9840
|
function AgentTerminalBlock({
|
|
11078
9841
|
command,
|
|
@@ -11081,7 +9844,7 @@ function AgentTerminalBlock({
|
|
|
11081
9844
|
status
|
|
11082
9845
|
}) {
|
|
11083
9846
|
"use memo";
|
|
11084
|
-
const [expanded, setExpanded] =
|
|
9847
|
+
const [expanded, setExpanded] = useState9(false);
|
|
11085
9848
|
const outputText = useMemo4(
|
|
11086
9849
|
() => [stdout, stderr].filter(Boolean).join("\n"),
|
|
11087
9850
|
[stdout, stderr]
|
|
@@ -11103,8 +9866,8 @@ function AgentTerminalBlock({
|
|
|
11103
9866
|
children: expanded ? "Collapse output" : `Show full output (${outputLines.length} lines)`
|
|
11104
9867
|
}
|
|
11105
9868
|
) : null;
|
|
11106
|
-
return /* @__PURE__ */
|
|
11107
|
-
command ? /* @__PURE__ */
|
|
9869
|
+
return /* @__PURE__ */ jsxs21("div", { className: "workspace-agents-status-panel__detail-tool-terminal overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)]", children: [
|
|
9870
|
+
command ? /* @__PURE__ */ jsxs21(
|
|
11108
9871
|
"div",
|
|
11109
9872
|
{
|
|
11110
9873
|
className: `flex min-w-0 items-center gap-3 px-3 text-[11px] text-[var(--text-secondary)] ${hasOutput ? "border-b border-[var(--line-2)] bg-[var(--transparency-block)] py-1.5" : "bg-[var(--transparency-block)] py-2"}`,
|
|
@@ -11122,7 +9885,7 @@ function AgentTerminalBlock({
|
|
|
11122
9885
|
]
|
|
11123
9886
|
}
|
|
11124
9887
|
) : null,
|
|
11125
|
-
hasOutput ? /* @__PURE__ */
|
|
9888
|
+
hasOutput ? /* @__PURE__ */ jsxs21(
|
|
11126
9889
|
AgentToolScrollArea,
|
|
11127
9890
|
{
|
|
11128
9891
|
maxHeightClassName: "max-h-[160px]",
|
|
@@ -11158,9 +9921,9 @@ function AgentBashContent({
|
|
|
11158
9921
|
}
|
|
11159
9922
|
|
|
11160
9923
|
// shared/agentConversation/components/tool-renderers/AgentImageGenerationContent.tsx
|
|
11161
|
-
import { useEffect as
|
|
9924
|
+
import { useEffect as useEffect9, useState as useState10 } from "react";
|
|
11162
9925
|
import { resolveWorkspaceImageMimeType } from "@tutti-os/workspace-file-manager/services";
|
|
11163
|
-
import { jsx as jsx32, jsxs as
|
|
9926
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11164
9927
|
function AgentImageGenerationContent({
|
|
11165
9928
|
call,
|
|
11166
9929
|
onLinkClick
|
|
@@ -11170,7 +9933,7 @@ function AgentImageGenerationContent({
|
|
|
11170
9933
|
if (!image.prompt && !image.imageUri) {
|
|
11171
9934
|
return null;
|
|
11172
9935
|
}
|
|
11173
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ jsxs22("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11174
9937
|
image.prompt ? /* @__PURE__ */ jsx32(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx32(
|
|
11175
9938
|
ToolMarkdownBlock,
|
|
11176
9939
|
{
|
|
@@ -11196,10 +9959,10 @@ function ImageGenerationPreview({
|
|
|
11196
9959
|
const agentHostApi = useOptionalAgentHostApi();
|
|
11197
9960
|
const localPath = isLocalImagePath(uri) ? uri.trim() : null;
|
|
11198
9961
|
const readWorkspaceImage = localPath ? agentHostApi?.workspace?.readFile : void 0;
|
|
11199
|
-
const [src, setSrc] =
|
|
9962
|
+
const [src, setSrc] = useState10(
|
|
11200
9963
|
() => !localPath ? resolveImageGenerationPreviewSrc(uri) : null
|
|
11201
9964
|
);
|
|
11202
|
-
|
|
9965
|
+
useEffect9(() => {
|
|
11203
9966
|
if (!localPath || !readWorkspaceImage) {
|
|
11204
9967
|
setSrc(resolveImageGenerationPreviewSrc(uri));
|
|
11205
9968
|
return;
|
|
@@ -11281,7 +10044,7 @@ function normalizeMcpPayload(call) {
|
|
|
11281
10044
|
return {
|
|
11282
10045
|
server,
|
|
11283
10046
|
tool,
|
|
11284
|
-
inputSummary:
|
|
10047
|
+
inputSummary: firstString5(
|
|
11285
10048
|
stringValue9(call.input?.query),
|
|
11286
10049
|
stringValue9(call.input?.url),
|
|
11287
10050
|
stringValue9(call.input?.path),
|
|
@@ -11289,7 +10052,7 @@ function normalizeMcpPayload(call) {
|
|
|
11289
10052
|
stringValue9(call.input?.command)
|
|
11290
10053
|
),
|
|
11291
10054
|
structured,
|
|
11292
|
-
text:
|
|
10055
|
+
text: firstString5(
|
|
11293
10056
|
contentArrayText(call.output?.content),
|
|
11294
10057
|
stringValue9(call.output?.content),
|
|
11295
10058
|
stringValue9(call.output?.output),
|
|
@@ -11328,7 +10091,7 @@ function parsedItems(value) {
|
|
|
11328
10091
|
return [];
|
|
11329
10092
|
}
|
|
11330
10093
|
function itemPrimaryText(item) {
|
|
11331
|
-
return
|
|
10094
|
+
return firstString5(
|
|
11332
10095
|
stringValue9(item.key),
|
|
11333
10096
|
stringValue9(item.title),
|
|
11334
10097
|
stringValue9(item.name),
|
|
@@ -11338,7 +10101,7 @@ function itemPrimaryText(item) {
|
|
|
11338
10101
|
);
|
|
11339
10102
|
}
|
|
11340
10103
|
function itemSecondaryText(item) {
|
|
11341
|
-
return
|
|
10104
|
+
return firstString5(
|
|
11342
10105
|
stringValue9(item.summary),
|
|
11343
10106
|
stringValue9(item.description),
|
|
11344
10107
|
stringValue9(item.status),
|
|
@@ -11377,7 +10140,7 @@ function contentArrayText(value) {
|
|
|
11377
10140
|
return [];
|
|
11378
10141
|
}
|
|
11379
10142
|
return [
|
|
11380
|
-
|
|
10143
|
+
firstString5(
|
|
11381
10144
|
stringValue9(record.text),
|
|
11382
10145
|
stringValue9(record.content),
|
|
11383
10146
|
stringValue9(objectValue6(record.content)?.text)
|
|
@@ -11386,7 +10149,7 @@ function contentArrayText(value) {
|
|
|
11386
10149
|
}).join("\n").trim();
|
|
11387
10150
|
return text || null;
|
|
11388
10151
|
}
|
|
11389
|
-
function
|
|
10152
|
+
function firstString5(...values) {
|
|
11390
10153
|
for (const value of values) {
|
|
11391
10154
|
if (value) {
|
|
11392
10155
|
return value;
|
|
@@ -11396,11 +10159,11 @@ function firstString4(...values) {
|
|
|
11396
10159
|
}
|
|
11397
10160
|
|
|
11398
10161
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentAtlassianRenderers.tsx
|
|
11399
|
-
import { jsx as jsx33, jsxs as
|
|
10162
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
11400
10163
|
function renderAtlassianMcp(payload) {
|
|
11401
10164
|
const items = parsedItems(payload.structured);
|
|
11402
10165
|
if (items.length > 0) {
|
|
11403
|
-
return /* @__PURE__ */ jsx33("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */
|
|
10166
|
+
return /* @__PURE__ */ jsx33("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
11404
10167
|
"div",
|
|
11405
10168
|
{
|
|
11406
10169
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
@@ -11416,11 +10179,11 @@ function renderAtlassianMcp(payload) {
|
|
|
11416
10179
|
}
|
|
11417
10180
|
|
|
11418
10181
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentContext7Renderers.tsx
|
|
11419
|
-
import { jsx as jsx34, jsxs as
|
|
10182
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
11420
10183
|
function renderContext7Mcp(payload) {
|
|
11421
10184
|
const items = parsedItems(payload.structured);
|
|
11422
10185
|
if (items.length > 0) {
|
|
11423
|
-
return /* @__PURE__ */ jsx34("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */
|
|
10186
|
+
return /* @__PURE__ */ jsx34("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */ jsxs24(
|
|
11424
10187
|
"div",
|
|
11425
10188
|
{
|
|
11426
10189
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
@@ -11448,7 +10211,7 @@ function renderRegisteredMcp(payload) {
|
|
|
11448
10211
|
}
|
|
11449
10212
|
|
|
11450
10213
|
// shared/agentConversation/components/tool-renderers/AgentMcpToolContent.tsx
|
|
11451
|
-
import { jsx as jsx35, jsxs as
|
|
10214
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11452
10215
|
function AgentMcpToolContent({
|
|
11453
10216
|
call,
|
|
11454
10217
|
onLinkClick
|
|
@@ -11456,7 +10219,7 @@ function AgentMcpToolContent({
|
|
|
11456
10219
|
"use memo";
|
|
11457
10220
|
const payload = normalizeMcpPayload(call);
|
|
11458
10221
|
const specialized = renderRegisteredMcp(payload);
|
|
11459
|
-
return /* @__PURE__ */
|
|
10222
|
+
return /* @__PURE__ */ jsxs25("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11460
10223
|
payload.server || payload.tool ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx35(
|
|
11461
10224
|
ToolMarkdownBlock,
|
|
11462
10225
|
{
|
|
@@ -11520,7 +10283,7 @@ function AgentPlanModeContent({
|
|
|
11520
10283
|
}
|
|
11521
10284
|
|
|
11522
10285
|
// shared/agentConversation/components/tool-renderers/AgentSearchContent.tsx
|
|
11523
|
-
import { jsx as jsx37, jsxs as
|
|
10286
|
+
import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
11524
10287
|
function AgentSearchContent({
|
|
11525
10288
|
call,
|
|
11526
10289
|
onLinkClick
|
|
@@ -11532,7 +10295,7 @@ function AgentSearchContent({
|
|
|
11532
10295
|
${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : search.query;
|
|
11533
10296
|
const resultFiles = withStableOccurrenceKeys(search.files, "file");
|
|
11534
10297
|
const outputLines = withStableOccurrenceKeys(search.lines, "line");
|
|
11535
|
-
return /* @__PURE__ */
|
|
10298
|
+
return /* @__PURE__ */ jsxs26("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11536
10299
|
queryText ? /* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx37(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
|
|
11537
10300
|
(search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: resultFiles.map(({ key, value: file, isFirst }) => /* @__PURE__ */ jsx37(
|
|
11538
10301
|
"div",
|
|
@@ -11588,7 +10351,7 @@ function withStableOccurrenceKeys(values, prefix) {
|
|
|
11588
10351
|
}
|
|
11589
10352
|
|
|
11590
10353
|
// shared/agentConversation/components/tool-renderers/AgentSkillContent.tsx
|
|
11591
|
-
import { jsx as jsx38, jsxs as
|
|
10354
|
+
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
11592
10355
|
function AgentSkillContent({
|
|
11593
10356
|
call,
|
|
11594
10357
|
onLinkClick
|
|
@@ -11598,7 +10361,7 @@ function AgentSkillContent({
|
|
|
11598
10361
|
if (!skill.skill && !skill.statusText) {
|
|
11599
10362
|
return null;
|
|
11600
10363
|
}
|
|
11601
|
-
return /* @__PURE__ */
|
|
10364
|
+
return /* @__PURE__ */ jsxs27("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11602
10365
|
skill.skill ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx38(
|
|
11603
10366
|
ToolMarkdownBlock,
|
|
11604
10367
|
{
|
|
@@ -11613,8 +10376,8 @@ ${skill.args}` : skill.skill,
|
|
|
11613
10376
|
}
|
|
11614
10377
|
|
|
11615
10378
|
// shared/agentConversation/components/AgentTaskStepList.tsx
|
|
11616
|
-
import { useState as
|
|
11617
|
-
import { jsx as jsx39, jsxs as
|
|
10379
|
+
import { useState as useState11 } from "react";
|
|
10380
|
+
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
11618
10381
|
function AgentTaskStepList({
|
|
11619
10382
|
steps,
|
|
11620
10383
|
onLinkClick
|
|
@@ -11627,11 +10390,11 @@ function AgentTaskStepRow({
|
|
|
11627
10390
|
onLinkClick
|
|
11628
10391
|
}) {
|
|
11629
10392
|
"use memo";
|
|
11630
|
-
const [expanded, setExpanded] =
|
|
10393
|
+
const [expanded, setExpanded] = useState11(false);
|
|
11631
10394
|
const call = step.tool ?? projectTaskStepCall(step);
|
|
11632
10395
|
const hasDetail = hasAgentToolContent(call);
|
|
11633
10396
|
const ariaLabel = taskStepAriaLabel(call);
|
|
11634
|
-
return /* @__PURE__ */
|
|
10397
|
+
return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
|
|
11635
10398
|
hasDetail ? /* @__PURE__ */ jsx39(
|
|
11636
10399
|
"button",
|
|
11637
10400
|
{
|
|
@@ -11675,21 +10438,21 @@ function projectTaskStepCall(step) {
|
|
|
11675
10438
|
}
|
|
11676
10439
|
|
|
11677
10440
|
// shared/agentConversation/components/tool-renderers/AgentTaskContent.tsx
|
|
11678
|
-
import { jsx as jsx40, jsxs as
|
|
10441
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
11679
10442
|
function AgentTaskContent({
|
|
11680
10443
|
call,
|
|
11681
10444
|
onLinkClick
|
|
11682
10445
|
}) {
|
|
11683
10446
|
"use memo";
|
|
11684
10447
|
const task = getTaskRenderData(call);
|
|
11685
|
-
return /* @__PURE__ */
|
|
11686
|
-
/* @__PURE__ */
|
|
10448
|
+
return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10449
|
+
/* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
|
|
11687
10450
|
/* @__PURE__ */ jsx40("strong", { children: task.title }),
|
|
11688
|
-
task.status ? /* @__PURE__ */
|
|
10451
|
+
task.status ? /* @__PURE__ */ jsxs29("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
|
|
11689
10452
|
" \xB7 ",
|
|
11690
10453
|
task.status
|
|
11691
10454
|
] }) : null,
|
|
11692
|
-
task.durationText ? /* @__PURE__ */
|
|
10455
|
+
task.durationText ? /* @__PURE__ */ jsxs29("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
|
|
11693
10456
|
" \xB7 ",
|
|
11694
10457
|
task.durationText
|
|
11695
10458
|
] }) : null
|
|
@@ -11717,7 +10480,7 @@ function AgentTaskContent({
|
|
|
11717
10480
|
|
|
11718
10481
|
// shared/agentConversation/components/tool-renderers/AgentTodoWriteContent.tsx
|
|
11719
10482
|
import { CheckCircle2, Circle } from "lucide-react";
|
|
11720
|
-
import { jsx as jsx41, jsxs as
|
|
10483
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
11721
10484
|
function AgentTodoWriteContent({
|
|
11722
10485
|
call
|
|
11723
10486
|
}) {
|
|
@@ -11726,7 +10489,7 @@ function AgentTodoWriteContent({
|
|
|
11726
10489
|
if (todos.length === 0) {
|
|
11727
10490
|
return null;
|
|
11728
10491
|
}
|
|
11729
|
-
return /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx41("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */
|
|
10492
|
+
return /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx41("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs30(
|
|
11730
10493
|
"div",
|
|
11731
10494
|
{
|
|
11732
10495
|
className: "flex items-start gap-2 rounded-[8px] px-1 py-0.5 text-[11px]",
|
|
@@ -11782,7 +10545,7 @@ function contentClassName(status) {
|
|
|
11782
10545
|
}
|
|
11783
10546
|
|
|
11784
10547
|
// shared/agentConversation/components/tool-renderers/AgentToolSearchContent.tsx
|
|
11785
|
-
import { jsx as jsx42, jsxs as
|
|
10548
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
11786
10549
|
function AgentToolSearchContent({
|
|
11787
10550
|
call
|
|
11788
10551
|
}) {
|
|
@@ -11791,7 +10554,7 @@ function AgentToolSearchContent({
|
|
|
11791
10554
|
if (!toolSearch.query && toolSearch.matches.length === 0) {
|
|
11792
10555
|
return null;
|
|
11793
10556
|
}
|
|
11794
|
-
return /* @__PURE__ */
|
|
10557
|
+
return /* @__PURE__ */ jsxs31("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11795
10558
|
toolSearch.displayQuery ? /* @__PURE__ */ jsx42(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx42(
|
|
11796
10559
|
ToolMarkdownBlock,
|
|
11797
10560
|
{
|
|
@@ -11817,7 +10580,7 @@ ${toolSearch.mode}`
|
|
|
11817
10580
|
}
|
|
11818
10581
|
|
|
11819
10582
|
// shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
|
|
11820
|
-
import { jsx as jsx43, jsxs as
|
|
10583
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11821
10584
|
function AgentWebFetchContent({
|
|
11822
10585
|
call,
|
|
11823
10586
|
onLinkClick
|
|
@@ -11827,7 +10590,7 @@ function AgentWebFetchContent({
|
|
|
11827
10590
|
if (!web.url && !web.visibleContent) {
|
|
11828
10591
|
return null;
|
|
11829
10592
|
}
|
|
11830
|
-
return /* @__PURE__ */
|
|
10593
|
+
return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11831
10594
|
web.url ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx43(
|
|
11832
10595
|
ToolMarkdownBlock,
|
|
11833
10596
|
{
|
|
@@ -11850,7 +10613,7 @@ ${web.url}` : web.url,
|
|
|
11850
10613
|
}
|
|
11851
10614
|
|
|
11852
10615
|
// shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
|
|
11853
|
-
import { jsx as jsx44, jsxs as
|
|
10616
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11854
10617
|
var MAX_SUMMARY_LENGTH = 3e3;
|
|
11855
10618
|
function AgentWebSearchContent({
|
|
11856
10619
|
call,
|
|
@@ -11863,7 +10626,7 @@ function AgentWebSearchContent({
|
|
|
11863
10626
|
const links = normalizeLinks(call.output?.links, outputText);
|
|
11864
10627
|
const summary = extractSummary(outputText) ?? (call.summary.trim() || null);
|
|
11865
10628
|
const visibleSummary = summary ? summary.slice(0, MAX_SUMMARY_LENGTH) : null;
|
|
11866
|
-
return /* @__PURE__ */
|
|
10629
|
+
return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11867
10630
|
web.query ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx44(ToolMarkdownBlock, { content: web.query, onLinkClick }) }) : null,
|
|
11868
10631
|
queries.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: queries.map((candidate, index) => /* @__PURE__ */ jsx44(
|
|
11869
10632
|
"div",
|
|
@@ -11873,7 +10636,7 @@ function AgentWebSearchContent({
|
|
|
11873
10636
|
},
|
|
11874
10637
|
`${candidate}:${queries.length}`
|
|
11875
10638
|
)) }) }) : null,
|
|
11876
|
-
links.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: links.map((link, index) => /* @__PURE__ */
|
|
10639
|
+
links.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: links.map((link, index) => /* @__PURE__ */ jsxs33(
|
|
11877
10640
|
"a",
|
|
11878
10641
|
{
|
|
11879
10642
|
href: link.url,
|
|
@@ -11982,7 +10745,7 @@ function domainForUrl2(url) {
|
|
|
11982
10745
|
}
|
|
11983
10746
|
|
|
11984
10747
|
// shared/agentConversation/components/tool-renderers/AgentWriteContent.tsx
|
|
11985
|
-
import { jsx as jsx45, jsxs as
|
|
10748
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11986
10749
|
function AgentWriteContent({
|
|
11987
10750
|
call,
|
|
11988
10751
|
onLinkClick
|
|
@@ -12002,7 +10765,7 @@ function AgentWriteContent({
|
|
|
12002
10765
|
if (!hasRenderableContent) {
|
|
12003
10766
|
return null;
|
|
12004
10767
|
}
|
|
12005
|
-
return /* @__PURE__ */
|
|
10768
|
+
return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
12006
10769
|
path && files.length === 0 ? /* @__PURE__ */ jsx45(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
12007
10770
|
patchFiles.map((candidate) => /* @__PURE__ */ jsx45(
|
|
12008
10771
|
AgentUnifiedPatchViewer,
|
|
@@ -12086,7 +10849,7 @@ function AgentExpandedToolContent({
|
|
|
12086
10849
|
}
|
|
12087
10850
|
|
|
12088
10851
|
// shared/agentConversation/components/AgentAskUserQuestionCard.tsx
|
|
12089
|
-
import { jsx as jsx47, jsxs as
|
|
10852
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
12090
10853
|
function AgentAskUserQuestionCard({
|
|
12091
10854
|
call,
|
|
12092
10855
|
onLinkClick,
|
|
@@ -12097,8 +10860,8 @@ function AgentAskUserQuestionCard({
|
|
|
12097
10860
|
const waitingInput = (call.askUserQuestion?.status ?? call.status ?? "").trim().toLowerCase() === "waiting_input";
|
|
12098
10861
|
const hasDetail = hasAgentToolContent(call);
|
|
12099
10862
|
const pinned = nonCollapsible ?? waitingInput;
|
|
12100
|
-
const [expanded, setExpanded] =
|
|
12101
|
-
return /* @__PURE__ */
|
|
10863
|
+
const [expanded, setExpanded] = useState12(defaultExpanded ?? waitingInput);
|
|
10864
|
+
return /* @__PURE__ */ jsxs35("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--ask-user", children: [
|
|
12102
10865
|
hasDetail && !pinned ? /* @__PURE__ */ jsx47(
|
|
12103
10866
|
"button",
|
|
12104
10867
|
{
|
|
@@ -12116,14 +10879,14 @@ function AgentAskUserQuestionCard({
|
|
|
12116
10879
|
}
|
|
12117
10880
|
|
|
12118
10881
|
// shared/agentConversation/components/AgentEnterPlanModeCard.tsx
|
|
12119
|
-
import { jsx as jsx48, jsxs as
|
|
10882
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12120
10883
|
function AgentEnterPlanModeCard({
|
|
12121
10884
|
call,
|
|
12122
10885
|
onLinkClick
|
|
12123
10886
|
}) {
|
|
12124
10887
|
"use memo";
|
|
12125
10888
|
const hasDetail = hasAgentToolContent(call);
|
|
12126
|
-
return /* @__PURE__ */
|
|
10889
|
+
return /* @__PURE__ */ jsxs36("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-enter", children: [
|
|
12127
10890
|
/* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx48(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12128
10891
|
!hasDetail && call.summary ? /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12129
10892
|
hasDetail ? /* @__PURE__ */ jsx48(AgentExpandedToolContent, { call, onLinkClick }) : null
|
|
@@ -12131,14 +10894,14 @@ function AgentEnterPlanModeCard({
|
|
|
12131
10894
|
}
|
|
12132
10895
|
|
|
12133
10896
|
// shared/agentConversation/components/AgentExitPlanModeCard.tsx
|
|
12134
|
-
import { jsx as jsx49, jsxs as
|
|
10897
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12135
10898
|
function AgentExitPlanModeCard({
|
|
12136
10899
|
call,
|
|
12137
10900
|
onLinkClick
|
|
12138
10901
|
}) {
|
|
12139
10902
|
"use memo";
|
|
12140
10903
|
const hasDetail = hasAgentToolContent(call);
|
|
12141
|
-
return /* @__PURE__ */
|
|
10904
|
+
return /* @__PURE__ */ jsxs37("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-exit", children: [
|
|
12142
10905
|
/* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx49(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12143
10906
|
!hasDetail && call.summary ? /* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12144
10907
|
hasDetail ? /* @__PURE__ */ jsx49(AgentExpandedToolContent, { call, onLinkClick }) : null
|
|
@@ -12146,8 +10909,8 @@ function AgentExitPlanModeCard({
|
|
|
12146
10909
|
}
|
|
12147
10910
|
|
|
12148
10911
|
// shared/agentConversation/components/AgentTaskCallCard.tsx
|
|
12149
|
-
import { useState as
|
|
12150
|
-
import { jsx as jsx50, jsxs as
|
|
10912
|
+
import { useState as useState13 } from "react";
|
|
10913
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12151
10914
|
function AgentTaskCallCard({
|
|
12152
10915
|
call,
|
|
12153
10916
|
onLinkClick,
|
|
@@ -12158,9 +10921,9 @@ function AgentTaskCallCard({
|
|
|
12158
10921
|
const running = (call.task?.status ?? call.status ?? "").trim().toLowerCase() === "running";
|
|
12159
10922
|
const hasDetail = hasAgentToolContent(call);
|
|
12160
10923
|
const pinned = nonCollapsible ?? running;
|
|
12161
|
-
const [expanded, setExpanded] =
|
|
10924
|
+
const [expanded, setExpanded] = useState13(defaultExpanded ?? running);
|
|
12162
10925
|
const ariaLabel = taskCallAriaLabel(call);
|
|
12163
|
-
return /* @__PURE__ */
|
|
10926
|
+
return /* @__PURE__ */ jsxs38("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--task", children: [
|
|
12164
10927
|
hasDetail && !pinned ? /* @__PURE__ */ jsx50(
|
|
12165
10928
|
"button",
|
|
12166
10929
|
{
|
|
@@ -12186,8 +10949,8 @@ function taskCallAriaLabel(call) {
|
|
|
12186
10949
|
}
|
|
12187
10950
|
|
|
12188
10951
|
// shared/agentConversation/components/AgentToolCallCard.tsx
|
|
12189
|
-
import { useState as
|
|
12190
|
-
import { jsx as jsx51, jsxs as
|
|
10952
|
+
import { useState as useState14 } from "react";
|
|
10953
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12191
10954
|
function AgentToolCallCard({
|
|
12192
10955
|
call,
|
|
12193
10956
|
onLinkClick,
|
|
@@ -12196,11 +10959,11 @@ function AgentToolCallCard({
|
|
|
12196
10959
|
variantClassName
|
|
12197
10960
|
}) {
|
|
12198
10961
|
"use memo";
|
|
12199
|
-
const [expanded, setExpanded] =
|
|
10962
|
+
const [expanded, setExpanded] = useState14(defaultExpanded);
|
|
12200
10963
|
const hasDetail = hasAgentToolContent(call);
|
|
12201
10964
|
const canCollapse = hasDetail && !nonCollapsible;
|
|
12202
10965
|
const ariaLabel = toolCallAriaLabel(call);
|
|
12203
|
-
return /* @__PURE__ */
|
|
10966
|
+
return /* @__PURE__ */ jsxs39(
|
|
12204
10967
|
"div",
|
|
12205
10968
|
{
|
|
12206
10969
|
className: [
|
|
@@ -12234,7 +10997,7 @@ function toolCallAriaLabel(call) {
|
|
|
12234
10997
|
}
|
|
12235
10998
|
|
|
12236
10999
|
// shared/agentConversation/components/AgentToolGroupRow.tsx
|
|
12237
|
-
import { Fragment as Fragment5, jsx as jsx52, jsxs as
|
|
11000
|
+
import { Fragment as Fragment5, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12238
11001
|
var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
12239
11002
|
row,
|
|
12240
11003
|
label,
|
|
@@ -12247,7 +11010,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12247
11010
|
rawTimelineJsonLabel = ""
|
|
12248
11011
|
}) {
|
|
12249
11012
|
"use memo";
|
|
12250
|
-
const [localExpanded, setLocalExpanded] =
|
|
11013
|
+
const [localExpanded, setLocalExpanded] = useState15(false);
|
|
12251
11014
|
const hasDetail = hasGroupDetail(row);
|
|
12252
11015
|
const isExpanded = hasDetail && (expanded ?? localExpanded);
|
|
12253
11016
|
const setNextExpanded = (nextExpanded) => {
|
|
@@ -12268,13 +11031,13 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12268
11031
|
rawTimelineJsonLabel
|
|
12269
11032
|
);
|
|
12270
11033
|
}
|
|
12271
|
-
return /* @__PURE__ */
|
|
11034
|
+
return /* @__PURE__ */ jsxs40(
|
|
12272
11035
|
"div",
|
|
12273
11036
|
{
|
|
12274
11037
|
className: "workspace-agents-status-panel__detail-tool-section",
|
|
12275
11038
|
"data-tool-group-expanded": isExpanded ? "true" : void 0,
|
|
12276
11039
|
children: [
|
|
12277
|
-
hasDetail ? /* @__PURE__ */
|
|
11040
|
+
hasDetail ? /* @__PURE__ */ jsxs40(
|
|
12278
11041
|
"button",
|
|
12279
11042
|
{
|
|
12280
11043
|
type: "button",
|
|
@@ -12341,7 +11104,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12341
11104
|
});
|
|
12342
11105
|
function ToolGroupLabel({ label }) {
|
|
12343
11106
|
"use memo";
|
|
12344
|
-
return /* @__PURE__ */
|
|
11107
|
+
return /* @__PURE__ */ jsxs40(Fragment5, { children: [
|
|
12345
11108
|
/* @__PURE__ */ jsx52(
|
|
12346
11109
|
ToolActivityKindIcon,
|
|
12347
11110
|
{
|
|
@@ -12366,7 +11129,7 @@ function renderToolCountLabel(label) {
|
|
|
12366
11129
|
if (!primary || !status) {
|
|
12367
11130
|
return /* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
|
|
12368
11131
|
}
|
|
12369
|
-
return /* @__PURE__ */
|
|
11132
|
+
return /* @__PURE__ */ jsxs40(Fragment5, { children: [
|
|
12370
11133
|
/* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: primary }),
|
|
12371
11134
|
/* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-status", children: formatInlineStatusLabel3(status) })
|
|
12372
11135
|
] });
|
|
@@ -12393,7 +11156,7 @@ function renderToolCard(call, onLinkClick, showRawTimelineJson = false, rawTimel
|
|
|
12393
11156
|
default:
|
|
12394
11157
|
card = /* @__PURE__ */ jsx52(AgentToolCallCard, { ...props });
|
|
12395
11158
|
}
|
|
12396
|
-
return /* @__PURE__ */
|
|
11159
|
+
return /* @__PURE__ */ jsxs40(Fragment5, { children: [
|
|
12397
11160
|
card,
|
|
12398
11161
|
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx52(
|
|
12399
11162
|
RawTimelineJsonDisclosure,
|
|
@@ -12406,7 +11169,7 @@ function renderToolCard(call, onLinkClick, showRawTimelineJson = false, rawTimel
|
|
|
12406
11169
|
}
|
|
12407
11170
|
|
|
12408
11171
|
// shared/agentConversation/components/AgentTurnSummaryRow.tsx
|
|
12409
|
-
import { useMemo as useMemo5, useState as
|
|
11172
|
+
import { useMemo as useMemo5, useState as useState16 } from "react";
|
|
12410
11173
|
import { ChevronDown as ChevronDown7, ChevronRight as ChevronRight7 } from "lucide-react";
|
|
12411
11174
|
|
|
12412
11175
|
// app/renderer/components/icons/DirectLinedIcon.tsx
|
|
@@ -12434,64 +11197,18 @@ function DirectLinedIcon(props) {
|
|
|
12434
11197
|
);
|
|
12435
11198
|
}
|
|
12436
11199
|
|
|
12437
|
-
// contexts/workspace/presentation/renderer/components/shared/CanvasNodeGhostIconButton.tsx
|
|
12438
|
-
import { forwardRef as forwardRef7 } from "react";
|
|
12439
|
-
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
12440
|
-
var CanvasNodeGhostIconButton = forwardRef7(function CanvasNodeGhostIconButton2({
|
|
12441
|
-
className,
|
|
12442
|
-
children,
|
|
12443
|
-
onPointerDown,
|
|
12444
|
-
onMouseDown,
|
|
12445
|
-
onClick,
|
|
12446
|
-
stopsEventPropagation = true,
|
|
12447
|
-
...rest
|
|
12448
|
-
}, ref) {
|
|
12449
|
-
"use memo";
|
|
12450
|
-
return /* @__PURE__ */ jsx54(
|
|
12451
|
-
"button",
|
|
12452
|
-
{
|
|
12453
|
-
ref,
|
|
12454
|
-
...rest,
|
|
12455
|
-
type: "button",
|
|
12456
|
-
className: cn(
|
|
12457
|
-
"nodrag inline-flex h-7 min-h-7 w-7 min-w-7 shrink-0 items-center justify-center rounded-[4px] border border-transparent bg-transparent p-0 text-[var(--cove-canvas-control-text)] transition-[background-color,color,border-color,opacity] duration-200 ease-in-out [-webkit-app-region:no-drag] hover:border-transparent hover:bg-[var(--transparency-block)] hover:text-[var(--cove-canvas-control-text-hover)] active:bg-[var(--transparency-block-active)] active:text-[var(--cove-canvas-control-text-hover)] disabled:cursor-not-allowed disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-[color:color-mix(in_srgb,var(--tsh-shell-accent)_80%,white)] focus-visible:outline-offset-2 [&_svg]:block [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:fill-none [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:stroke-current data-[menu-open=true]:border-transparent data-[menu-open=true]:bg-[var(--transparency-block)] data-[menu-open=true]:text-[var(--cove-canvas-control-text-hover)] data-[menu-open=true]:hover:bg-[var(--transparency-block-active)]",
|
|
12458
|
-
className
|
|
12459
|
-
),
|
|
12460
|
-
onPointerDown: (event) => {
|
|
12461
|
-
if (stopsEventPropagation) {
|
|
12462
|
-
event.stopPropagation();
|
|
12463
|
-
}
|
|
12464
|
-
onPointerDown?.(event);
|
|
12465
|
-
},
|
|
12466
|
-
onMouseDown: (event) => {
|
|
12467
|
-
if (stopsEventPropagation) {
|
|
12468
|
-
event.stopPropagation();
|
|
12469
|
-
}
|
|
12470
|
-
onMouseDown?.(event);
|
|
12471
|
-
},
|
|
12472
|
-
onClick: (event) => {
|
|
12473
|
-
if (stopsEventPropagation) {
|
|
12474
|
-
event.stopPropagation();
|
|
12475
|
-
}
|
|
12476
|
-
onClick?.(event);
|
|
12477
|
-
},
|
|
12478
|
-
children
|
|
12479
|
-
}
|
|
12480
|
-
);
|
|
12481
|
-
});
|
|
12482
|
-
|
|
12483
11200
|
// shared/agentConversation/components/AgentTurnSummaryRow.tsx
|
|
12484
|
-
import { jsx as
|
|
11201
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
12485
11202
|
function AgentTurnSummaryRow({
|
|
12486
11203
|
row,
|
|
12487
11204
|
workspaceRoot,
|
|
12488
11205
|
onLinkAction
|
|
12489
11206
|
}) {
|
|
12490
11207
|
"use memo";
|
|
12491
|
-
const [expandedFiles, setExpandedFiles] =
|
|
11208
|
+
const [expandedFiles, setExpandedFiles] = useState16(
|
|
12492
11209
|
{}
|
|
12493
11210
|
);
|
|
12494
|
-
const [showAllFiles, setShowAllFiles] =
|
|
11211
|
+
const [showAllFiles, setShowAllFiles] = useState16(false);
|
|
12495
11212
|
const aggregateStats = useMemo5(
|
|
12496
11213
|
() => summarizeRowDiff(row.files),
|
|
12497
11214
|
[row.files]
|
|
@@ -12499,26 +11216,26 @@ function AgentTurnSummaryRow({
|
|
|
12499
11216
|
const visibleFiles = row.files.slice(0, 3);
|
|
12500
11217
|
const hiddenFiles = row.files.slice(3);
|
|
12501
11218
|
const hiddenFileCount = hiddenFiles.length;
|
|
12502
|
-
return /* @__PURE__ */
|
|
12503
|
-
/* @__PURE__ */
|
|
12504
|
-
/* @__PURE__ */
|
|
11219
|
+
return /* @__PURE__ */ jsx54("section", { className: "workspace-agents-status-panel__detail-turn-summary", children: /* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card w-full overflow-hidden rounded-[8px] text-[var(--text-primary)]", children: [
|
|
11220
|
+
/* @__PURE__ */ jsx54("div", { className: "flex items-start gap-3 px-4 py-3", children: /* @__PURE__ */ jsx54("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
11221
|
+
/* @__PURE__ */ jsx54("div", { className: "min-w-0 text-[15px] font-semibold leading-5 tracking-[0] text-[var(--text-primary)]", children: translate("agentHost.agentGui.turnSummaryFilesChanged", {
|
|
12505
11222
|
count: row.fileCount
|
|
12506
11223
|
}) }),
|
|
12507
|
-
/* @__PURE__ */
|
|
12508
|
-
aggregateStats.added > 0 ? /* @__PURE__ */
|
|
11224
|
+
/* @__PURE__ */ jsxs41("div", { className: "inline-flex shrink-0 items-center gap-2.5 text-[11px] font-semibold", children: [
|
|
11225
|
+
aggregateStats.added > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
12509
11226
|
"+",
|
|
12510
11227
|
aggregateStats.added
|
|
12511
11228
|
] }) : null,
|
|
12512
|
-
aggregateStats.removed > 0 ? /* @__PURE__ */
|
|
11229
|
+
aggregateStats.removed > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
|
|
12513
11230
|
"-",
|
|
12514
11231
|
aggregateStats.removed
|
|
12515
11232
|
] }) : null
|
|
12516
11233
|
] })
|
|
12517
11234
|
] }) }) }),
|
|
12518
|
-
/* @__PURE__ */
|
|
11235
|
+
/* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card__list", children: [
|
|
12519
11236
|
visibleFiles.map((file) => {
|
|
12520
11237
|
const key = `${file.path}:${file.messageId}`;
|
|
12521
|
-
return /* @__PURE__ */
|
|
11238
|
+
return /* @__PURE__ */ jsx54(
|
|
12522
11239
|
TurnSummaryFileCard,
|
|
12523
11240
|
{
|
|
12524
11241
|
file,
|
|
@@ -12533,9 +11250,9 @@ function AgentTurnSummaryRow({
|
|
|
12533
11250
|
key
|
|
12534
11251
|
);
|
|
12535
11252
|
}),
|
|
12536
|
-
hiddenFileCount > 0 ? /* @__PURE__ */
|
|
11253
|
+
hiddenFileCount > 0 ? /* @__PURE__ */ jsx54(CollapsibleReveal, { expanded: showAllFiles, preMountOnIdle: true, children: /* @__PURE__ */ jsx54("div", { className: "agent-turn-summary-card__overflow-list", children: hiddenFiles.map((file) => {
|
|
12537
11254
|
const key = `${file.path}:${file.messageId}`;
|
|
12538
|
-
return /* @__PURE__ */
|
|
11255
|
+
return /* @__PURE__ */ jsx54(
|
|
12539
11256
|
TurnSummaryFileCard,
|
|
12540
11257
|
{
|
|
12541
11258
|
file,
|
|
@@ -12550,28 +11267,28 @@ function AgentTurnSummaryRow({
|
|
|
12550
11267
|
key
|
|
12551
11268
|
);
|
|
12552
11269
|
}) }) }) : null,
|
|
12553
|
-
hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */
|
|
11270
|
+
hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */ jsxs41(
|
|
12554
11271
|
"button",
|
|
12555
11272
|
{
|
|
12556
11273
|
type: "button",
|
|
12557
11274
|
className: "agent-turn-summary-card__toggle-more flex w-full items-center gap-2 px-4 py-2.5 text-left text-[11px] font-semibold transition-colors",
|
|
12558
11275
|
onClick: () => setShowAllFiles(true),
|
|
12559
11276
|
children: [
|
|
12560
|
-
/* @__PURE__ */
|
|
11277
|
+
/* @__PURE__ */ jsx54("span", { children: translate("agentHost.agentGui.turnSummaryShowMoreFiles", {
|
|
12561
11278
|
count: hiddenFileCount
|
|
12562
11279
|
}) }),
|
|
12563
|
-
/* @__PURE__ */
|
|
11280
|
+
/* @__PURE__ */ jsx54(ChevronDown7, { size: 16, strokeWidth: 2.2, "aria-hidden": "true" })
|
|
12564
11281
|
]
|
|
12565
11282
|
}
|
|
12566
|
-
) : hiddenFileCount > 0 ? /* @__PURE__ */
|
|
11283
|
+
) : hiddenFileCount > 0 ? /* @__PURE__ */ jsxs41(
|
|
12567
11284
|
"button",
|
|
12568
11285
|
{
|
|
12569
11286
|
type: "button",
|
|
12570
11287
|
className: "agent-turn-summary-card__toggle-more flex w-full items-center gap-2 px-4 py-2.5 text-left text-[11px] font-semibold transition-colors",
|
|
12571
11288
|
onClick: () => setShowAllFiles(false),
|
|
12572
11289
|
children: [
|
|
12573
|
-
/* @__PURE__ */
|
|
12574
|
-
/* @__PURE__ */
|
|
11290
|
+
/* @__PURE__ */ jsx54("span", { children: translate("agentHost.agentGui.turnSummaryShowFewerFiles") }),
|
|
11291
|
+
/* @__PURE__ */ jsx54(
|
|
12575
11292
|
ChevronRight7,
|
|
12576
11293
|
{
|
|
12577
11294
|
size: 16,
|
|
@@ -12602,10 +11319,10 @@ function TurnSummaryFileCard({
|
|
|
12602
11319
|
const canOpen = Boolean(action && onLinkAction);
|
|
12603
11320
|
const stats = summarizeFileDiff(file);
|
|
12604
11321
|
const preview = filePreview(file);
|
|
12605
|
-
return /* @__PURE__ */
|
|
12606
|
-
/* @__PURE__ */
|
|
12607
|
-
/* @__PURE__ */
|
|
12608
|
-
/* @__PURE__ */
|
|
11322
|
+
return /* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card__file", children: [
|
|
11323
|
+
/* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card__file-row flex min-w-0 items-center gap-2.5 overflow-hidden px-4 py-2.5", children: [
|
|
11324
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
11325
|
+
/* @__PURE__ */ jsxs41(
|
|
12609
11326
|
"button",
|
|
12610
11327
|
{
|
|
12611
11328
|
type: "button",
|
|
@@ -12613,7 +11330,7 @@ function TurnSummaryFileCard({
|
|
|
12613
11330
|
"aria-expanded": expanded,
|
|
12614
11331
|
onClick: onToggle,
|
|
12615
11332
|
children: [
|
|
12616
|
-
/* @__PURE__ */
|
|
11333
|
+
/* @__PURE__ */ jsx54("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx54(
|
|
12617
11334
|
"span",
|
|
12618
11335
|
{
|
|
12619
11336
|
className: `agent-turn-summary-card__path block min-w-0 truncate text-[13px] font-medium leading-5 text-[var(--text-secondary)] ${file.changeType === "deleted" ? "line-through" : ""}`,
|
|
@@ -12621,7 +11338,7 @@ function TurnSummaryFileCard({
|
|
|
12621
11338
|
children: file.path
|
|
12622
11339
|
}
|
|
12623
11340
|
) }),
|
|
12624
|
-
/* @__PURE__ */
|
|
11341
|
+
/* @__PURE__ */ jsx54("span", { className: "shrink-0 text-[var(--text-tertiary)] opacity-0 transition-opacity group-hover/file-toggle:opacity-100 group-focus-visible/file-toggle:opacity-100", children: /* @__PURE__ */ jsx54(
|
|
12625
11342
|
ChevronRight7,
|
|
12626
11343
|
{
|
|
12627
11344
|
size: 14,
|
|
@@ -12633,18 +11350,18 @@ function TurnSummaryFileCard({
|
|
|
12633
11350
|
]
|
|
12634
11351
|
}
|
|
12635
11352
|
),
|
|
12636
|
-
/* @__PURE__ */
|
|
12637
|
-
stats.added > 0 ? /* @__PURE__ */
|
|
11353
|
+
/* @__PURE__ */ jsxs41("span", { className: "ml-auto inline-flex shrink-0 items-center gap-2 text-[11px] font-semibold", children: [
|
|
11354
|
+
stats.added > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
12638
11355
|
"+",
|
|
12639
11356
|
stats.added
|
|
12640
11357
|
] }) : null,
|
|
12641
|
-
stats.removed > 0 ? /* @__PURE__ */
|
|
11358
|
+
stats.removed > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
|
|
12642
11359
|
"-",
|
|
12643
11360
|
stats.removed
|
|
12644
11361
|
] }) : null
|
|
12645
11362
|
] })
|
|
12646
11363
|
] }),
|
|
12647
|
-
canOpen ? /* @__PURE__ */
|
|
11364
|
+
canOpen ? /* @__PURE__ */ jsx54(
|
|
12648
11365
|
CanvasNodeGhostIconButton,
|
|
12649
11366
|
{
|
|
12650
11367
|
"aria-label": translate(
|
|
@@ -12656,7 +11373,7 @@ function TurnSummaryFileCard({
|
|
|
12656
11373
|
onClick: () => {
|
|
12657
11374
|
onLinkAction?.(action);
|
|
12658
11375
|
},
|
|
12659
|
-
children: /* @__PURE__ */
|
|
11376
|
+
children: /* @__PURE__ */ jsx54(
|
|
12660
11377
|
DirectLinedIcon,
|
|
12661
11378
|
{
|
|
12662
11379
|
width: 14,
|
|
@@ -12668,12 +11385,12 @@ function TurnSummaryFileCard({
|
|
|
12668
11385
|
}
|
|
12669
11386
|
) : null
|
|
12670
11387
|
] }),
|
|
12671
|
-
preview ? /* @__PURE__ */
|
|
11388
|
+
preview ? /* @__PURE__ */ jsx54(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx54("div", { className: "agent-turn-summary-card__preview rounded-none px-4 pb-3 pt-2", children: preview }) }) : null
|
|
12672
11389
|
] });
|
|
12673
11390
|
}
|
|
12674
11391
|
function filePreview(file) {
|
|
12675
11392
|
if (file.changeType === "created" && file.content?.trim()) {
|
|
12676
|
-
return /* @__PURE__ */
|
|
11393
|
+
return /* @__PURE__ */ jsx54(
|
|
12677
11394
|
AgentCodeBlock,
|
|
12678
11395
|
{
|
|
12679
11396
|
path: file.path,
|
|
@@ -12685,7 +11402,7 @@ function filePreview(file) {
|
|
|
12685
11402
|
);
|
|
12686
11403
|
}
|
|
12687
11404
|
if (file.unifiedDiff?.trim()) {
|
|
12688
|
-
return /* @__PURE__ */
|
|
11405
|
+
return /* @__PURE__ */ jsx54(
|
|
12689
11406
|
AgentUnifiedPatchViewer,
|
|
12690
11407
|
{
|
|
12691
11408
|
path: file.path,
|
|
@@ -12696,7 +11413,7 @@ function filePreview(file) {
|
|
|
12696
11413
|
);
|
|
12697
11414
|
}
|
|
12698
11415
|
if (file.changeType === "created" && file.newString?.trim()) {
|
|
12699
|
-
return /* @__PURE__ */
|
|
11416
|
+
return /* @__PURE__ */ jsx54(
|
|
12700
11417
|
AgentCodeBlock,
|
|
12701
11418
|
{
|
|
12702
11419
|
path: file.path,
|
|
@@ -12708,7 +11425,7 @@ function filePreview(file) {
|
|
|
12708
11425
|
);
|
|
12709
11426
|
}
|
|
12710
11427
|
if (file.oldString?.trim() || file.newString?.trim()) {
|
|
12711
|
-
return /* @__PURE__ */
|
|
11428
|
+
return /* @__PURE__ */ jsx54(
|
|
12712
11429
|
AgentMonacoDiffViewer,
|
|
12713
11430
|
{
|
|
12714
11431
|
path: file.path,
|
|
@@ -12720,7 +11437,7 @@ function filePreview(file) {
|
|
|
12720
11437
|
);
|
|
12721
11438
|
}
|
|
12722
11439
|
if (file.content?.trim()) {
|
|
12723
|
-
return /* @__PURE__ */
|
|
11440
|
+
return /* @__PURE__ */ jsx54(
|
|
12724
11441
|
AgentCodeBlock,
|
|
12725
11442
|
{
|
|
12726
11443
|
path: file.path,
|
|
@@ -12771,7 +11488,7 @@ function summarizeFileDiff(file) {
|
|
|
12771
11488
|
}
|
|
12772
11489
|
|
|
12773
11490
|
// shared/agentConversation/components/AgentTranscriptItemView.tsx
|
|
12774
|
-
import { jsx as
|
|
11491
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
12775
11492
|
var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
12776
11493
|
workspaceRoot,
|
|
12777
11494
|
basePath,
|
|
@@ -12803,7 +11520,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
12803
11520
|
);
|
|
12804
11521
|
switch (row.kind) {
|
|
12805
11522
|
case "message":
|
|
12806
|
-
return /* @__PURE__ */
|
|
11523
|
+
return /* @__PURE__ */ jsx55(
|
|
12807
11524
|
AgentMessageBlock,
|
|
12808
11525
|
{
|
|
12809
11526
|
workspaceRoot,
|
|
@@ -12819,7 +11536,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
12819
11536
|
}
|
|
12820
11537
|
);
|
|
12821
11538
|
case "tool-group":
|
|
12822
|
-
return /* @__PURE__ */
|
|
11539
|
+
return /* @__PURE__ */ jsx55(
|
|
12823
11540
|
AgentToolGroupRow,
|
|
12824
11541
|
{
|
|
12825
11542
|
row,
|
|
@@ -12834,7 +11551,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
12834
11551
|
}
|
|
12835
11552
|
);
|
|
12836
11553
|
case "turn-summary":
|
|
12837
|
-
return /* @__PURE__ */
|
|
11554
|
+
return /* @__PURE__ */ jsx55(
|
|
12838
11555
|
AgentTurnSummaryRow,
|
|
12839
11556
|
{
|
|
12840
11557
|
row,
|
|
@@ -12844,7 +11561,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
12844
11561
|
}
|
|
12845
11562
|
);
|
|
12846
11563
|
case "processing":
|
|
12847
|
-
return /* @__PURE__ */
|
|
11564
|
+
return /* @__PURE__ */ jsx55(AgentProcessingRow, { row, label: labels.processing });
|
|
12848
11565
|
}
|
|
12849
11566
|
});
|
|
12850
11567
|
|
|
@@ -12965,7 +11682,7 @@ function looksLikeTableSeparator(line) {
|
|
|
12965
11682
|
}
|
|
12966
11683
|
|
|
12967
11684
|
// shared/agentConversation/components/AgentTranscriptView.tsx
|
|
12968
|
-
import { Fragment as Fragment7, jsx as
|
|
11685
|
+
import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12969
11686
|
var AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN = 6;
|
|
12970
11687
|
var AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX = 280;
|
|
12971
11688
|
var AGENT_TRANSCRIPT_TURN_GAP_PX = 12;
|
|
@@ -12998,9 +11715,9 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
12998
11715
|
labels
|
|
12999
11716
|
}) {
|
|
13000
11717
|
"use memo";
|
|
13001
|
-
const [expandedToolRows, setExpandedToolRows] =
|
|
11718
|
+
const [expandedToolRows, setExpandedToolRows] = useState17({});
|
|
13002
11719
|
const virtualizerHostRef = useRef8(null);
|
|
13003
|
-
const [virtualScrollElement, setVirtualScrollElement] =
|
|
11720
|
+
const [virtualScrollElement, setVirtualScrollElement] = useState17(null);
|
|
13004
11721
|
const rowKeys = useMemo6(
|
|
13005
11722
|
() => conversation.rows.map(transcriptRowKey),
|
|
13006
11723
|
[conversation.rows]
|
|
@@ -13058,8 +11775,8 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13058
11775
|
const rowKey = rowKeys[rowIndex] ?? transcriptRowKey(row);
|
|
13059
11776
|
const showTurnDivider = dividerRowIndexes.has(rowIndex);
|
|
13060
11777
|
const shouldAnimateEnter = row.kind !== "processing" && enteringRowKeys.has(rowKey);
|
|
13061
|
-
return /* @__PURE__ */
|
|
13062
|
-
showTurnDivider ? /* @__PURE__ */
|
|
11778
|
+
return /* @__PURE__ */ jsxs42(Fragment6, { children: [
|
|
11779
|
+
showTurnDivider ? /* @__PURE__ */ jsx56(
|
|
13063
11780
|
"div",
|
|
13064
11781
|
{
|
|
13065
11782
|
className: "h-px w-full flex-none bg-[var(--line-2,var(--tutti-line-2))]",
|
|
@@ -13067,14 +11784,14 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13067
11784
|
"aria-hidden": "true"
|
|
13068
11785
|
}
|
|
13069
11786
|
) : null,
|
|
13070
|
-
/* @__PURE__ */
|
|
11787
|
+
/* @__PURE__ */ jsx56(
|
|
13071
11788
|
"div",
|
|
13072
11789
|
{
|
|
13073
11790
|
className: "agent-gui-transcript-row",
|
|
13074
11791
|
"data-agent-transcript-row": rowKey,
|
|
13075
11792
|
"data-agent-transcript-row-kind": row.kind,
|
|
13076
11793
|
"data-agent-transcript-row-enter": shouldAnimateEnter ? "true" : void 0,
|
|
13077
|
-
children: /* @__PURE__ */
|
|
11794
|
+
children: /* @__PURE__ */ jsx56(
|
|
13078
11795
|
AgentTranscriptItemView,
|
|
13079
11796
|
{
|
|
13080
11797
|
workspaceRoot,
|
|
@@ -13107,7 +11824,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13107
11824
|
AGENT_TRANSCRIPT_FALLBACK_TURN_COUNT
|
|
13108
11825
|
) + fallbackIndex) * AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX
|
|
13109
11826
|
})) : rowVirtualizer.getVirtualItems();
|
|
13110
|
-
return /* @__PURE__ */
|
|
11827
|
+
return /* @__PURE__ */ jsx56(
|
|
13111
11828
|
"div",
|
|
13112
11829
|
{
|
|
13113
11830
|
ref: virtualizerHostRef,
|
|
@@ -13119,7 +11836,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13119
11836
|
if (!group) {
|
|
13120
11837
|
return null;
|
|
13121
11838
|
}
|
|
13122
|
-
return /* @__PURE__ */
|
|
11839
|
+
return /* @__PURE__ */ jsx56(
|
|
13123
11840
|
"div",
|
|
13124
11841
|
{
|
|
13125
11842
|
ref: rowVirtualizer.measureElement,
|
|
@@ -13138,7 +11855,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13138
11855
|
}
|
|
13139
11856
|
);
|
|
13140
11857
|
}
|
|
13141
|
-
return /* @__PURE__ */
|
|
11858
|
+
return /* @__PURE__ */ jsx56(Fragment7, { children: conversation.rows.map(renderRow) });
|
|
13142
11859
|
}, areAgentTranscriptViewPropsEqual);
|
|
13143
11860
|
function useEnteringTranscriptRows(rowKeys) {
|
|
13144
11861
|
const previousKeysRef = useRef8(null);
|
|
@@ -13199,7 +11916,7 @@ function findTurnDividerRowIndexes(turnIndexById, rows) {
|
|
|
13199
11916
|
|
|
13200
11917
|
// shared/agentConversation/components/AgentConversationFlow.tsx
|
|
13201
11918
|
import { memo as memo4 } from "react";
|
|
13202
|
-
import { Fragment as Fragment8, jsx as
|
|
11919
|
+
import { Fragment as Fragment8, jsx as jsx57 } from "react/jsx-runtime";
|
|
13203
11920
|
var AgentConversationFlow = memo4(function AgentConversationFlow2({
|
|
13204
11921
|
conversation,
|
|
13205
11922
|
isLoading,
|
|
@@ -13215,12 +11932,12 @@ var AgentConversationFlow = memo4(function AgentConversationFlow2({
|
|
|
13215
11932
|
}) {
|
|
13216
11933
|
"use memo";
|
|
13217
11934
|
if (isLoading) {
|
|
13218
|
-
return /* @__PURE__ */
|
|
11935
|
+
return /* @__PURE__ */ jsx57(AgentTranscriptSkeleton, { label: loadingLabel, testId: loadingTestId });
|
|
13219
11936
|
}
|
|
13220
11937
|
if (!conversation || conversation.rows.length === 0) {
|
|
13221
|
-
return /* @__PURE__ */
|
|
11938
|
+
return /* @__PURE__ */ jsx57(Fragment8, { children: empty });
|
|
13222
11939
|
}
|
|
13223
|
-
return /* @__PURE__ */
|
|
11940
|
+
return /* @__PURE__ */ jsx57(
|
|
13224
11941
|
AgentTranscriptView,
|
|
13225
11942
|
{
|
|
13226
11943
|
conversation,
|
|
@@ -13268,20 +11985,11 @@ export {
|
|
|
13268
11985
|
buildWorkspaceAgentSessionDetailViewModel,
|
|
13269
11986
|
projectAgentConversationVM,
|
|
13270
11987
|
reconcileProjectedAgentConversationVM,
|
|
13271
|
-
exitAgentFileMentionSuggestion,
|
|
13272
|
-
buildAgentSessionMentionHref,
|
|
13273
|
-
buildAgentWorkspaceIssueMentionHref,
|
|
13274
|
-
buildAgentWorkspaceAppMentionHref,
|
|
13275
|
-
normalizeAgentSessionMentionTitle,
|
|
13276
|
-
formatAgentMentionMarkdown,
|
|
13277
|
-
AgentTranscriptSkeleton,
|
|
13278
|
-
getProviderSkillQueryMatch,
|
|
13279
|
-
filterProviderSkills,
|
|
13280
|
-
draftForProviderSkill,
|
|
13281
11988
|
skillTriggerForPrefix,
|
|
13282
11989
|
labelForProviderSkill,
|
|
13283
11990
|
promptForProviderSkills,
|
|
13284
11991
|
skillDescriptionForDisplay,
|
|
11992
|
+
AgentTranscriptSkeleton,
|
|
13285
11993
|
plainTextToAgentRichTextDoc,
|
|
13286
11994
|
plainTextToAgentRichTextInlineContent,
|
|
13287
11995
|
editorToPromptText,
|
|
@@ -13290,4 +11998,4 @@ export {
|
|
|
13290
11998
|
AgentConversationFlow,
|
|
13291
11999
|
useProjectedAgentConversation
|
|
13292
12000
|
};
|
|
13293
|
-
//# sourceMappingURL=chunk-
|
|
12001
|
+
//# sourceMappingURL=chunk-GZHQPPK2.js.map
|