@tutti-os/agent-gui 0.0.102 → 0.0.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{AgentGUI-BJ3As1gI.d.ts → AgentGUI-DQ9gVoXh.d.ts} +2 -3
  2. package/dist/agent-conversation/index.d.ts +3 -3
  3. package/dist/agent-conversation/index.js +7 -7
  4. package/dist/agent-gui.d.ts +3 -3
  5. package/dist/agent-gui.js +14 -14
  6. package/dist/agent-message-center/index.d.ts +2 -2
  7. package/dist/agent-message-center/index.js +7 -6
  8. package/dist/agent-message-center/index.js.map +1 -1
  9. package/dist/{agentConversationVM-BzHZhwFP.d.ts → agentConversationVM-CkcYM5Wg.d.ts} +3 -1
  10. package/dist/{agentGuiNodeTypes-BH3lz6gn.d.ts → agentGuiNodeTypes-B9vcvjmR.d.ts} +2 -2
  11. package/dist/app/renderer/agentactivity.css +11 -0
  12. package/dist/{chunk-YYE35EZ5.js → chunk-747L443E.js} +6 -6
  13. package/dist/chunk-747L443E.js.map +1 -0
  14. package/dist/{chunk-LHKBR77G.js → chunk-7N524ZK7.js} +903 -542
  15. package/dist/chunk-7N524ZK7.js.map +1 -0
  16. package/dist/{chunk-KAV2WHTG.js → chunk-AKKDP2LI.js} +2 -2
  17. package/dist/{chunk-E5AD46HP.js → chunk-F5LFPORI.js} +2 -2
  18. package/dist/{chunk-TDVYZEUI.js → chunk-FJ4W2VC5.js} +126 -30
  19. package/dist/chunk-FJ4W2VC5.js.map +1 -0
  20. package/dist/{chunk-ZPKPIHMZ.js → chunk-HLVC4NNL.js} +497 -980
  21. package/dist/chunk-HLVC4NNL.js.map +1 -0
  22. package/dist/{chunk-DWUVRWXD.js → chunk-MUPZPISC.js} +2 -2
  23. package/dist/{chunk-GCW57WYQ.js → chunk-NOXQOGT5.js} +3 -3
  24. package/dist/{chunk-UESYITH6.js → chunk-OFSDOID4.js} +2 -2
  25. package/dist/{chunk-D7HMQLBO.js → chunk-QI3JAO4J.js} +2 -2
  26. package/dist/{chunk-4E3QCW6L.js → chunk-SKCLZXSW.js} +3 -5
  27. package/dist/chunk-SKCLZXSW.js.map +1 -0
  28. package/dist/{chunk-MJOQP2ED.js → chunk-TPV2SV6L.js} +3 -3
  29. package/dist/{chunk-W4RYNKWO.js → chunk-VAB7EIL5.js} +11 -7
  30. package/dist/{chunk-W4RYNKWO.js.map → chunk-VAB7EIL5.js.map} +1 -1
  31. package/dist/context-mention-palette/index.js +8 -8
  32. package/dist/i18n/index.d.ts +2 -4
  33. package/dist/i18n/index.js +2 -2
  34. package/dist/index.d.ts +5 -5
  35. package/dist/index.js +14 -14
  36. package/dist/mention-search.js +6 -6
  37. package/dist/workbench/contribution.js +3 -3
  38. package/dist/workbench/index.js +3 -3
  39. package/dist/workbench/sessionTitle.js +2 -2
  40. package/package.json +12 -12
  41. package/dist/chunk-4E3QCW6L.js.map +0 -1
  42. package/dist/chunk-LHKBR77G.js.map +0 -1
  43. package/dist/chunk-TDVYZEUI.js.map +0 -1
  44. package/dist/chunk-YYE35EZ5.js.map +0 -1
  45. package/dist/chunk-ZPKPIHMZ.js.map +0 -1
  46. /package/dist/{chunk-KAV2WHTG.js.map → chunk-AKKDP2LI.js.map} +0 -0
  47. /package/dist/{chunk-E5AD46HP.js.map → chunk-F5LFPORI.js.map} +0 -0
  48. /package/dist/{chunk-DWUVRWXD.js.map → chunk-MUPZPISC.js.map} +0 -0
  49. /package/dist/{chunk-GCW57WYQ.js.map → chunk-NOXQOGT5.js.map} +0 -0
  50. /package/dist/{chunk-UESYITH6.js.map → chunk-OFSDOID4.js.map} +0 -0
  51. /package/dist/{chunk-D7HMQLBO.js.map → chunk-QI3JAO4J.js.map} +0 -0
  52. /package/dist/{chunk-MJOQP2ED.js.map → chunk-TPV2SV6L.js.map} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  resolveAgentGuiSessionProviderFlatIconUrl,
10
10
  resolveNextAgentGUIConversationRailWidthPx,
11
11
  shouldAutoCollapseAgentGUIConversationRail
12
- } from "./chunk-D7HMQLBO.js";
12
+ } from "./chunk-QI3JAO4J.js";
13
13
  import {
14
14
  AGENT_PROVIDERS,
15
15
  AGENT_PROVIDER_LABEL,
@@ -21,7 +21,7 @@ import {
21
21
  resolveAgentGUIExplicitConversationTitle,
22
22
  resolveAgentGUIProviderDisplayLabel,
23
23
  resolveAgentGUIProviderIdentity
24
- } from "./chunk-KAV2WHTG.js";
24
+ } from "./chunk-AKKDP2LI.js";
25
25
  import {
26
26
  resolveAgentGuiWorkbenchProviderLabel
27
27
  } from "./chunk-L3GMMGRS.js";
@@ -42,22 +42,21 @@ import {
42
42
  agentPromptContentImageBlocks,
43
43
  agentPromptContentToComposerDraft,
44
44
  agentRichTextContentToPromptText,
45
- attachSubAgentLanesToConversationVM,
46
45
  buildAgentComposerDraft,
47
- buildSubAgentLanesByCallId,
48
46
  buildWorkspaceAgentSessionDetailViewModel,
49
47
  createAgentRichTextInputExtensions,
50
48
  editorToPromptText,
51
49
  emptyAgentComposerDraft,
52
50
  getAppErrorCode,
51
+ isWorkspaceAgentToolCallItem,
53
52
  labelForProviderSkill,
54
53
  materializePastedTextInstructions,
55
54
  normalizeAgentPromptContentBlocks,
56
- partitionSubAgentTimelineItems,
57
55
  pastedTextPreview,
58
56
  plainTextToAgentRichTextDoc,
59
57
  plainTextToAgentRichTextInlineContent,
60
58
  projectAgentConversationVM,
59
+ resolveWorkspaceAgentToolName,
61
60
  skillDescriptionForDisplay,
62
61
  skillTriggerForPrefix,
63
62
  snapshotAgentComposerDraft,
@@ -65,14 +64,14 @@ import {
65
64
  toLocalShortDateTime,
66
65
  updateAgentComposerDraft,
67
66
  useProjectedAgentConversation
68
- } from "./chunk-ZPKPIHMZ.js";
67
+ } from "./chunk-HLVC4NNL.js";
69
68
  import {
70
69
  openAgentEnvPanel
71
70
  } from "./chunk-7BXWPI4F.js";
72
71
  import {
73
72
  AgentFileMentionPalette,
74
73
  agentMentionItemKey
75
- } from "./chunk-W4RYNKWO.js";
74
+ } from "./chunk-VAB7EIL5.js";
76
75
  import {
77
76
  normalizeAgentGUIAgents,
78
77
  projectAgentGUIAgentsToInternalTargets
@@ -83,7 +82,7 @@ import {
83
82
  DEFAULT_AGENT_MENTION_FILTER,
84
83
  agentGuiScheduler,
85
84
  buildWorkspaceAgentActivityListViewModel
86
- } from "./chunk-YYE35EZ5.js";
85
+ } from "./chunk-747L443E.js";
87
86
  import {
88
87
  AGENT_RICH_TEXT_CARET_ANCHOR,
89
88
  createAgentSessionMarkdownLink,
@@ -93,7 +92,7 @@ import {
93
92
  mentionItemToAttrs,
94
93
  normalizeAgentSessionMentionTitle,
95
94
  parseMentionItemFromHref
96
- } from "./chunk-GCW57WYQ.js";
95
+ } from "./chunk-NOXQOGT5.js";
97
96
  import {
98
97
  AgentInteractivePromptSurface,
99
98
  PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
@@ -103,7 +102,7 @@ import {
103
102
  dispatchAgentPlanPromptAction,
104
103
  latestPlanTurnId,
105
104
  planImplementationPromptFromPlanTurn
106
- } from "./chunk-TDVYZEUI.js";
105
+ } from "./chunk-FJ4W2VC5.js";
107
106
  import {
108
107
  useEngineSelector
109
108
  } from "./chunk-2RQM7PJN.js";
@@ -115,7 +114,7 @@ import {
115
114
  resolveAgentTargetPresentation,
116
115
  resolveWorkspaceLinkAction,
117
116
  useAgentTargetPresentations
118
- } from "./chunk-MJOQP2ED.js";
117
+ } from "./chunk-TPV2SV6L.js";
119
118
  import {
120
119
  resolveWorkspaceAgentSessionSortTimeUnixMs
121
120
  } from "./chunk-YMXYBG7U.js";
@@ -130,7 +129,7 @@ import {
130
129
  useAgentHostApi,
131
130
  useOptionalAgentActivityRuntime,
132
131
  useOptionalAgentHostApi
133
- } from "./chunk-UESYITH6.js";
132
+ } from "./chunk-OFSDOID4.js";
134
133
  import {
135
134
  normalizeManagedAgentProvider
136
135
  } from "./chunk-H6IQ63DQ.js";
@@ -138,7 +137,7 @@ import {
138
137
  AgentGuiI18nProvider,
139
138
  translate,
140
139
  useTranslation
141
- } from "./chunk-E5AD46HP.js";
140
+ } from "./chunk-F5LFPORI.js";
142
141
  import {
143
142
  migratedAgentGUIProviderIdentityCatalog,
144
143
  resolveAgentGUIProviderCatalogIdentity,
@@ -2005,7 +2004,10 @@ var trafficLightIconPathByName = {
2005
2004
  };
2006
2005
 
2007
2006
  // agent-gui/agentGuiNode/controller/useAgentGUINodeController.ts
2008
- import { selectWorkspaceAgentConsumerSessions as selectWorkspaceAgentConsumerSessions2 } from "@tutti-os/agent-activity-core";
2007
+ import {
2008
+ selectEngineSessionIsRespondingToInteraction as selectEngineSessionIsRespondingToInteraction2,
2009
+ selectWorkspaceAgentConsumerSessions as selectWorkspaceAgentConsumerSessions2
2010
+ } from "@tutti-os/agent-activity-core";
2009
2011
  import { useCallback as useCallback24, useEffect as useEffect14, useMemo as useMemo18, useRef as useRef16 } from "react";
2010
2012
 
2011
2013
  // host/agentHostAccountStore.ts
@@ -2134,6 +2136,619 @@ function mergeProfilesIntoSnapshot(snapshot, users) {
2134
2136
  };
2135
2137
  }
2136
2138
 
