@tutti-os/agent-gui 0.0.53 → 0.0.54
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/{AgentMentionSearchController-CExFPobz.d.ts → AgentMentionSearchController-DzhWr0PN.d.ts} +13 -3
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +7 -6
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-message-center/index.js +15 -12
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentGuiNodeTypes-wzOITHRW.d.ts → agentGuiNodeTypes-DCnsaqJr.d.ts} +16 -2
- package/dist/app/renderer/agentactivity.css +136 -2
- package/dist/{chunk-ZTSS2NU2.js → chunk-2XVECUTU.js} +25 -1
- package/dist/chunk-2XVECUTU.js.map +1 -0
- package/dist/{chunk-OBFDA7RG.js → chunk-4PSDYKZQ.js} +20 -3
- package/dist/chunk-4PSDYKZQ.js.map +1 -0
- package/dist/{chunk-BFIYBPFD.js → chunk-6AXH2BOD.js} +5 -5
- package/dist/{chunk-4K22O34C.js → chunk-7GM7UQXD.js} +29 -3
- package/dist/chunk-7GM7UQXD.js.map +1 -0
- package/dist/{chunk-2OLYX32K.js → chunk-7ZDLFTVL.js} +76 -7
- package/dist/chunk-7ZDLFTVL.js.map +1 -0
- package/dist/{chunk-FYVVHRLZ.js → chunk-BGZ2OSDQ.js} +2 -2
- package/dist/{chunk-DPG2J7N5.js → chunk-CMOGPJ23.js} +2 -2
- package/dist/{chunk-3ZVVFQH5.js → chunk-EXZH66UE.js} +180 -88
- package/dist/chunk-EXZH66UE.js.map +1 -0
- package/dist/{chunk-66EQ6EQO.js → chunk-GL54NRMB.js} +59 -2
- package/dist/chunk-GL54NRMB.js.map +1 -0
- package/dist/{chunk-Y7ZVTWMZ.js → chunk-H2YWXFYX.js} +2 -2
- package/dist/{chunk-UKDC63WG.js → chunk-JRA44NYI.js} +78 -4
- package/dist/chunk-JRA44NYI.js.map +1 -0
- package/dist/{chunk-EFDGMXTB.js → chunk-OQJSZSYB.js} +48 -48
- package/dist/chunk-OQJSZSYB.js.map +1 -0
- package/dist/{chunk-GWHPTB4L.js → chunk-PBHTLI3E.js} +2 -2
- package/dist/{chunk-GWHPTB4L.js.map → chunk-PBHTLI3E.js.map} +1 -1
- package/dist/{chunk-5Y3PC7HP.js → chunk-VOXUYDQF.js} +238 -25
- package/dist/chunk-VOXUYDQF.js.map +1 -0
- package/dist/{chunk-HDBKB5RA.js → chunk-WMQN7SZC.js} +2 -58
- package/dist/chunk-WMQN7SZC.js.map +1 -0
- package/dist/{chunk-F5DYXCY3.js → chunk-Z2BTIAOC.js} +1 -1
- package/dist/chunk-Z2BTIAOC.js.map +1 -0
- package/dist/{chunk-PIKG746A.js → chunk-ZFDO72FE.js} +132 -67
- package/dist/chunk-ZFDO72FE.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +2 -2
- package/dist/context-mention-palette/index.js +8 -8
- package/dist/context-mention-provider.d.ts +1 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +21 -53
- package/dist/index.js +832 -607
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-xMz0lJWt.d.ts → types-B2m7UcBb.d.ts} +8 -0
- package/dist/workbench/contribution.d.ts +43 -4
- package/dist/workbench/contribution.js +9 -5
- package/dist/workbench/index.d.ts +3 -3
- package/dist/workbench/index.js +18 -8
- package/dist/workbench/launch.d.ts +2 -1
- package/dist/workbench/launch.js +2 -2
- package/dist/workbench/providerCatalog.d.ts +1 -1
- package/dist/workbench/sessionTitle.d.ts +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.d.ts +1 -1
- package/dist/workbench/state.js +2 -2
- package/dist/workbench/types.d.ts +8 -8
- package/dist/workbench/types.js +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- package/dist/chunk-2OLYX32K.js.map +0 -1
- package/dist/chunk-3ZVVFQH5.js.map +0 -1
- package/dist/chunk-4K22O34C.js.map +0 -1
- package/dist/chunk-5Y3PC7HP.js.map +0 -1
- package/dist/chunk-66EQ6EQO.js.map +0 -1
- package/dist/chunk-EFDGMXTB.js.map +0 -1
- package/dist/chunk-F5DYXCY3.js.map +0 -1
- package/dist/chunk-HDBKB5RA.js.map +0 -1
- package/dist/chunk-OBFDA7RG.js.map +0 -1
- package/dist/chunk-PIKG746A.js.map +0 -1
- package/dist/chunk-UKDC63WG.js.map +0 -1
- package/dist/chunk-ZTSS2NU2.js.map +0 -1
- /package/dist/{chunk-BFIYBPFD.js.map → chunk-6AXH2BOD.js.map} +0 -0
- /package/dist/{chunk-FYVVHRLZ.js.map → chunk-BGZ2OSDQ.js.map} +0 -0
- /package/dist/{chunk-DPG2J7N5.js.map → chunk-CMOGPJ23.js.map} +0 -0
- /package/dist/{chunk-Y7ZVTWMZ.js.map → chunk-H2YWXFYX.js.map} +0 -0
|
@@ -10,10 +10,12 @@ import {
|
|
|
10
10
|
extractExitPlanModeOptions,
|
|
11
11
|
isExitPlanSwitchModeInput,
|
|
12
12
|
normalizeAskUserQuestions,
|
|
13
|
+
resolveAgentTargetPresentation,
|
|
13
14
|
resolveWorkspaceFileLinkAction,
|
|
14
15
|
resolveWorkspaceFilePathCandidate,
|
|
15
|
-
resolveWorkspaceLinkAction
|
|
16
|
-
|
|
16
|
+
resolveWorkspaceLinkAction,
|
|
17
|
+
useAgentTargetPresentations
|
|
18
|
+
} from "./chunk-ZFDO72FE.js";
|
|
17
19
|
import {
|
|
18
20
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
19
21
|
attrsToMentionItem,
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
formatAgentMentionMarkdown,
|
|
22
24
|
mentionItemToAttrs,
|
|
23
25
|
parseAgentMentionMarkdown
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JRA44NYI.js";
|
|
25
27
|
import {
|
|
26
28
|
fileChangeCountFromChanges,
|
|
27
29
|
fileChangeEntriesFromChanges,
|
|
@@ -31,14 +33,14 @@ import {
|
|
|
31
33
|
import {
|
|
32
34
|
getOptionalAgentActivityRuntime,
|
|
33
35
|
useOptionalAgentHostApi
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GL54NRMB.js";
|
|
35
37
|
import {
|
|
36
38
|
workspaceAgentProviderLabel
|
|
37
39
|
} from "./chunk-TYGL25EL.js";
|
|
38
40
|
import {
|
|
39
41
|
getActiveUiLanguage,
|
|
40
42
|
translate
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-H2YWXFYX.js";
|
|
42
44
|
|
|
43
45
|
// shared/imageGenerationTool.ts
|
|
44
46
|
var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -1488,11 +1490,16 @@ function normalizeStatusToken(value) {
|
|
|
1488
1490
|
|
|
1489
1491
|
// shared/agentConversation/projection/subAgentTimelinePartition.ts
|
|
1490
1492
|
function timelineItemOwnerThreadId(item) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
+
return trimmedPayloadString(item.payload?.ownerThreadId);
|
|
1494
|
+
}
|
|
1495
|
+
function timelineItemOwnerCallId(item) {
|
|
1496
|
+
return trimmedPayloadString(item.payload?.ownerCallId);
|
|
1497
|
+
}
|
|
1498
|
+
function trimmedPayloadString(value) {
|
|
1499
|
+
if (typeof value !== "string") {
|
|
1493
1500
|
return null;
|
|
1494
1501
|
}
|
|
1495
|
-
const trimmed =
|
|
1502
|
+
const trimmed = value.trim();
|
|
1496
1503
|
return trimmed.length > 0 ? trimmed : null;
|
|
1497
1504
|
}
|
|
1498
1505
|
function partitionSubAgentTimelineItems(timelineItems) {
|
|
@@ -1526,12 +1533,16 @@ function buildSubAgentLanesByCallId(partition) {
|
|
|
1526
1533
|
if (cards.length === 0) {
|
|
1527
1534
|
return lanesByCallId;
|
|
1528
1535
|
}
|
|
1536
|
+
const cardsByCallId = new Map(cards.map((card) => [card.callId, card]));
|
|
1529
1537
|
const lanedOwners = /* @__PURE__ */ new Set();
|
|
1530
1538
|
for (const [ownerThreadId, items] of partition.subAgentItemsByOwner) {
|
|
1531
1539
|
const sortedItems = [...items].sort(compareTimelineItemsAscending);
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1534
|
-
|
|
1540
|
+
const ownerCallId = firstOwnerCallId(sortedItems);
|
|
1541
|
+
if (!ownerCallId) {
|
|
1542
|
+
continue;
|
|
1543
|
+
}
|
|
1544
|
+
const card = cardsByCallId.get(ownerCallId);
|
|
1545
|
+
if (!card || isControlAgentToken(card.agentName)) {
|
|
1535
1546
|
continue;
|
|
1536
1547
|
}
|
|
1537
1548
|
lanedOwners.add(ownerThreadId);
|
|
@@ -1790,7 +1801,6 @@ function collectCollabCards(mainTimelineItems) {
|
|
|
1790
1801
|
stringValue2(item.payload?.status)
|
|
1791
1802
|
),
|
|
1792
1803
|
receiverThreadIds: collectReceiverThreadIds(input),
|
|
1793
|
-
outputStrings: collectStringValues(output),
|
|
1794
1804
|
childStatuses: collectChildStatuses(output)
|
|
1795
1805
|
});
|
|
1796
1806
|
continue;
|
|
@@ -1803,9 +1813,6 @@ function collectCollabCards(mainTimelineItems) {
|
|
|
1803
1813
|
for (const value of collectReceiverThreadIds(input)) {
|
|
1804
1814
|
existing.receiverThreadIds.add(value);
|
|
1805
1815
|
}
|
|
1806
|
-
for (const value of collectStringValues(output)) {
|
|
1807
|
-
existing.outputStrings.add(value);
|
|
1808
|
-
}
|
|
1809
1816
|
for (const [threadId, childStatus] of collectChildStatuses(output)) {
|
|
1810
1817
|
existing.childStatuses.set(threadId, childStatus);
|
|
1811
1818
|
}
|
|
@@ -1821,7 +1828,6 @@ function collectCollabCards(mainTimelineItems) {
|
|
|
1821
1828
|
agentName: stringValue2(input?.agentName),
|
|
1822
1829
|
callStatus: subAgentStatusFromCallStatus(card.latestCallStatus),
|
|
1823
1830
|
receiverThreadIds: card.receiverThreadIds,
|
|
1824
|
-
outputStrings: card.outputStrings,
|
|
1825
1831
|
childStatuses: card.childStatuses
|
|
1826
1832
|
};
|
|
1827
1833
|
}).sort((left, right) => left.startedAtUnixMs - right.startedAtUnixMs);
|
|
@@ -1841,23 +1847,25 @@ function isCollabCardItem(item) {
|
|
|
1841
1847
|
const toolName = normalizeToolToken3(resolveWorkspaceAgentToolName(item));
|
|
1842
1848
|
return COLLAB_CARD_TOOL_NAMES.has(toolName);
|
|
1843
1849
|
}
|
|
1844
|
-
function
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
if (pool.length === 0) {
|
|
1851
|
-
return null;
|
|
1850
|
+
function firstOwnerCallId(sortedItems) {
|
|
1851
|
+
for (const item of sortedItems) {
|
|
1852
|
+
const ownerCallId = timelineItemOwnerCallId(item);
|
|
1853
|
+
if (ownerCallId) {
|
|
1854
|
+
return ownerCallId;
|
|
1855
|
+
}
|
|
1852
1856
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
+
return null;
|
|
1858
|
+
}
|
|
1859
|
+
function isControlAgentToken(agentName) {
|
|
1860
|
+
switch (normalizeToolToken3(agentName)) {
|
|
1861
|
+
case "wait":
|
|
1862
|
+
case "waitagent":
|
|
1863
|
+
case "close":
|
|
1864
|
+
case "closeagent":
|
|
1865
|
+
return true;
|
|
1866
|
+
default:
|
|
1867
|
+
return false;
|
|
1857
1868
|
}
|
|
1858
|
-
return pool.reduce(
|
|
1859
|
-
(earliest, card) => card.startedAtUnixMs < earliest.startedAtUnixMs ? card : earliest
|
|
1860
|
-
);
|
|
1861
1869
|
}
|
|
1862
1870
|
function subAgentStatusFromCallStatus(status) {
|
|
1863
1871
|
switch ((status ?? "").trim().toLowerCase()) {
|
|
@@ -1962,37 +1970,6 @@ function collectChildStatusesInto(value, out, depth) {
|
|
|
1962
1970
|
collectChildStatusesInto(entry, out, depth + 1);
|
|
1963
1971
|
}
|
|
1964
1972
|
}
|
|
1965
|
-
function collectStringValues(value, depth = 0) {
|
|
1966
|
-
const out = /* @__PURE__ */ new Set();
|
|
1967
|
-
collectStringValuesInto(value, depth, out);
|
|
1968
|
-
return out;
|
|
1969
|
-
}
|
|
1970
|
-
function collectStringValuesInto(value, depth, out) {
|
|
1971
|
-
if (depth > 5 || value == null) {
|
|
1972
|
-
return;
|
|
1973
|
-
}
|
|
1974
|
-
if (typeof value === "string") {
|
|
1975
|
-
const trimmed = value.trim();
|
|
1976
|
-
if (trimmed) {
|
|
1977
|
-
out.add(trimmed);
|
|
1978
|
-
}
|
|
1979
|
-
return;
|
|
1980
|
-
}
|
|
1981
|
-
if (Array.isArray(value)) {
|
|
1982
|
-
for (const entry of value) {
|
|
1983
|
-
collectStringValuesInto(entry, depth + 1, out);
|
|
1984
|
-
}
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
if (typeof value === "object") {
|
|
1988
|
-
for (const [key, entry] of Object.entries(
|
|
1989
|
-
value
|
|
1990
|
-
)) {
|
|
1991
|
-
out.add(key);
|
|
1992
|
-
collectStringValuesInto(entry, depth + 1, out);
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
1973
|
function timelineItemTime(item) {
|
|
1997
1974
|
return item?.occurredAtUnixMs ?? item?.createdAtUnixMs ?? 0;
|
|
1998
1975
|
}
|
|
@@ -2032,6 +2009,10 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
2032
2009
|
const sortedTimelineItems = [...timelineItems].sort(
|
|
2033
2010
|
compareTimelineItemsAscending2
|
|
2034
2011
|
);
|
|
2012
|
+
const suppressedToolCallIds = suppressedClaudeAskUserQuestionCallIds(
|
|
2013
|
+
session,
|
|
2014
|
+
sortedTimelineItems
|
|
2015
|
+
);
|
|
2035
2016
|
for (const item of sortedTimelineItems) {
|
|
2036
2017
|
if (timelineItemOwnerThreadId(item)) {
|
|
2037
2018
|
continue;
|
|
@@ -2069,7 +2050,7 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
2069
2050
|
const turnId = explicitTurnId || activeSequenceTurnId || `seq:${item.seq || item.id}`;
|
|
2070
2051
|
const turn = getTurn(turns, turnId);
|
|
2071
2052
|
if (isWorkspaceAgentToolCallItem(item)) {
|
|
2072
|
-
if (shouldSuppressToolCall(
|
|
2053
|
+
if (shouldSuppressToolCall(item, suppressedToolCallIds)) {
|
|
2073
2054
|
continue;
|
|
2074
2055
|
}
|
|
2075
2056
|
upsertToolCall(turn, item);
|
|
@@ -2225,9 +2206,59 @@ function upsertToolCall(turn, item) {
|
|
|
2225
2206
|
);
|
|
2226
2207
|
upsertToolCallAgentItem(turn, call, itemId2(item));
|
|
2227
2208
|
}
|
|
2228
|
-
function
|
|
2209
|
+
function suppressedClaudeAskUserQuestionCallIds(session, items) {
|
|
2229
2210
|
const provider = session.provider?.trim().toLowerCase() ?? "";
|
|
2230
|
-
|
|
2211
|
+
if (provider !== "claude-code") {
|
|
2212
|
+
return /* @__PURE__ */ new Set();
|
|
2213
|
+
}
|
|
2214
|
+
const suppressed = /* @__PURE__ */ new Set();
|
|
2215
|
+
for (const item of items) {
|
|
2216
|
+
if (normalizeToolName(toolNameFromItem(item)) !== "askuserquestion" || !isUnavailableAskUserQuestionFailure(item)) {
|
|
2217
|
+
continue;
|
|
2218
|
+
}
|
|
2219
|
+
const callId = toolCallSuppressionId(item);
|
|
2220
|
+
if (callId) {
|
|
2221
|
+
suppressed.add(callId);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
return suppressed;
|
|
2225
|
+
}
|
|
2226
|
+
function shouldSuppressToolCall(item, suppressedToolCallIds) {
|
|
2227
|
+
const callId = toolCallSuppressionId(item);
|
|
2228
|
+
return callId ? suppressedToolCallIds.has(callId) : false;
|
|
2229
|
+
}
|
|
2230
|
+
function toolCallSuppressionId(item) {
|
|
2231
|
+
return firstPresentString5(
|
|
2232
|
+
item.callId,
|
|
2233
|
+
stringRecordValue5(item.payload, "callId"),
|
|
2234
|
+
stringRecordValue5(item.payload, "toolCallId")
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
function isUnavailableAskUserQuestionFailure(item) {
|
|
2238
|
+
const status = firstPresentString5(
|
|
2239
|
+
item.status,
|
|
2240
|
+
stringRecordValue5(item.payload, "status")
|
|
2241
|
+
);
|
|
2242
|
+
if (status !== "failed") {
|
|
2243
|
+
return false;
|
|
2244
|
+
}
|
|
2245
|
+
const payload = normalizedPayload(item.payload);
|
|
2246
|
+
const output = normalizedPayload(
|
|
2247
|
+
payload?.output
|
|
2248
|
+
);
|
|
2249
|
+
const error = normalizedPayload(
|
|
2250
|
+
payload?.error
|
|
2251
|
+
);
|
|
2252
|
+
const message = firstPresentString5(
|
|
2253
|
+
stringRecordValue5(output, "output"),
|
|
2254
|
+
stringRecordValue5(output, "text"),
|
|
2255
|
+
stringRecordValue5(output, "message"),
|
|
2256
|
+
stringRecordValue5(error, "error"),
|
|
2257
|
+
stringRecordValue5(error, "message"),
|
|
2258
|
+
stringRecordValue5(payload, "error"),
|
|
2259
|
+
stringRecordValue5(payload, "message")
|
|
2260
|
+
);
|
|
2261
|
+
return message?.includes("No such tool available: AskUserQuestion") ?? false;
|
|
2231
2262
|
}
|
|
2232
2263
|
function upsertToolCallAgentItem(turn, call, sourceId) {
|
|
2233
2264
|
for (const entry2 of turn.agentItems) {
|
|
@@ -2787,13 +2818,21 @@ function shouldShowProcessingIndicator(session, turns) {
|
|
|
2787
2818
|
return true;
|
|
2788
2819
|
}
|
|
2789
2820
|
const lastAgentItem = lastTurn.agentItems.at(-1);
|
|
2790
|
-
if (lastAgentItem?.kind === "message" && isTerminalAgentMessageStatus(lastAgentItem.message.statusKind)) {
|
|
2821
|
+
if (lastAgentItem?.kind === "message" && isTerminalAgentMessageStatus(lastAgentItem.message.statusKind) && !hasActiveRunningTurnLifecycle(session)) {
|
|
2791
2822
|
return false;
|
|
2792
2823
|
}
|
|
2793
2824
|
return !lastTurn.toolCalls.some(
|
|
2794
2825
|
(call) => call.statusKind === "working" || call.statusKind === "waiting"
|
|
2795
2826
|
);
|
|
2796
2827
|
}
|
|
2828
|
+
function hasActiveRunningTurnLifecycle(session) {
|
|
2829
|
+
const lifecycle = session.turnLifecycle;
|
|
2830
|
+
if (!lifecycle?.activeTurnId || lifecycle.settling === true) {
|
|
2831
|
+
return false;
|
|
2832
|
+
}
|
|
2833
|
+
const phase = lifecycle.phase?.trim().toLowerCase() ?? "";
|
|
2834
|
+
return phase === "submitted" || phase === "running" || phase === "waiting";
|
|
2835
|
+
}
|
|
2797
2836
|
function isTerminalAgentMessageStatus(statusKind) {
|
|
2798
2837
|
return statusKind === "completed" || statusKind === "failed" || statusKind === "canceled";
|
|
2799
2838
|
}
|
|
@@ -3115,9 +3154,9 @@ function projectAgentTaskItem(call, input, output, metadata) {
|
|
|
3115
3154
|
id: call.id,
|
|
3116
3155
|
turnId: call.turnId ?? "turn:unknown",
|
|
3117
3156
|
title: call.summary.trim() || call.name,
|
|
3118
|
-
status: call.status,
|
|
3157
|
+
status: stringValue6(metadata?.taskStatus) ?? stringValue6(metadata?.subagentStatus) ?? call.status,
|
|
3119
3158
|
prompt: stringValue6(input?.prompt) ?? stringValue6(input?.description) ?? stringValue6(call.payload?.description) ?? stringValue6(claudeToolResponse?.prompt),
|
|
3120
|
-
delegateSessionId: stringValue6(metadata?.childSessionID) ?? stringValue6(metadata?.child_session_id) ?? stringValue6(metadata?.subagentSessionID) ?? stringValue6(metadata?.subagent_session_id) ?? stringValue6(claudeToolResponse?.agentId),
|
|
3159
|
+
delegateSessionId: stringValue6(metadata?.childSessionID) ?? stringValue6(metadata?.child_session_id) ?? stringValue6(metadata?.subagentSessionID) ?? stringValue6(metadata?.subagent_session_id) ?? stringValue6(metadata?.subagentAgentId) ?? stringValue6(metadata?.agentId) ?? stringValue6(claudeToolResponse?.agentId),
|
|
3121
3160
|
steps,
|
|
3122
3161
|
result: firstNonEmptyText(output),
|
|
3123
3162
|
resultMarkdown: firstNonEmptyText(output),
|
|
@@ -5399,11 +5438,11 @@ function normalizeApprovalPendingStatus(value, statusKind) {
|
|
|
5399
5438
|
}
|
|
5400
5439
|
}
|
|
5401
5440
|
function normalizeInteractivePendingStatus(value, statusKind) {
|
|
5402
|
-
if (statusKind === "waiting") {
|
|
5441
|
+
if (statusKind === "waiting" || statusKind === "working") {
|
|
5403
5442
|
return true;
|
|
5404
5443
|
}
|
|
5405
5444
|
const normalized = (value ?? "").trim().toLowerCase();
|
|
5406
|
-
return normalized === "waiting_input" || normalized === "waiting";
|
|
5445
|
+
return normalized === "waiting_input" || normalized === "waiting" || normalized === "pending" || normalized === "running" || normalized === "streaming" || normalized === "working";
|
|
5407
5446
|
}
|
|
5408
5447
|
function fallbackApprovalFromCall(call) {
|
|
5409
5448
|
if (call.rendererKind !== "approval") {
|
|
@@ -6371,13 +6410,17 @@ function AgentRichTextReadonly({
|
|
|
6371
6410
|
editorClassName,
|
|
6372
6411
|
onLinkClick,
|
|
6373
6412
|
availableSkills = [],
|
|
6374
|
-
workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS
|
|
6413
|
+
workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS,
|
|
6414
|
+
agentTargets
|
|
6375
6415
|
}) {
|
|
6376
6416
|
"use memo";
|
|
6377
|
-
const
|
|
6417
|
+
const contextAgentTargets = useAgentTargetPresentations();
|
|
6418
|
+
const effectiveAgentTargets = agentTargets ?? contextAgentTargets;
|
|
6419
|
+
const contentDoc = plainTextToAgentRichTextDocWithMentionPresentations(
|
|
6378
6420
|
value,
|
|
6379
6421
|
availableSkills,
|
|
6380
|
-
workspaceAppIcons
|
|
6422
|
+
workspaceAppIcons,
|
|
6423
|
+
effectiveAgentTargets
|
|
6381
6424
|
);
|
|
6382
6425
|
const isMentionOnly = isMentionOnlyRichTextDoc(contentDoc);
|
|
6383
6426
|
const editor = useEditor({
|
|
@@ -6421,16 +6464,23 @@ function AgentRichTextReadonly({
|
|
|
6421
6464
|
if (!editor || editor.isDestroyed) {
|
|
6422
6465
|
return;
|
|
6423
6466
|
}
|
|
6424
|
-
const nextDoc =
|
|
6467
|
+
const nextDoc = plainTextToAgentRichTextDocWithMentionPresentations(
|
|
6425
6468
|
value,
|
|
6426
6469
|
availableSkills,
|
|
6427
|
-
workspaceAppIcons
|
|
6470
|
+
workspaceAppIcons,
|
|
6471
|
+
effectiveAgentTargets
|
|
6428
6472
|
);
|
|
6429
6473
|
if (JSON.stringify(editor.getJSON()) === JSON.stringify(nextDoc)) {
|
|
6430
6474
|
return;
|
|
6431
6475
|
}
|
|
6432
6476
|
editor.commands.setContent(nextDoc, { emitUpdate: false });
|
|
6433
|
-
}, [
|
|
6477
|
+
}, [
|
|
6478
|
+
availableSkills,
|
|
6479
|
+
effectiveAgentTargets,
|
|
6480
|
+
editor,
|
|
6481
|
+
value,
|
|
6482
|
+
workspaceAppIcons
|
|
6483
|
+
]);
|
|
6434
6484
|
if (!editor) {
|
|
6435
6485
|
return /* @__PURE__ */ jsx4(
|
|
6436
6486
|
"div",
|
|
@@ -6466,12 +6516,15 @@ function isMentionOnlyRichTextDoc(doc) {
|
|
|
6466
6516
|
);
|
|
6467
6517
|
return inlineContent.length === 1 && inlineContent[0]?.type === "agentFileMention";
|
|
6468
6518
|
}
|
|
6469
|
-
function
|
|
6470
|
-
|
|
6471
|
-
if (workspaceAppIcons.length
|
|
6472
|
-
|
|
6519
|
+
function plainTextToAgentRichTextDocWithMentionPresentations(value, availableSkills, workspaceAppIcons, agentTargets) {
|
|
6520
|
+
let doc = plainTextToAgentRichTextDoc(value, { skills: availableSkills });
|
|
6521
|
+
if (workspaceAppIcons.length > 0) {
|
|
6522
|
+
doc = hydrateWorkspaceAppMentionIcons(doc, workspaceAppIcons);
|
|
6523
|
+
}
|
|
6524
|
+
if (agentTargets.length > 0) {
|
|
6525
|
+
doc = hydrateAgentTargetMentionPresentations(doc, agentTargets);
|
|
6473
6526
|
}
|
|
6474
|
-
return
|
|
6527
|
+
return doc;
|
|
6475
6528
|
}
|
|
6476
6529
|
function hydrateWorkspaceAppMentionIcons(node, workspaceAppIcons) {
|
|
6477
6530
|
const nextContent = node.content?.map(
|
|
@@ -6518,6 +6571,38 @@ function resolveWorkspaceAppIconUrl(input) {
|
|
|
6518
6571
|
);
|
|
6519
6572
|
return exactMatch?.iconUrl?.trim() || fallbackMatch?.iconUrl?.trim() || void 0;
|
|
6520
6573
|
}
|
|
6574
|
+
function hydrateAgentTargetMentionPresentations(node, agentTargets) {
|
|
6575
|
+
const nextContent = node.content?.map(
|
|
6576
|
+
(child) => hydrateAgentTargetMentionPresentations(child, agentTargets)
|
|
6577
|
+
);
|
|
6578
|
+
if (node.type !== "agentFileMention") {
|
|
6579
|
+
return nextContent ? { ...node, content: nextContent } : node;
|
|
6580
|
+
}
|
|
6581
|
+
const attrs = node.attrs ?? {};
|
|
6582
|
+
if (attrs.kind !== "agent-target") {
|
|
6583
|
+
return nextContent ? { ...node, content: nextContent } : node;
|
|
6584
|
+
}
|
|
6585
|
+
const agentTargetId = typeof attrs.targetId === "string" ? attrs.targetId.trim() : "";
|
|
6586
|
+
const workspaceId = typeof attrs.workspaceId === "string" ? attrs.workspaceId.trim() : "";
|
|
6587
|
+
const target = resolveAgentTargetPresentation({
|
|
6588
|
+
agentTargetId,
|
|
6589
|
+
agentTargets,
|
|
6590
|
+
workspaceId
|
|
6591
|
+
});
|
|
6592
|
+
if (!target) {
|
|
6593
|
+
return nextContent ? { ...node, content: nextContent } : node;
|
|
6594
|
+
}
|
|
6595
|
+
return {
|
|
6596
|
+
...node,
|
|
6597
|
+
attrs: {
|
|
6598
|
+
...node.attrs,
|
|
6599
|
+
agentProviderId: target.provider?.trim() ?? "",
|
|
6600
|
+
iconUrl: target.iconUrl?.trim() ?? "",
|
|
6601
|
+
name: target.name?.trim() || attrs.name
|
|
6602
|
+
},
|
|
6603
|
+
...nextContent ? { content: nextContent } : {}
|
|
6604
|
+
};
|
|
6605
|
+
}
|
|
6521
6606
|
|
|
6522
6607
|
// shared/agentEnv/agentEnvPanelStore.ts
|
|
6523
6608
|
import { useSnapshot } from "valtio";
|
|
@@ -9422,10 +9507,12 @@ function getWebSearchRenderData(call) {
|
|
|
9422
9507
|
stringValue9(recordValue6(call.input?.action)?.url)
|
|
9423
9508
|
),
|
|
9424
9509
|
output: firstString5(
|
|
9510
|
+
stringValue9(call.output?.text),
|
|
9511
|
+
contentText(call.content),
|
|
9512
|
+
contentText(call.output?.content),
|
|
9425
9513
|
stringValue9(call.output?.stdout),
|
|
9426
9514
|
stringValue9(call.output?.output),
|
|
9427
|
-
stringValue9(call.output?.content)
|
|
9428
|
-
contentText(call.output?.content)
|
|
9515
|
+
stringValue9(call.output?.content)
|
|
9429
9516
|
) ?? "",
|
|
9430
9517
|
error: firstString5(
|
|
9431
9518
|
stringValue9(call.error?.message),
|
|
@@ -9514,7 +9601,7 @@ function getTaskRenderData(call) {
|
|
|
9514
9601
|
const errorRawOutput = recordValue6(call.error?.rawOutput);
|
|
9515
9602
|
return {
|
|
9516
9603
|
title: task?.title ?? call.name,
|
|
9517
|
-
status: task?.status ??
|
|
9604
|
+
status: task?.status ?? stringValue9(call.metadata?.taskStatus) ?? stringValue9(call.metadata?.subagentStatus),
|
|
9518
9605
|
durationText: typeof task?.durationMs === "number" && Number.isFinite(task.durationMs) ? formatDuration(task.durationMs) : null,
|
|
9519
9606
|
latestStepSummary: task?.status === "running" ? steps.at(-1)?.summary ?? null : null,
|
|
9520
9607
|
prompt: firstString5(
|
|
@@ -9528,7 +9615,9 @@ function getTaskRenderData(call) {
|
|
|
9528
9615
|
stringValue9(call.metadata?.childSessionID),
|
|
9529
9616
|
stringValue9(call.metadata?.child_session_id),
|
|
9530
9617
|
stringValue9(call.metadata?.subagentSessionID),
|
|
9531
|
-
stringValue9(call.metadata?.subagent_session_id)
|
|
9618
|
+
stringValue9(call.metadata?.subagent_session_id),
|
|
9619
|
+
stringValue9(call.metadata?.subagentAgentId),
|
|
9620
|
+
stringValue9(call.metadata?.agentId)
|
|
9532
9621
|
),
|
|
9533
9622
|
steps,
|
|
9534
9623
|
resultMarkdown: firstString5(
|
|
@@ -10048,6 +10137,9 @@ function LoadingEllipsis3() {
|
|
|
10048
10137
|
] });
|
|
10049
10138
|
}
|
|
10050
10139
|
function diffStatsForCall(call) {
|
|
10140
|
+
if (call.rendererKind === "approval") {
|
|
10141
|
+
return null;
|
|
10142
|
+
}
|
|
10051
10143
|
const files = getFileChangeRenderData(call);
|
|
10052
10144
|
if (files.length > 0) {
|
|
10053
10145
|
const totals = files.reduce(
|
|
@@ -11305,7 +11397,7 @@ function approvalPreviewCall(call) {
|
|
|
11305
11397
|
if (normalizedKind !== "edit" && normalizedKind !== "move") {
|
|
11306
11398
|
return null;
|
|
11307
11399
|
}
|
|
11308
|
-
const input = objectValue6(toolCall.rawInput);
|
|
11400
|
+
const input = objectValue6(toolCall.rawInput) ?? objectValue6(toolCall.input);
|
|
11309
11401
|
const content = arrayValue8(toolCall.content);
|
|
11310
11402
|
const locations = arrayValue8(toolCall.locations);
|
|
11311
11403
|
return {
|
|
@@ -14315,7 +14407,7 @@ function AgentMessageLocatorRail({
|
|
|
14315
14407
|
if (previousAgentResponseByKey) {
|
|
14316
14408
|
for (const item of items) {
|
|
14317
14409
|
const hadAgentResponse = previousAgentResponseByKey.get(item.key) ?? false;
|
|
14318
|
-
if (item.hasAgentResponse && !hadAgentResponse && item.key !== selectedKey) {
|
|
14410
|
+
if (previousAgentResponseByKey.has(item.key) && item.hasAgentResponse && !hadAgentResponse && item.key !== selectedKey) {
|
|
14319
14411
|
ensureNextUnreadKeys().add(item.key);
|
|
14320
14412
|
}
|
|
14321
14413
|
}
|
|
@@ -14864,4 +14956,4 @@ export {
|
|
|
14864
14956
|
AgentConversationFlow,
|
|
14865
14957
|
useProjectedAgentConversation
|
|
14866
14958
|
};
|
|
14867
|
-
//# sourceMappingURL=chunk-
|
|
14959
|
+
//# sourceMappingURL=chunk-EXZH66UE.js.map
|