2139
+ // shared/agentConversation/projection/workspaceAgentMessageProjection.ts
2140
+ function projectWorkspaceAgentMessagesToTimelineItems(messages) {
2141
+ const sortedMessages = latestMessageSnapshots(messages).sort(
2142
+ compareMessagesByDisplayOrder
2143
+ );
2144
+ const mergedToolPayloadByKey = /* @__PURE__ */ new Map();
2145
+ return sortedMessages.map((message, index) => {
2146
+ const kind = normalizeToken(message.kind);
2147
+ const role = normalizeToken(message.role);
2148
+ const payload = normalizedPayload(message.payload);
2149
+ const id = normalizedMessageId(message.version, index);
2150
+ const seq = index + 1;
2151
+ const eventId = message.messageId.trim() || `message:${id}`;
2152
+ const turnId = message.turnId?.trim() || void 0;
2153
+ const occurredAtUnixMs = messageDisplayOrderTime(message);
2154
+ if (kind === "tool_call") {
2155
+ const callId = firstNonEmptyString(
2156
+ messagePayloadString(message, "callId"),
2157
+ message.messageId
2158
+ );
2159
+ const title = messagePayloadString(message, "title");
2160
+ const toolKey = callId || eventId;
2161
+ const payloadToolName = displayToolNameCandidate(
2162
+ stringValue(payload.toolName),
2163
+ callId
2164
+ );
2165
+ const titleToolName = displayToolNameCandidate(title, callId);
2166
+ const toolName = firstNonEmptyString(payloadToolName, titleToolName);
2167
+ const toolPayload = sanitizedToolPayload(payload, callId);
2168
+ const mergedPayload = mergePayload(mergedToolPayloadByKey.get(toolKey), {
2169
+ ...toolPayload,
2170
+ ...toolName ? { toolName } : {},
2171
+ ...message.status?.trim() ? { status: message.status.trim() } : {}
2172
+ });
2173
+ mergedToolPayloadByKey.set(toolKey, mergedPayload);
2174
+ const callType = firstNonEmptyString(stringValue(mergedPayload.callType)) || "tool";
2175
+ const workspaceId = workspaceIdFromMessage(message);
2176
+ return {
2177
+ id,
2178
+ ...workspaceTimelineFields(workspaceId),
2179
+ agentSessionId: message.agentSessionId,
2180
+ seq,
2181
+ ...turnId ? { turnId } : {},
2182
+ eventId,
2183
+ actorType: "agent",
2184
+ actorId: message.agentSessionId,
2185
+ itemType: toolCallItemType(message.status ?? void 0),
2186
+ role: "assistant",
2187
+ callType,
2188
+ callId,
2189
+ name: firstNonEmptyString(toolName, titleToolName) || "Tool",
2190
+ ...message.status !== void 0 ? { status: message.status } : {},
2191
+ payload: mergedPayload,
2192
+ ...occurredAtUnixMs !== void 0 ? { occurredAtUnixMs } : {},
2193
+ ...message.startedAtUnixMs !== void 0 ? { createdAtUnixMs: message.startedAtUnixMs } : {}
2194
+ };
2195
+ }
2196
+ if (kind === "reasoning") {
2197
+ return messageTimelineItem({
2198
+ message,
2199
+ id,
2200
+ seq,
2201
+ eventId,
2202
+ turnId,
2203
+ actorType: "agent",
2204
+ itemType: "message.assistant_thinking",
2205
+ role: "assistant_thinking",
2206
+ content: messageText(message),
2207
+ occurredAtUnixMs
2208
+ });
2209
+ }
2210
+ if (kind === "text" && role === "user") {
2211
+ return messageTimelineItem({
2212
+ message,
2213
+ id,
2214
+ seq,
2215
+ eventId,
2216
+ turnId,
2217
+ actorType: "user",
2218
+ itemType: "message.user",
2219
+ role: "user",
2220
+ content: messageText(message),
2221
+ occurredAtUnixMs
2222
+ });
2223
+ }
2224
+ if (kind === "text" && (role === "assistant" || role === "agent")) {
2225
+ return messageTimelineItem({
2226
+ message,
2227
+ id,
2228
+ seq,
2229
+ eventId,
2230
+ turnId,
2231
+ actorType: "agent",
2232
+ itemType: "message.assistant",
2233
+ role: "assistant",
2234
+ content: messageText(message),
2235
+ occurredAtUnixMs
2236
+ });
2237
+ }
2238
+ const statusTurnId = turnId ?? `session-status:${kind === "error" ? "error" : "notice"}`;
2239
+ const statusMessage = {
2240
+ ...message,
2241
+ payload: kind === "error" ? {
2242
+ ...payload,
2243
+ detail: messageText(message),
2244
+ kind: "agent_visible_error"
2245
+ } : {
2246
+ ...payload,
2247
+ detail: messageText(message),
2248
+ kind: "agent_system_notice",
2249
+ noticeKind: kind,
2250
+ severity: "info"
2251
+ }
2252
+ };
2253
+ return messageTimelineItem({
2254
+ message: statusMessage,
2255
+ id,
2256
+ seq,
2257
+ eventId,
2258
+ turnId: statusTurnId,
2259
+ actorType: role === "user" ? "user" : "agent",
2260
+ itemType: role === "user" ? "message.user" : "message.assistant",
2261
+ role: role === "user" ? "user" : "assistant",
2262
+ content: statusMessageText(statusMessage),
2263
+ occurredAtUnixMs
2264
+ });
2265
+ });
2266
+ }
2267
+ function latestMessageSnapshots(messages) {
2268
+ const latestByKey = /* @__PURE__ */ new Map();
2269
+ const unkeyedMessages = [];
2270
+ for (const message of messages) {
2271
+ const key = messageSnapshotKey(message);
2272
+ if (!key) {
2273
+ unkeyedMessages.push(message);
2274
+ continue;
2275
+ }
2276
+ const previous = latestByKey.get(key);
2277
+ if (!previous || (message.version ?? 0) >= (previous.version ?? 0)) {
2278
+ latestByKey.set(key, mergeMessageSnapshot(previous, message));
2279
+ } else {
2280
+ latestByKey.set(key, mergeMessageSnapshot(message, previous));
2281
+ }
2282
+ }
2283
+ return [...unkeyedMessages, ...latestByKey.values()];
2284
+ }
2285
+ function mergeMessageSnapshot(previous, next) {
2286
+ return {
2287
+ ...previous,
2288
+ ...next,
2289
+ payload: {
2290
+ ...previous?.payload ?? {},
2291
+ ...next.payload ?? {}
2292
+ }
2293
+ };
2294
+ }
2295
+ function messageSnapshotKey(message) {
2296
+ const messageId = message.messageId.trim();
2297
+ if (!messageId) {
2298
+ return null;
2299
+ }
2300
+ return `${message.agentSessionId.trim()}\0${messageId}`;
2301
+ }
2302
+ function messageTimelineItem({
2303
+ message,
2304
+ id,
2305
+ seq,
2306
+ eventId,
2307
+ turnId,
2308
+ actorType,
2309
+ itemType,
2310
+ role,
2311
+ content,
2312
+ occurredAtUnixMs
2313
+ }) {
2314
+ const workspaceId = workspaceIdFromMessage(message);
2315
+ return {
2316
+ id,
2317
+ ...workspaceTimelineFields(workspaceId),
2318
+ agentSessionId: message.agentSessionId,
2319
+ seq,
2320
+ ...turnId ? { turnId } : {},
2321
+ eventId,
2322
+ actorType,
2323
+ actorId: actorType === "user" ? "user" : message.agentSessionId,
2324
+ itemType,
2325
+ role,
2326
+ status: message.status,
2327
+ content,
2328
+ payload: normalizedPayload(message.payload),
2329
+ ...occurredAtUnixMs !== void 0 ? { occurredAtUnixMs } : {},
2330
+ ...message.startedAtUnixMs !== void 0 ? { createdAtUnixMs: message.startedAtUnixMs } : {}
2331
+ };
2332
+ }
2333
+ function workspaceIdFromMessage(message) {
2334
+ return message.workspaceId?.trim() || "";
2335
+ }
2336
+ function workspaceTimelineFields(workspaceId) {
2337
+ return {
2338
+ workspaceId
2339
+ };
2340
+ }
2341
+ function compareMessagesByDisplayOrder(left, right) {
2342
+ const leftTime = messageDisplayOrderTime(left);
2343
+ const rightTime = messageDisplayOrderTime(right);
2344
+ if (leftTime > 0 && rightTime > 0 && leftTime !== rightTime) {
2345
+ return leftTime - rightTime;
2346
+ }
2347
+ const leftVersion = normalizedPositiveNumber(left.version);
2348
+ const rightVersion = normalizedPositiveNumber(right.version);
2349
+ if (leftVersion > 0 && rightVersion > 0 && leftVersion !== rightVersion) {
2350
+ return leftVersion - rightVersion;
2351
+ }
2352
+ return 0;
2353
+ }
2354
+ function normalizedMessageId(id, index) {
2355
+ const normalizedId = typeof id === "number" ? id : 0;
2356
+ return Number.isFinite(normalizedId) && normalizedId > 0 ? normalizedId : index + 1;
2357
+ }
2358
+ function normalizedPositiveNumber(value) {
2359
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
2360
+ }
2361
+ function messageDisplayOrderTime(message) {
2362
+ return normalizedPositiveNumber(message.startedAtUnixMs) || normalizedPositiveNumber(message.occurredAtUnixMs) || normalizedPositiveNumber(message.completedAtUnixMs);
2363
+ }
2364
+ function toolCallItemType(status) {
2365
+ switch (normalizeToken(status)) {
2366
+ case "running":
2367
+ case "working":
2368
+ case "active":
2369
+ return "call.started";
2370
+ case "completed":
2371
+ case "complete":
2372
+ case "done":
2373
+ case "success":
2374
+ case "succeeded":
2375
+ return "call.completed";
2376
+ case "failed":
2377
+ case "error":
2378
+ return "call.failed";
2379
+ case "canceled":
2380
+ return "call.canceled";
2381
+ default:
2382
+ return "call";
2383
+ }
2384
+ }
2385
+ function messageText(message) {
2386
+ const payload = normalizedPayload(message.payload);
2387
+ const title = messagePayloadString(message, "title");
2388
+ return firstNonEmptyString(
2389
+ stringValue(payload.displayPrompt),
2390
+ stringValue(payload.text),
2391
+ stringValue(payload.content),
2392
+ stringValue(payload.message),
2393
+ stringValue(payload.body),
2394
+ title
2395
+ );
2396
+ }
2397
+ function statusMessageText(message) {
2398
+ const title = messagePayloadString(message, "title") ?? "";
2399
+ const text = messageText(message);
2400
+ if (title && text && title !== text) {
2401
+ return `${title}
2402
+
2403
+ ${text}`;
2404
+ }
2405
+ return title || text;
2406
+ }
2407
+ function messagePayloadString(message, key) {
2408
+ return stringValue(normalizedPayload(message.payload)[key]);
2409
+ }
2410
+ function mergePayload(previous, next) {
2411
+ if (!previous) {
2412
+ return next;
2413
+ }
2414
+ const merged = { ...previous, ...next };
2415
+ for (const key of [
2416
+ "input",
2417
+ "output",
2418
+ "error",
2419
+ "metadata",
2420
+ "toolState",
2421
+ "tool_state"
2422
+ ]) {
2423
+ if (isRecord(previous[key]) || isRecord(next[key])) {
2424
+ merged[key] = {
2425
+ ...isRecord(previous[key]) ? previous[key] : {},
2426
+ ...isRecord(next[key]) ? next[key] : {}
2427
+ };
2428
+ }
2429
+ }
2430
+ return merged;
2431
+ }
2432
+ function normalizedPayload(payload) {
2433
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
2434
+ }
2435
+ function sanitizedToolPayload(payload, callId) {
2436
+ if (!isOpaqueCallIdentifierString(stringValue(payload.toolName), callId)) {
2437
+ return payload;
2438
+ }
2439
+ const { toolName: _toolName, ...rest } = payload;
2440
+ return rest;
2441
+ }
2442
+ function isRecord(value) {
2443
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
2444
+ }
2445
+ function stringValue(value) {
2446
+ return typeof value === "string" && value.trim() ? value.trim() : "";
2447
+ }
2448
+ function firstNonEmptyString(...values) {
2449
+ for (const value of values) {
2450
+ if (typeof value === "string" && value.trim()) {
2451
+ return value.trim();
2452
+ }
2453
+ }
2454
+ return "";
2455
+ }
2456
+ function displayToolNameCandidate(value, callId) {
2457
+ const trimmed = value?.trim() ?? "";
2458
+ if (!trimmed || isOpaqueCallIdentifierString(trimmed, callId)) {
2459
+ return "";
2460
+ }
2461
+ return trimmed;
2462
+ }
2463
+ function isOpaqueCallIdentifierString(value, callId) {
2464
+ const trimmed = value.trim();
2465
+ if (!trimmed) {
2466
+ return false;
2467
+ }
2468
+ if (callId?.trim() && trimmed === callId.trim()) {
2469
+ return true;
2470
+ }
2471
+ const lower = trimmed.toLowerCase();
2472
+ if (lower.startsWith("call_")) {
2473
+ return isOpaqueIdentifierTail(trimmed.slice("call_".length));
2474
+ }
2475
+ if (lower.startsWith("ws_")) {
2476
+ return isOpaqueIdentifierTail(trimmed.slice("ws_".length));
2477
+ }
2478
+ return false;
2479
+ }
2480
+ function isOpaqueIdentifierTail(value) {
2481
+ return value.length >= 12 && /^[a-z0-9]+$/i.test(value);
2482
+ }
2483
+ function normalizeToken(value) {
2484
+ return value?.trim().toLowerCase() ?? "";
2485
+ }
2486
+
2487
+ // shared/agentConversation/projection/childSessionLanes.ts
2488
+ function buildChildSessionLanesByParentToolCallId(input) {
2489
+ const rootSessionId = input.rootSession.agentSessionId.trim();
2490
+ const childrenByParentSessionId = /* @__PURE__ */ new Map();
2491
+ for (const childSession of input.childSessions) {
2492
+ if (childSession.kind !== "child" || childSession.rootAgentSessionId !== rootSessionId || !childSession.parentAgentSessionId?.trim() || !childSession.parentToolCallId?.trim()) {
2493
+ continue;
2494
+ }
2495
+ const parentSessionId = childSession.parentAgentSessionId.trim();
2496
+ const siblings = childrenByParentSessionId.get(parentSessionId) ?? [];
2497
+ siblings.push(childSession);
2498
+ childrenByParentSessionId.set(parentSessionId, siblings);
2499
+ }
2500
+ for (const siblings of childrenByParentSessionId.values()) {
2501
+ siblings.sort(compareChildSessions);
2502
+ }
2503
+ const lanesByParentToolCallId = /* @__PURE__ */ new Map();
2504
+ const directChildren = childrenByParentSessionId.get(rootSessionId) ?? [];
2505
+ const visited = /* @__PURE__ */ new Set();
2506
+ for (const childSession of directChildren) {
2507
+ const parentToolCallId = childSession.parentToolCallId?.trim();
2508
+ if (!parentToolCallId) continue;
2509
+ const lanes = lanesByParentToolCallId.get(parentToolCallId) ?? [];
2510
+ lanes.push(
2511
+ buildChildSessionLane({
2512
+ childSession,
2513
+ childrenByParentSessionId,
2514
+ messagesBySessionId: input.messagesBySessionId,
2515
+ parentTimelineItems: input.rootTimelineItems,
2516
+ visited
2517
+ })
2518
+ );
2519
+ lanesByParentToolCallId.set(parentToolCallId, lanes);
2520
+ }
2521
+ for (const lanes of lanesByParentToolCallId.values()) {
2522
+ assignLanePositions(lanes);
2523
+ }
2524
+ return lanesByParentToolCallId;
2525
+ }
2526
+ function attachChildSessionLanesToConversationVM(conversation, lanesByParentToolCallId) {
2527
+ if (!conversation || lanesByParentToolCallId.size === 0) {
2528
+ return conversation;
2529
+ }
2530
+ let changed = false;
2531
+ const rows = conversation.rows.map((row) => {
2532
+ if (row.kind !== "tool-group") return row;
2533
+ const nextRow = toolGroupRowWithChildSessions(row, lanesByParentToolCallId);
2534
+ if (nextRow !== row) changed = true;
2535
+ return nextRow;
2536
+ });
2537
+ return changed ? { ...conversation, rows } : conversation;
2538
+ }
2539
+ function deriveSubAgentNameFromTask(task) {
2540
+ if (!task) return null;
2541
+ const firstSentence = task.trim().split(/[。..!?!?,,\n]/, 1)[0]?.trim();
2542
+ if (!firstSentence) return null;
2543
+ const selfAddress = /^(你现在是|你現在是|你是|you are|act as)\s*/i;
2544
+ if (!selfAddress.test(firstSentence)) return null;
2545
+ const stripped = firstSentence.replace(selfAddress, "").replace(/\s+/g, " ").trim();
2546
+ return stripped.length >= 2 && stripped.length <= 36 ? stripped : null;
2547
+ }
2548
+ function buildChildSessionLane(input) {
2549
+ const childSessionId = input.childSession.agentSessionId.trim();
2550
+ if (input.visited.has(childSessionId)) {
2551
+ return emptyCycleLane(input.childSession);
2552
+ }
2553
+ input.visited.add(childSessionId);
2554
+ const childMessages = input.messagesBySessionId[childSessionId] ?? [];
2555
+ const childTimelineItems = projectWorkspaceAgentMessagesToTimelineItems(childMessages);
2556
+ const parentToolCallId = input.childSession.parentToolCallId?.trim() ?? "";
2557
+ const parentCall = parentToolCall(
2558
+ input.parentTimelineItems,
2559
+ parentToolCallId
2560
+ );
2561
+ const task = parentCall?.task ?? null;
2562
+ const childSessions = (input.childrenByParentSessionId.get(childSessionId) ?? []).map(
2563
+ (nestedChild) => buildChildSessionLane({
2564
+ childSession: nestedChild,
2565
+ childrenByParentSessionId: input.childrenByParentSessionId,
2566
+ messagesBySessionId: input.messagesBySessionId,
2567
+ parentTimelineItems: childTimelineItems,
2568
+ visited: input.visited
2569
+ })
2570
+ );
2571
+ assignSiblingLanePositions(childSessions);
2572
+ input.visited.delete(childSessionId);
2573
+ const activity = childSessionActivityLog(childTimelineItems);
2574
+ const latestActivity = activity.entries.at(-1) ?? null;
2575
+ const latestMessageAtUnixMs = childMessages.reduce(
2576
+ (latest, message) => Math.max(latest, message.occurredAtUnixMs),
2577
+ 0
2578
+ );
2579
+ const latestTurn = input.childSession.latestTurn;
2580
+ const status = childSessionStatus(input.childSession);
2581
+ const terminalAtUnixMs = status === "running" ? null : latestTurn?.settledAtUnixMs ?? input.childSession.endedAtUnixMs;
2582
+ return {
2583
+ childSessionId,
2584
+ parentToolCallId,
2585
+ status,
2586
+ name: normalizedString(input.childSession.title) ?? deriveSubAgentNameFromTask(task),
2587
+ task,
2588
+ laneIndex: 1,
2589
+ laneCount: 1,
2590
+ latestActivity: latestActivity?.text ?? null,
2591
+ latestActivityKind: latestActivity?.kind ?? null,
2592
+ activityLog: activity.entries,
2593
+ activityOmittedCount: activity.omittedCount,
2594
+ queued: input.childSession.activeTurn?.phase === "submitted",
2595
+ failureDetail: status === "failed" ? latestTurn?.error?.message?.trim() ?? null : null,
2596
+ startedAtUnixMs: input.childSession.activeTurn?.startedAtUnixMs ?? latestTurn?.startedAtUnixMs ?? input.childSession.createdAtUnixMs,
2597
+ latestActivityAtUnixMs: Math.max(
2598
+ latestMessageAtUnixMs,
2599
+ latestTurn?.updatedAtUnixMs ?? 0,
2600
+ input.childSession.updatedAtUnixMs
2601
+ ),
2602
+ terminalAtUnixMs,
2603
+ childSessions
2604
+ };
2605
+ }
2606
+ function emptyCycleLane(session) {
2607
+ return {
2608
+ childSessionId: session.agentSessionId,
2609
+ parentToolCallId: session.parentToolCallId ?? "",
2610
+ status: childSessionStatus(session),
2611
+ name: normalizedString(session.title),
2612
+ task: null,
2613
+ laneIndex: 1,
2614
+ laneCount: 1,
2615
+ latestActivity: null,
2616
+ latestActivityKind: null,
2617
+ activityLog: [],
2618
+ activityOmittedCount: 0,
2619
+ failureDetail: session.latestTurn?.error?.message?.trim() ?? null,
2620
+ startedAtUnixMs: session.createdAtUnixMs,
2621
+ latestActivityAtUnixMs: session.updatedAtUnixMs,
2622
+ terminalAtUnixMs: session.latestTurn?.settledAtUnixMs ?? session.endedAtUnixMs,
2623
+ childSessions: []
2624
+ };
2625
+ }
2626
+ function childSessionStatus(session) {
2627
+ const activeTurn = session.activeTurn;
2628
+ if (activeTurn && activeTurn.phase !== "settled") return "running";
2629
+ const latestTurn = session.latestTurn;
2630
+ if (!latestTurn || latestTurn.phase !== "settled") return "running";
2631
+ switch (latestTurn.outcome) {
2632
+ case "failed":
2633
+ return "failed";
2634
+ case "canceled":
2635
+ case "interrupted":
2636
+ return "canceled";
2637
+ case "completed":
2638
+ default:
2639
+ return "completed";
2640
+ }
2641
+ }
2642
+ function parentToolCall(timelineItems, parentToolCallId) {
2643
+ if (!parentToolCallId) return null;
2644
+ for (const item of timelineItems) {
2645
+ if (!isWorkspaceAgentToolCallItem(item)) continue;
2646
+ const callId = firstString(item.callId, stringValue2(item.payload?.callId));
2647
+ if (callId !== parentToolCallId) continue;
2648
+ const input = recordValue(item.payload?.input);
2649
+ return {
2650
+ task: firstString(
2651
+ stringValue2(input?.task),
2652
+ stringValue2(input?.prompt),
2653
+ stringValue2(input?.description)
2654
+ )
2655
+ };
2656
+ }
2657
+ return null;
2658
+ }
2659
+ function toolGroupRowWithChildSessions(row, lanesByParentToolCallId) {
2660
+ let changed = false;
2661
+ const callsById = /* @__PURE__ */ new Map();
2662
+ const calls = row.calls.map((call) => {
2663
+ const lanes = call.task ? lanesByParentToolCallId.get(toolCallRawId(call.id)) : null;
2664
+ if (!lanes?.length || !call.task) return call;
2665
+ changed = true;
2666
+ const nextCall = {
2667
+ ...call,
2668
+ task: { ...call.task, subAgents: lanes }
2669
+ };
2670
+ callsById.set(nextCall.id, nextCall);
2671
+ return nextCall;
2672
+ });
2673
+ if (!changed) return row;
2674
+ const entries = row.entries.map((entry) => {
2675
+ if (entry.kind !== "tool-call") return entry;
2676
+ const nextCall = callsById.get(entry.call.id);
2677
+ return nextCall ? { ...entry, call: nextCall } : entry;
2678
+ });
2679
+ return { ...row, calls, entries };
2680
+ }
2681
+ function toolCallRawId(id) {
2682
+ return id.startsWith("call:") ? id.slice("call:".length) : id;
2683
+ }
2684
+ var CHILD_ACTIVITY_LOG_CAP = 20;
2685
+ function childSessionActivityLog(timelineItems) {
2686
+ const entries = timelineItems.map(displayableActivityEntry).filter((entry) => entry !== null);
2687
+ const omittedCount = Math.max(0, entries.length - CHILD_ACTIVITY_LOG_CAP);
2688
+ return { entries: entries.slice(omittedCount), omittedCount };
2689
+ }
2690
+ function displayableActivityEntry(item) {
2691
+ const atUnixMs = timelineItemTime(item) || null;
2692
+ if (isWorkspaceAgentToolCallItem(item)) {
2693
+ const name = firstString(
2694
+ resolveWorkspaceAgentToolName(item),
2695
+ item.name,
2696
+ stringValue2(item.payload?.name)
2697
+ );
2698
+ return name ? { kind: "tool", text: name, atUnixMs } : null;
2699
+ }
2700
+ const text = snippet(timelineItemText(item));
2701
+ if (!text) return null;
2702
+ const itemType = item.itemType?.trim().toLowerCase() ?? "";
2703
+ const role = item.role?.trim().toLowerCase() ?? "";
2704
+ return itemType === "message.assistant_thinking" || role === "assistant_thinking" ? { kind: "reasoning", text, atUnixMs } : { kind: "message", text, atUnixMs };
2705
+ }
2706
+ function timelineItemText(item) {
2707
+ return (stringValue2(item.payload?.text) ?? stringValue2(item.payload?.content) ?? stringValue2(item.content) ?? "").replace(/\s+/g, " ").trim();
2708
+ }
2709
+ function snippet(text) {
2710
+ return text.length <= 140 ? text : String.fromCodePoint(8230) + text.slice(-140);
2711
+ }
2712
+ function assignSiblingLanePositions(lanes) {
2713
+ const lanesByCallId = /* @__PURE__ */ new Map();
2714
+ for (const lane of lanes) {
2715
+ const siblings = lanesByCallId.get(lane.parentToolCallId) ?? [];
2716
+ siblings.push(lane);
2717
+ lanesByCallId.set(lane.parentToolCallId, siblings);
2718
+ }
2719
+ for (const siblings of lanesByCallId.values()) assignLanePositions(siblings);
2720
+ }
2721
+ function assignLanePositions(lanes) {
2722
+ for (let index = 0; index < lanes.length; index += 1) {
2723
+ const lane = lanes[index];
2724
+ if (!lane) continue;
2725
+ lane.laneIndex = index + 1;
2726
+ lane.laneCount = lanes.length;
2727
+ }
2728
+ }
2729
+ function compareChildSessions(left, right) {
2730
+ return left.createdAtUnixMs - right.createdAtUnixMs || left.agentSessionId.localeCompare(right.agentSessionId);
2731
+ }
2732
+ function timelineItemTime(item) {
2733
+ return item?.occurredAtUnixMs ?? item?.createdAtUnixMs ?? 0;
2734
+ }
2735
+ function normalizedString(value) {
2736
+ return typeof value === "string" && value.trim() ? value.trim() : null;
2737
+ }
2738
+ function stringValue2(value) {
2739
+ return typeof value === "string" && value.trim() ? value.trim() : null;
2740
+ }
2741
+ function recordValue(value) {
2742
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
2743
+ }
2744
+ function firstString(...values) {
2745
+ for (const value of values) {
2746
+ const normalized = normalizedString(value);
2747
+ if (normalized) return normalized;
2748
+ }
2749
+ return null;
2750
+ }
2751
+
2137
2752
  // agent-gui/agentGuiNode/model/agentGuiConversationFilter.ts
2138
2753
  function createAgentGUIConversationFilterState(filter = { kind: "all" }) {
2139
2754
  return {
@@ -2180,7 +2795,7 @@ function matchesAgentGUIConversationFilterAgentTarget(agentTargetId, provider, f
2180
2795
  }
2181
2796
 
2182
2797
  // agent-gui/agentGuiNode/model/agentGuiConversationModel.ts
2183
- import { selectCanonicalAgentActivitySessions } from "@tutti-os/agent-activity-core";
2798
+ import { selectRootAgentActivitySessions } from "@tutti-os/agent-activity-core";
2184
2799
 
2185
2800
  // agent-gui/agentGuiNode/model/agentGuiConversationProjectResolver.ts
2186
2801
  import { resolveWorkspaceUserProjectDisplayLabel } from "@tutti-os/workspace-user-project/core";
@@ -2588,6 +3203,8 @@ function buildAgentGUIConversationDetail({
2588
3203
  function buildAgentGUIConversationModels({
2589
3204
  timelineItems,
2590
3205
  conversation,
3206
+ childSessions = [],
3207
+ childMessagesBySessionId = {},
2591
3208
  workspaceRoot = null,
2592
3209
  avoidGroupingEdits = false
2593
3210
  }) {
@@ -2599,13 +3216,16 @@ function buildAgentGUIConversationModels({
2599
3216
  if (!detail) {
2600
3217
  return { conversation: null, detail: null };
2601
3218
  }
2602
- const subAgentLanesByCallId = buildSubAgentLanesByCallId(
2603
- partitionSubAgentTimelineItems(timelineItems)
2604
- );
3219
+ const childSessionLanesByParentToolCallId = buildChildSessionLanesByParentToolCallId({
3220
+ rootSession: detail.session,
3221
+ rootTimelineItems: timelineItems,
3222
+ childSessions,
3223
+ messagesBySessionId: childMessagesBySessionId
3224
+ });
2605
3225
  return {
2606
- conversation: attachSubAgentLanesToConversationVM(
3226
+ conversation: attachChildSessionLanesToConversationVM(
2607
3227
  projectAgentConversationVM(detail, { avoidGroupingEdits }),
2608
- subAgentLanesByCallId
3228
+ childSessionLanesByParentToolCallId
2609
3229
  ),
2610
3230
  detail
2611
3231
  };
@@ -2916,354 +3536,6 @@ function stringField(record, field) {
2916
3536
  return typeof value === "string" ? value.trim() : "";
2917
3537
  }
2918
3538
 
2919
- // shared/agentConversation/projection/workspaceAgentMessageProjection.ts
2920
- function projectWorkspaceAgentMessagesToTimelineItems(messages) {
2921
- const sortedMessages = latestMessageSnapshots(messages).sort(
2922
- compareMessagesByDisplayOrder
2923
- );
2924
- const mergedToolPayloadByKey = /* @__PURE__ */ new Map();
2925
- return sortedMessages.map((message, index) => {
2926
- const kind = normalizeToken(message.kind);
2927
- const role = normalizeToken(message.role);
2928
- const payload = normalizedPayload(message.payload);
2929
- const id = normalizedMessageId(message.version, index);
2930
- const seq = index + 1;
2931
- const eventId = message.messageId.trim() || `message:${id}`;
2932
- const turnId = message.turnId?.trim() || void 0;
2933
- const occurredAtUnixMs = messageDisplayOrderTime(message);
2934
- if (kind === "tool_call") {
2935
- const callId = firstNonEmptyString(
2936
- messagePayloadString(message, "callId"),
2937
- message.messageId
2938
- );
2939
- const title = messagePayloadString(message, "title");
2940
- const toolKey = callId || eventId;
2941
- const payloadToolName = displayToolNameCandidate(
2942
- stringValue(payload.toolName),
2943
- callId
2944
- );
2945
- const titleToolName = displayToolNameCandidate(title, callId);
2946
- const toolName = firstNonEmptyString(payloadToolName, titleToolName);
2947
- const toolPayload = sanitizedToolPayload(payload, callId);
2948
- const mergedPayload = mergePayload(mergedToolPayloadByKey.get(toolKey), {
2949
- ...toolPayload,
2950
- ...toolName ? { toolName } : {},
2951
- ...message.status?.trim() ? { status: message.status.trim() } : {}
2952
- });
2953
- mergedToolPayloadByKey.set(toolKey, mergedPayload);
2954
- const callType = firstNonEmptyString(stringValue(mergedPayload.callType)) || "tool";
2955
- const workspaceId = workspaceIdFromMessage(message);
2956
- return {
2957
- id,
2958
- ...workspaceTimelineFields(workspaceId),
2959
- agentSessionId: message.agentSessionId,
2960
- seq,
2961
- ...turnId ? { turnId } : {},
2962
- eventId,
2963
- actorType: "agent",
2964
- actorId: message.agentSessionId,
2965
- itemType: toolCallItemType(message.status ?? void 0),
2966
- role: "assistant",
2967
- callType,
2968
- callId,
2969
- name: firstNonEmptyString(toolName, titleToolName) || "Tool",
2970
- ...message.status !== void 0 ? { status: message.status } : {},
2971
- payload: mergedPayload,
2972
- ...occurredAtUnixMs !== void 0 ? { occurredAtUnixMs } : {},
2973
- ...message.startedAtUnixMs !== void 0 ? { createdAtUnixMs: message.startedAtUnixMs } : {}
2974
- };
2975
- }
2976
- if (kind === "reasoning") {
2977
- return messageTimelineItem({
2978
- message,
2979
- id,
2980
- seq,
2981
- eventId,
2982
- turnId,
2983
- actorType: "agent",
2984
- itemType: "message.assistant_thinking",
2985
- role: "assistant_thinking",
2986
- content: messageText(message),
2987
- occurredAtUnixMs
2988
- });
2989
- }
2990
- if (kind === "text" && role === "user") {
2991
- return messageTimelineItem({
2992
- message,
2993
- id,
2994
- seq,
2995
- eventId,
2996
- turnId,
2997
- actorType: "user",
2998
- itemType: "message.user",
2999
- role: "user",
3000
- content: messageText(message),
3001
- occurredAtUnixMs
3002
- });
3003
- }
3004
- if (kind === "text" && (role === "assistant" || role === "agent")) {
3005
- return messageTimelineItem({
3006
- message,
3007
- id,
3008
- seq,
3009
- eventId,
3010
- turnId,
3011
- actorType: "agent",
3012
- itemType: "message.assistant",
3013
- role: "assistant",
3014
- content: messageText(message),
3015
- occurredAtUnixMs
3016
- });
3017
- }
3018
- const statusTurnId = turnId ?? `session-status:${kind === "error" ? "error" : "notice"}`;
3019
- const statusMessage = {
3020
- ...message,
3021
- payload: kind === "error" ? {
3022
- ...payload,
3023
- detail: messageText(message),
3024
- kind: "agent_visible_error"
3025
- } : {
3026
- ...payload,
3027
- detail: messageText(message),
3028
- kind: "agent_system_notice",
3029
- noticeKind: kind,
3030
- severity: "info"
3031
- }
3032
- };
3033
- return messageTimelineItem({
3034
- message: statusMessage,
3035
- id,
3036
- seq,
3037
- eventId,
3038
- turnId: statusTurnId,
3039
- actorType: role === "user" ? "user" : "agent",
3040
- itemType: role === "user" ? "message.user" : "message.assistant",
3041
- role: role === "user" ? "user" : "assistant",
3042
- content: statusMessageText(statusMessage),
3043
- occurredAtUnixMs
3044
- });
3045
- });
3046
- }
3047
- function latestMessageSnapshots(messages) {
3048
- const latestByKey = /* @__PURE__ */ new Map();
3049
- const unkeyedMessages = [];
3050
- for (const message of messages) {
3051
- const key = messageSnapshotKey(message);
3052
- if (!key) {
3053
- unkeyedMessages.push(message);
3054
- continue;
3055
- }
3056
- const previous = latestByKey.get(key);
3057
- if (!previous || (message.version ?? 0) >= (previous.version ?? 0)) {
3058
- latestByKey.set(key, mergeMessageSnapshot(previous, message));
3059
- } else {
3060
- latestByKey.set(key, mergeMessageSnapshot(message, previous));
3061
- }
3062
- }
3063
- return [...unkeyedMessages, ...latestByKey.values()];
3064
- }
3065
- function mergeMessageSnapshot(previous, next) {
3066
- return {
3067
- ...previous,
3068
- ...next,
3069
- payload: {
3070
- ...previous?.payload ?? {},
3071
- ...next.payload ?? {}
3072
- }
3073
- };
3074
- }
3075
- function messageSnapshotKey(message) {
3076
- const messageId = message.messageId.trim();
3077
- if (!messageId) {
3078
- return null;
3079
- }
3080
- return `${message.agentSessionId.trim()}\0${messageId}`;
3081
- }
3082
- function messageTimelineItem({
3083
- message,
3084
- id,
3085
- seq,
3086
- eventId,
3087
- turnId,
3088
- actorType,
3089
- itemType,
3090
- role,
3091
- content,
3092
- occurredAtUnixMs
3093
- }) {
3094
- const workspaceId = workspaceIdFromMessage(message);
3095
- return {
3096
- id,
3097
- ...workspaceTimelineFields(workspaceId),
3098
- agentSessionId: message.agentSessionId,
3099
- seq,
3100
- ...turnId ? { turnId } : {},
3101
- eventId,
3102
- actorType,
3103
- actorId: actorType === "user" ? "user" : message.agentSessionId,
3104
- itemType,
3105
- role,
3106
- status: message.status,
3107
- content,
3108
- payload: normalizedPayload(message.payload),
3109
- ...occurredAtUnixMs !== void 0 ? { occurredAtUnixMs } : {},
3110
- ...message.startedAtUnixMs !== void 0 ? { createdAtUnixMs: message.startedAtUnixMs } : {}
3111
- };
3112
- }
3113
- function workspaceIdFromMessage(message) {
3114
- return message.workspaceId?.trim() || "";
3115
- }
3116
- function workspaceTimelineFields(workspaceId) {
3117
- return {
3118
- workspaceId
3119
- };
3120
- }
3121
- function compareMessagesByDisplayOrder(left, right) {
3122
- const leftTime = messageDisplayOrderTime(left);
3123
- const rightTime = messageDisplayOrderTime(right);
3124
- if (leftTime > 0 && rightTime > 0 && leftTime !== rightTime) {
3125
- return leftTime - rightTime;
3126
- }
3127
- const leftVersion = normalizedPositiveNumber(left.version);
3128
- const rightVersion = normalizedPositiveNumber(right.version);
3129
- if (leftVersion > 0 && rightVersion > 0 && leftVersion !== rightVersion) {
3130
- return leftVersion - rightVersion;
3131
- }
3132
- return 0;
3133
- }
3134
- function normalizedMessageId(id, index) {
3135
- const normalizedId = typeof id === "number" ? id : 0;
3136
- return Number.isFinite(normalizedId) && normalizedId > 0 ? normalizedId : index + 1;
3137
- }
3138
- function normalizedPositiveNumber(value) {
3139
- return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
3140
- }
3141
- function messageDisplayOrderTime(message) {
3142
- return normalizedPositiveNumber(message.startedAtUnixMs) || normalizedPositiveNumber(message.occurredAtUnixMs) || normalizedPositiveNumber(message.completedAtUnixMs);
3143
- }
3144
- function toolCallItemType(status) {
3145
- switch (normalizeToken(status)) {
3146
- case "running":
3147
- case "working":
3148
- case "active":
3149
- return "call.started";
3150
- case "completed":
3151
- case "complete":
3152
- case "done":
3153
- case "success":
3154
- case "succeeded":
3155
- return "call.completed";
3156
- case "failed":
3157
- case "error":
3158
- return "call.failed";
3159
- case "canceled":
3160
- return "call.canceled";
3161
- default:
3162
- return "call";
3163
- }
3164
- }
3165
- function messageText(message) {
3166
- const payload = normalizedPayload(message.payload);
3167
- const title = messagePayloadString(message, "title");
3168
- return firstNonEmptyString(
3169
- stringValue(payload.displayPrompt),
3170
- stringValue(payload.text),
3171
- stringValue(payload.content),
3172
- stringValue(payload.message),
3173
- stringValue(payload.body),
3174
- title
3175
- );
3176
- }
3177
- function statusMessageText(message) {
3178
- const title = messagePayloadString(message, "title") ?? "";
3179
- const text = messageText(message);
3180
- if (title && text && title !== text) {
3181
- return `${title}
3182
-
3183
- ${text}`;
3184
- }
3185
- return title || text;
3186
- }
3187
- function messagePayloadString(message, key) {
3188
- return stringValue(normalizedPayload(message.payload)[key]);
3189
- }
3190
- function mergePayload(previous, next) {
3191
- if (!previous) {
3192
- return next;
3193
- }
3194
- const merged = { ...previous, ...next };
3195
- for (const key of [
3196
- "input",
3197
- "output",
3198
- "error",
3199
- "metadata",
3200
- "toolState",
3201
- "tool_state"
3202
- ]) {
3203
- if (isRecord2(previous[key]) || isRecord2(next[key])) {
3204
- merged[key] = {
3205
- ...isRecord2(previous[key]) ? previous[key] : {},
3206
- ...isRecord2(next[key]) ? next[key] : {}
3207
- };
3208
- }
3209
- }
3210
- return merged;
3211
- }
3212
- function normalizedPayload(payload) {
3213
- return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
3214
- }
3215
- function sanitizedToolPayload(payload, callId) {
3216
- if (!isOpaqueCallIdentifierString(stringValue(payload.toolName), callId)) {
3217
- return payload;
3218
- }
3219
- const { toolName: _toolName, ...rest } = payload;
3220
- return rest;
3221
- }
3222
- function isRecord2(value) {
3223
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
3224
- }
3225
- function stringValue(value) {
3226
- return typeof value === "string" && value.trim() ? value.trim() : "";
3227
- }
3228
- function firstNonEmptyString(...values) {
3229
- for (const value of values) {
3230
- if (typeof value === "string" && value.trim()) {
3231
- return value.trim();
3232
- }
3233
- }
3234
- return "";
3235
- }
3236
- function displayToolNameCandidate(value, callId) {
3237
- const trimmed = value?.trim() ?? "";
3238
- if (!trimmed || isOpaqueCallIdentifierString(trimmed, callId)) {
3239
- return "";
3240
- }
3241
- return trimmed;
3242
- }
3243
- function isOpaqueCallIdentifierString(value, callId) {
3244
- const trimmed = value.trim();
3245
- if (!trimmed) {
3246
- return false;
3247
- }
3248
- if (callId?.trim() && trimmed === callId.trim()) {
3249
- return true;
3250
- }
3251
- const lower = trimmed.toLowerCase();
3252
- if (lower.startsWith("call_")) {
3253
- return isOpaqueIdentifierTail(trimmed.slice("call_".length));
3254
- }
3255
- if (lower.startsWith("ws_")) {
3256
- return isOpaqueIdentifierTail(trimmed.slice("ws_".length));
3257
- }
3258
- return false;
3259
- }
3260
- function isOpaqueIdentifierTail(value) {
3261
- return value.length >= 12 && /^[a-z0-9]+$/i.test(value);
3262
- }
3263
- function normalizeToken(value) {
3264
- return value?.trim().toLowerCase() ?? "";
3265
- }
3266
-
3267
3539
  // agent-gui/agentGuiNode/controller/agentGuiController.promptHelpers.ts
3268
3540
  function createAgentGUIConversationId() {
3269
3541
  if (typeof globalThis.crypto?.randomUUID === "function") {
@@ -3518,7 +3790,6 @@ function sortAgentTargetRefValue(value) {
3518
3790
 
3519
3791
  // agent-gui/agentGuiNode/controller/agentGuiController.providerHelpers.ts
3520
3792
  var EMPTY_AGENT_GUI_MESSAGES = [];
3521
- var GOAL_CLEAR_PROMPT = "/goal clear";
3522
3793
  function resolveAgentGUIProviderRailTargetSelection(input) {
3523
3794
  return input.nextFilter.kind === "agentTarget" && input.activeConversation && matchesAgentGUIConversationSummaryFilter(
3524
3795
  input.activeConversation,
@@ -3618,7 +3889,7 @@ function reasoningOptionsFromRuntimeConfig(runtimeContext) {
3618
3889
  return null;
3619
3890
  }
3620
3891
  for (const rawOption of configOptions) {
3621
- const option = recordValue(rawOption);
3892
+ const option = recordValue2(rawOption);
3622
3893
  const id = normalizeConfigOptionValue(option?.id);
3623
3894
  if (!option || !id || !["reasoning_effort", "model_reasoning_effort", "effort"].includes(id)) {
3624
3895
  continue;
@@ -3629,7 +3900,7 @@ function reasoningOptionsFromRuntimeConfig(runtimeContext) {
3629
3900
  }
3630
3901
  const options = [];
3631
3902
  for (const rawEntry of rawEntries) {
3632
- const entry = recordValue(rawEntry);
3903
+ const entry = recordValue2(rawEntry);
3633
3904
  const value = normalizeConfigOptionValue(entry?.value);
3634
3905
  if (!entry || !value || options.some((candidate) => candidate.value === value)) {
3635
3906
  continue;
@@ -3651,7 +3922,7 @@ function reasoningOptionsFromRuntimeConfig(runtimeContext) {
3651
3922
  }
3652
3923
  return null;
3653
3924
  }
3654
- function recordValue(value) {
3925
+ function recordValue2(value) {
3655
3926
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
3656
3927
  }
3657
3928
  function reasoningProfileForModel(options, model) {
@@ -6474,7 +6745,6 @@ function useAgentGUIComposerCapabilities(input) {
6474
6745
  [usageSource]
6475
6746
  );
6476
6747
  return {
6477
- backgroundAgentCount: input.activeEngineSession?.backgroundAgents?.count ?? 0,
6478
6748
  compactSupported: sessionCapabilities?.compact ?? resolveAgentActivityCapability2("compact", {
6479
6749
  composerOptions: providerComposerOptions,
6480
6750
  sessionCapabilities
@@ -8392,6 +8662,21 @@ var AgentGUIHomeDraftSettlementController = class {
8392
8662
  }
8393
8663
  };
8394
8664
 
8665
+ // agent-gui/agentGuiNode/controller/agentGuiController.interactionHelpers.ts
8666
+ function resolveAgentGUIInteractionTarget(interactions, requestId) {
8667
+ const normalizedRequestId = requestId.trim();
8668
+ if (!normalizedRequestId) return null;
8669
+ for (let index = interactions.length - 1; index >= 0; index -= 1) {
8670
+ const interaction = interactions[index];
8671
+ if (interaction?.requestId.trim() !== normalizedRequestId) continue;
8672
+ const agentSessionId = interaction.agentSessionId.trim();
8673
+ const turnId = interaction.turnId.trim();
8674
+ if (!agentSessionId || !turnId) return null;
8675
+ return { agentSessionId, turnId };
8676
+ }
8677
+ return null;
8678
+ }
8679
+
8395
8680
  // agent-gui/agentGuiNode/controller/useAgentGUISubmitInteractionActions.ts
8396
8681
  function useAgentGUISubmitInteractionActions(input) {
8397
8682
  const {
@@ -8417,6 +8702,7 @@ function useAgentGUISubmitInteractionActions(input) {
8417
8702
  setActiveConversationId,
8418
8703
  setDetailError,
8419
8704
  setDraftByScopeKey,
8705
+ setGoalClearNoticeSequence,
8420
8706
  setIntent,
8421
8707
  submittedDraftSnapshotsRef,
8422
8708
  startConversation,
@@ -8611,20 +8897,16 @@ function useAgentGUISubmitInteractionActions(input) {
8611
8897
  return;
8612
8898
  }
8613
8899
  setDetailError(null);
8614
- if (action === "clear") {
8615
- executePrompt(
8616
- agentSessionId,
8617
- textPromptContent(GOAL_CLEAR_PROMPT),
8618
- GOAL_CLEAR_PROMPT,
8619
- { immediate: true }
8620
- );
8621
- return;
8622
- }
8623
8900
  void agentActivityRuntime.goalControl({
8624
8901
  workspaceId,
8625
8902
  agentSessionId,
8626
8903
  action,
8627
8904
  ...objective !== void 0 ? { objective } : {}
8905
+ }).then(() => {
8906
+ if (action !== "clear" || !isCurrentConversation(agentSessionId)) {
8907
+ return;
8908
+ }
8909
+ setGoalClearNoticeSequence((current) => current + 1);
8628
8910
  }).catch((error) => {
8629
8911
  if (!isCurrentConversation(agentSessionId)) {
8630
8912
  return;
@@ -8634,10 +8916,10 @@ function useAgentGUISubmitInteractionActions(input) {
8634
8916
  },
8635
8917
  [
8636
8918
  agentActivityRuntime,
8637
- executePrompt,
8638
8919
  isCurrentConversation,
8639
8920
  previewMode,
8640
8921
  setDetailError,
8922
+ setGoalClearNoticeSequence,
8641
8923
  workspaceId
8642
8924
  ]
8643
8925
  );
@@ -8797,12 +9079,14 @@ function useAgentGUISubmitInteractionActions(input) {
8797
9079
  planActionsRef.current.skip();
8798
9080
  return;
8799
9081
  }
8800
- const agentSessionId = activeConversationIdRef.current;
8801
9082
  const normalizedRequestId = input2.requestId.trim();
8802
9083
  const normalizedOptionId = input2.optionId?.trim() ?? "";
8803
- const turnId = activeEnginePendingInteractions.find(
8804
- (interaction) => interaction.requestId === normalizedRequestId
8805
- )?.turnId ?? "";
9084
+ const target = resolveAgentGUIInteractionTarget(
9085
+ activeEnginePendingInteractions,
9086
+ normalizedRequestId
9087
+ );
9088
+ const agentSessionId = target?.agentSessionId ?? "";
9089
+ const turnId = target?.turnId ?? "";
8806
9090
  if (!agentSessionId || !normalizedRequestId || !turnId || isRespondingToInteraction) {
8807
9091
  return;
8808
9092
  }
@@ -8979,7 +9263,6 @@ function useAgentGUIViewModel(candidate) {
8979
9263
  [
8980
9264
  candidate.detail.availability,
8981
9265
  candidate.detail.avoidGroupingEdits,
8982
- candidate.detail.backgroundAgentCount,
8983
9266
  candidate.detail.conversation,
8984
9267
  candidate.detail.conversationDetail,
8985
9268
  candidate.detail.hasOlderMessages,
@@ -9034,6 +9317,7 @@ function useAgentGUIViewModel(candidate) {
9034
9317
  const operations = useMemo8(
9035
9318
  () => candidate.operations,
9036
9319
  [
9320
+ candidate.operations.goalClearNoticeSequence,
9037
9321
  candidate.operations.isDeletingConversation,
9038
9322
  candidate.operations.isDeletingProjectConversations,
9039
9323
  candidate.operations.pendingDeleteConversation,
@@ -9935,20 +10219,30 @@ function useAgentGUIConversationDetail(input) {
9935
10219
  [input.providerComposerOptions]
9936
10220
  )
9937
10221
  );
9938
- const conversationModels = useMemo11(
9939
- () => projectionConversation ? buildAgentGUIConversationModels({
10222
+ const conversationModels = useMemo11(() => {
10223
+ if (!projectionConversation) {
10224
+ return { conversation: null, detail: null };
10225
+ }
10226
+ const rootSessionId = projectionConversation.id.trim();
10227
+ const childSessions = input.agentActivitySnapshot.sessions.filter(
10228
+ (session) => session.kind === "child" && session.rootAgentSessionId === rootSessionId
10229
+ );
10230
+ return buildAgentGUIConversationModels({
9940
10231
  timelineItems: input.activeTimelineItems,
9941
10232
  conversation: projectionConversation,
10233
+ childSessions,
10234
+ childMessagesBySessionId: input.agentActivitySnapshot.sessionMessagesById,
9942
10235
  workspaceRoot: input.workspacePath,
9943
10236
  avoidGroupingEdits: input.avoidGroupingEdits
9944
- }) : { conversation: null, detail: null },
9945
- [
9946
- input.activeTimelineItems,
9947
- input.avoidGroupingEdits,
9948
- input.workspacePath,
9949
- projectionConversation
9950
- ]
9951
- );
10237
+ });
10238
+ }, [
10239
+ input.activeTimelineItems,
10240
+ input.agentActivitySnapshot.sessionMessagesById,
10241
+ input.agentActivitySnapshot.sessions,
10242
+ input.avoidGroupingEdits,
10243
+ input.workspacePath,
10244
+ projectionConversation
10245
+ ]);
9952
10246
  const conversationDetail = useStableConversationDetail(
9953
10247
  conversationModels.detail
9954
10248
  );
@@ -10802,7 +11096,6 @@ function useAgentGUIViewAssembly(input) {
10802
11096
  isLoadingOlderMessages: input.activeSessionView?.isLoadingOlderMessages ?? false,
10803
11097
  hasOlderMessages: input.activeSessionView?.hasOlderMessages ?? false,
10804
11098
  usage: input.usage,
10805
- backgroundAgentCount: input.backgroundAgentCount,
10806
11099
  hasSentUserMessage: session.hasSentUserMessage,
10807
11100
  avoidGroupingEdits: input.avoidGroupingEdits,
10808
11101
  conversation: detail.conversation,
@@ -10847,6 +11140,7 @@ function useAgentGUIViewAssembly(input) {
10847
11140
  providerReadinessGate
10848
11141
  },
10849
11142
  operations: {
11143
+ goalClearNoticeSequence: input.goalClearNoticeSequence,
10850
11144
  isDeletingConversation: input.isDeletingConversation,
10851
11145
  isDeletingProjectConversations: input.isDeletingProjectConversations,
10852
11146
  pendingDeleteConversation: input.pendingDeleteConversation,
@@ -11582,11 +11876,13 @@ function useAgentGUILocalState({
11582
11876
  ] = useState7(null);
11583
11877
  const [listError, setListError] = useState7(null);
11584
11878
  const [detailError, setDetailError] = useState7(null);
11879
+ const [goalClearNoticeSequence, setGoalClearNoticeSequence] = useState7(0);
11585
11880
  return {
11586
11881
  activeConversationId,
11587
11882
  detailError,
11588
11883
  draftByScopeKey,
11589
11884
  draftSettingsBySessionId,
11885
+ goalClearNoticeSequence,
11590
11886
  intent,
11591
11887
  isComposerHome,
11592
11888
  isDeletingConversation,
@@ -11600,6 +11896,7 @@ function useAgentGUILocalState({
11600
11896
  setDetailError,
11601
11897
  setDraftByScopeKey,
11602
11898
  setDraftSettingsBySessionId,
11899
+ setGoalClearNoticeSequence,
11603
11900
  setIntent,
11604
11901
  setIsComposerHome,
11605
11902
  setIsDeletingConversation,
@@ -11728,6 +12025,23 @@ function useAgentGUINodeController({
11728
12025
  activeSessionState,
11729
12026
  isCreatingConversation
11730
12027
  } = sessionEngineState;
12028
+ const activeRelatedPendingInteractions = useMemo18(() => {
12029
+ if (!activeConversationId) return [];
12030
+ return agentActivitySnapshot.sessions.filter(
12031
+ (session) => session.agentSessionId === activeConversationId || session.kind === "child" && session.rootAgentSessionId === activeConversationId
12032
+ ).flatMap((session) => session.pendingInteractions).sort(
12033
+ (left, right) => left.createdAtUnixMs - right.createdAtUnixMs || left.agentSessionId.localeCompare(right.agentSessionId) || left.requestId.localeCompare(right.requestId)
12034
+ );
12035
+ }, [activeConversationId, agentActivitySnapshot.sessions]);
12036
+ const activeRelatedIsRespondingToInteraction = useEngineSelector(
12037
+ sessionEngine,
12038
+ (state) => activeRelatedPendingInteractions.some(
12039
+ (interaction) => selectEngineSessionIsRespondingToInteraction2(
12040
+ state,
12041
+ interaction.agentSessionId
12042
+ )
12043
+ )
12044
+ );
11731
12045
  const updateComposerSettingsRef = useRef16(() => {
11732
12046
  });
11733
12047
  const planActionsRef = useRef16({ implement: () => {
@@ -12041,6 +12355,7 @@ function useAgentGUINodeController({
12041
12355
  ...controllerRefs,
12042
12356
  ...sessionDetailTransport,
12043
12357
  ...conversationSelection,
12358
+ activeEnginePendingInteractions: activeRelatedPendingInteractions,
12044
12359
  accountProfilesByUserId,
12045
12360
  activation,
12046
12361
  agentActivityRuntime,
@@ -12053,6 +12368,7 @@ function useAgentGUINodeController({
12053
12368
  data,
12054
12369
  defaultAgentTargetId,
12055
12370
  isExplicitAgentGUIAgentTarget,
12371
+ isRespondingToInteraction: activeRelatedIsRespondingToInteraction,
12056
12372
  loadDraftComposerOptions,
12057
12373
  normalizedExplicitProviderTargets,
12058
12374
  normalizedProviderTargets,
@@ -12082,11 +12398,14 @@ function useAgentGUINodeController({
12082
12398
  ...conversationSelection,
12083
12399
  ...operationActions,
12084
12400
  activeCancelStatus: sessionEngineState.activeCancelState?.status ?? null,
12085
- activePendingInteractions: sessionEngineState.activeEnginePendingInteractions,
12401
+ activePendingInteractions: activeRelatedPendingInteractions,
12086
12402
  activeTurn: sessionEngineState.activeEngineActiveTurn,
12087
12403
  activeLatestPendingSubmitTurnId: sessionEngineState.activeLatestPendingSubmit?.turnId ?? null,
12088
12404
  activeMessages,
12089
12405
  activeTimelineItems,
12406
+ agentActivitySnapshot,
12407
+ activeEngineHasPendingInteractions: activeRelatedPendingInteractions.length > 0,
12408
+ isRespondingToInteraction: activeRelatedIsRespondingToInteraction,
12090
12409
  activeConversationLiveState,
12091
12410
  activationState: activeConversationLiveState,
12092
12411
  activityDisplayStatus: activeConversationId ? agentActivityDisplayStatuses.get(activeConversationId) ?? null : null,
@@ -12131,7 +12450,7 @@ import {
12131
12450
  useEffect as useEffect37,
12132
12451
  useMemo as useMemo37,
12133
12452
  useRef as useRef42,
12134
- useState as useState35
12453
+ useState as useState36
12135
12454
  } from "react";
12136
12455
  import { TooltipProvider as TooltipProvider5 } from "@tutti-os/ui-system";
12137
12456
 
@@ -12378,7 +12697,7 @@ function numberValue(value) {
12378
12697
  }
12379
12698
  return null;
12380
12699
  }
12381
- function stringValue2(value) {
12700
+ function stringValue3(value) {
12382
12701
  return typeof value === "string" ? value : "";
12383
12702
  }
12384
12703
  function useStableEventCallback(callback) {
@@ -18336,7 +18655,6 @@ import { createPortal as createPortal4 } from "react-dom";
18336
18655
  import {
18337
18656
  Popover as Popover3,
18338
18657
  PopoverAnchor as PopoverAnchor2,
18339
- Spinner as Spinner5,
18340
18658
  Tooltip as Tooltip5,
18341
18659
  TooltipContent as TooltipContent5,
18342
18660
  TooltipProvider as TooltipProvider4,
@@ -21317,15 +21635,15 @@ import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
21317
21635
  var paletteStyles = {
21318
21636
  palette: "nodrag agent-gui-node__mention-palette flex h-full min-h-0 flex-col gap-0.5 overflow-y-auto px-1 pb-1 pt-2 [-webkit-app-region:no-drag]",
21319
21637
  option: "nodrag relative flex h-7 min-h-7 w-full min-w-0 cursor-pointer select-none items-center gap-2 overflow-hidden rounded-[6px] border-0 bg-transparent px-2.5 py-0 text-left text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 [-webkit-app-region:no-drag] hover:bg-[var(--transparency-block)] focus-visible:bg-[var(--transparency-block)] focus-visible:outline-none active:bg-[var(--transparency-active)] data-[highlighted]:bg-[var(--transparency-block)] data-[highlighted]:text-[var(--text-primary)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
21320
- icon: "flex w-3 shrink-0 items-center justify-center self-center text-[var(--text-secondary)]",
21321
- copy: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden leading-[16px]",
21322
- name: "flex min-w-0 max-w-[48%] shrink-0 items-center gap-1 overflow-hidden",
21323
- primaryName: "min-w-0 truncate text-[11px] font-semibold text-[var(--text-primary)]",
21324
- secondaryName: "shrink-0 text-[10px] font-normal text-[var(--text-secondary)]",
21325
- descriptionText: "min-w-0 flex-1 truncate text-[11px] font-normal text-[var(--text-secondary)]",
21638
+ icon: "flex w-4 shrink-0 items-center justify-center self-center text-[var(--text-secondary)]",
21639
+ copy: "flex min-w-0 flex-1 items-center gap-[8px] overflow-hidden leading-[16px]",
21640
+ name: "flex min-w-0 max-w-[48%] shrink-0 items-center gap-[8px] overflow-hidden",
21641
+ primaryName: "min-w-0 truncate text-[13px] font-semibold text-[var(--text-primary)]",
21642
+ secondaryName: "shrink-0 text-[13px] font-normal text-[var(--text-secondary)]",
21643
+ descriptionText: "min-w-0 flex-1 truncate text-[13px] font-normal text-[var(--text-secondary)]",
21326
21644
  groupHeader: "select-none px-2.5 pb-0.5 text-[11px] font-normal text-[var(--text-secondary)]",
21327
21645
  groupHeaderFirst: "pt-1.5",
21328
- groupHeaderSeparated: "mt-1 border-t border-[var(--border-1)] pt-2",
21646
+ groupHeaderSeparated: "relative mt-3 pt-3 before:absolute before:inset-x-3 before:top-0 before:border-t before:border-[var(--border-1)] before:content-['']",
21329
21647
  settingsButton: "nodrag ml-1 flex h-5 min-h-5 shrink-0 items-center rounded-[4px] border-0 bg-[var(--transparency-hover)] px-2 py-0 text-[11px] font-semibold leading-[14px] text-[var(--text-secondary)] outline-none transition-colors duration-150 hover:bg-[var(--transparency-active)] hover:text-[var(--text-primary)] focus-visible:ring-2 focus-visible:ring-[var(--agent-gui-focus-ring,var(--border-focus))]",
21330
21648
  loading: "flex min-h-9 w-full items-center gap-2 px-2.5 py-2 text-[11px] text-[var(--text-secondary)]"
21331
21649
  };
@@ -21449,7 +21767,7 @@ function AgentSlashCommandPalette({
21449
21767
  /* @__PURE__ */ jsx30("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
21450
21768
  entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx30("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
21451
21769
  ] }),
21452
- entry.description ? /* @__PURE__ */ jsx30("span", { className: paletteStyles.descriptionText, children: entry.description }) : null
21770
+ entry.description ? /* @__PURE__ */ jsx30("span", { className: paletteStyles.descriptionText, children: descriptionWithoutTerminalPeriod(entry.description) }) : null
21453
21771
  ] }),
21454
21772
  entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */ jsx30(
21455
21773
  "button",
@@ -21477,6 +21795,9 @@ function AgentSlashCommandPalette({
21477
21795
  capabilityLoadingInsertIndex === entries.length ? capabilityLoadingNode : null
21478
21796
  ] });
21479
21797
  }
21798
+ function descriptionWithoutTerminalPeriod(description) {
21799
+ return description.trimEnd().replace(/[。.]+$/u, "");
21800
+ }
21480
21801
  function capabilityLoadingIndex(entries) {
21481
21802
  let lastCapabilityIndex = -1;
21482
21803
  for (let index = entries.length - 1; index >= 0; index -= 1) {
@@ -21519,7 +21840,7 @@ function labelForEntryGroupType(groupType, labels) {
21519
21840
  return labels.skillsGroupLabel;
21520
21841
  }
21521
21842
  }
21522
- var SLASH_PALETTE_ICON_CLASS = "size-3";
21843
+ var SLASH_PALETTE_ICON_CLASS = "size-4";
21523
21844
  function slashPaletteEntryIcon(entry) {
21524
21845
  if (entry.type === "capability") {
21525
21846
  return entry.capability.capability === "computerUse" ? /* @__PURE__ */ jsx30(Monitor, { className: SLASH_PALETTE_ICON_CLASS }) : /* @__PURE__ */ jsx30(Globe, { className: SLASH_PALETTE_ICON_CLASS });
@@ -22821,7 +23142,6 @@ function AgentComposerView(input) {
22821
23142
  previewMode = false,
22822
23143
  layoutMode = "dock",
22823
23144
  providerSelectLabel = "",
22824
- backgroundAgentStatusText = null,
22825
23145
  labels,
22826
23146
  workspaceUserProjectI18n,
22827
23147
  isSubmittingPrompt,
@@ -23016,16 +23336,6 @@ function AgentComposerView(input) {
23016
23336
  ),
23017
23337
  "data-edge-glow": showEdgeGlow ? "true" : void 0,
23018
23338
  children: [
23019
- backgroundAgentStatusText ? /* @__PURE__ */ jsx35(
23020
- AgentChromeNotice,
23021
- {
23022
- tone: "muted",
23023
- role: "status",
23024
- testId: "agent-gui-composer-background-agent-status",
23025
- title: backgroundAgentStatusText,
23026
- icon: /* @__PURE__ */ jsx35(Spinner5, { className: "h-3.5 w-3.5" })
23027
- }
23028
- ) : null,
23029
23339
  input.isSelectedProjectMissing ? /* @__PURE__ */ jsx35(
23030
23340
  AgentChromeNotice,
23031
23341
  {
@@ -23181,7 +23491,10 @@ function AgentComposerView(input) {
23181
23491
  ComposerFloatingMenuSurface,
23182
23492
  {
23183
23493
  anchorRef: input.inputShellRef,
23184
- className: "max-h-[320px] border-0 p-0",
23494
+ className: cn(
23495
+ composerStyles.dropdownSurface,
23496
+ "max-h-[320px] overflow-hidden border-[var(--line-1)] p-0"
23497
+ ),
23185
23498
  contentClassName: "h-full min-h-0",
23186
23499
  dismissBoundaryRef: input.promptInputAreaRef,
23187
23500
  maxHeight: SLASH_PALETTE_HEIGHT_PX,
@@ -25942,7 +26255,7 @@ function AgentConversationListSkeleton({
25942
26255
  }
25943
26256
 
25944
26257
  // agent-gui/agentGuiNode/agentGuiNodeViewConversation.tsx
25945
- import { Spinner as Spinner6 } from "@tutti-os/ui-system";
26258
+ import { Spinner as Spinner5 } from "@tutti-os/ui-system";
25946
26259
  import { AskLinedIcon } from "@tutti-os/ui-system/icons";
25947
26260
  import { jsx as jsx44 } from "react/jsx-runtime";
25948
26261
  function ConversationMeta({
@@ -26182,7 +26495,7 @@ function formatConversationRelativeTime(updatedAtUnixMs, nowMs, labels) {
26182
26495
  function LoadingGlyph() {
26183
26496
  "use memo";
26184
26497
  return /* @__PURE__ */ jsx44(
26185
- Spinner6,
26498
+ Spinner5,
26186
26499
  {
26187
26500
  className: AgentGUINode_styles_default.conversationStatusGlyph,
26188
26501
  size: 14,
@@ -28678,7 +28991,7 @@ import {
28678
28991
  useEffect as useEffect34,
28679
28992
  useMemo as useMemo35,
28680
28993
  useRef as useRef37,
28681
- useState as useState32
28994
+ useState as useState33
28682
28995
  } from "react";
28683
28996
  import { ScrollArea as ScrollArea2 } from "@tutti-os/ui-system/components";
28684
28997
 
@@ -29093,8 +29406,8 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
29093
29406
  "use memo";
29094
29407
  const previewMode = composerProps.previewMode === true;
29095
29408
  const goal = objectRecord(sessionChrome.rawState?.goal);
29096
- const goalObjective = goal ? stringValue2(goal.objective) : "";
29097
- const goalStatus = goal ? stringValue2(goal.status) : "";
29409
+ const goalObjective = goal ? stringValue3(goal.objective) : "";
29410
+ const goalStatus = goal ? stringValue3(goal.status) : "";
29098
29411
  const goalTokenBudget = goal ? numberValue(goal.tokenBudget) : null;
29099
29412
  const goalTokensUsed = goal ? numberValue(goal.tokensUsed) : null;
29100
29413
  const goalTimeUsedSeconds = goal ? numberValue(goal.timeUsedSeconds) : null;
@@ -29258,9 +29571,46 @@ function AgentRunPathInfo({
29258
29571
  ] });
29259
29572
  }
29260
29573
 
29574
+ // agent-gui/agentGuiNode/view/AgentGUIContentToast.tsx
29575
+ import { useState as useState30 } from "react";
29576
+ import {
29577
+ ToastProvider,
29578
+ ToastRoot,
29579
+ ToastTitle,
29580
+ ToastViewport
29581
+ } from "@tutti-os/ui-system";
29582
+ import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
29583
+ function AgentGUIContentToast({
29584
+ insetTopPx,
29585
+ message
29586
+ }) {
29587
+ const [open, setOpen] = useState30(true);
29588
+ return /* @__PURE__ */ jsxs39(ToastProvider, { children: [
29589
+ /* @__PURE__ */ jsx54(
29590
+ ToastRoot,
29591
+ {
29592
+ open,
29593
+ className: "nodrag tsh-desktop-no-drag z-30 border-[var(--line-2)] bg-[var(--background-fronted)] text-[var(--text-primary)] shadow-[0_10px_30px_var(--toast-shadow-color)] [-webkit-app-region:no-drag]",
29594
+ "data-testid": "agent-gui-content-toast",
29595
+ variant: "default",
29596
+ onOpenChange: setOpen,
29597
+ children: /* @__PURE__ */ jsx54(ToastTitle, { children: message })
29598
+ }
29599
+ ),
29600
+ /* @__PURE__ */ jsx54(
29601
+ ToastViewport,
29602
+ {
29603
+ className: "nodrag tsh-desktop-no-drag absolute left-0 w-full translate-x-0 px-4 [-webkit-app-region:no-drag]",
29604
+ "data-testid": "agent-gui-content-toast-viewport",
29605
+ style: { top: `${insetTopPx}px` }
29606
+ }
29607
+ )
29608
+ ] });
29609
+ }
29610
+
29261
29611
  // agent-gui/agentGuiNode/view/AgentGUIConversationTimelinePane.tsx
29262
29612
  import { memo as memo11 } from "react";
29263
- import { Fragment as Fragment14, jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
29613
+ import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
29264
29614
  var EMPTY_WORKSPACE_APP_ICONS3 = [];
29265
29615
  var AgentGUIConversationTimelinePane = memo11(
29266
29616
  function AgentGUIConversationTimelinePane2({
@@ -29277,17 +29627,17 @@ var AgentGUIConversationTimelinePane = memo11(
29277
29627
  labels
29278
29628
  }) {
29279
29629
  "use memo";
29280
- return /* @__PURE__ */ jsxs39(Fragment14, { children: [
29281
- isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx54(
29630
+ return /* @__PURE__ */ jsxs40(Fragment14, { children: [
29631
+ isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx55(
29282
29632
  "div",
29283
29633
  {
29284
29634
  className: "mx-auto flex h-8 items-center justify-center text-[12px] text-[var(--text-secondary)]",
29285
29635
  "data-testid": "agent-gui-older-messages-loading",
29286
29636
  role: "status",
29287
- children: /* @__PURE__ */ jsx54("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
29637
+ children: /* @__PURE__ */ jsx55("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
29288
29638
  }
29289
29639
  ) : null,
29290
- /* @__PURE__ */ jsx54(
29640
+ /* @__PURE__ */ jsx55(
29291
29641
  AgentConversationFlow,
29292
29642
  {
29293
29643
  conversation,
@@ -29326,7 +29676,7 @@ import {
29326
29676
  useEffect as useEffect33,
29327
29677
  useLayoutEffect as useLayoutEffect7,
29328
29678
  useRef as useRef36,
29329
- useState as useState30
29679
+ useState as useState31
29330
29680
  } from "react";
29331
29681
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
29332
29682
  var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
@@ -29345,8 +29695,8 @@ function useAgentGUIDetailScroll(input) {
29345
29695
  timelineScrollAnchorRef,
29346
29696
  viewModel
29347
29697
  } = input;
29348
- const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState30(true);
29349
- const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState30(true);
29698
+ const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState31(true);
29699
+ const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState31(true);
29350
29700
  const bottomLockOwnerRef = useRef36(null);
29351
29701
  const userScrollAwayIntentConversationRef = useRef36(null);
29352
29702
  useLayoutEffect7(() => {
@@ -29438,30 +29788,40 @@ function useAgentGUIDetailScroll(input) {
29438
29788
  let animationFrameId = null;
29439
29789
  const syncBottomDockSafeArea = () => {
29440
29790
  const bottomDockRect = bottomDock.getBoundingClientRect();
29441
- let visualTop = bottomDockRect.top;
29791
+ let timelineVisualTop = bottomDockRect.top;
29792
+ let floatingVisualTop = bottomDockRect.top;
29442
29793
  bottomDock.querySelectorAll("*").forEach((element) => {
29443
29794
  if (element.closest(`.${AgentGUINode_styles_default.bottomDockScrollToBottom}`)) {
29444
29795
  return;
29445
29796
  }
29446
- if (element.closest(`.${AgentGUINode_styles_default.composerInputShell}`)) {
29797
+ const rect = element.getBoundingClientRect();
29798
+ if (rect.width <= 0 || rect.height <= 0) {
29447
29799
  return;
29448
29800
  }
29449
- const rect = element.getBoundingClientRect();
29450
- if (rect.width > 0 && rect.height > 0) {
29451
- visualTop = Math.min(visualTop, rect.top);
29801
+ if (element.closest(`.${AgentGUINode_styles_default.composerInputShell}`)) {
29802
+ if (element.matches(".agent-gui-node__composer-prompt-input-area")) {
29803
+ floatingVisualTop = Math.min(floatingVisualTop, rect.top);
29804
+ }
29805
+ return;
29452
29806
  }
29807
+ floatingVisualTop = Math.min(floatingVisualTop, rect.top);
29808
+ timelineVisualTop = Math.min(timelineVisualTop, rect.top);
29453
29809
  });
29454
- const overflowHeight = Math.max(
29810
+ const timelineOverflowHeight = Math.max(
29811
+ 0,
29812
+ Math.ceil(bottomDockRect.top - timelineVisualTop)
29813
+ );
29814
+ const floatingOverflowHeight = Math.max(
29455
29815
  0,
29456
- Math.ceil(bottomDockRect.top - visualTop)
29816
+ Math.ceil(bottomDockRect.top - floatingVisualTop)
29457
29817
  );
29458
29818
  timeline.style.setProperty(
29459
29819
  "--agent-gui-bottom-dock-safe-area",
29460
- `${overflowHeight}px`
29820
+ `${timelineOverflowHeight}px`
29461
29821
  );
29462
29822
  bottomDock.style.setProperty(
29463
29823
  "--agent-gui-bottom-dock-floating-safe-area",
29464
- `${overflowHeight}px`
29824
+ `${floatingOverflowHeight}px`
29465
29825
  );
29466
29826
  };
29467
29827
  const syncBottomDockSpace = () => {
@@ -29658,10 +30018,10 @@ function useAgentGUIDetailScroll(input) {
29658
30018
  import { useMemo as useMemo34 } from "react";
29659
30019
 
29660
30020
  // app/renderer/components/icons/UnavailableChatIcon.tsx
29661
- import { jsx as jsx55 } from "react/jsx-runtime";
30021
+ import { jsx as jsx56 } from "react/jsx-runtime";
29662
30022
  function UnavailableChatIcon(props) {
29663
30023
  "use memo";
29664
- return /* @__PURE__ */ jsx55(
30024
+ return /* @__PURE__ */ jsx56(
29665
30025
  "svg",
29666
30026
  {
29667
30027
  xmlns: "http://www.w3.org/2000/svg",
@@ -29669,21 +30029,21 @@ function UnavailableChatIcon(props) {
29669
30029
  fill: "currentColor",
29670
30030
  "aria-hidden": true,
29671
30031
  ...props,
29672
- children: /* @__PURE__ */ jsx55("path", { d: "M20.833 2.125C21.6507 2.125 22.4355 2.45019 23.0137 3.02832C23.5916 3.60645 23.9159 4.39053 23.916 5.20801V17.708C23.916 18.5257 23.5918 19.3104 23.0137 19.8887C22.4355 20.4668 21.6507 20.792 20.833 20.792H7.1123C6.82516 20.7922 6.5497 20.9063 6.34668 21.1094L4.05273 23.4033C3.80954 23.6464 3.49934 23.8118 3.16211 23.8789C2.82492 23.9459 2.47487 23.9118 2.15723 23.7803C1.83953 23.6486 1.56707 23.4256 1.37598 23.1396C1.18489 22.8536 1.08305 22.5168 1.08301 22.1729V5.20801C1.08309 4.39045 1.40827 3.60647 1.98633 3.02832C2.56441 2.45024 3.3485 2.12517 4.16602 2.125H20.833ZM16.1533 7.80566C15.7628 7.41518 15.1298 7.41527 14.7393 7.80566L12.5 10.0439L10.2607 7.80469C9.87031 7.41464 9.23712 7.41465 8.84668 7.80469C8.45627 8.19509 8.45651 8.8282 8.84668 9.21875L11.0859 11.458L8.84668 13.6982C8.45651 14.0888 8.45627 14.7219 8.84668 15.1123C9.2371 15.5026 9.87024 15.5024 10.2607 15.1123L12.5 12.873L14.7393 15.1113C15.1298 15.5017 15.7628 15.5018 16.1533 15.1113C16.5434 14.7208 16.5436 14.0877 16.1533 13.6973L13.9141 11.458L16.1533 9.21973C16.5437 8.82924 16.5437 8.19616 16.1533 7.80566Z" })
30032
+ children: /* @__PURE__ */ jsx56("path", { d: "M20.833 2.125C21.6507 2.125 22.4355 2.45019 23.0137 3.02832C23.5916 3.60645 23.9159 4.39053 23.916 5.20801V17.708C23.916 18.5257 23.5918 19.3104 23.0137 19.8887C22.4355 20.4668 21.6507 20.792 20.833 20.792H7.1123C6.82516 20.7922 6.5497 20.9063 6.34668 21.1094L4.05273 23.4033C3.80954 23.6464 3.49934 23.8118 3.16211 23.8789C2.82492 23.9459 2.47487 23.9118 2.15723 23.7803C1.83953 23.6486 1.56707 23.4256 1.37598 23.1396C1.18489 22.8536 1.08305 22.5168 1.08301 22.1729V5.20801C1.08309 4.39045 1.40827 3.60647 1.98633 3.02832C2.56441 2.45024 3.3485 2.12517 4.16602 2.125H20.833ZM16.1533 7.80566C15.7628 7.41518 15.1298 7.41527 14.7393 7.80566L12.5 10.0439L10.2607 7.80469C9.87031 7.41464 9.23712 7.41465 8.84668 7.80469C8.45627 8.19509 8.45651 8.8282 8.84668 9.21875L11.0859 11.458L8.84668 13.6982C8.45651 14.0888 8.45627 14.7219 8.84668 15.1123C9.2371 15.5026 9.87024 15.5024 10.2607 15.1123L12.5 12.873L14.7393 15.1113C15.1298 15.5017 15.7628 15.5018 16.1533 15.1113C16.5434 14.7208 16.5436 14.0877 16.1533 13.6973L13.9141 11.458L16.1533 9.21973C16.5437 8.82924 16.5437 8.19616 16.1533 7.80566Z" })
29673
30033
  }
29674
30034
  );
29675
30035
  }
29676
30036
 
29677
30037
  // agent-gui/agentGuiNode/view/useAgentGUITimelineTransition.ts
29678
- import { useLayoutEffect as useLayoutEffect8, useState as useState31 } from "react";
30038
+ import { useLayoutEffect as useLayoutEffect8, useState as useState32 } from "react";
29679
30039
  var AGENT_GUI_TIMELINE_SKELETON_DELAY_MS = 300;
29680
30040
  function useAgentGUITimelineTransition(input) {
29681
30041
  const activeConversationId = input.activeConversationId;
29682
- const [committedTimeline, setCommittedTimeline] = useState31(() => ({
30042
+ const [committedTimeline, setCommittedTimeline] = useState32(() => ({
29683
30043
  conversation: input.conversation,
29684
30044
  conversationId: activeConversationId
29685
30045
  }));
29686
- const [revealedSkeletonConversationId, setRevealedSkeletonConversationId] = useState31(null);
30046
+ const [revealedSkeletonConversationId, setRevealedSkeletonConversationId] = useState32(null);
29687
30047
  const transitionPending = activeConversationId !== null && input.availability === "loading" && (!input.conversation || input.conversation.rows.length === 0);
29688
30048
  useLayoutEffect8(() => {
29689
30049
  if (!transitionPending || activeConversationId === null) {
@@ -29715,7 +30075,7 @@ function useAgentGUITimelineTransition(input) {
29715
30075
  }
29716
30076
 
29717
30077
  // agent-gui/agentGuiNode/view/useAgentGUIDetailModel.tsx
29718
- import { Fragment as Fragment15, jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
30078
+ import { Fragment as Fragment15, jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
29719
30079
  function useAgentGUIDetailModel(input) {
29720
30080
  const {
29721
30081
  bottomDockDismissedPromptRequestId,
@@ -29850,17 +30210,17 @@ function useAgentGUIDetailModel(input) {
29850
30210
  ]
29851
30211
  );
29852
30212
  const conversationFlowEmpty = useMemo34(
29853
- () => showUnavailableChatEmpty ? /* @__PURE__ */ jsxs40(
30213
+ () => showUnavailableChatEmpty ? /* @__PURE__ */ jsxs41(
29854
30214
  "div",
29855
30215
  {
29856
30216
  className: AgentGUINode_styles_default.unavailableChatEmpty,
29857
30217
  "data-testid": "agent-gui-unavailable-chat-empty",
29858
30218
  children: [
29859
- /* @__PURE__ */ jsx56(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
29860
- /* @__PURE__ */ jsx56("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
30219
+ /* @__PURE__ */ jsx57(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
30220
+ /* @__PURE__ */ jsx57("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
29861
30221
  ]
29862
30222
  }
29863
- ) : /* @__PURE__ */ jsx56(Fragment15, {}),
30223
+ ) : /* @__PURE__ */ jsx57(Fragment15, {}),
29864
30224
  [labels.conversationUnavailable, showUnavailableChatEmpty]
29865
30225
  );
29866
30226
  const chromeLabels = useMemo34(
@@ -30229,7 +30589,7 @@ function useAgentGUIDetailModel(input) {
30229
30589
  }
30230
30590
 
30231
30591
  // agent-gui/agentGuiNode/view/AgentGUIDetailPane.tsx
30232
- import { Fragment as Fragment16, jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
30592
+ import { Fragment as Fragment16, jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
30233
30593
  var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
30234
30594
  width: "100%",
30235
30595
  minWidth: "100%",
@@ -30258,8 +30618,8 @@ function mergeWorkspaceAppIconsFromCommands(input) {
30258
30618
  if (!source) {
30259
30619
  continue;
30260
30620
  }
30261
- const appId = stringValue2(source.appId).trim();
30262
- const iconUrl = stringValue2(source.iconUrl).trim();
30621
+ const appId = stringValue3(source.appId).trim();
30622
+ const iconUrl = stringValue3(source.iconUrl).trim();
30263
30623
  if (!appId || !iconUrl) {
30264
30624
  continue;
30265
30625
  }
@@ -30319,7 +30679,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30319
30679
  const [
30320
30680
  bottomDockDismissedPromptRequestId,
30321
30681
  setBottomDockDismissedPromptRequestId
30322
- ] = useState32(null);
30682
+ ] = useState33(null);
30323
30683
  const {
30324
30684
  activePromptRequestId,
30325
30685
  bottomDockLiftedPrompt,
@@ -30456,7 +30816,6 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30456
30816
  );
30457
30817
  const stableRequestGitBranches = useOptionalStableEventCallback(onRequestGitBranches);
30458
30818
  const authLogin = useOptionalStableEventCallback(onAgentProviderLogin);
30459
- const backgroundAgentStatusText = viewModel.detail.backgroundAgentCount > 0 ? labels.waitingForBackgroundAgent(viewModel.detail.backgroundAgentCount) : null;
30460
30819
  const submitBottomDockInteractivePrompt = useCallback45(
30461
30820
  (input) => {
30462
30821
  submitInteractivePrompt(input);
@@ -30539,7 +30898,6 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30539
30898
  referenceProvenanceFilter,
30540
30899
  // Plan decisions replace the composer; approval / ask-user embed here.
30541
30900
  activePrompt: composerActivePrompt,
30542
- backgroundAgentStatusText,
30543
30901
  activePromptKeyboardShortcutsEnabled: isActive,
30544
30902
  promptTips: labels.promptTips,
30545
30903
  composerFocusRequestSequence,
@@ -30577,7 +30935,6 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30577
30935
  }),
30578
30936
  [
30579
30937
  canQueueWhileBusy,
30580
- backgroundAgentStatusText,
30581
30938
  capabilityMenuState,
30582
30939
  canSwitchComposerProvider,
30583
30940
  composerDisabled,
@@ -30669,7 +31026,6 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30669
31026
  sessionChrome.auth?.message ?? "",
30670
31027
  sessionChrome.recovery?.kind ?? "",
30671
31028
  sessionChrome.recovery?.message ?? "",
30672
- backgroundAgentStatusText ?? "",
30673
31029
  viewModel.composer.queuedPrompts.map((prompt) => prompt.id).join(","),
30674
31030
  viewModel.composer.queueStatus,
30675
31031
  viewModel.composer.drainingQueuedPromptId ?? "",
@@ -30695,14 +31051,22 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30695
31051
  timelineScrollAnchorRef,
30696
31052
  viewModel
30697
31053
  });
30698
- return /* @__PURE__ */ jsxs41(
31054
+ return /* @__PURE__ */ jsxs42(
30699
31055
  "main",
30700
31056
  {
30701
31057
  className: AgentGUINode_styles_default.detail,
30702
31058
  "aria-busy": timelineInteractionLocked || void 0,
30703
31059
  inert: timelineInteractionLocked,
30704
31060
  children: [
30705
- /* @__PURE__ */ jsx57(
31061
+ viewModel.operations.goalClearNoticeSequence > 0 ? /* @__PURE__ */ jsx58(
31062
+ AgentGUIContentToast,
31063
+ {
31064
+ insetTopPx: hideDetailHeader ? 16 : 80,
31065
+ message: labels.goalRemoved
31066
+ },
31067
+ viewModel.operations.goalClearNoticeSequence
31068
+ ) : null,
31069
+ /* @__PURE__ */ jsx58(
30706
31070
  AgentGUIDetailHeader,
30707
31071
  {
30708
31072
  activeConversation: viewModel.rail.activeConversation,
@@ -30712,7 +31076,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30712
31076
  previewMode
30713
31077
  }
30714
31078
  ),
30715
- /* @__PURE__ */ jsx57(
31079
+ /* @__PURE__ */ jsx58(
30716
31080
  ScrollArea2,
30717
31081
  {
30718
31082
  scrollbarMode: "native",
@@ -30721,7 +31085,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30721
31085
  viewportTestId: "agent-gui-timeline",
30722
31086
  viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${!isTimelineScrolledToTop ? AgentGUINode_styles_default.timelineScrolledFromTop : ""} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
30723
31087
  viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
30724
- children: !hasActiveConversation ? shouldRenderProviderUnavailableState && disabledProviderTarget ? /* @__PURE__ */ jsx57(Fragment16, { children: renderProviderUnavailableState?.({
31088
+ children: !hasActiveConversation ? shouldRenderProviderUnavailableState && disabledProviderTarget ? /* @__PURE__ */ jsx58(Fragment16, { children: renderProviderUnavailableState?.({
30725
31089
  provider: disabledProviderTarget.provider,
30726
31090
  providerLabel: labels.emptyProviderForProvider?.(
30727
31091
  disabledProviderTarget.provider
@@ -30733,7 +31097,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30733
31097
  disabledProviderTarget.provider
30734
31098
  ),
30735
31099
  unavailableReason: disabledProviderTarget.unavailableReason ?? null
30736
- }) }) : /* @__PURE__ */ jsx57(
31100
+ }) }) : /* @__PURE__ */ jsx58(
30737
31101
  AgentGUIEmptyHomePane,
30738
31102
  {
30739
31103
  provider: emptyHeroProvider,
@@ -30756,7 +31120,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30756
31120
  onSelectSuggestion: handleSelectHomeSuggestion,
30757
31121
  onSelectSuggestionAction: handleHomeSuggestionAction
30758
31122
  }
30759
- ) : /* @__PURE__ */ jsx57(
31123
+ ) : /* @__PURE__ */ jsx58(
30760
31124
  AgentGUIConversationTimelinePane,
30761
31125
  {
30762
31126
  conversation,
@@ -30774,7 +31138,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30774
31138
  )
30775
31139
  }
30776
31140
  ),
30777
- hasActiveConversation ? /* @__PURE__ */ jsx57(
31141
+ hasActiveConversation ? /* @__PURE__ */ jsx58(
30778
31142
  AgentGUIBottomDockPane,
30779
31143
  {
30780
31144
  bottomDockRef,
@@ -30806,9 +31170,9 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
30806
31170
  });
30807
31171
 
30808
31172
  // agent-gui/agentGuiNode/view/AgentGUIRenameConversationDialog.tsx
30809
- import { memo as memo13, useCallback as useCallback46, useEffect as useEffect35, useRef as useRef38, useState as useState33 } from "react";
31173
+ import { memo as memo13, useCallback as useCallback46, useEffect as useEffect35, useRef as useRef38, useState as useState34 } from "react";
30810
31174
  import { ConfirmationDialog as ConfirmationDialog2 } from "@tutti-os/ui-system";
30811
- import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
31175
+ import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
30812
31176
  var AgentGUIRenameConversationDialog = memo13(
30813
31177
  function AgentGUIRenameConversationDialog2({
30814
31178
  conversation,
@@ -30818,8 +31182,8 @@ var AgentGUIRenameConversationDialog = memo13(
30818
31182
  onRename
30819
31183
  }) {
30820
31184
  "use memo";
30821
- const [title, setTitle] = useState33("");
30822
- const [isSaving, setIsSaving] = useState33(false);
31185
+ const [title, setTitle] = useState34("");
31186
+ const [isSaving, setIsSaving] = useState34(false);
30823
31187
  const isSavingRef = useRef38(false);
30824
31188
  const armedPointerActionRef = useRef38(null);
30825
31189
  const inputRef = useRef38(null);
@@ -30864,7 +31228,7 @@ var AgentGUIRenameConversationDialog = memo13(
30864
31228
  setIsSaving(false);
30865
31229
  });
30866
31230
  }, [conversation, onOpenChange, onRename, trimmedTitle]);
30867
- return /* @__PURE__ */ jsx58(
31231
+ return /* @__PURE__ */ jsx59(
30868
31232
  ConfirmationDialog2,
30869
31233
  {
30870
31234
  cancelLabel: labels.cancel,
@@ -30873,8 +31237,8 @@ var AgentGUIRenameConversationDialog = memo13(
30873
31237
  confirmDisabled: !trimmedTitle,
30874
31238
  confirmLabel: labels.renameSessionSave,
30875
31239
  description: labels.renameSessionDescription,
30876
- footer: /* @__PURE__ */ jsxs42("div", { className: "flex justify-end gap-2", children: [
30877
- /* @__PURE__ */ jsx58(
31240
+ footer: /* @__PURE__ */ jsxs43("div", { className: "flex justify-end gap-2", children: [
31241
+ /* @__PURE__ */ jsx59(
30878
31242
  Button,
30879
31243
  {
30880
31244
  disabled: isSaving,
@@ -30912,7 +31276,7 @@ var AgentGUIRenameConversationDialog = memo13(
30912
31276
  children: labels.cancel
30913
31277
  }
30914
31278
  ),
30915
- /* @__PURE__ */ jsx58(
31279
+ /* @__PURE__ */ jsx59(
30916
31280
  Button,
30917
31281
  {
30918
31282
  className: "shadow-none",
@@ -30967,7 +31331,7 @@ var AgentGUIRenameConversationDialog = memo13(
30967
31331
  title: labels.renameSessionTitle,
30968
31332
  onConfirm: confirmRename,
30969
31333
  onOpenChange,
30970
- children: /* @__PURE__ */ jsx58(
31334
+ children: /* @__PURE__ */ jsx59(
30971
31335
  "input",
30972
31336
  {
30973
31337
  ref: inputRef,
@@ -30994,7 +31358,7 @@ import {
30994
31358
  ReferenceSourcePicker,
30995
31359
  WorkspaceFileReferencePicker
30996
31360
  } from "@tutti-os/workspace-file-reference/ui";
30997
- import { jsx as jsx59 } from "react/jsx-runtime";
31361
+ import { jsx as jsx60 } from "react/jsx-runtime";
30998
31362
  function AgentGUIReferencePickerSurface({
30999
31363
  aggregator,
31000
31364
  copy,
@@ -31011,7 +31375,7 @@ function AgentGUIReferencePickerSurface({
31011
31375
  onConfirm,
31012
31376
  onConfirmBundles
31013
31377
  }) {
31014
- return aggregator ? /* @__PURE__ */ jsx59(
31378
+ return aggregator ? /* @__PURE__ */ jsx60(
31015
31379
  ReferenceSourcePicker,
31016
31380
  {
31017
31381
  aggregator,
@@ -31021,7 +31385,7 @@ function AgentGUIReferencePickerSurface({
31021
31385
  fileManagerCopy: fileManagerCopy ?? void 0,
31022
31386
  open,
31023
31387
  provenanceFilter: provenanceFilter?.snapshot.value,
31024
- provenanceFilterControl: provenanceFilter ? /* @__PURE__ */ jsx59(
31388
+ provenanceFilterControl: provenanceFilter ? /* @__PURE__ */ jsx60(
31025
31389
  AgentReferenceProvenanceFilterControl,
31026
31390
  {
31027
31391
  filter: provenanceFilter,
@@ -31034,7 +31398,7 @@ function AgentGUIReferencePickerSurface({
31034
31398
  onConfirm,
31035
31399
  onConfirmBundles
31036
31400
  }
31037
- ) : /* @__PURE__ */ jsx59(
31401
+ ) : /* @__PURE__ */ jsx60(
31038
31402
  WorkspaceFileReferencePicker,
31039
31403
  {
31040
31404
  copy,
@@ -31050,7 +31414,7 @@ function AgentGUIReferencePickerSurface({
31050
31414
  }
31051
31415
 
31052
31416
  // agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
31053
- import { useCallback as useCallback47, useMemo as useMemo36, useRef as useRef39, useState as useState34 } from "react";
31417
+ import { useCallback as useCallback47, useMemo as useMemo36, useRef as useRef39, useState as useState35 } from "react";
31054
31418
  import { createRichTextMentionHref } from "@tutti-os/ui-rich-text/core";
31055
31419
  function useAgentGUIWorkspaceReferencePicker(input) {
31056
31420
  const {
@@ -31063,8 +31427,8 @@ function useAgentGUIWorkspaceReferencePicker(input) {
31063
31427
  workspaceFileReferenceAdapter,
31064
31428
  workspaceFileReferenceCopy
31065
31429
  } = input;
31066
- const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState34(false);
31067
- const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState34(null);
31430
+ const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState35(false);
31431
+ const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState35(null);
31068
31432
  const workspaceReferencePickerResolverRef = useRef39(null);
31069
31433
  const emptyReferencePickResult = useMemo36(
31070
31434
  () => ({ files: [], mentionItems: [] }),
@@ -31428,7 +31792,7 @@ function useAgentGUINodeEngagement(input) {
31428
31792
  }
31429
31793
 
31430
31794
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
31431
- import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
31795
+ import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
31432
31796
  function AgentGUINodeView({
31433
31797
  viewModel,
31434
31798
  referenceProvenanceFilter = null,
@@ -31497,16 +31861,16 @@ function AgentGUINodeView({
31497
31861
  previewMode,
31498
31862
  viewModel
31499
31863
  });
31500
- const [providerManagerOpen, setProviderManagerOpen] = useState35(false);
31864
+ const [providerManagerOpen, setProviderManagerOpen] = useState36(false);
31501
31865
  const railResizeInteractionRef = useRef42(null);
31502
- const [isRailResizing, setIsRailResizing] = useState35(false);
31503
- const [railResizeWidthPx, setRailResizeWidthPx] = useState35(
31866
+ const [isRailResizing, setIsRailResizing] = useState36(false);
31867
+ const [railResizeWidthPx, setRailResizeWidthPx] = useState36(
31504
31868
  null
31505
31869
  );
31506
31870
  const [
31507
31871
  localComposerFocusRequestSequence,
31508
31872
  setLocalComposerFocusRequestSequence
31509
- ] = useState35(0);
31873
+ ] = useState36(0);
31510
31874
  const handledNewConversationRequestSequenceRef = useRef42(
31511
31875
  newConversationRequestSequence
31512
31876
  );
@@ -31758,8 +32122,8 @@ function AgentGUINodeView({
31758
32122
  const openAgentSettings = useCallback48(() => {
31759
32123
  openWorkspaceSettingsPanel({ section: "agent" });
31760
32124
  }, []);
31761
- const [renameConversationTarget, setRenameConversationTarget] = useState35(null);
31762
- const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState35(false);
32125
+ const [renameConversationTarget, setRenameConversationTarget] = useState36(null);
32126
+ const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState36(false);
31763
32127
  const requestRenameConversation = useCallback48(
31764
32128
  (conversation) => {
31765
32129
  setRenameConversationTarget(conversation);
@@ -31850,8 +32214,8 @@ function AgentGUINodeView({
31850
32214
  ),
31851
32215
  [viewModel.rail.agentTargets, viewModel.shell.workspaceId]
31852
32216
  );
31853
- const content = /* @__PURE__ */ jsxs43(AgentTargetPresentationProvider, { agentTargets: agentTargetPresentations, children: [
31854
- /* @__PURE__ */ jsxs43(
32217
+ const content = /* @__PURE__ */ jsxs44(AgentTargetPresentationProvider, { agentTargets: agentTargetPresentations, children: [
32218
+ /* @__PURE__ */ jsxs44(
31855
32219
  "div",
31856
32220
  {
31857
32221
  ref: layoutElementRef,
@@ -31861,7 +32225,7 @@ function AgentGUINodeView({
31861
32225
  inert: previewMode ? true : void 0,
31862
32226
  style: layoutStyle,
31863
32227
  children: [
31864
- showProviderRail ? /* @__PURE__ */ jsxs43(
32228
+ showProviderRail ? /* @__PURE__ */ jsxs44(
31865
32229
  "aside",
31866
32230
  {
31867
32231
  className: `${AgentGUINode_styles_default.providerRailPanel} nodrag tsh-desktop-no-drag`,
@@ -31869,7 +32233,7 @@ function AgentGUINodeView({
31869
32233
  "aria-hidden": conversationRailCollapsed ? "true" : void 0,
31870
32234
  inert: conversationRailCollapsed ? true : void 0,
31871
32235
  children: [
31872
- /* @__PURE__ */ jsx60(
32236
+ /* @__PURE__ */ jsx61(
31873
32237
  AgentGUIProviderRail,
31874
32238
  {
31875
32239
  activeConversation: viewModel.rail.activeConversation,
@@ -31893,7 +32257,7 @@ function AgentGUINodeView({
31893
32257
  onRequestComposerFocus: requestComposerFocus
31894
32258
  }
31895
32259
  ),
31896
- renderSidebarFooter ? /* @__PURE__ */ jsx60(
32260
+ renderSidebarFooter ? /* @__PURE__ */ jsx61(
31897
32261
  "div",
31898
32262
  {
31899
32263
  className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailSidebarFooter} nodrag tsh-desktop-no-drag`,
@@ -31904,12 +32268,12 @@ function AgentGUINodeView({
31904
32268
  })
31905
32269
  }
31906
32270
  ) : null,
31907
- shouldShowProviderRailConfigButton ? /* @__PURE__ */ jsx60(
32271
+ shouldShowProviderRailConfigButton ? /* @__PURE__ */ jsx61(
31908
32272
  "div",
31909
32273
  {
31910
32274
  className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailConfigFooter} nodrag tsh-desktop-no-drag`,
31911
32275
  "data-testid": "agent-gui-config-footer",
31912
- children: shouldShowProviderRailConfigMenu ? /* @__PURE__ */ jsx60(
32276
+ children: shouldShowProviderRailConfigMenu ? /* @__PURE__ */ jsx61(
31913
32277
  AgentGUIConfigMenu,
31914
32278
  {
31915
32279
  environmentSetupVisible,
@@ -31928,7 +32292,7 @@ function AgentGUINodeView({
31928
32292
  onOpenAgentEnvSetup: openAgentEnvSetup,
31929
32293
  onOpenAgentSettings: openAgentSettings
31930
32294
  }
31931
- ) : /* @__PURE__ */ jsx60(
32295
+ ) : /* @__PURE__ */ jsx61(
31932
32296
  "button",
31933
32297
  {
31934
32298
  type: "button",
@@ -31937,7 +32301,7 @@ function AgentGUINodeView({
31937
32301
  title: labels.agentSettingsMenu,
31938
32302
  disabled: previewMode,
31939
32303
  onClick: openAgentSettings,
31940
- children: /* @__PURE__ */ jsx60(
32304
+ children: /* @__PURE__ */ jsx61(
31941
32305
  SettingsLinedIcon,
31942
32306
  {
31943
32307
  "aria-hidden": "true",
@@ -31952,21 +32316,21 @@ function AgentGUINodeView({
31952
32316
  ]
31953
32317
  }
31954
32318
  ) : null,
31955
- /* @__PURE__ */ jsx60(
32319
+ /* @__PURE__ */ jsx61(
31956
32320
  "aside",
31957
32321
  {
31958
32322
  id: "agent-gui-conversation-rail",
31959
32323
  className: `${AgentGUINode_styles_default.railPanel}${conversationRailCollapsed ? ` ${AgentGUINode_styles_default.railPanelCollapsed}` : ""}`,
31960
32324
  "aria-hidden": conversationRailCollapsed ? "true" : void 0,
31961
32325
  inert: conversationRailCollapsed ? true : void 0,
31962
- children: /* @__PURE__ */ jsx60(
32326
+ children: /* @__PURE__ */ jsx61(
31963
32327
  AgentGUIConversationRailController,
31964
32328
  {
31965
32329
  ...conversationRailStoreState,
31966
32330
  conversations: viewModel.rail.conversations,
31967
32331
  userProjects: viewModel.rail.userProjects,
31968
32332
  workspaceId: viewModel.shell.workspaceId,
31969
- footer: accountMenuState?.user ? /* @__PURE__ */ jsx60(
32333
+ footer: accountMenuState?.user ? /* @__PURE__ */ jsx61(
31970
32334
  AgentGUIAccountRailMenu,
31971
32335
  {
31972
32336
  accountMenuState,
@@ -31978,7 +32342,7 @@ function AgentGUINodeView({
31978
32342
  )
31979
32343
  }
31980
32344
  ),
31981
- /* @__PURE__ */ jsx60(
32345
+ /* @__PURE__ */ jsx61(
31982
32346
  "div",
31983
32347
  {
31984
32348
  id: "agent-gui-conversation-rail-resize",
@@ -32002,7 +32366,7 @@ function AgentGUINodeView({
32002
32366
  onPointerUp: endConversationRailResize
32003
32367
  }
32004
32368
  ),
32005
- /* @__PURE__ */ jsx60("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx60(
32369
+ /* @__PURE__ */ jsx61("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx61(
32006
32370
  AgentGUIDetailPane,
32007
32371
  {
32008
32372
  viewModel,
@@ -32039,7 +32403,7 @@ function AgentGUINodeView({
32039
32403
  ]
32040
32404
  }
32041
32405
  ),
32042
- /* @__PURE__ */ jsx60(
32406
+ /* @__PURE__ */ jsx61(
32043
32407
  AgentGUIReferencePickerSurface,
32044
32408
  {
32045
32409
  aggregator: referenceSourceAggregator,
@@ -32058,7 +32422,7 @@ function AgentGUINodeView({
32058
32422
  onConfirmBundles: confirmWorkspaceReferenceBundles
32059
32423
  }
32060
32424
  ),
32061
- /* @__PURE__ */ jsx60(
32425
+ /* @__PURE__ */ jsx61(
32062
32426
  AgentGUIRenameConversationDialog,
32063
32427
  {
32064
32428
  conversation: renameConversationTarget,
@@ -32074,7 +32438,7 @@ function AgentGUINodeView({
32074
32438
  }
32075
32439
  )
32076
32440
  ] });
32077
- return previewMode ? content : /* @__PURE__ */ jsx60(TooltipProvider5, { children: content });
32441
+ return previewMode ? content : /* @__PURE__ */ jsx61(TooltipProvider5, { children: content });
32078
32442
  }
32079
32443
 
32080
32444
  // agent-gui/workspaceDesktop/view/desktopDockAgentProbeTooltipModel.ts
@@ -32252,10 +32616,10 @@ import {
32252
32616
  useEffect as useEffect38,
32253
32617
  useLayoutEffect as useLayoutEffect9,
32254
32618
  useRef as useRef43,
32255
- useState as useState36
32619
+ useState as useState37
32256
32620
  } from "react";
32257
32621
  import { createPortal as createPortal5 } from "react-dom";
32258
- import { Fragment as Fragment17, jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
32622
+ import { Fragment as Fragment17, jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
32259
32623
  var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
32260
32624
  var POPOVER_DEFAULT_WIDTH_PX = 260;
32261
32625
  function dockAgentProbeLineKey(line) {
@@ -32265,11 +32629,11 @@ function renderDockAgentProbeLine(line) {
32265
32629
  if (typeof line === "string") {
32266
32630
  return line;
32267
32631
  }
32268
- return /* @__PURE__ */ jsxs44(Fragment17, { children: [
32632
+ return /* @__PURE__ */ jsxs45(Fragment17, { children: [
32269
32633
  line.primary,
32270
- line.secondary ? /* @__PURE__ */ jsxs44(Fragment17, { children: [
32634
+ line.secondary ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
32271
32635
  " ",
32272
- /* @__PURE__ */ jsx61("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
32636
+ /* @__PURE__ */ jsx62("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
32273
32637
  ] }) : null
32274
32638
  ] });
32275
32639
  }
@@ -32291,8 +32655,8 @@ function AgentProbeInfoPopover({
32291
32655
  "use memo";
32292
32656
  const anchorRef = useRef43(null);
32293
32657
  const popoverRef = useRef43(null);
32294
- const [isOpen, setIsOpen] = useState36(false);
32295
- const [popoverStyle, setPopoverStyle] = useState36(null);
32658
+ const [isOpen, setIsOpen] = useState37(false);
32659
+ const [popoverStyle, setPopoverStyle] = useState37(null);
32296
32660
  const openPopover = useCallback49(() => {
32297
32661
  if (!isOpen) {
32298
32662
  onOpen?.();
@@ -32353,7 +32717,7 @@ function AgentProbeInfoPopover({
32353
32717
  if (lines.length === 0) {
32354
32718
  return null;
32355
32719
  }
32356
- const popover = /* @__PURE__ */ jsx61(
32720
+ const popover = /* @__PURE__ */ jsx62(
32357
32721
  "div",
32358
32722
  {
32359
32723
  ref: popoverRef,
@@ -32362,17 +32726,17 @@ function AgentProbeInfoPopover({
32362
32726
  style: popoverStyle ?? void 0,
32363
32727
  onMouseEnter: openPopover,
32364
32728
  onMouseLeave: closeIfPointerLeavesPopover,
32365
- children: /* @__PURE__ */ jsx61("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
32729
+ children: /* @__PURE__ */ jsx62("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
32366
32730
  const label = getDockAgentProbeLineLabel(line);
32367
32731
  const valueText = formatDockAgentProbeLineText(line);
32368
- return /* @__PURE__ */ jsxs44(
32732
+ return /* @__PURE__ */ jsxs45(
32369
32733
  "li",
32370
32734
  {
32371
32735
  className: "desktop-dock-popup__agent-info-item",
32372
32736
  "data-has-label": label ? "true" : "false",
32373
32737
  children: [
32374
- label ? /* @__PURE__ */ jsx61("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
32375
- /* @__PURE__ */ jsx61(
32738
+ label ? /* @__PURE__ */ jsx62("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
32739
+ /* @__PURE__ */ jsx62(
32376
32740
  "span",
32377
32741
  {
32378
32742
  className: "desktop-dock-popup__agent-info-value",
@@ -32387,7 +32751,7 @@ function AgentProbeInfoPopover({
32387
32751
  }) })
32388
32752
  }
32389
32753
  );
32390
- return /* @__PURE__ */ jsxs44(
32754
+ return /* @__PURE__ */ jsxs45(
32391
32755
  "div",
32392
32756
  {
32393
32757
  ref: anchorRef,
@@ -32407,7 +32771,7 @@ function AgentProbeInfoPopover({
32407
32771
  },
32408
32772
  onBlur: () => setIsOpen(false),
32409
32773
  children: [
32410
- /* @__PURE__ */ jsx61(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
32774
+ /* @__PURE__ */ jsx62(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
32411
32775
  isOpen ? createPortal5(popover, document.body) : null
32412
32776
  ]
32413
32777
  }
@@ -32968,6 +33332,7 @@ function useAgentGUIViewLabels(input) {
32968
33332
  goalPauseAction: t("agentHost.agentGui.goalPauseAction"),
32969
33333
  goalResumeAction: t("agentHost.agentGui.goalResumeAction"),
32970
33334
  goalClearAction: t("agentHost.agentGui.goalClearAction"),
33335
+ goalRemoved: t("agentHost.agentGui.goalRemoved"),
32971
33336
  processing: t("agentHost.agentGui.processing"),
32972
33337
  turnSummary: t("agentHost.agentGui.turnSummary"),
32973
33338
  userMessageLocator: t("agentHost.agentGui.userMessageLocator"),
@@ -33002,10 +33367,6 @@ function useAgentGUIViewLabels(input) {
33002
33367
  submitAnswers: t("agentHost.agentGui.submitAnswers"),
33003
33368
  answerPlaceholder: t("agentHost.agentGui.answerPlaceholder"),
33004
33369
  waitingForAnswer: t("agentHost.agentGui.waitingForAnswer"),
33005
- waitingForBackgroundAgent: (count) => {
33006
- const pluralKey = count === 1 ? "agentHost.agentGui.waitingForBackgroundAgent_one" : "agentHost.agentGui.waitingForBackgroundAgent_other";
33007
- return t(pluralKey, { count });
33008
- },
33009
33370
  thinkingLabel: t("agentHost.workspaceAgentSessionDetailThinking"),
33010
33371
  toolCallsLabel: (count) => t("agentHost.workspaceAgentSessionDetailToolCalls", { count }),
33011
33372
  openConversationWindow: t("agentHost.agentGui.openConversationWindow"),
@@ -33332,7 +33693,7 @@ function resolveAgentGUIRailStatusProvider(input) {
33332
33693
  }
33333
33694
 
33334
33695
  // agent-gui/agentGuiNode/AgentGUINode.tsx
33335
- import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
33696
+ import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
33336
33697
  var EMPTY_SLASH_STATUS_QUOTAS = [];
33337
33698
  var DISABLED_REFERENCE_PROVENANCE_CATALOG = {
33338
33699
  enabledDimensions: [],
@@ -33736,7 +34097,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
33736
34097
  previewMode,
33737
34098
  railStatusProvider
33738
34099
  ]);
33739
- return /* @__PURE__ */ jsx62(
34100
+ return /* @__PURE__ */ jsx63(
33740
34101
  WorkspaceNodeWindow,
33741
34102
  {
33742
34103
  nodeId,
@@ -33752,8 +34113,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
33752
34113
  className: "size-full bg-transparent",
33753
34114
  bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
33754
34115
  hideHeader: embedded,
33755
- titleAccessory: /* @__PURE__ */ jsxs45("span", { className: "inline-flex flex-none items-center gap-1", children: [
33756
- /* @__PURE__ */ jsx62(
34116
+ titleAccessory: /* @__PURE__ */ jsxs46("span", { className: "inline-flex flex-none items-center gap-1", children: [
34117
+ /* @__PURE__ */ jsx63(
33757
34118
  AgentProbeInfoPopover,
33758
34119
  {
33759
34120
  lines: agentProbeLines,
@@ -33762,7 +34123,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
33762
34123
  onOpen: handleAgentProbeInfoOpen
33763
34124
  }
33764
34125
  ),
33765
- /* @__PURE__ */ jsx62(
34126
+ /* @__PURE__ */ jsx63(
33766
34127
  CanvasNodeGhostIconButton,
33767
34128
  {
33768
34129
  "aria-label": isConversationRailCollapsed ? t("agentHost.agentGui.expandConversationRail") : t("agentHost.agentGui.collapseConversationRail"),
@@ -33774,7 +34135,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
33774
34135
  event.stopPropagation();
33775
34136
  handleConversationRailToggle();
33776
34137
  },
33777
- children: /* @__PURE__ */ jsx62(
34138
+ children: /* @__PURE__ */ jsx63(
33778
34139
  CanvasNodePanelLinedIcon,
33779
34140
  {
33780
34141
  width: 18,
@@ -33798,7 +34159,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
33798
34159
  renderedWidth,
33799
34160
  railAutoCollapseWidthPx
33800
34161
  );
33801
- return /* @__PURE__ */ jsx62(
34162
+ return /* @__PURE__ */ jsx63(
33802
34163
  AgentGUINodeView,
33803
34164
  {
33804
34165
  viewModel,
@@ -33868,7 +34229,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
33868
34229
  }, areAgentGUINodePropsEqual);
33869
34230
 
33870
34231
  // AgentGUI.tsx
33871
- import { jsx as jsx63 } from "react/jsx-runtime";
34232
+ import { jsx as jsx64 } from "react/jsx-runtime";
33872
34233
  var AgentGUI = memo15(function AgentGUI2({
33873
34234
  agentActivityRuntime,
33874
34235
  agentHostApi,
@@ -33898,15 +34259,15 @@ var AgentGUI = memo15(function AgentGUI2({
33898
34259
  providerRailEmpty: renderAgentsEmpty
33899
34260
  }
33900
34261
  };
33901
- const content = /* @__PURE__ */ jsx63(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx63(
34262
+ const content = /* @__PURE__ */ jsx64(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx64(
33902
34263
  AgentActivityHostProvider,
33903
34264
  {
33904
34265
  agentActivityRuntime,
33905
34266
  agentHostApi,
33906
- children: /* @__PURE__ */ jsx63(AgentGUINode, { ...nodeProps })
34267
+ children: /* @__PURE__ */ jsx64(AgentGUINode, { ...nodeProps })
33907
34268
  }
33908
34269
  ) });
33909
- return props.frame.previewMode ? content : /* @__PURE__ */ jsx63(TooltipProvider6, { delayDuration: 120, skipDelayDuration: 0, children: content });
34270
+ return props.frame.previewMode ? content : /* @__PURE__ */ jsx64(TooltipProvider6, { delayDuration: 120, skipDelayDuration: 0, children: content });
33910
34271
  });
33911
34272
 
33912
34273
  export {
@@ -33919,4 +34280,4 @@ export {
33919
34280
  resolveAgentGUIAgentTarget,
33920
34281
  AgentGUI
33921
34282
  };
33922
- //# sourceMappingURL=chunk-LHKBR77G.js.map
34283
+ //# sourceMappingURL=chunk-7N524ZK7.js.map