@tutti-os/agent-gui 0.0.45 → 0.0.47

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 (60) hide show
  1. package/dist/{AgentMentionSearchController-D5ks45fN.d.ts → AgentMentionSearchController-CExFPobz.d.ts} +1 -1
  2. package/dist/AgentMessageMarkdown-DeYPURtF.d.ts +7 -0
  3. package/dist/agent-conversation/index.d.ts +4 -3
  4. package/dist/agent-conversation/index.js +8 -8
  5. package/dist/agent-message-center/index.d.ts +1 -1
  6. package/dist/agent-message-center/index.js +9 -9
  7. package/dist/{agentConversationVM-1QgRwvwZ.d.ts → agentConversationVM-BTMtRteS.d.ts} +14 -0
  8. package/dist/{AgentMessageMarkdown-Cts0dAIm.d.ts → agentGuiNodeTypes-B5Y6yDKy.d.ts} +43 -9
  9. package/dist/app/renderer/agentactivity.css +148 -25
  10. package/dist/{chunk-ZG3WZSMV.js → chunk-2FOBSURO.js} +29 -10
  11. package/dist/chunk-2FOBSURO.js.map +1 -0
  12. package/dist/{chunk-AMNXH4DJ.js → chunk-2RYZ4EBF.js} +2 -2
  13. package/dist/{chunk-EIC7XS3C.js → chunk-5QTC2L52.js} +2 -2
  14. package/dist/{chunk-UGV6JTWM.js → chunk-7NCWSH7U.js} +9 -9
  15. package/dist/{chunk-UGV6JTWM.js.map → chunk-7NCWSH7U.js.map} +1 -1
  16. package/dist/{chunk-62QOR3TC.js → chunk-HCS3HUUX.js} +5 -5
  17. package/dist/{chunk-OL54R6OL.js → chunk-J3SJZMI5.js} +2 -2
  18. package/dist/{chunk-VFQR7AZI.js → chunk-KACBTC7Y.js} +25 -3
  19. package/dist/chunk-KACBTC7Y.js.map +1 -0
  20. package/dist/{chunk-FJG2EH4V.js → chunk-KUCWRSXU.js} +2 -2
  21. package/dist/{chunk-D6IYEVDT.js → chunk-MCH35MAX.js} +2 -2
  22. package/dist/{chunk-NZ2BGOJU.js → chunk-Q4X6Q4E6.js} +2 -2
  23. package/dist/{chunk-EU7RWKHE.js → chunk-R6GOICRO.js} +5 -5
  24. package/dist/chunk-SD56WDSC.js +359 -0
  25. package/dist/chunk-SD56WDSC.js.map +1 -0
  26. package/dist/{chunk-TXXWUG2J.js → chunk-VE6JY2TH.js} +2 -1
  27. package/dist/{chunk-TXXWUG2J.js.map → chunk-VE6JY2TH.js.map} +1 -1
  28. package/dist/{chunk-QT45WUPQ.js → chunk-XJXSR5XI.js} +244 -21
  29. package/dist/chunk-XJXSR5XI.js.map +1 -0
  30. package/dist/{chunk-CZ7PS3DU.js → chunk-ZAF4IVUT.js} +859 -104
  31. package/dist/chunk-ZAF4IVUT.js.map +1 -0
  32. package/dist/context-mention-palette/index.d.ts +3 -3
  33. package/dist/context-mention-palette/index.js +9 -9
  34. package/dist/i18n/index.d.ts +24 -2
  35. package/dist/i18n/index.js +2 -2
  36. package/dist/index.d.ts +22 -6
  37. package/dist/index.js +1011 -825
  38. package/dist/index.js.map +1 -1
  39. package/dist/plan-decision-ops.d.ts +1 -1
  40. package/dist/queued-prompt-runtime.d.ts +97 -0
  41. package/dist/queued-prompt-runtime.js +9 -0
  42. package/dist/queued-prompt-runtime.js.map +1 -0
  43. package/dist/workbench/contribution.js +3 -3
  44. package/dist/workbench/index.js +9 -9
  45. package/dist/workbench/launch.js +2 -2
  46. package/dist/workbench/sessionTitle.js +3 -3
  47. package/dist/workspace-agent-generated-files.js +3 -3
  48. package/package.json +19 -12
  49. package/dist/chunk-CZ7PS3DU.js.map +0 -1
  50. package/dist/chunk-QT45WUPQ.js.map +0 -1
  51. package/dist/chunk-VFQR7AZI.js.map +0 -1
  52. package/dist/chunk-ZG3WZSMV.js.map +0 -1
  53. /package/dist/{chunk-AMNXH4DJ.js.map → chunk-2RYZ4EBF.js.map} +0 -0
  54. /package/dist/{chunk-EIC7XS3C.js.map → chunk-5QTC2L52.js.map} +0 -0
  55. /package/dist/{chunk-62QOR3TC.js.map → chunk-HCS3HUUX.js.map} +0 -0
  56. /package/dist/{chunk-OL54R6OL.js.map → chunk-J3SJZMI5.js.map} +0 -0
  57. /package/dist/{chunk-FJG2EH4V.js.map → chunk-KUCWRSXU.js.map} +0 -0
  58. /package/dist/{chunk-D6IYEVDT.js.map → chunk-MCH35MAX.js.map} +0 -0
  59. /package/dist/{chunk-NZ2BGOJU.js.map → chunk-Q4X6Q4E6.js.map} +0 -0
  60. /package/dist/{chunk-EU7RWKHE.js.map → chunk-R6GOICRO.js.map} +0 -0
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  AgentInteractivePromptSurface,
24
24
  approvalOptionDisplayLabel
25
- } from "./chunk-62QOR3TC.js";
25
+ } from "./chunk-HCS3HUUX.js";
26
26
  import {
27
27
  PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
28
28
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
@@ -41,7 +41,7 @@ import {
41
41
  resolveAgentGUIExplicitConversationTitle,
42
42
  resolveAgentGUIProviderDisplayLabel,
43
43
  resolveAgentGUIProviderIdentity
44
- } from "./chunk-FJG2EH4V.js";
44
+ } from "./chunk-KUCWRSXU.js";
45
45
  import {
46
46
  AgentConversationFlow,
47
47
  Button,
@@ -49,6 +49,7 @@ import {
49
49
  buildWorkspaceAgentSessionDetailViewModel,
50
50
  createAgentRichTextInputExtensions,
51
51
  editorToPromptText,
52
+ getAppErrorCode,
52
53
  labelForProviderSkill,
53
54
  openAgentEnvPanel,
54
55
  plainTextToAgentRichTextDoc,
@@ -57,14 +58,15 @@ import {
57
58
  promptForProviderSkills,
58
59
  skillDescriptionForDisplay,
59
60
  skillTriggerForPrefix,
61
+ toLocalShortDateTime,
60
62
  useProjectedAgentConversation
61
- } from "./chunk-CZ7PS3DU.js";
63
+ } from "./chunk-ZAF4IVUT.js";
62
64
  import {
63
65
  AgentMessageMarkdown,
64
66
  ZoomableImage,
65
67
  cn,
66
68
  resolveWorkspaceLinkAction
67
- } from "./chunk-QT45WUPQ.js";
69
+ } from "./chunk-XJXSR5XI.js";
68
70
  import {
69
71
  AGENT_MENTION_FILTER_TAB_ORDER,
70
72
  AgentFileMentionPalette,
@@ -72,7 +74,7 @@ import {
72
74
  DEFAULT_AGENT_MENTION_FILTER,
73
75
  agentMentionItemKey,
74
76
  preloadAgentMentionBrowse
75
- } from "./chunk-UGV6JTWM.js";
77
+ } from "./chunk-7NCWSH7U.js";
76
78
  import {
77
79
  WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
78
80
  buildWorkspaceAgentActivityListViewModel,
@@ -82,25 +84,27 @@ import {
82
84
  isWorkspaceAgentUntitledTask,
83
85
  mergeWorkspaceAgentActivityDurableAndOverlayMessages,
84
86
  selectWorkspaceAgentActivityOverlayMessages
85
- } from "./chunk-D6IYEVDT.js";
87
+ } from "./chunk-MCH35MAX.js";
86
88
  import {
87
89
  MANAGED_AGENT_ICON_FALLBACK_URL,
88
90
  MANAGED_AGENT_ICON_URLS,
89
91
  Spinner,
90
92
  normalizeManagedAgentProvider
91
- } from "./chunk-NZ2BGOJU.js";
93
+ } from "./chunk-Q4X6Q4E6.js";
92
94
  import {
93
95
  resolveWorkspaceAgentSessionSortTimeUnixMs
94
96
  } from "./chunk-IBIMGLCD.js";
95
97
  import "./chunk-MTFSQWZ6.js";
96
98
  import {
99
+ AGENT_RICH_TEXT_CARET_ANCHOR,
97
100
  exitAgentFileMentionSuggestion,
98
101
  formatAgentMentionMarkdown,
99
102
  mentionItemToAttrs,
100
103
  normalizeAgentSessionMentionTitle,
101
104
  parseMentionItemFromHref
102
- } from "./chunk-ZG3WZSMV.js";
105
+ } from "./chunk-2FOBSURO.js";
103
106
  import "./chunk-Y35GDLP2.js";
107
+ import "./chunk-LUGELG5V.js";
104
108
  import {
105
109
  AgentActivityHostProvider,
106
110
  AgentActivityRuntimeProvider,
@@ -112,24 +116,26 @@ import {
112
116
  useAgentActivityRuntime,
113
117
  useAgentActivitySnapshot,
114
118
  useAgentHostApi,
115
- useOptionalAgentActivityRuntime
116
- } from "./chunk-TXXWUG2J.js";
119
+ useOptionalAgentActivityRuntime,
120
+ useOptionalAgentHostApi
121
+ } from "./chunk-VE6JY2TH.js";
117
122
  import "./chunk-TYGL25EL.js";
123
+ import "./chunk-PJP5BUU6.js";
118
124
  import {
119
125
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
120
126
  } from "./chunk-JM24HADP.js";
121
127
  import "./chunk-GCBDIQDX.js";
128
+ import {
129
+ createAgentQueuedPromptRuntime
130
+ } from "./chunk-SD56WDSC.js";
122
131
  import {
123
132
  AgentGuiI18nProvider,
124
133
  agentGuiI18nModule,
125
134
  agentGuiI18nResources,
126
- getActiveUiLanguage,
127
135
  translate,
128
136
  useTranslation
129
- } from "./chunk-EIC7XS3C.js";
130
- import "./chunk-VFQR7AZI.js";
131
- import "./chunk-LUGELG5V.js";
132
- import "./chunk-PJP5BUU6.js";
137
+ } from "./chunk-5QTC2L52.js";
138
+ import "./chunk-KACBTC7Y.js";
133
139
 
134
140
  // shared/agentActivitySnapshotProjection.ts
135
141
  import {
@@ -299,145 +305,6 @@ import { memo as memo2, useCallback as useCallback13, useEffect as useEffect14,
299
305
  import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
300
306
  import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
301
307
 
302
- // shared/errors/appError.ts
303
- function createMessageMap() {
304
- return {
305
- "common.invalid_input": "The request was invalid.",
306
- "common.approved_path_required": "The selected path is outside approved workspaces.",
307
- "common.unavailable": "This feature is unavailable.",
308
- "common.unexpected": "Something went wrong. Please try again.",
309
- "session.not_found": "Session not found.",
310
- "control_surface.unauthorized": "Unauthorized request.",
311
- "workspace.select_directory_failed": "Unable to open the directory picker.",
312
- "workspace.select_files_failed": "Unable to open the file picker.",
313
- "workspace.ensure_directory_failed": "Unable to create the directory.",
314
- "workspace.import_files_failed": "Unable to import the selected files.",
315
- "workspace.read_file_failed": "Unable to load the selected file.",
316
- "workspace.write_file_failed": "Unable to save the selected file.",
317
- "workspace.export_file_failed": "Unable to export the selected file.",
318
- "workspace.copy_path_failed": "Unable to copy the path.",
319
- "workspace.host_unsupported": "This Mac cannot run the workspace environment required by tsh. Please use macOS 13 or later on Apple Silicon (or an Intel Mac that supports Apple Virtualization), and ensure virtualization is not blocked by MDM.",
320
- "workspace.runtime_artifact_unavailable": "Unable to prepare the workspace environment required by tsh. Check your network connection and try again.",
321
- "runtime.guest_agent_lane_unavailable": "The workspace environment connection is unavailable. Refresh and try again.",
322
- "workspace.room_full": "Room is full.",
323
- "workspace.room_delete_forbidden": "Only the space owner can delete this space.",
324
- "workspace.room_delete_not_found": "This space no longer exists.",
325
- "filesystem.create_directory_failed": "Unable to create the directory.",
326
- "filesystem.read_file_bytes_failed": "Unable to read the file.",
327
- "filesystem.read_file_text_failed": "Unable to read the file.",
328
- "filesystem.write_file_text_failed": "Unable to save the file.",
329
- "filesystem.copy_entry_failed": "Unable to copy the file or folder.",
330
- "filesystem.move_entry_failed": "Unable to move the file or folder.",
331
- "filesystem.rename_entry_failed": "Unable to rename the file or folder.",
332
- "filesystem.delete_entry_failed": "Unable to delete the file or folder.",
333
- "filesystem.read_directory_failed": "Unable to load the directory.",
334
- "filesystem.stat_failed": "Unable to read file details.",
335
- "terminal.spawn_failed": "Unable to start the terminal.",
336
- "terminal.write_failed": "Unable to write to the terminal.",
337
- "terminal.resize_failed": "Unable to resize the terminal.",
338
- "terminal.close_failed": "Unable to close the terminal.",
339
- "terminal.attach_failed": "Unable to attach the terminal session.",
340
- "terminal.detach_failed": "Unable to detach the terminal session.",
341
- "terminal.snapshot_failed": "Unable to read terminal output.",
342
- "agent.list_models_failed": "Unable to load models for this provider.",
343
- "agent.launch_failed": "Unable to start the agent.",
344
- "agent.read_last_message_failed": "Unable to read the last agent message.",
345
- "agent.provider_session_not_found": "The previous agent session can no longer be restored.",
346
- "agent.resume_session_not_local": "The previous agent session is not available on this machine.",
347
- "agent.resume_session_resolve_failed": "Unable to resolve the previous agent session.",
348
- "agent.settings_require_new_session": "This model can only be used in a new session to preserve context.",
349
- "task.suggest_title_failed": "Unable to generate task details.",
350
- "persistence.unavailable": "Storage is unavailable; changes will not be saved.",
351
- "persistence.quota_exceeded": "Storage quota was exceeded.",
352
- "persistence.payload_too_large": "Workspace state is too large to save.",
353
- "persistence.io_failed": "Unable to save data to storage.",
354
- "persistence.invalid_state": "The workspace state could not be saved.",
355
- "persistence.invalid_node_id": "The terminal history could not be saved.",
356
- "update.get_state_failed": "Unable to read the update status.",
357
- "update.configure_failed": "Unable to apply update settings.",
358
- "update.check_failed": "Unable to check for updates.",
359
- "update.download_failed": "Unable to download the update.",
360
- "update.install_failed": "Unable to install the update.",
361
- PACKAGE_DOWNLOAD_INTERRUPTED: "The agent package download was interrupted. Check your network connection and retry.",
362
- PACKAGE_DOWNLOAD_HTTP_STATUS: "The agent package server rejected the download. Retry later or contact support.",
363
- PACKAGE_DOWNLOAD_INVALID: "The downloaded agent package failed integrity checks. Retry the download.",
364
- PACKAGE_DOWNLOAD_DISK_ERROR: "Unable to write the agent package cache. Check disk permissions and free space."
365
- };
366
- }
367
- var APP_ERROR_MESSAGES = createMessageMap();
368
- function createAppErrorDescriptor(code, options = {}) {
369
- return {
370
- code,
371
- ...options.params ? { params: options.params } : {},
372
- ...options.debugMessage ? { debugMessage: options.debugMessage } : {}
373
- };
374
- }
375
- function isAppErrorDescriptor(value) {
376
- if (!value || typeof value !== "object") {
377
- return false;
378
- }
379
- const record = value;
380
- return typeof record.code === "string" && record.code in APP_ERROR_MESSAGES;
381
- }
382
- function getAppErrorCode(error) {
383
- if (error instanceof TshAppError) {
384
- return error.code;
385
- }
386
- if (isAppErrorDescriptor(error)) {
387
- return error.code;
388
- }
389
- if (error && typeof error === "object") {
390
- const code = error.code;
391
- if (typeof code === "string" && code in APP_ERROR_MESSAGES) {
392
- return code;
393
- }
394
- }
395
- return null;
396
- }
397
- var TshAppError = class extends Error {
398
- code;
399
- params;
400
- debugMessage;
401
- constructor(descriptor) {
402
- super(formatAppErrorMessage(descriptor));
403
- this.name = "TshAppError";
404
- this.code = descriptor.code;
405
- this.params = descriptor.params;
406
- this.debugMessage = descriptor.debugMessage;
407
- }
408
- toDescriptor() {
409
- return createAppErrorDescriptor(this.code, {
410
- params: this.params,
411
- debugMessage: this.debugMessage
412
- });
413
- }
414
- };
415
- function formatAppErrorMessage(error) {
416
- const descriptor = error instanceof TshAppError ? error.toDescriptor() : error;
417
- return APP_ERROR_MESSAGES[descriptor.code] ?? APP_ERROR_MESSAGES["common.unexpected"];
418
- }
419
-
420
- // app/renderer/shell/utils/format.ts
421
- var shortDateTimeFormatterByLanguage = /* @__PURE__ */ new Map();
422
- function getShortDateTimeFormatter(language) {
423
- const cached = shortDateTimeFormatterByLanguage.get(language);
424
- if (cached) {
425
- return cached;
426
- }
427
- const formatter = new Intl.DateTimeFormat(language, {
428
- month: language === "en" ? "short" : "numeric",
429
- day: "numeric",
430
- hour: "2-digit",
431
- minute: "2-digit",
432
- hourCycle: "h23"
433
- });
434
- shortDateTimeFormatterByLanguage.set(language, formatter);
435
- return formatter;
436
- }
437
- function toLocalShortDateTime(value, language = getActiveUiLanguage()) {
438
- return getShortDateTimeFormatter(language).format(value);
439
- }
440
-
441
308
  // utils/workspaceNodeSizing.ts
442
309
  var MIN_SIZE_BY_KIND = {
443
310
  terminal: { width: 400, height: 160 },
@@ -2306,6 +2173,67 @@ import {
2306
2173
  } from "react";
2307
2174
  import { debounce } from "lodash";
2308
2175
  import { toast } from "@tutti-os/ui-system";
2176
+
2177
+ // agentQueuedPromptRuntime.tsx
2178
+ import {
2179
+ createContext,
2180
+ useContext,
2181
+ useSyncExternalStore
2182
+ } from "react";
2183
+ import { jsx as jsx11 } from "react/jsx-runtime";
2184
+ var AgentQueuedPromptRuntimeContext = createContext(null);
2185
+ var currentAgentQueuedPromptRuntime = null;
2186
+ function AgentQueuedPromptRuntimeProvider({
2187
+ children,
2188
+ runtime
2189
+ }) {
2190
+ currentAgentQueuedPromptRuntime = runtime ?? null;
2191
+ return /* @__PURE__ */ jsx11(AgentQueuedPromptRuntimeContext.Provider, { value: runtime ?? null, children });
2192
+ }
2193
+ function useAgentQueuedPromptRuntime() {
2194
+ const runtime = useContext(AgentQueuedPromptRuntimeContext) ?? getTestAgentQueuedPromptRuntime();
2195
+ if (!runtime) {
2196
+ throw new Error(
2197
+ "AgentQueuedPromptRuntimeProvider is missing an AgentQueuedPromptRuntime instance."
2198
+ );
2199
+ }
2200
+ return runtime;
2201
+ }
2202
+ function useAgentQueuedPromptSessionSnapshot(input) {
2203
+ const runtime = useAgentQueuedPromptRuntime();
2204
+ const workspaceId = input.workspaceId.trim();
2205
+ const agentSessionId = input.agentSessionId?.trim() ?? "";
2206
+ return useSyncExternalStore(
2207
+ runtime.subscribe,
2208
+ () => agentSessionId ? runtime.getSessionSnapshot({ workspaceId, agentSessionId }) : null,
2209
+ () => agentSessionId ? runtime.getSessionSnapshot({ workspaceId, agentSessionId }) : null
2210
+ );
2211
+ }
2212
+ function resetAgentQueuedPromptRuntimeForTests() {
2213
+ if (process.env.NODE_ENV === "test") {
2214
+ currentAgentQueuedPromptRuntime = null;
2215
+ }
2216
+ }
2217
+ function setAgentQueuedPromptRuntimeForTests(runtime) {
2218
+ if (process.env.NODE_ENV === "test") {
2219
+ currentAgentQueuedPromptRuntime = runtime;
2220
+ }
2221
+ }
2222
+ function getTestAgentQueuedPromptRuntime() {
2223
+ if (process.env.NODE_ENV !== "test") {
2224
+ return null;
2225
+ }
2226
+ if (currentAgentQueuedPromptRuntime) {
2227
+ return currentAgentQueuedPromptRuntime;
2228
+ }
2229
+ if (typeof window === "undefined") {
2230
+ return null;
2231
+ }
2232
+ const testRuntime = window.agentQueuedPromptRuntime;
2233
+ return testRuntime ?? null;
2234
+ }
2235
+
2236
+ // agent-gui/agentGuiNode/controller/useAgentGUINodeController.ts
2309
2237
  import {
2310
2238
  resolveAgentActivityCapability as resolveAgentActivityCapability2,
2311
2239
  resolveAgentActivityUsage,
@@ -4021,7 +3949,7 @@ function subscribeCoalesced(type, options, callback) {
4021
3949
  }
4022
3950
 
4023
3951
  // contexts/workspace/presentation/renderer/agentSessions/agentSessionViewStore.ts
4024
- import { useSyncExternalStore } from "react";
3952
+ import { useSyncExternalStore as useSyncExternalStore2 } from "react";
4025
3953
  var STREAM_LINGER_MS = 15e3;
4026
3954
  var EMPTY_AGENT_SESSION_VIEW_STORE_SNAPSHOT = {
4027
3955
  sessionViewsBySessionKey: {}
@@ -4047,7 +3975,7 @@ function getAgentSessionView(ref) {
4047
3975
  }
4048
3976
  function useAgentSessionView(ref) {
4049
3977
  const sessionKey = createAgentSessionViewKey(ref);
4050
- return useSyncExternalStore(
3978
+ return useSyncExternalStore2(
4051
3979
  subscribeAgentSessionViewStore,
4052
3980
  () => sessionKey ? snapshot.sessionViewsBySessionKey[sessionKey] ?? null : null,
4053
3981
  () => sessionKey ? snapshot.sessionViewsBySessionKey[sessionKey] ?? null : null
@@ -6128,13 +6056,13 @@ function markLocalDeletedAgentGUIConversation(input) {
6128
6056
  }
6129
6057
 
6130
6058
  // contexts/workspace/presentation/renderer/agentGuiConversationList/useAgentGuiConversationList.ts
6131
- import { useCallback as useCallback2, useSyncExternalStore as useSyncExternalStore2 } from "react";
6059
+ import { useCallback as useCallback2, useSyncExternalStore as useSyncExternalStore3 } from "react";
6132
6060
  function useAgentGuiConversationList(query) {
6133
6061
  const getSnapshot = useCallback2(
6134
6062
  () => getOrCreateAgentGUIConversationListQuerySnapshot(query),
6135
6063
  [query]
6136
6064
  );
6137
- return useSyncExternalStore2(
6065
+ return useSyncExternalStore3(
6138
6066
  subscribeAgentGUIConversationListStore,
6139
6067
  getSnapshot,
6140
6068
  getSnapshot
@@ -7410,6 +7338,23 @@ function retargetOptimisticPromptMessages(messages, input) {
7410
7338
  });
7411
7339
  return { changed, messages: retargeted };
7412
7340
  }
7341
+ function removeOptimisticPromptMessagesByClientSubmitId(messages, clientSubmitId) {
7342
+ const normalizedClientSubmitId = clientSubmitId.trim();
7343
+ if (!normalizedClientSubmitId || messages.length === 0) {
7344
+ return { changed: false, messages: [...messages] };
7345
+ }
7346
+ const filtered = messages.filter((message) => {
7347
+ if (!isWorkspaceAgentActivityOptimisticMessage(message)) {
7348
+ return true;
7349
+ }
7350
+ const messageClientSubmitId = message.payload?.clientSubmitId;
7351
+ return typeof messageClientSubmitId !== "string" || messageClientSubmitId.trim() !== normalizedClientSubmitId;
7352
+ });
7353
+ return {
7354
+ changed: filtered.length !== messages.length,
7355
+ messages: filtered
7356
+ };
7357
+ }
7413
7358
  function shouldRetargetOptimisticPromptFromMessage(message, trace) {
7414
7359
  const turnId = message.turnId?.trim() ?? "";
7415
7360
  if (!turnId || trace.turnId) {
@@ -8123,11 +8068,11 @@ function permissionModeDescription(provider, option) {
8123
8068
  }
8124
8069
  return void 0;
8125
8070
  }
8126
- function removeQueuedPromptById(queue, queuedPromptId) {
8127
- return queue.filter((queuedPrompt) => queuedPrompt.id !== queuedPromptId);
8128
- }
8129
8071
  var NODE_DEFAULT_DRAFT_KEY = "__agent_gui_node_defaults__";
8130
8072
  var EMPTY_AGENT_COMPOSER_DRAFT = emptyAgentComposerDraft();
8073
+ var EMPTY_QUEUED_PROMPTS = Object.freeze(
8074
+ []
8075
+ );
8131
8076
  function areAgentComposerDraftsEqual(left, right) {
8132
8077
  const leftFiles = left.files ?? [];
8133
8078
  const rightFiles = right.files ?? [];
@@ -8441,6 +8386,7 @@ function useAgentGUINodeController({
8441
8386
  onShowMessage
8442
8387
  }) {
8443
8388
  const agentActivityRuntime = useAgentActivityRuntime();
8389
+ const agentQueuedPromptRuntime = useAgentQueuedPromptRuntime();
8444
8390
  const agentHostApi = useAgentHostApi();
8445
8391
  const agentActivitySnapshot = useAgentActivitySnapshot(workspaceId);
8446
8392
  const normalizedExplicitProviderTargets = useMemo4(
@@ -8505,6 +8451,15 @@ function useAgentGUINodeController({
8505
8451
  );
8506
8452
  const pendingCreateOwnerKey = nodeId?.trim() ?? "";
8507
8453
  const conversationListActiveOwnerKey = pendingCreateOwnerKey || generatedControllerOwnerKey;
8454
+ const queuedPromptOwnerId = conversationListActiveOwnerKey;
8455
+ useEffect4(() => {
8456
+ if (previewMode) {
8457
+ return;
8458
+ }
8459
+ return () => {
8460
+ agentQueuedPromptRuntime.releaseOwner(queuedPromptOwnerId);
8461
+ };
8462
+ }, [agentQueuedPromptRuntime, previewMode, queuedPromptOwnerId]);
8508
8463
  const resolvePendingCreateConversationId = useCallback4(
8509
8464
  () => conversationListQuery && pendingCreateOwnerKey ? getAgentGUIConversationCreatePending({
8510
8465
  query: conversationListQuery,
@@ -8531,7 +8486,6 @@ function useAgentGUINodeController({
8531
8486
  const [draftBySessionId, setDraftBySessionId] = useState4({});
8532
8487
  const draftBySessionIdRef = useRef4(draftBySessionId);
8533
8488
  const [draftSettingsBySessionId, setDraftSettingsBySessionId] = useState4({});
8534
- const [queuedPromptsBySessionId, setQueuedPromptsBySessionId] = useState4({});
8535
8489
  const hasLoadedConversations = conversationListState?.initialized ?? false;
8536
8490
  const isLoadingConversations = conversationListState?.isLoading ?? false;
8537
8491
  const [isLoadingMessages, setIsLoadingMessages] = useState4(false);
@@ -8548,16 +8502,15 @@ function useAgentGUINodeController({
8548
8502
  const [isPendingSubmit, setIsPendingSubmit] = useState4(resolvePendingSubmit);
8549
8503
  const [localIsSubmitting, setLocalIsSubmitting] = useState4(false);
8550
8504
  const isSubmitting = localIsSubmitting || isPendingSubmit;
8551
- const [drainingQueuedPromptSessionId, setDrainingQueuedPromptSessionId] = useState4(null);
8552
- const [
8553
- sendNextQueuedPromptIdBySessionId,
8554
- setSendNextQueuedPromptIdBySessionId
8555
- ] = useState4({});
8556
- const [failedQueuedPromptIdBySessionId, setFailedQueuedPromptIdBySessionId] = useState4({});
8557
- const [
8558
- queuedPromptRetryBlockBySessionId,
8559
- setQueuedPromptRetryBlockBySessionId
8560
- ] = useState4({});
8505
+ const activeQueuedPromptSnapshot = useAgentQueuedPromptSessionSnapshot({
8506
+ workspaceId,
8507
+ agentSessionId: activeConversationId
8508
+ });
8509
+ const activeQueuedPrompts = activeQueuedPromptSnapshot?.prompts ?? EMPTY_QUEUED_PROMPTS;
8510
+ const activeQueuedPromptClaim = activeQueuedPromptSnapshot?.claim ?? null;
8511
+ const activeFailedQueuedPromptId = activeQueuedPromptSnapshot?.failedPromptId ?? null;
8512
+ const activeQueuedPromptRetryBlock = activeQueuedPromptSnapshot?.retryBlock ?? null;
8513
+ const activeSendNextQueuedPromptId = activeQueuedPromptSnapshot?.sendNextPromptId ?? null;
8561
8514
  const [interruptingSessionIds, setInterruptingSessionIds] = useState4({});
8562
8515
  const [pendingInterruptSessionIds, setPendingInterruptSessionIds] = useState4({});
8563
8516
  const [
@@ -9427,6 +9380,7 @@ function useAgentGUINodeController({
9427
9380
  },
9428
9381
  [
9429
9382
  activation,
9383
+ agentQueuedPromptRuntime,
9430
9384
  agentActivityRuntime,
9431
9385
  conversationListQuery,
9432
9386
  currentUserId,
@@ -9899,6 +9853,10 @@ function useAgentGUINodeController({
9899
9853
  "local-delete"
9900
9854
  );
9901
9855
  }
9856
+ agentQueuedPromptRuntime.cleanupSession({
9857
+ workspaceId,
9858
+ agentSessionId
9859
+ });
9902
9860
  deleteAgentSessionView(sessionViewRef(agentSessionId));
9903
9861
  reportAgentGUIActiveConversationCleared({
9904
9862
  details: {
@@ -9933,6 +9891,7 @@ function useAgentGUINodeController({
9933
9891
  }
9934
9892
  },
9935
9893
  [
9894
+ agentQueuedPromptRuntime,
9936
9895
  agentActivityRuntime,
9937
9896
  applySessionStateSnapshot,
9938
9897
  clearFailedLiveState,
@@ -10665,6 +10624,41 @@ function useAgentGUINodeController({
10665
10624
  },
10666
10625
  [sessionViewRef]
10667
10626
  );
10627
+ const removeOptimisticPrompt = useCallback4(
10628
+ (agentSessionId, clientSubmitId) => {
10629
+ const normalizedAgentSessionId = agentSessionId.trim();
10630
+ if (!normalizedAgentSessionId || !clientSubmitId.trim()) {
10631
+ return;
10632
+ }
10633
+ const sessionView = getAgentSessionView(
10634
+ sessionViewRef(normalizedAgentSessionId)
10635
+ );
10636
+ if (!sessionView) {
10637
+ return;
10638
+ }
10639
+ const detail = removeOptimisticPromptMessagesByClientSubmitId(
10640
+ sessionView.detailMessages,
10641
+ clientSubmitId
10642
+ );
10643
+ if (detail.changed) {
10644
+ setAgentSessionViewDetailMessages(
10645
+ sessionViewRef(normalizedAgentSessionId),
10646
+ detail.messages
10647
+ );
10648
+ }
10649
+ const overlay = removeOptimisticPromptMessagesByClientSubmitId(
10650
+ sessionView.overlayMessages,
10651
+ clientSubmitId
10652
+ );
10653
+ if (overlay.changed) {
10654
+ setAgentSessionViewOverlayMessages(
10655
+ sessionViewRef(normalizedAgentSessionId),
10656
+ overlay.messages
10657
+ );
10658
+ }
10659
+ },
10660
+ [sessionViewRef]
10661
+ );
10668
10662
  const applyStatePatch = useCallback4(
10669
10663
  (patch) => {
10670
10664
  const agentSessionId = patch.agentSessionId.trim();
@@ -11613,7 +11607,7 @@ function useAgentGUINodeController({
11613
11607
  workspaceId
11614
11608
  ]);
11615
11609
  const executePrompt = useCallback4(
11616
- (agentSessionId, content, queuedPromptId, displayPrompt) => {
11610
+ (agentSessionId, content, queuedPromptId, displayPrompt, queuedPromptClaim) => {
11617
11611
  const normalizedContent = normalizeAgentPromptContentBlocks(content);
11618
11612
  if (!agentSessionId || normalizedContent.length === 0) {
11619
11613
  return;
@@ -11684,6 +11678,13 @@ function useAgentGUINodeController({
11684
11678
  )
11685
11679
  } : current
11686
11680
  );
11681
+ const pendingOptimisticTurnId = createPendingOptimisticTurnId(
11682
+ submitTrace.clientSubmitId
11683
+ );
11684
+ pendingTurnIdBySessionIdRef.current = {
11685
+ ...pendingTurnIdBySessionIdRef.current,
11686
+ [agentSessionId]: pendingOptimisticTurnId
11687
+ };
11687
11688
  applyStatePatch({
11688
11689
  agentSessionId,
11689
11690
  currentPhase: "working",
@@ -11695,10 +11696,29 @@ function useAgentGUINodeController({
11695
11696
  trace: submitTrace,
11696
11697
  workspaceId
11697
11698
  });
11699
+ let queuedPromptClaimCompleted = false;
11700
+ const shouldRecordPendingOptimisticPrompt = queuedPromptId === void 0;
11701
+ if (shouldRecordPendingOptimisticPrompt) {
11702
+ recordLocalMessages(agentSessionId, [
11703
+ createOptimisticPromptMessage({
11704
+ workspaceId,
11705
+ agentSessionId,
11706
+ turnId: pendingOptimisticTurnId,
11707
+ clientSubmitId: submitTrace.clientSubmitId,
11708
+ userId: currentUserId?.trim() || "user",
11709
+ prompt: submittedPromptText,
11710
+ content: normalizedContent,
11711
+ occurredAtUnixMs: submittedAtUnixMs
11712
+ })
11713
+ ]);
11714
+ reportAgentSubmitTraceDiagnostic({
11715
+ event: "optimistic_user_message_recorded",
11716
+ runtime: agentActivityRuntime,
11717
+ trace: submitTrace,
11718
+ workspaceId
11719
+ });
11720
+ }
11698
11721
  void Promise.resolve().then(() => {
11699
- if (!isCurrentConversation(agentSessionId)) {
11700
- return null;
11701
- }
11702
11722
  reportAgentSubmitTraceDiagnostic({
11703
11723
  event: "send_input.requested",
11704
11724
  runtime: agentActivityRuntime,
@@ -11713,7 +11733,7 @@ function useAgentGUINodeController({
11713
11733
  metadata: agentSubmitTraceMetadata(submitTrace)
11714
11734
  });
11715
11735
  }).then((result) => {
11716
- if (!result || !isCurrentConversation(agentSessionId)) {
11736
+ if (!result) {
11717
11737
  return;
11718
11738
  }
11719
11739
  submitTrace.turnId = result.turnId.trim() || null;
@@ -11773,34 +11793,14 @@ function useAgentGUINodeController({
11773
11793
  });
11774
11794
  }
11775
11795
  if (queuedPromptId) {
11776
- setQueuedPromptsBySessionId((current) => {
11777
- const queue = current[agentSessionId] ?? [];
11778
- if (queue.length === 0 || !queue.some((item) => item.id === queuedPromptId)) {
11779
- return current;
11780
- }
11781
- return {
11782
- ...current,
11783
- [agentSessionId]: removeQueuedPromptById(queue, queuedPromptId)
11784
- };
11785
- });
11786
- setSendNextQueuedPromptIdBySessionId((current) => {
11787
- if (current[agentSessionId] !== queuedPromptId) {
11788
- return current;
11789
- }
11790
- return { ...current, [agentSessionId]: null };
11791
- });
11792
- setFailedQueuedPromptIdBySessionId((current) => {
11793
- if (current[agentSessionId] !== queuedPromptId) {
11794
- return current;
11795
- }
11796
- return { ...current, [agentSessionId]: null };
11797
- });
11798
- setQueuedPromptRetryBlockBySessionId((current) => {
11799
- if (current[agentSessionId]?.queuedPromptId !== queuedPromptId) {
11800
- return current;
11801
- }
11802
- return { ...current, [agentSessionId]: null };
11803
- });
11796
+ if (queuedPromptClaim) {
11797
+ queuedPromptClaimCompleted = agentQueuedPromptRuntime.completeClaim({
11798
+ workspaceId,
11799
+ agentSessionId,
11800
+ ownerId: queuedPromptClaim.ownerId,
11801
+ claimId: queuedPromptClaim.claimId
11802
+ });
11803
+ }
11804
11804
  }
11805
11805
  const submittedTurnId = result.turnId.trim();
11806
11806
  if (submittedTurnId) {
@@ -11808,24 +11808,32 @@ function useAgentGUINodeController({
11808
11808
  ...pendingTurnIdBySessionIdRef.current,
11809
11809
  [agentSessionId]: submittedTurnId
11810
11810
  };
11811
- recordLocalMessages(agentSessionId, [
11812
- createOptimisticPromptMessage({
11813
- workspaceId,
11811
+ if (shouldRecordPendingOptimisticPrompt) {
11812
+ retargetOptimisticPromptTurn(
11814
11813
  agentSessionId,
11815
- turnId: submittedTurnId,
11816
- clientSubmitId: submitTrace.clientSubmitId,
11817
- userId: currentUserId?.trim() || "user",
11818
- prompt: submittedPromptText,
11819
- content: normalizedContent,
11820
- occurredAtUnixMs: Date.now()
11821
- })
11822
- ]);
11823
- reportAgentSubmitTraceDiagnostic({
11824
- event: "optimistic_user_message_recorded",
11825
- runtime: agentActivityRuntime,
11826
- trace: submitTrace,
11827
- workspaceId
11828
- });
11814
+ submitTrace.clientSubmitId,
11815
+ submittedTurnId
11816
+ );
11817
+ } else {
11818
+ recordLocalMessages(agentSessionId, [
11819
+ createOptimisticPromptMessage({
11820
+ workspaceId,
11821
+ agentSessionId,
11822
+ turnId: submittedTurnId,
11823
+ clientSubmitId: submitTrace.clientSubmitId,
11824
+ userId: currentUserId?.trim() || "user",
11825
+ prompt: submittedPromptText,
11826
+ content: normalizedContent,
11827
+ occurredAtUnixMs: Date.now()
11828
+ })
11829
+ ]);
11830
+ reportAgentSubmitTraceDiagnostic({
11831
+ event: "optimistic_user_message_recorded",
11832
+ runtime: agentActivityRuntime,
11833
+ trace: submitTrace,
11834
+ workspaceId
11835
+ });
11836
+ }
11829
11837
  scheduleAgentSubmitTracePaint({
11830
11838
  runtime: agentActivityRuntime,
11831
11839
  trace: submitTrace,
@@ -11843,6 +11851,12 @@ function useAgentGUINodeController({
11843
11851
  const nextTraces = { ...submitTraceBySessionIdRef.current };
11844
11852
  delete nextTraces[agentSessionId];
11845
11853
  submitTraceBySessionIdRef.current = nextTraces;
11854
+ if (shouldRecordPendingOptimisticPrompt) {
11855
+ removeOptimisticPrompt(agentSessionId, submitTrace.clientSubmitId);
11856
+ }
11857
+ const nextPendingTurns = { ...pendingTurnIdBySessionIdRef.current };
11858
+ delete nextPendingTurns[agentSessionId];
11859
+ pendingTurnIdBySessionIdRef.current = nextPendingTurns;
11846
11860
  reportAgentSubmitTraceDiagnostic({
11847
11861
  event: "submit.failed",
11848
11862
  runtime: agentActivityRuntime,
@@ -11893,19 +11907,21 @@ function useAgentGUINodeController({
11893
11907
  }
11894
11908
  if (queuedPromptId) {
11895
11909
  if (shouldRetryQueuedPromptOnNextActivity) {
11896
- setQueuedPromptRetryBlockBySessionId((current) => ({
11897
- ...current,
11898
- [agentSessionId]: {
11910
+ agentQueuedPromptRuntime.setRetryBlock({
11911
+ workspaceId,
11912
+ agentSessionId,
11913
+ retryBlock: {
11899
11914
  queuedPromptId,
11900
11915
  sessionStateUpdatedAtUnixMs: currentSessionState?.updatedAtUnixMs ?? null,
11901
11916
  conversationUpdatedAtUnixMs: currentConversationSummary?.updatedAtUnixMs ?? null
11902
11917
  }
11903
- }));
11918
+ });
11904
11919
  } else {
11905
- setFailedQueuedPromptIdBySessionId((current) => ({
11906
- ...current,
11907
- [agentSessionId]: queuedPromptId
11908
- }));
11920
+ agentQueuedPromptRuntime.markPromptFailed({
11921
+ workspaceId,
11922
+ agentSessionId,
11923
+ promptId: queuedPromptId
11924
+ });
11909
11925
  }
11910
11926
  }
11911
11927
  }).finally(() => {
@@ -11916,12 +11932,18 @@ function useAgentGUINodeController({
11916
11932
  });
11917
11933
  }
11918
11934
  setLocalIsSubmitting(false);
11919
- setDrainingQueuedPromptSessionId(
11920
- (current) => current === agentSessionId ? null : current
11921
- );
11935
+ if (queuedPromptClaim && !queuedPromptClaimCompleted) {
11936
+ agentQueuedPromptRuntime.releaseClaim({
11937
+ workspaceId,
11938
+ agentSessionId,
11939
+ ownerId: queuedPromptClaim.ownerId,
11940
+ claimId: queuedPromptClaim.claimId
11941
+ });
11942
+ }
11922
11943
  });
11923
11944
  },
11924
11945
  [
11946
+ agentQueuedPromptRuntime,
11925
11947
  currentUserId,
11926
11948
  isCurrentConversation,
11927
11949
  applyStatePatch,
@@ -11931,6 +11953,8 @@ function useAgentGUINodeController({
11931
11953
  loadSessionState,
11932
11954
  refreshMessagesFromSnapshot,
11933
11955
  recordLocalMessages,
11956
+ removeOptimisticPrompt,
11957
+ retargetOptimisticPromptTurn,
11934
11958
  sessionViewRef,
11935
11959
  setTransientConversation,
11936
11960
  patchConversation,
@@ -11953,17 +11977,18 @@ function useAgentGUINodeController({
11953
11977
  ...displayPrompt && displayPrompt.trim() ? { displayPrompt } : {},
11954
11978
  createdAtUnixMs: Date.now()
11955
11979
  };
11956
- setQueuedPromptsBySessionId((current) => ({
11957
- ...current,
11958
- [agentSessionId]: [...current[agentSessionId] ?? [], queuedPrompt]
11959
- }));
11980
+ agentQueuedPromptRuntime.enqueue({
11981
+ workspaceId,
11982
+ agentSessionId,
11983
+ prompt: queuedPrompt
11984
+ });
11960
11985
  setDraftBySessionId((current) => ({
11961
11986
  ...current,
11962
11987
  [agentSessionId]: emptyAgentComposerDraft()
11963
11988
  }));
11964
11989
  setDetailError(null);
11965
11990
  },
11966
- []
11991
+ [agentQueuedPromptRuntime, workspaceId]
11967
11992
  );
11968
11993
  const shouldQueuePromptLocally = useCallback4(
11969
11994
  (agentSessionId) => {
@@ -11977,11 +12002,20 @@ function useAgentGUINodeController({
11977
12002
  if (pendingTurnIdBySessionIdRef.current[normalizedAgentSessionId]) {
11978
12003
  return true;
11979
12004
  }
12005
+ const sessionState = getAgentSessionView(sessionViewRef(normalizedAgentSessionId))?.controlState ?? null;
12006
+ if (sessionState?.pendingInteractive) {
12007
+ return true;
12008
+ }
11980
12009
  return agentActivityDisplayStatusBusy(
11981
12010
  agentActivityDisplayStatuses.get(normalizedAgentSessionId)
11982
12011
  );
11983
12012
  },
11984
- [agentActivityDisplayStatuses, isRespondingApproval, isSubmitting]
12013
+ [
12014
+ agentActivityDisplayStatuses,
12015
+ isRespondingApproval,
12016
+ isSubmitting,
12017
+ sessionViewRef
12018
+ ]
11985
12019
  );
11986
12020
  const submitExistingPrompt = useCallback4(
11987
12021
  (agentSessionId, normalizedContent, displayPromptText, options) => {
@@ -12028,6 +12062,9 @@ function useAgentGUINodeController({
12028
12062
  );
12029
12063
  const submitPrompt = useCallback4(
12030
12064
  (content, displayPrompt) => {
12065
+ if (previewMode) {
12066
+ return;
12067
+ }
12031
12068
  const agentSessionId = activeConversationIdRef.current;
12032
12069
  const normalizedContent = normalizeAgentPromptContentBlocks(content);
12033
12070
  if (normalizedContent.length === 0) {
@@ -12088,6 +12125,7 @@ function useAgentGUINodeController({
12088
12125
  [
12089
12126
  agentActivityRuntime,
12090
12127
  conversationListQuery,
12128
+ previewMode,
12091
12129
  resolvedPromptImagesSupported,
12092
12130
  persistActiveConversation,
12093
12131
  startConversation,
@@ -12673,41 +12711,50 @@ function useAgentGUINodeController({
12673
12711
  if (!activeConversationId) {
12674
12712
  return;
12675
12713
  }
12676
- const queuedPrompt = (queuedPromptsBySessionId[activeConversationId] ?? [])[0] ?? null;
12677
- const failedQueuedPromptId = failedQueuedPromptIdBySessionId[activeConversationId] ?? null;
12678
- const queuedPromptRetryBlock = queuedPromptRetryBlockBySessionId[activeConversationId] ?? null;
12714
+ const queuedPrompt = activeQueuedPrompts[0] ?? null;
12679
12715
  const activeSessionState2 = getAgentSessionView(sessionViewRef(activeConversationId))?.controlState ?? null;
12680
12716
  const activeConversationSummary = resolveConversationSummaryById(
12681
12717
  conversations,
12682
12718
  activeConversationId,
12683
12719
  transientConversationRef.current
12684
12720
  );
12685
- const blockedByStaleActiveTurnConflict = queuedPrompt !== null && queuedPromptRetryBlock?.queuedPromptId === queuedPrompt.id && queuedPromptRetryBlock.sessionStateUpdatedAtUnixMs === (activeSessionState2?.updatedAtUnixMs ?? null) && queuedPromptRetryBlock.conversationUpdatedAtUnixMs === (activeConversationSummary?.updatedAtUnixMs ?? null);
12686
- const canDrainQueuedPrompt = queuedPrompt !== null && queuedPrompt.id !== failedQueuedPromptId && !blockedByStaleActiveTurnConflict && drainingQueuedPromptSessionId === null && !isSubmitting && !isRespondingApproval && !agentActivityDisplayStatusBusy(
12721
+ const blockedByStaleActiveTurnConflict = queuedPrompt !== null && activeQueuedPromptRetryBlock?.queuedPromptId === queuedPrompt.id && activeQueuedPromptRetryBlock.sessionStateUpdatedAtUnixMs === (activeSessionState2?.updatedAtUnixMs ?? null) && activeQueuedPromptRetryBlock.conversationUpdatedAtUnixMs === (activeConversationSummary?.updatedAtUnixMs ?? null);
12722
+ const canDrainQueuedPrompt = queuedPrompt !== null && queuedPrompt.id !== activeFailedQueuedPromptId && !blockedByStaleActiveTurnConflict && activeQueuedPromptClaim === null && !isSubmitting && !isRespondingApproval && !activeSessionState2?.pendingInteractive && !agentActivityDisplayStatusBusy(
12687
12723
  agentActivityDisplayStatuses.get(activeConversationId)
12688
12724
  );
12689
12725
  if (!canDrainQueuedPrompt) {
12690
12726
  return;
12691
12727
  }
12692
- setDrainingQueuedPromptSessionId(activeConversationId);
12728
+ const claimResult = agentQueuedPromptRuntime.claimNextToDrain({
12729
+ workspaceId,
12730
+ agentSessionId: activeConversationId,
12731
+ ownerId: queuedPromptOwnerId
12732
+ });
12733
+ if (!claimResult) {
12734
+ return;
12735
+ }
12693
12736
  executePrompt(
12694
12737
  activeConversationId,
12695
- queuedPrompt.content,
12696
- queuedPrompt.id,
12697
- queuedPrompt.displayPrompt
12738
+ claimResult.prompt.content,
12739
+ claimResult.prompt.id,
12740
+ claimResult.prompt.displayPrompt,
12741
+ claimResult.claim
12698
12742
  );
12699
12743
  }, [
12700
12744
  activeConversationId,
12745
+ activeFailedQueuedPromptId,
12746
+ activeQueuedPromptClaim,
12747
+ activeQueuedPromptRetryBlock,
12748
+ activeQueuedPrompts,
12749
+ agentQueuedPromptRuntime,
12701
12750
  agentActivityDisplayStatuses,
12702
12751
  conversations,
12703
- drainingQueuedPromptSessionId,
12704
12752
  executePrompt,
12705
12753
  isRespondingApproval,
12706
12754
  isSubmitting,
12707
- failedQueuedPromptIdBySessionId,
12708
12755
  previewMode,
12709
- queuedPromptRetryBlockBySessionId,
12710
- queuedPromptsBySessionId
12756
+ queuedPromptOwnerId,
12757
+ workspaceId
12711
12758
  ]);
12712
12759
  useEffect4(() => {
12713
12760
  if (previewMode) {
@@ -12716,9 +12763,7 @@ function useAgentGUINodeController({
12716
12763
  if (!activeConversationId) {
12717
12764
  return;
12718
12765
  }
12719
- const sendNextQueuedPromptId = sendNextQueuedPromptIdBySessionId[activeConversationId] ?? null;
12720
- const queuedPrompts2 = queuedPromptsBySessionId[activeConversationId] ?? [];
12721
- if (!sendNextQueuedPromptId || queuedPrompts2[0]?.id !== sendNextQueuedPromptId) {
12766
+ if (!activeSendNextQueuedPromptId || activeQueuedPrompts[0]?.id !== activeSendNextQueuedPromptId) {
12722
12767
  return;
12723
12768
  }
12724
12769
  const activeSessionState2 = getAgentSessionView(sessionViewRef(activeConversationId))?.controlState ?? null;
@@ -12728,7 +12773,7 @@ function useAgentGUINodeController({
12728
12773
  transientConversationRef.current
12729
12774
  );
12730
12775
  const activeActivityDisplayStatus2 = agentActivityDisplayStatuses.get(activeConversationId) ?? null;
12731
- const shouldInterrupt = drainingQueuedPromptSessionId === null && !isSubmitting && activeActivityDisplayStatus2 === "working";
12776
+ const shouldInterrupt = activeQueuedPromptClaim === null && !isSubmitting && activeActivityDisplayStatus2 === "working";
12732
12777
  if (!shouldInterrupt || interruptingSessionIds[activeConversationId]) {
12733
12778
  return;
12734
12779
  }
@@ -12791,9 +12836,11 @@ function useAgentGUINodeController({
12791
12836
  });
12792
12837
  }, [
12793
12838
  activeConversationId,
12839
+ activeQueuedPromptClaim,
12840
+ activeQueuedPrompts,
12841
+ activeSendNextQueuedPromptId,
12794
12842
  agentActivityDisplayStatuses,
12795
12843
  conversations,
12796
- drainingQueuedPromptSessionId,
12797
12844
  interruptingSessionIds,
12798
12845
  isCurrentConversation,
12799
12846
  isSubmitting,
@@ -12801,11 +12848,9 @@ function useAgentGUINodeController({
12801
12848
  loadSessionState,
12802
12849
  refreshMessagesFromSnapshot,
12803
12850
  previewMode,
12804
- queuedPromptsBySessionId,
12805
12851
  runtimeSessionsBySessionId,
12806
12852
  workspaceId,
12807
12853
  sessionViewRef,
12808
- sendNextQueuedPromptIdBySessionId,
12809
12854
  agentActivityRuntime
12810
12855
  ]);
12811
12856
  const requestDeleteConversation = useCallback4(
@@ -12831,64 +12876,39 @@ function useAgentGUINodeController({
12831
12876
  }
12832
12877
  setPendingDeleteConversation(null);
12833
12878
  }, [isDeletingConversation]);
12834
- const removeQueuedPrompt = useCallback4((queuedPromptId) => {
12835
- const agentSessionId = activeConversationIdRef.current;
12836
- const normalizedQueuedPromptId = queuedPromptId.trim();
12837
- if (!agentSessionId || !normalizedQueuedPromptId) {
12838
- return;
12839
- }
12840
- setQueuedPromptsBySessionId((current) => {
12841
- const queue = current[agentSessionId] ?? [];
12842
- const queuedPrompt = queue.find((item) => item.id === normalizedQueuedPromptId) ?? null;
12843
- if (!queuedPrompt) {
12844
- return current;
12845
- }
12846
- return {
12847
- ...current,
12848
- [agentSessionId]: removeQueuedPromptById(
12849
- queue,
12850
- normalizedQueuedPromptId
12851
- )
12852
- };
12853
- });
12854
- setSendNextQueuedPromptIdBySessionId((current) => {
12855
- if (current[agentSessionId] !== normalizedQueuedPromptId) {
12856
- return current;
12857
- }
12858
- return { ...current, [agentSessionId]: null };
12859
- });
12860
- setFailedQueuedPromptIdBySessionId((current) => {
12861
- if (current[agentSessionId] !== normalizedQueuedPromptId) {
12862
- return current;
12879
+ const removeQueuedPrompt = useCallback4(
12880
+ (queuedPromptId) => {
12881
+ if (previewMode) {
12882
+ return;
12863
12883
  }
12864
- return { ...current, [agentSessionId]: null };
12865
- });
12866
- setQueuedPromptRetryBlockBySessionId((current) => {
12867
- if (current[agentSessionId]?.queuedPromptId !== normalizedQueuedPromptId) {
12868
- return current;
12884
+ const agentSessionId = activeConversationIdRef.current;
12885
+ const normalizedQueuedPromptId = queuedPromptId.trim();
12886
+ if (!agentSessionId || !normalizedQueuedPromptId) {
12887
+ return;
12869
12888
  }
12870
- return { ...current, [agentSessionId]: null };
12871
- });
12872
- }, []);
12889
+ agentQueuedPromptRuntime.removePrompt({
12890
+ workspaceId,
12891
+ agentSessionId,
12892
+ promptId: normalizedQueuedPromptId
12893
+ });
12894
+ },
12895
+ [agentQueuedPromptRuntime, previewMode, workspaceId]
12896
+ );
12873
12897
  const editQueuedPrompt = useCallback4(
12874
12898
  (queuedPromptId) => {
12875
12899
  const agentSessionId = activeConversationIdRef.current;
12876
12900
  const normalizedQueuedPromptId = queuedPromptId.trim();
12877
- if (!agentSessionId || !normalizedQueuedPromptId) {
12901
+ if (previewMode || !agentSessionId || !normalizedQueuedPromptId) {
12878
12902
  return;
12879
12903
  }
12880
- const queue = queuedPromptsBySessionId[agentSessionId] ?? [];
12881
- const queuedPrompt = queue.find((item) => item.id === normalizedQueuedPromptId) ?? null;
12904
+ const queuedPrompt = agentQueuedPromptRuntime.removePrompt({
12905
+ workspaceId,
12906
+ agentSessionId,
12907
+ promptId: normalizedQueuedPromptId
12908
+ });
12882
12909
  if (!queuedPrompt) {
12883
12910
  return;
12884
12911
  }
12885
- setQueuedPromptsBySessionId((current) => ({
12886
- ...current,
12887
- [agentSessionId]: removeQueuedPromptById(
12888
- current[agentSessionId] ?? [],
12889
- normalizedQueuedPromptId
12890
- )
12891
- }));
12892
12912
  setDraftBySessionId((current) => ({
12893
12913
  ...current,
12894
12914
  [agentSessionId]: agentPromptContentToComposerDraft(
@@ -12896,67 +12916,23 @@ function useAgentGUINodeController({
12896
12916
  `restore-${queuedPrompt.id}`
12897
12917
  )
12898
12918
  }));
12899
- setSendNextQueuedPromptIdBySessionId((current) => {
12900
- if (current[agentSessionId] !== normalizedQueuedPromptId) {
12901
- return current;
12902
- }
12903
- return { ...current, [agentSessionId]: null };
12904
- });
12905
- setFailedQueuedPromptIdBySessionId((current) => {
12906
- if (current[agentSessionId] !== normalizedQueuedPromptId) {
12907
- return current;
12908
- }
12909
- return { ...current, [agentSessionId]: null };
12910
- });
12911
- setQueuedPromptRetryBlockBySessionId((current) => {
12912
- if (current[agentSessionId]?.queuedPromptId !== normalizedQueuedPromptId) {
12913
- return current;
12914
- }
12915
- return { ...current, [agentSessionId]: null };
12916
- });
12917
12919
  },
12918
- [queuedPromptsBySessionId]
12920
+ [agentQueuedPromptRuntime, previewMode, workspaceId]
12919
12921
  );
12920
12922
  const sendQueuedPromptNext = useCallback4(
12921
12923
  (queuedPromptId) => {
12922
12924
  const agentSessionId = activeConversationIdRef.current;
12923
12925
  const normalizedQueuedPromptId = queuedPromptId.trim();
12924
- if (!agentSessionId || !normalizedQueuedPromptId) {
12926
+ if (previewMode || !agentSessionId || !normalizedQueuedPromptId) {
12925
12927
  return;
12926
12928
  }
12927
- const queue = [...queuedPromptsBySessionId[agentSessionId] ?? []];
12928
- const queueIndex = queue.findIndex(
12929
- (item) => item.id === normalizedQueuedPromptId
12930
- );
12931
- if (queueIndex < 0) {
12932
- return;
12933
- }
12934
- if (queueIndex > 0) {
12935
- const [selected] = queue.splice(queueIndex, 1);
12936
- queue.unshift(selected);
12937
- }
12938
- setQueuedPromptsBySessionId((current) => ({
12939
- ...current,
12940
- [agentSessionId]: queue
12941
- }));
12942
- setSendNextQueuedPromptIdBySessionId((current) => ({
12943
- ...current,
12944
- [agentSessionId]: normalizedQueuedPromptId
12945
- }));
12946
- setFailedQueuedPromptIdBySessionId((current) => {
12947
- if (current[agentSessionId] !== normalizedQueuedPromptId) {
12948
- return current;
12949
- }
12950
- return { ...current, [agentSessionId]: null };
12951
- });
12952
- setQueuedPromptRetryBlockBySessionId((current) => {
12953
- if (current[agentSessionId]?.queuedPromptId !== normalizedQueuedPromptId) {
12954
- return current;
12955
- }
12956
- return { ...current, [agentSessionId]: null };
12929
+ agentQueuedPromptRuntime.promotePrompt({
12930
+ workspaceId,
12931
+ agentSessionId,
12932
+ promptId: normalizedQueuedPromptId
12957
12933
  });
12958
12934
  },
12959
- [queuedPromptsBySessionId]
12935
+ [agentQueuedPromptRuntime, previewMode, workspaceId]
12960
12936
  );
12961
12937
  const removeProject = useCallback4(
12962
12938
  (path) => {
@@ -13060,37 +13036,9 @@ function useAgentGUINodeController({
13060
13036
  delete next[target.id];
13061
13037
  return next;
13062
13038
  });
13063
- setQueuedPromptsBySessionId((current) => {
13064
- if (!current[target.id]) {
13065
- return current;
13066
- }
13067
- const next = { ...current };
13068
- delete next[target.id];
13069
- return next;
13070
- });
13071
- setSendNextQueuedPromptIdBySessionId((current) => {
13072
- if (!(target.id in current)) {
13073
- return current;
13074
- }
13075
- const next = { ...current };
13076
- delete next[target.id];
13077
- return next;
13078
- });
13079
- setFailedQueuedPromptIdBySessionId((current) => {
13080
- if (!(target.id in current)) {
13081
- return current;
13082
- }
13083
- const next = { ...current };
13084
- delete next[target.id];
13085
- return next;
13086
- });
13087
- setQueuedPromptRetryBlockBySessionId((current) => {
13088
- if (!(target.id in current)) {
13089
- return current;
13090
- }
13091
- const next = { ...current };
13092
- delete next[target.id];
13093
- return next;
13039
+ agentQueuedPromptRuntime.cleanupSession({
13040
+ workspaceId,
13041
+ agentSessionId: target.id
13094
13042
  });
13095
13043
  deleteAgentSessionView(sessionViewRef(target.id));
13096
13044
  const currentConversations = conversationsRef.current;
@@ -13146,6 +13094,7 @@ function useAgentGUINodeController({
13146
13094
  workspaceId,
13147
13095
  sessionViewRef,
13148
13096
  agentActivityRuntime,
13097
+ agentQueuedPromptRuntime,
13149
13098
  removeConversations
13150
13099
  ]);
13151
13100
  const finalizeConversationBatchDeletion = useCallback4(
@@ -13172,18 +13121,12 @@ function useAgentGUINodeController({
13172
13121
  setDraftBySessionId(
13173
13122
  (current) => omitConversationLocalState(current, targetIds)
13174
13123
  );
13175
- setQueuedPromptsBySessionId(
13176
- (current) => omitConversationLocalState(current, targetIds)
13177
- );
13178
- setSendNextQueuedPromptIdBySessionId(
13179
- (current) => omitConversationLocalState(current, targetIds)
13180
- );
13181
- setFailedQueuedPromptIdBySessionId(
13182
- (current) => omitConversationLocalState(current, targetIds)
13183
- );
13184
- setQueuedPromptRetryBlockBySessionId(
13185
- (current) => omitConversationLocalState(current, targetIds)
13186
- );
13124
+ for (const id of targetIds) {
13125
+ agentQueuedPromptRuntime.cleanupSession({
13126
+ workspaceId,
13127
+ agentSessionId: id
13128
+ });
13129
+ }
13187
13130
  const nextConversations = conversationsRef.current.filter(
13188
13131
  (conversation2) => !targetIds.has(conversation2.id)
13189
13132
  );
@@ -13209,8 +13152,10 @@ function useAgentGUINodeController({
13209
13152
  clearSelectedConversationNotFoundRetry,
13210
13153
  markSelectedConversationDetailPending,
13211
13154
  persistActiveConversation,
13155
+ agentQueuedPromptRuntime,
13212
13156
  sessionViewRef,
13213
13157
  setTransientConversation,
13158
+ workspaceId,
13214
13159
  removeConversations
13215
13160
  ]
13216
13161
  );
@@ -13742,11 +13687,8 @@ function useAgentGUINodeController({
13742
13687
  const serverInteractivePrompt = hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingInteractivePrompt;
13743
13688
  const isInterrupting = activeConversationId !== null && Boolean(interruptingSessionIds[activeConversationId]);
13744
13689
  const isCancelPending = activeConversationId !== null && Boolean(pendingInterruptSessionIds[activeConversationId]);
13745
- const queuedPrompts = useMemo4(
13746
- () => activeConversationId !== null ? queuedPromptsBySessionId[activeConversationId] ?? [] : [],
13747
- [activeConversationId, queuedPromptsBySessionId]
13748
- );
13749
- const drainingQueuedPromptId = drainingQueuedPromptSessionId === activeConversationId ? queuedPrompts[0]?.id ?? null : null;
13690
+ const queuedPrompts = activeConversationId ? [...activeQueuedPrompts] : [];
13691
+ const drainingQueuedPromptId = activeQueuedPromptClaim?.promptId ?? null;
13750
13692
  const sessionSettings = useStableComposerSettings(
13751
13693
  cloneComposerSettings(activeSessionState?.settings ?? null)
13752
13694
  );
@@ -13853,7 +13795,7 @@ function useAgentGUINodeController({
13853
13795
  pendingApproval
13854
13796
  ]);
13855
13797
  const canSubmit = activeLiveState !== "activating" && activeLiveState !== "failed" && !activeConversationResumeUnavailable && (activeConversationId !== null || selectedProviderTarget.disabled !== true) && (data.provider !== "openclaw" || openclawGateway?.status === "ready") && pendingApproval === null && pendingInteractivePrompt === null && sessionChrome.auth === null && !isCreatingConversation && !isSubmitting && !isInterrupting;
13856
- const canQueueWhileBusy = Boolean(activeConversationId) && (activeConversationBusy || isSubmitting);
13798
+ const canQueueWhileBusy = Boolean(activeConversationId) && (activeConversationBusy || isSubmitting || Boolean(activeSessionState?.pendingInteractive));
13857
13799
  useEffect4(() => {
13858
13800
  const firstVersion = minFiniteMessageVersion(activeMessages);
13859
13801
  const lastVersion = maxFiniteMessageVersion(activeMessages);
@@ -14468,7 +14410,7 @@ var USAGE_WARN_PERCENT = 80;
14468
14410
  var USAGE_CRITICAL_PERCENT = 95;
14469
14411
 
14470
14412
  // agent-gui/agentGuiNode/AgentUsageMeter.tsx
14471
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
14413
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
14472
14414
  function agentUsageBarColor(percentUsed) {
14473
14415
  if (percentUsed >= USAGE_CRITICAL_PERCENT) {
14474
14416
  return "var(--state-danger)";
@@ -14488,15 +14430,15 @@ function AgentUsageMeter({
14488
14430
  const clampedPercent = typeof percent === "number" && Number.isFinite(percent) ? Math.max(0, Math.min(100, percent)) : null;
14489
14431
  return /* @__PURE__ */ jsxs4("div", { className: "grid min-w-0 gap-1", "data-testid": testId, children: [
14490
14432
  /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 items-center justify-between gap-3", children: [
14491
- /* @__PURE__ */ jsx11("span", { className: "min-w-0 truncate text-[var(--text-secondary)]", children: label }),
14492
- /* @__PURE__ */ jsx11("span", { className: "shrink-0 whitespace-nowrap text-[var(--text-secondary)]", children: value })
14433
+ /* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate text-[var(--text-secondary)]", children: label }),
14434
+ /* @__PURE__ */ jsx12("span", { className: "shrink-0 whitespace-nowrap text-[var(--text-secondary)]", children: value })
14493
14435
  ] }),
14494
- clampedPercent !== null ? /* @__PURE__ */ jsx11(
14436
+ clampedPercent !== null ? /* @__PURE__ */ jsx12(
14495
14437
  "span",
14496
14438
  {
14497
14439
  "aria-hidden": "true",
14498
14440
  className: "relative h-1.5 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--text-primary)_10%,transparent)]",
14499
- children: /* @__PURE__ */ jsx11(
14441
+ children: /* @__PURE__ */ jsx12(
14500
14442
  "span",
14501
14443
  {
14502
14444
  className: "absolute inset-y-0 left-0 min-w-0.5 rounded-full",
@@ -14535,10 +14477,10 @@ import {
14535
14477
  } from "@tutti-os/ui-system/icons";
14536
14478
 
14537
14479
  // app/renderer/components/icons/PinFilledIcon.tsx
14538
- import { jsx as jsx12 } from "react/jsx-runtime";
14480
+ import { jsx as jsx13 } from "react/jsx-runtime";
14539
14481
  function PinFilledIcon(props) {
14540
14482
  "use memo";
14541
- return /* @__PURE__ */ jsx12(
14483
+ return /* @__PURE__ */ jsx13(
14542
14484
  "svg",
14543
14485
  {
14544
14486
  xmlns: "http://www.w3.org/2000/svg",
@@ -14546,16 +14488,16 @@ function PinFilledIcon(props) {
14546
14488
  fill: "currentColor",
14547
14489
  "aria-hidden": true,
14548
14490
  ...props,
14549
- children: /* @__PURE__ */ jsx12("path", { d: "M21.6066 8.05025C22.1692 8.61286 22.4849 9.37592 22.4849 10.1716C22.4849 10.9672 22.1692 11.7303 21.6066 12.2929C21.044 12.8555 20.2809 13.1713 19.4853 13.1713C18.6896 13.1713 17.9266 12.8555 17.3639 12.2929L14.7054 14.9514L14.6142 15.0564C14.531 15.1669 14.4714 15.2943 14.4395 15.43C14.3972 15.6109 14.406 15.8 14.4651 15.9762L14.4678 15.9831L15.0873 17.8717L15.1466 18.072C15.2691 18.5425 15.2761 19.037 15.1646 19.5124C15.0372 20.0557 14.7607 20.5526 14.3663 20.9474L13.8284 21.4853C13.4533 21.8604 12.9446 22.0709 12.4142 22.0709C11.8838 22.0709 11.3751 21.8604 11 21.4853L7.46445 17.9497L4.63603 20.7782C4.2455 21.1687 3.61234 21.1687 3.22181 20.7782C2.83129 20.3877 2.83129 19.7545 3.22181 19.364L6.05024 16.5355L2.51471 13C2.13963 12.6249 1.92913 12.1162 1.92913 11.5858C1.92913 11.0554 2.13963 10.5466 2.51471 10.1716L3.05263 9.63365L3.20524 9.49209C3.57235 9.17309 4.01205 8.94693 4.48756 8.83539C5.03093 8.70798 5.59924 8.73494 6.12827 8.91273L8.01688 9.53214L8.02379 9.5349C8.19995 9.59404 8.38907 9.60282 8.57 9.56045C8.7057 9.52863 8.83304 9.46898 8.94358 9.38575L9.04854 9.2946L11.7071 6.63604C11.1445 6.07343 10.8287 5.31037 10.8287 4.51472C10.8287 3.71907 11.1445 2.95601 11.7071 2.3934C12.2697 1.83079 13.0328 1.51504 13.8284 1.51504C14.6241 1.51504 15.3871 1.83079 15.9497 2.3934L21.6066 8.05025Z" })
14491
+ children: /* @__PURE__ */ jsx13("path", { d: "M21.6066 8.05025C22.1692 8.61286 22.4849 9.37592 22.4849 10.1716C22.4849 10.9672 22.1692 11.7303 21.6066 12.2929C21.044 12.8555 20.2809 13.1713 19.4853 13.1713C18.6896 13.1713 17.9266 12.8555 17.3639 12.2929L14.7054 14.9514L14.6142 15.0564C14.531 15.1669 14.4714 15.2943 14.4395 15.43C14.3972 15.6109 14.406 15.8 14.4651 15.9762L14.4678 15.9831L15.0873 17.8717L15.1466 18.072C15.2691 18.5425 15.2761 19.037 15.1646 19.5124C15.0372 20.0557 14.7607 20.5526 14.3663 20.9474L13.8284 21.4853C13.4533 21.8604 12.9446 22.0709 12.4142 22.0709C11.8838 22.0709 11.3751 21.8604 11 21.4853L7.46445 17.9497L4.63603 20.7782C4.2455 21.1687 3.61234 21.1687 3.22181 20.7782C2.83129 20.3877 2.83129 19.7545 3.22181 19.364L6.05024 16.5355L2.51471 13C2.13963 12.6249 1.92913 12.1162 1.92913 11.5858C1.92913 11.0554 2.13963 10.5466 2.51471 10.1716L3.05263 9.63365L3.20524 9.49209C3.57235 9.17309 4.01205 8.94693 4.48756 8.83539C5.03093 8.70798 5.59924 8.73494 6.12827 8.91273L8.01688 9.53214L8.02379 9.5349C8.19995 9.59404 8.38907 9.60282 8.57 9.56045C8.7057 9.52863 8.83304 9.46898 8.94358 9.38575L9.04854 9.2946L11.7071 6.63604C11.1445 6.07343 10.8287 5.31037 10.8287 4.51472C10.8287 3.71907 11.1445 2.95601 11.7071 2.3934C12.2697 1.83079 13.0328 1.51504 13.8284 1.51504C14.6241 1.51504 15.3871 1.83079 15.9497 2.3934L21.6066 8.05025Z" })
14550
14492
  }
14551
14493
  );
14552
14494
  }
14553
14495
 
14554
14496
  // app/renderer/components/icons/PinLinedIcon.tsx
14555
- import { jsx as jsx13 } from "react/jsx-runtime";
14497
+ import { jsx as jsx14 } from "react/jsx-runtime";
14556
14498
  function PinLinedIcon(props) {
14557
14499
  "use memo";
14558
- return /* @__PURE__ */ jsx13(
14500
+ return /* @__PURE__ */ jsx14(
14559
14501
  "svg",
14560
14502
  {
14561
14503
  xmlns: "http://www.w3.org/2000/svg",
@@ -14563,16 +14505,16 @@ function PinLinedIcon(props) {
14563
14505
  fill: "currentColor",
14564
14506
  "aria-hidden": true,
14565
14507
  ...props,
14566
- children: /* @__PURE__ */ jsx13("path", { d: "M21.6066 8.05025C22.1692 8.61286 22.4849 9.37592 22.4849 10.1716C22.4849 10.9672 22.1692 11.7303 21.6066 12.2929C21.044 12.8555 20.2809 13.1713 19.4853 13.1713C18.6896 13.1713 17.9266 12.8555 17.3639 12.2929L14.7054 14.9514L14.6142 15.0564C14.531 15.1669 14.4714 15.2943 14.4395 15.43C14.3972 15.6109 14.406 15.8 14.4651 15.9762L14.4678 15.9831L15.0873 17.8717L15.1466 18.072C15.2691 18.5425 15.2761 19.037 15.1646 19.5124C15.0372 20.0557 14.7607 20.5526 14.3663 20.9474L13.8284 21.4853C13.4533 21.8604 12.9446 22.0709 12.4142 22.0709C11.8838 22.0709 11.3751 21.8604 11 21.4853L7.46445 17.9497L4.63603 20.7782C4.2455 21.1687 3.61234 21.1687 3.22181 20.7782C2.83129 20.3877 2.83129 19.7545 3.22181 19.364L6.05024 16.5355L2.51471 13C2.13963 12.6249 1.92913 12.1162 1.92913 11.5858C1.92913 11.0554 2.13963 10.5466 2.51471 10.1716L3.05263 9.63365L3.20524 9.49209C3.57235 9.17309 4.01205 8.94693 4.48756 8.83539C5.03093 8.70798 5.59924 8.73494 6.12827 8.91273L8.01688 9.53214L8.02379 9.5349C8.19995 9.59404 8.38907 9.60282 8.57 9.56045C8.7057 9.52863 8.83304 9.46898 8.94358 9.38575L9.04854 9.2946L11.7071 6.63604C11.1445 6.07343 10.8287 5.31037 10.8287 4.51472C10.8287 3.71907 11.1445 2.95601 11.7071 2.3934C12.2697 1.83079 13.0328 1.51504 13.8284 1.51504C14.6241 1.51504 15.3871 1.83079 15.9497 2.3934L21.6066 8.05025ZM14.5355 3.80761C14.348 3.62008 14.0936 3.51483 13.8284 3.51483C13.5632 3.51483 13.3088 3.62008 13.1213 3.80761C12.9338 3.99515 12.8285 4.2495 12.8285 4.51472C12.8285 4.74685 12.9091 4.97066 13.055 5.14863L13.2539 5.36822C13.5457 5.72416 13.7069 6.17177 13.7069 6.63604C13.7069 7.16647 13.4964 7.67518 13.1213 8.05025L10.4621 10.7095C10.0673 11.1038 9.57037 11.3803 9.02713 11.5078C8.48575 11.6347 7.92002 11.6071 7.39264 11.4311V11.4325L5.49781 10.811L5.49091 10.8082C5.31475 10.7491 5.12562 10.7403 4.94469 10.7827C4.76366 10.8251 4.59774 10.9172 4.46615 11.0486L3.92892 11.5858L12.4142 20.0711L12.9514 19.5338C13.0828 19.4022 13.1748 19.2363 13.2173 19.0553C13.2597 18.8744 13.2509 18.6852 13.1917 18.5091L13.189 18.5022L12.5675 16.6073L12.5682 16.6067C12.3924 16.0795 12.3654 15.514 12.4922 14.9729C12.6197 14.4296 12.8962 13.9327 13.2905 13.5379L15.9497 10.8787C16.3248 10.5036 16.8335 10.2931 17.3639 10.2931C17.8282 10.2931 18.2758 10.4543 18.6318 10.7461L18.8514 10.945C19.0293 11.0909 19.2531 11.1715 19.4853 11.1715C19.7505 11.1715 20.0048 11.0662 20.1924 10.8787C20.3799 10.6911 20.4852 10.4368 20.4852 10.1716C20.4852 9.90636 20.3799 9.652 20.1924 9.46447L14.5355 3.80761Z" })
14508
+ children: /* @__PURE__ */ jsx14("path", { d: "M21.6066 8.05025C22.1692 8.61286 22.4849 9.37592 22.4849 10.1716C22.4849 10.9672 22.1692 11.7303 21.6066 12.2929C21.044 12.8555 20.2809 13.1713 19.4853 13.1713C18.6896 13.1713 17.9266 12.8555 17.3639 12.2929L14.7054 14.9514L14.6142 15.0564C14.531 15.1669 14.4714 15.2943 14.4395 15.43C14.3972 15.6109 14.406 15.8 14.4651 15.9762L14.4678 15.9831L15.0873 17.8717L15.1466 18.072C15.2691 18.5425 15.2761 19.037 15.1646 19.5124C15.0372 20.0557 14.7607 20.5526 14.3663 20.9474L13.8284 21.4853C13.4533 21.8604 12.9446 22.0709 12.4142 22.0709C11.8838 22.0709 11.3751 21.8604 11 21.4853L7.46445 17.9497L4.63603 20.7782C4.2455 21.1687 3.61234 21.1687 3.22181 20.7782C2.83129 20.3877 2.83129 19.7545 3.22181 19.364L6.05024 16.5355L2.51471 13C2.13963 12.6249 1.92913 12.1162 1.92913 11.5858C1.92913 11.0554 2.13963 10.5466 2.51471 10.1716L3.05263 9.63365L3.20524 9.49209C3.57235 9.17309 4.01205 8.94693 4.48756 8.83539C5.03093 8.70798 5.59924 8.73494 6.12827 8.91273L8.01688 9.53214L8.02379 9.5349C8.19995 9.59404 8.38907 9.60282 8.57 9.56045C8.7057 9.52863 8.83304 9.46898 8.94358 9.38575L9.04854 9.2946L11.7071 6.63604C11.1445 6.07343 10.8287 5.31037 10.8287 4.51472C10.8287 3.71907 11.1445 2.95601 11.7071 2.3934C12.2697 1.83079 13.0328 1.51504 13.8284 1.51504C14.6241 1.51504 15.3871 1.83079 15.9497 2.3934L21.6066 8.05025ZM14.5355 3.80761C14.348 3.62008 14.0936 3.51483 13.8284 3.51483C13.5632 3.51483 13.3088 3.62008 13.1213 3.80761C12.9338 3.99515 12.8285 4.2495 12.8285 4.51472C12.8285 4.74685 12.9091 4.97066 13.055 5.14863L13.2539 5.36822C13.5457 5.72416 13.7069 6.17177 13.7069 6.63604C13.7069 7.16647 13.4964 7.67518 13.1213 8.05025L10.4621 10.7095C10.0673 11.1038 9.57037 11.3803 9.02713 11.5078C8.48575 11.6347 7.92002 11.6071 7.39264 11.4311V11.4325L5.49781 10.811L5.49091 10.8082C5.31475 10.7491 5.12562 10.7403 4.94469 10.7827C4.76366 10.8251 4.59774 10.9172 4.46615 11.0486L3.92892 11.5858L12.4142 20.0711L12.9514 19.5338C13.0828 19.4022 13.1748 19.2363 13.2173 19.0553C13.2597 18.8744 13.2509 18.6852 13.1917 18.5091L13.189 18.5022L12.5675 16.6073L12.5682 16.6067C12.3924 16.0795 12.3654 15.514 12.4922 14.9729C12.6197 14.4296 12.8962 13.9327 13.2905 13.5379L15.9497 10.8787C16.3248 10.5036 16.8335 10.2931 17.3639 10.2931C17.8282 10.2931 18.2758 10.4543 18.6318 10.7461L18.8514 10.945C19.0293 11.0909 19.2531 11.1715 19.4853 11.1715C19.7505 11.1715 20.0048 11.0662 20.1924 10.8787C20.3799 10.6911 20.4852 10.4368 20.4852 10.1716C20.4852 9.90636 20.3799 9.652 20.1924 9.46447L14.5355 3.80761Z" })
14567
14509
  }
14568
14510
  );
14569
14511
  }
14570
14512
 
14571
14513
  // app/renderer/components/icons/UnavailableChatIcon.tsx
14572
- import { jsx as jsx14 } from "react/jsx-runtime";
14514
+ import { jsx as jsx15 } from "react/jsx-runtime";
14573
14515
  function UnavailableChatIcon(props) {
14574
14516
  "use memo";
14575
- return /* @__PURE__ */ jsx14(
14517
+ return /* @__PURE__ */ jsx15(
14576
14518
  "svg",
14577
14519
  {
14578
14520
  xmlns: "http://www.w3.org/2000/svg",
@@ -14580,16 +14522,16 @@ function UnavailableChatIcon(props) {
14580
14522
  fill: "currentColor",
14581
14523
  "aria-hidden": true,
14582
14524
  ...props,
14583
- children: /* @__PURE__ */ jsx14("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" })
14525
+ children: /* @__PURE__ */ jsx15("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" })
14584
14526
  }
14585
14527
  );
14586
14528
  }
14587
14529
 
14588
14530
  // app/renderer/components/icons/EnvironmentLinedIcon.tsx
14589
- import { jsx as jsx15 } from "react/jsx-runtime";
14531
+ import { jsx as jsx16 } from "react/jsx-runtime";
14590
14532
  function EnvironmentLinedIcon(props) {
14591
14533
  "use memo";
14592
- return /* @__PURE__ */ jsx15(
14534
+ return /* @__PURE__ */ jsx16(
14593
14535
  "svg",
14594
14536
  {
14595
14537
  width: "24",
@@ -14598,7 +14540,7 @@ function EnvironmentLinedIcon(props) {
14598
14540
  fill: "none",
14599
14541
  xmlns: "http://www.w3.org/2000/svg",
14600
14542
  ...props,
14601
- children: /* @__PURE__ */ jsx15(
14543
+ children: /* @__PURE__ */ jsx16(
14602
14544
  "path",
14603
14545
  {
14604
14546
  d: "M2.0094 19.0001C2.56169 19.0001 3.0094 19.4478 3.0094 20.0001C3.0094 20.5523 2.56169 21.0001 2.0094 21.0001H1.99964C1.44752 20.9999 0.999635 20.5522 0.999635 20.0001C0.999635 19.4479 1.44752 19.0002 1.99964 19.0001H2.0094ZM1.01624 15.8174C1.1173 15.2748 1.63961 14.9161 2.18225 15.0166C3.37336 15.2385 4.47004 15.8162 5.32679 16.6729C6.18355 17.5297 6.76118 18.6263 6.98304 19.8174C7.08384 20.3602 6.72504 20.8824 6.18226 20.9835C5.63962 21.084 5.11731 20.7253 5.01624 20.1827C4.86826 19.3888 4.48377 18.658 3.91272 18.087C3.34169 17.516 2.61086 17.1314 1.81702 16.9834C1.27446 16.8822 0.915501 16.3601 1.01624 15.8174ZM2.1051 11.0059C4.37989 11.2473 6.50315 12.2614 8.12074 13.8789C9.73833 15.4965 10.7524 17.6197 10.9938 19.8946C11.052 20.4438 10.6543 20.9359 10.1051 20.9942C9.55607 21.0523 9.06377 20.6546 9.0055 20.1055C8.81236 18.2857 8.00074 16.5871 6.70667 15.293C5.41262 13.999 3.71397 13.1873 1.89417 12.9942C1.34517 12.9357 0.947265 12.4436 1.00549 11.8946C1.06376 11.3455 1.55606 10.9478 2.1051 11.0059ZM19.9997 3C20.7952 3 21.5582 3.31641 22.1208 3.87891C22.6834 4.44152 22.9997 5.20436 22.9997 6.00001V18.0001C22.9997 18.7957 22.6834 19.5585 22.1208 20.1212C21.5582 20.6837 20.7952 21.0001 19.9997 21.0001H13.9996C13.4475 20.9999 12.9996 20.5522 12.9996 20.0001C12.9996 19.4479 13.4475 19.0002 13.9996 19.0001H19.9997C20.2648 19.0001 20.5192 18.8945 20.7067 18.7071C20.8942 18.5195 20.9997 18.2653 20.9997 18.0001V6.00001C20.9997 5.73479 20.8942 5.48051 20.7067 5.29298C20.5192 5.10555 20.2648 5.00001 19.9997 5.00001H3.99964C3.73455 5.0001 3.48006 5.10552 3.29261 5.29298C3.10518 5.4805 2.99964 5.73488 2.99964 6.00001V8.00002C2.99964 8.5523 2.55192 9.00002 1.99964 9.00002C1.44752 8.99983 0.999635 8.55218 0.999635 8.00002V6.00001C0.999635 5.20444 1.31605 4.4415 1.87854 3.87891C2.44107 3.31638 3.20412 3.0001 3.99964 3H19.9997Z",
@@ -14958,7 +14900,7 @@ var styles = {
14958
14900
  var RoomIssueNode_styles_default = styles;
14959
14901
 
14960
14902
  // agent-gui/RoomIssueNode/TaskSearchField.tsx
14961
- import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
14903
+ import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
14962
14904
  function TaskSearchField({
14963
14905
  ariaLabel,
14964
14906
  className,
@@ -14978,7 +14920,7 @@ function TaskSearchField({
14978
14920
  className: `${RoomIssueNode_styles_default.searchField} ${className ?? ""}`.trim(),
14979
14921
  "data-has-value": searchInput.value ? "true" : "false",
14980
14922
  children: [
14981
- /* @__PURE__ */ jsx16(
14923
+ /* @__PURE__ */ jsx17(
14982
14924
  Input,
14983
14925
  {
14984
14926
  type: "search",
@@ -15001,7 +14943,7 @@ function TaskSearchField({
15001
14943
  "data-testid": dataTestId
15002
14944
  }
15003
14945
  ),
15004
- searchInput.value ? /* @__PURE__ */ jsx16(
14946
+ searchInput.value ? /* @__PURE__ */ jsx17(
15005
14947
  "button",
15006
14948
  {
15007
14949
  type: "button",
@@ -15009,7 +14951,7 @@ function TaskSearchField({
15009
14951
  "aria-label": clearAriaLabel ?? t("common.clear"),
15010
14952
  onMouseDown: (event) => event.preventDefault(),
15011
14953
  onClick: searchInput.clearValue,
15012
- children: /* @__PURE__ */ jsx16(CloseLinedIcon, { "aria-hidden": "true" })
14954
+ children: /* @__PURE__ */ jsx17(CloseLinedIcon, { "aria-hidden": "true" })
15013
14955
  }
15014
14956
  ) : null
15015
14957
  ]
@@ -15048,7 +14990,7 @@ import {
15048
14990
  useAnimation,
15049
14991
  useReducedMotion
15050
14992
  } from "framer-motion";
15051
- import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
14993
+ import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
15052
14994
  var CAST_VARIANTS = {
15053
14995
  normal: { opacity: 1 },
15054
14996
  animate: (custom) => ({
@@ -15116,7 +15058,7 @@ var CastIcon = forwardRef2(
15116
15058
  },
15117
15059
  [onMouseLeave, stopAnimation]
15118
15060
  );
15119
- return /* @__PURE__ */ jsx17(
15061
+ return /* @__PURE__ */ jsx18(
15120
15062
  "div",
15121
15063
  {
15122
15064
  className: cn("inline-flex items-center justify-center", className),
@@ -15136,8 +15078,8 @@ var CastIcon = forwardRef2(
15136
15078
  width: size,
15137
15079
  xmlns: "http://www.w3.org/2000/svg",
15138
15080
  children: [
15139
- /* @__PURE__ */ jsx17("path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }),
15140
- /* @__PURE__ */ jsx17(
15081
+ /* @__PURE__ */ jsx18("path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }),
15082
+ /* @__PURE__ */ jsx18(
15141
15083
  motion.path,
15142
15084
  {
15143
15085
  animate: controls,
@@ -15146,7 +15088,7 @@ var CastIcon = forwardRef2(
15146
15088
  variants: CAST_VARIANTS
15147
15089
  }
15148
15090
  ),
15149
- /* @__PURE__ */ jsx17(
15091
+ /* @__PURE__ */ jsx18(
15150
15092
  motion.path,
15151
15093
  {
15152
15094
  animate: controls,
@@ -15155,7 +15097,7 @@ var CastIcon = forwardRef2(
15155
15097
  variants: CAST_VARIANTS
15156
15098
  }
15157
15099
  ),
15158
- /* @__PURE__ */ jsx17(
15100
+ /* @__PURE__ */ jsx18(
15159
15101
  motion.line,
15160
15102
  {
15161
15103
  animate: controls,
@@ -15205,7 +15147,7 @@ var styles2 = {
15205
15147
  var AgentGUIChrome_styles_default = styles2;
15206
15148
 
15207
15149
  // agent-gui/agentGuiNode/AgentSessionChrome.tsx
15208
- import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
15150
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
15209
15151
  function splitTrailingEllipsis(message) {
15210
15152
  const match = message.match(/^(.*?)(\.{3}|…)\s*$/);
15211
15153
  if (!match) {
@@ -15219,9 +15161,9 @@ function splitTrailingEllipsis(message) {
15219
15161
  function LoadingEllipsis() {
15220
15162
  "use memo";
15221
15163
  return /* @__PURE__ */ jsxs7("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
15222
- /* @__PURE__ */ jsx18("span", {}),
15223
- /* @__PURE__ */ jsx18("span", {}),
15224
- /* @__PURE__ */ jsx18("span", {})
15164
+ /* @__PURE__ */ jsx19("span", {}),
15165
+ /* @__PURE__ */ jsx19("span", {}),
15166
+ /* @__PURE__ */ jsx19("span", {})
15225
15167
  ] });
15226
15168
  }
15227
15169
  function AgentChromeNotice({
@@ -15234,7 +15176,7 @@ function AgentChromeNotice({
15234
15176
  }) {
15235
15177
  "use memo";
15236
15178
  const fullMessage = description ? `${title} ${description}` : title;
15237
- return /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx18(
15179
+ return /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx19(
15238
15180
  "section",
15239
15181
  {
15240
15182
  className: cn(
@@ -15245,16 +15187,16 @@ function AgentChromeNotice({
15245
15187
  "data-expanded": "false",
15246
15188
  role,
15247
15189
  "data-testid": testId,
15248
- children: /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
15249
- icon ? /* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: icon }) : null,
15190
+ children: /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
15191
+ icon ? /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: icon }) : null,
15250
15192
  /* @__PURE__ */ jsxs7(
15251
15193
  "p",
15252
15194
  {
15253
15195
  className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
15254
15196
  title: fullMessage,
15255
15197
  children: [
15256
- /* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: title }),
15257
- description ? /* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description }) : null
15198
+ /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: title }),
15199
+ description ? /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description }) : null
15258
15200
  ]
15259
15201
  }
15260
15202
  )
@@ -15403,7 +15345,7 @@ function AgentSessionChrome({
15403
15345
  event.stopPropagation();
15404
15346
  };
15405
15347
  return /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: [
15406
- visibleAuth ? /* @__PURE__ */ jsx18(
15348
+ visibleAuth ? /* @__PURE__ */ jsx19(
15407
15349
  "section",
15408
15350
  {
15409
15351
  ref: authCardRef,
@@ -15415,7 +15357,7 @@ function AgentSessionChrome({
15415
15357
  onKeyDown: handleExpandableCardKeyDown("auth"),
15416
15358
  children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
15417
15359
  /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
15418
- /* @__PURE__ */ jsx18(
15360
+ /* @__PURE__ */ jsx19(
15419
15361
  "p",
15420
15362
  {
15421
15363
  ref: authMessageRef,
@@ -15424,7 +15366,7 @@ function AgentSessionChrome({
15424
15366
  children: visibleAuth.message
15425
15367
  }
15426
15368
  ),
15427
- /* @__PURE__ */ jsx18(
15369
+ /* @__PURE__ */ jsx19(
15428
15370
  ChevronDown,
15429
15371
  {
15430
15372
  "aria-hidden": "true",
@@ -15437,7 +15379,7 @@ function AgentSessionChrome({
15437
15379
  )
15438
15380
  ] }),
15439
15381
  /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: [
15440
- onAuthLogin ? /* @__PURE__ */ jsx18(
15382
+ onAuthLogin ? /* @__PURE__ */ jsx19(
15441
15383
  Button2,
15442
15384
  {
15443
15385
  type: "button",
@@ -15450,7 +15392,7 @@ function AgentSessionChrome({
15450
15392
  children: labels.authLogin ?? labels.retryActivation
15451
15393
  }
15452
15394
  ) : null,
15453
- /* @__PURE__ */ jsx18(
15395
+ /* @__PURE__ */ jsx19(
15454
15396
  Button2,
15455
15397
  {
15456
15398
  type: "button",
@@ -15468,9 +15410,9 @@ function AgentSessionChrome({
15468
15410
  }
15469
15411
  ) : null,
15470
15412
  chrome.approval ? /* @__PURE__ */ jsxs7("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardAction), children: [
15471
- /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeTitle, children: labels.approvalRequired }),
15472
- /* @__PURE__ */ jsx18("p", { className: AgentGUIChrome_styles_default.chromeMessage, children: chrome.approval.title }),
15473
- /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeActions, children: chrome.approval.options.map((option) => /* @__PURE__ */ jsx18(
15413
+ /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeTitle, children: labels.approvalRequired }),
15414
+ /* @__PURE__ */ jsx19("p", { className: AgentGUIChrome_styles_default.chromeMessage, children: chrome.approval.title }),
15415
+ /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeActions, children: chrome.approval.options.map((option) => /* @__PURE__ */ jsx19(
15474
15416
  "button",
15475
15417
  {
15476
15418
  type: "button",
@@ -15484,7 +15426,7 @@ function AgentSessionChrome({
15484
15426
  option.id
15485
15427
  )) })
15486
15428
  ] }) : null,
15487
- visibleRecovery ? /* @__PURE__ */ jsx18(
15429
+ visibleRecovery ? /* @__PURE__ */ jsx19(
15488
15430
  "section",
15489
15431
  {
15490
15432
  ref: recoveryCardRef,
@@ -15502,7 +15444,7 @@ function AgentSessionChrome({
15502
15444
  onKeyDown: handleExpandableCardKeyDown("recovery"),
15503
15445
  children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
15504
15446
  /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
15505
- visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx18(
15447
+ visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx19(
15506
15448
  CastIcon,
15507
15449
  {
15508
15450
  active: true,
@@ -15512,7 +15454,7 @@ function AgentSessionChrome({
15512
15454
  size: 16
15513
15455
  }
15514
15456
  ) : null,
15515
- /* @__PURE__ */ jsx18(
15457
+ /* @__PURE__ */ jsx19(
15516
15458
  "p",
15517
15459
  {
15518
15460
  ref: recoveryMessageRef,
@@ -15520,12 +15462,12 @@ function AgentSessionChrome({
15520
15462
  "aria-label": visibleRecovery.kind === "activating" ? recoveryMessage : void 0,
15521
15463
  title: recoveryMessage,
15522
15464
  children: visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
15523
- /* @__PURE__ */ jsx18("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
15524
- activatingMessage.ellipsis ? /* @__PURE__ */ jsx18(LoadingEllipsis, {}) : null
15465
+ /* @__PURE__ */ jsx19("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
15466
+ activatingMessage.ellipsis ? /* @__PURE__ */ jsx19(LoadingEllipsis, {}) : null
15525
15467
  ] }) : recoveryMessage
15526
15468
  }
15527
15469
  ),
15528
- /* @__PURE__ */ jsx18(
15470
+ /* @__PURE__ */ jsx19(
15529
15471
  ChevronDown,
15530
15472
  {
15531
15473
  "aria-hidden": "true",
@@ -15537,7 +15479,7 @@ function AgentSessionChrome({
15537
15479
  }
15538
15480
  )
15539
15481
  ] }),
15540
- /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: visibleRecovery.kind === "failed" && visibleRecovery.followupAction === "continue-in-new-conversation" ? /* @__PURE__ */ jsx18(
15482
+ /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: visibleRecovery.kind === "failed" && visibleRecovery.followupAction === "continue-in-new-conversation" ? /* @__PURE__ */ jsx19(
15541
15483
  Button2,
15542
15484
  {
15543
15485
  type: "button",
@@ -15550,7 +15492,7 @@ function AgentSessionChrome({
15550
15492
  },
15551
15493
  children: labels.continueInNewConversation
15552
15494
  }
15553
- ) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */ jsx18(
15495
+ ) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */ jsx19(
15554
15496
  Button2,
15555
15497
  {
15556
15498
  type: "button",
@@ -15572,7 +15514,7 @@ function AgentSessionChrome({
15572
15514
 
15573
15515
  // agent-gui/agentGuiNode/AgentGoalBanner.tsx
15574
15516
  import { Target } from "lucide-react";
15575
- import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
15517
+ import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
15576
15518
  var TERMINAL_GOAL_STATUSES = /* @__PURE__ */ new Set(["complete", "completed", "done"]);
15577
15519
  function normalizeGoalStatus(status) {
15578
15520
  return (status ?? "").trim().toLowerCase();
@@ -15626,7 +15568,7 @@ function AgentGoalBanner({
15626
15568
  labels
15627
15569
  });
15628
15570
  const fullMessage = `${labels.goalLabel} ${description}`;
15629
- return /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx19(
15571
+ return /* @__PURE__ */ jsx20("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx20(
15630
15572
  "section",
15631
15573
  {
15632
15574
  className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardMuted),
@@ -15636,20 +15578,20 @@ function AgentGoalBanner({
15636
15578
  "data-testid": "agent-gui-goal-banner",
15637
15579
  children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
15638
15580
  /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
15639
- /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx19(Target, { "aria-hidden": true, className: "size-3.5" }) }),
15581
+ /* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx20(Target, { "aria-hidden": true, className: "size-3.5" }) }),
15640
15582
  /* @__PURE__ */ jsxs8(
15641
15583
  "p",
15642
15584
  {
15643
15585
  className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
15644
15586
  title: fullMessage,
15645
15587
  children: [
15646
- /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: labels.goalLabel }),
15647
- /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description })
15588
+ /* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: labels.goalLabel }),
15589
+ /* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description })
15648
15590
  ]
15649
15591
  }
15650
15592
  )
15651
15593
  ] }),
15652
- /* @__PURE__ */ jsx19(
15594
+ /* @__PURE__ */ jsx20(
15653
15595
  "span",
15654
15596
  {
15655
15597
  className: AgentGUIChrome_styles_default.chromeGoalHint,
@@ -16137,7 +16079,7 @@ import {
16137
16079
  Target as Target2,
16138
16080
  ZapIcon
16139
16081
  } from "lucide-react";
16140
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
16082
+ import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
16141
16083
  var paletteStyles = {
16142
16084
  palette: "nodrag agent-gui-node__mention-palette flex h-full min-h-0 flex-col gap-1 overflow-y-auto px-1 pb-1 pt-2 [-webkit-app-region:no-drag]",
16143
16085
  option: "nodrag relative flex min-h-9 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-2 text-left text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 [-webkit-app-region:no-drag] 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",
@@ -16185,11 +16127,11 @@ function AgentSlashCommandPalette({
16185
16127
  firstEntryIndexByType.set(groupType, index);
16186
16128
  }
16187
16129
  });
16188
- return /* @__PURE__ */ jsx20("div", { className: paletteStyles.palette, role: "listbox", "aria-label": label, children: entries.map((entry, index) => {
16130
+ return /* @__PURE__ */ jsx21("div", { className: paletteStyles.palette, role: "listbox", "aria-label": label, children: entries.map((entry, index) => {
16189
16131
  const isHighlighted = index === highlightedIndex;
16190
16132
  const groupType = entryGroupType(entry);
16191
16133
  const entryIcon = slashPaletteEntryIcon(entry);
16192
- const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */ jsx20(
16134
+ const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */ jsx21(
16193
16135
  "div",
16194
16136
  {
16195
16137
  "aria-hidden": "true",
@@ -16238,15 +16180,15 @@ function AgentSlashCommandPalette({
16238
16180
  onSelectSkill(entry.skill);
16239
16181
  },
16240
16182
  children: [
16241
- entryIcon ? /* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: paletteStyles.icon, children: entryIcon }) : null,
16183
+ entryIcon ? /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: paletteStyles.icon, children: entryIcon }) : null,
16242
16184
  /* @__PURE__ */ jsxs9("span", { className: paletteStyles.copy, children: [
16243
16185
  /* @__PURE__ */ jsxs9("span", { className: paletteStyles.name, children: [
16244
- /* @__PURE__ */ jsx20("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
16245
- entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx20("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
16186
+ /* @__PURE__ */ jsx21("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
16187
+ entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx21("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
16246
16188
  ] }),
16247
- entry.description ? /* @__PURE__ */ jsx20("span", { className: paletteStyles.descriptionText, children: entry.description }) : null
16189
+ entry.description ? /* @__PURE__ */ jsx21("span", { className: paletteStyles.descriptionText, children: entry.description }) : null
16248
16190
  ] }),
16249
- entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */ jsx20(
16191
+ entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */ jsx21(
16250
16192
  "button",
16251
16193
  {
16252
16194
  "aria-label": entry.settingsAriaLabel ?? entry.settingsLabel,
@@ -16301,24 +16243,24 @@ function labelForEntryGroupType(groupType, labels) {
16301
16243
  var SLASH_PALETTE_ICON_CLASS = "size-3";
16302
16244
  function slashPaletteEntryIcon(entry) {
16303
16245
  if (entry.type === "capability") {
16304
- return entry.capability.capability === "computerUse" ? /* @__PURE__ */ jsx20(Monitor, { className: SLASH_PALETTE_ICON_CLASS }) : /* @__PURE__ */ jsx20(Globe, { className: SLASH_PALETTE_ICON_CLASS });
16246
+ return entry.capability.capability === "computerUse" ? /* @__PURE__ */ jsx21(Monitor, { className: SLASH_PALETTE_ICON_CLASS }) : /* @__PURE__ */ jsx21(Globe, { className: SLASH_PALETTE_ICON_CLASS });
16305
16247
  }
16306
16248
  if (entry.type !== "command") {
16307
16249
  return null;
16308
16250
  }
16309
16251
  switch (entry.command.name.trim().toLowerCase()) {
16310
16252
  case "compact":
16311
- return /* @__PURE__ */ jsx20(Minimize2, { className: SLASH_PALETTE_ICON_CLASS });
16253
+ return /* @__PURE__ */ jsx21(Minimize2, { className: SLASH_PALETTE_ICON_CLASS });
16312
16254
  case "fast":
16313
- return /* @__PURE__ */ jsx20(ZapIcon, { className: SLASH_PALETTE_ICON_CLASS });
16255
+ return /* @__PURE__ */ jsx21(ZapIcon, { className: SLASH_PALETTE_ICON_CLASS });
16314
16256
  case "goal":
16315
- return /* @__PURE__ */ jsx20(Target2, { className: SLASH_PALETTE_ICON_CLASS });
16257
+ return /* @__PURE__ */ jsx21(Target2, { className: SLASH_PALETTE_ICON_CLASS });
16316
16258
  case "plan":
16317
- return /* @__PURE__ */ jsx20(ListChecks, { className: SLASH_PALETTE_ICON_CLASS });
16259
+ return /* @__PURE__ */ jsx21(ListChecks, { className: SLASH_PALETTE_ICON_CLASS });
16318
16260
  case "review":
16319
- return /* @__PURE__ */ jsx20(Search, { className: SLASH_PALETTE_ICON_CLASS });
16261
+ return /* @__PURE__ */ jsx21(Search, { className: SLASH_PALETTE_ICON_CLASS });
16320
16262
  case "status":
16321
- return /* @__PURE__ */ jsx20(Info, { className: SLASH_PALETTE_ICON_CLASS });
16263
+ return /* @__PURE__ */ jsx21(Info, { className: SLASH_PALETTE_ICON_CLASS });
16322
16264
  default:
16323
16265
  return null;
16324
16266
  }
@@ -16469,7 +16411,7 @@ var styles3 = {
16469
16411
  var AgentGUINode_styles_default = styles3;
16470
16412
 
16471
16413
  // agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
16472
- import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
16414
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
16473
16415
  var EMPTY_WORKSPACE_APP_ICONS = [];
16474
16416
  function queuedPromptImages(queuedPrompt) {
16475
16417
  return agentPromptContentImageBlocks(
@@ -16596,9 +16538,9 @@ function AgentQueuedPromptPanel({
16596
16538
  onKeyDown: handleKeyDown,
16597
16539
  children: [
16598
16540
  /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptHeader, children: [
16599
- /* @__PURE__ */ jsx21("span", { className: AgentGUINode_styles_default.composerQueuedPromptLabel, children: labels.queuedLabel }),
16600
- /* @__PURE__ */ jsx21("span", { className: AgentGUINode_styles_default.composerQueuedPromptCount, children: queuedPrompts.length }),
16601
- canExpand ? /* @__PURE__ */ jsx21(
16541
+ /* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptLabel, children: labels.queuedLabel }),
16542
+ /* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptCount, children: queuedPrompts.length }),
16543
+ canExpand ? /* @__PURE__ */ jsx22(
16602
16544
  ChevronRight,
16603
16545
  {
16604
16546
  "aria-hidden": "true",
@@ -16609,7 +16551,7 @@ function AgentQueuedPromptPanel({
16609
16551
  }
16610
16552
  ) : null
16611
16553
  ] }),
16612
- /* @__PURE__ */ jsx21(
16554
+ /* @__PURE__ */ jsx22(
16613
16555
  "div",
16614
16556
  {
16615
16557
  ref: queuedPromptListRef,
@@ -16628,8 +16570,8 @@ function AgentQueuedPromptPanel({
16628
16570
  "data-testid": `agent-gui-composer-queued-prompt-${queuedPrompt.id}`,
16629
16571
  "data-draining": isDraining ? "true" : "false",
16630
16572
  children: [
16631
- /* @__PURE__ */ jsx21("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptBody, title, children: [
16632
- displayText ? /* @__PURE__ */ jsx21(
16573
+ /* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptBody, title, children: [
16574
+ displayText ? /* @__PURE__ */ jsx22(
16633
16575
  "div",
16634
16576
  {
16635
16577
  ref: queuedPrompts.length === 1 ? singlePromptTextRef : void 0,
@@ -16639,7 +16581,7 @@ function AgentQueuedPromptPanel({
16639
16581
  event.stopPropagation();
16640
16582
  }
16641
16583
  },
16642
- children: /* @__PURE__ */ jsx21(
16584
+ children: /* @__PURE__ */ jsx22(
16643
16585
  AgentMessageMarkdown,
16644
16586
  {
16645
16587
  content: displayText,
@@ -16651,53 +16593,58 @@ function AgentQueuedPromptPanel({
16651
16593
  )
16652
16594
  }
16653
16595
  ) : null,
16654
- images.length > 0 ? /* @__PURE__ */ jsx21("div", { className: AgentGUINode_styles_default.composerQueuedPromptImages, children: images.slice(0, 3).map((image, index) => /* @__PURE__ */ jsx21(
16655
- "img",
16656
- {
16657
- alt: "",
16658
- className: AgentGUINode_styles_default.composerQueuedPromptImage,
16659
- src: `data:${image.mimeType};base64,${image.data}`
16660
- },
16661
- `${queuedPrompt.id}:image:${index}`
16662
- )) }) : null
16596
+ images.length > 0 ? /* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptImages, children: images.slice(0, 3).map((image, index) => {
16597
+ const src = `data:${image.mimeType};base64,${image.data}`;
16598
+ return /* @__PURE__ */ jsx22(
16599
+ ZoomableImage,
16600
+ {
16601
+ alt: image.name?.trim() || "",
16602
+ className: AgentGUINode_styles_default.composerQueuedPromptImage,
16603
+ draggable: false,
16604
+ src,
16605
+ wrapElement: "span"
16606
+ },
16607
+ `${queuedPrompt.id}:image:${index}`
16608
+ );
16609
+ }) }) : null
16663
16610
  ] }) }),
16664
16611
  /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptActions, children: [
16665
- /* @__PURE__ */ jsx21(
16612
+ /* @__PURE__ */ jsx22(
16666
16613
  CanvasNodeGhostIconButton,
16667
16614
  {
16668
16615
  "aria-label": labels.sendQueuedPromptNext,
16669
16616
  disabled: isDraining,
16670
16617
  onClick: () => onSendQueuedPromptNext(queuedPrompt.id),
16671
- children: /* @__PURE__ */ jsx21(CanvasNodeGuideLinedIcon, { "aria-hidden": "true" })
16618
+ children: /* @__PURE__ */ jsx22(CanvasNodeGuideLinedIcon, { "aria-hidden": "true" })
16672
16619
  }
16673
16620
  ),
16674
- /* @__PURE__ */ jsx21(
16621
+ /* @__PURE__ */ jsx22(
16675
16622
  CanvasNodeGhostIconButton,
16676
16623
  {
16677
16624
  "aria-label": labels.deleteQueuedPrompt,
16678
16625
  disabled: isDraining,
16679
16626
  onClick: () => onRemoveQueuedPrompt(queuedPrompt.id),
16680
- children: /* @__PURE__ */ jsx21(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
16627
+ children: /* @__PURE__ */ jsx22(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
16681
16628
  }
16682
16629
  ),
16683
16630
  /* @__PURE__ */ jsxs10(DropdownMenu, { children: [
16684
- /* @__PURE__ */ jsx21(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx21(
16631
+ /* @__PURE__ */ jsx22(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx22(
16685
16632
  CanvasNodeGhostIconButton,
16686
16633
  {
16687
16634
  "aria-label": labels.queuedPromptMoreActions,
16688
16635
  disabled: isDraining,
16689
16636
  stopsEventPropagation: false,
16690
16637
  onClick: (event) => event.stopPropagation(),
16691
- children: /* @__PURE__ */ jsx21(CanvasNodeMoreLinedIcon, { "aria-hidden": "true" })
16638
+ children: /* @__PURE__ */ jsx22(CanvasNodeMoreLinedIcon, { "aria-hidden": "true" })
16692
16639
  }
16693
16640
  ) }),
16694
- /* @__PURE__ */ jsx21(
16641
+ /* @__PURE__ */ jsx22(
16695
16642
  DropdownMenuContent,
16696
16643
  {
16697
16644
  align: "end",
16698
16645
  className: AgentGUINode_styles_default.composerMenuContent,
16699
16646
  sideOffset: 8,
16700
- children: /* @__PURE__ */ jsx21(
16647
+ children: /* @__PURE__ */ jsx22(
16701
16648
  DropdownMenuItem,
16702
16649
  {
16703
16650
  className: AgentGUINode_styles_default.composerMenuItem,
@@ -16711,7 +16658,7 @@ function AgentQueuedPromptPanel({
16711
16658
  onSelect: () => {
16712
16659
  handleEditQueuedPromptSelect(queuedPrompt.id);
16713
16660
  },
16714
- children: /* @__PURE__ */ jsx21("span", { children: labels.editQueuedPrompt })
16661
+ children: /* @__PURE__ */ jsx22("span", { children: labels.editQueuedPrompt })
16715
16662
  }
16716
16663
  )
16717
16664
  }
@@ -17095,7 +17042,7 @@ function optionsWithSelectedValue(options, selectedValue) {
17095
17042
  }
17096
17043
 
17097
17044
  // agent-gui/agentGuiNode/AgentComposerSettingsMenus.tsx
17098
- import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
17045
+ import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
17099
17046
  function basenameProjectPath(path) {
17100
17047
  const normalized = path.trim().replaceAll("\\", "/").replace(/\/+$/, "");
17101
17048
  return normalized.split("/").filter(Boolean).at(-1) ?? path;
@@ -17147,7 +17094,7 @@ function AgentProjectDropdown({
17147
17094
  className: "workspace-user-project-trigger-label",
17148
17095
  "data-workspace-user-project-trigger-label": "true",
17149
17096
  children: [
17150
- selectedPath ? /* @__PURE__ */ jsx22(FolderIcon, { "aria-hidden": true, className: "shrink-0", size: 15 }) : /* @__PURE__ */ jsx22(
17097
+ selectedPath ? /* @__PURE__ */ jsx23(FolderIcon, { "aria-hidden": true, className: "shrink-0", size: 15 }) : /* @__PURE__ */ jsx23(
17151
17098
  NoWorkspaceLinedIcon,
17152
17099
  {
17153
17100
  "aria-hidden": true,
@@ -17156,16 +17103,16 @@ function AgentProjectDropdown({
17156
17103
  size: 15
17157
17104
  }
17158
17105
  ),
17159
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: triggerLabel })
17106
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: triggerLabel })
17160
17107
  ]
17161
17108
  }
17162
17109
  ),
17163
- /* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17110
+ /* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17164
17111
  ]
17165
17112
  }
17166
17113
  );
17167
17114
  }
17168
- return /* @__PURE__ */ jsx22(
17115
+ return /* @__PURE__ */ jsx23(
17169
17116
  WorkspaceUserProjectSelect,
17170
17117
  {
17171
17118
  api: userProjectApi,
@@ -17185,7 +17132,7 @@ function AgentProjectDropdown({
17185
17132
  i18n,
17186
17133
  labels,
17187
17134
  projectLocked: Boolean(composerSettings.projectLocked),
17188
- renderAddProjectIcon: () => /* @__PURE__ */ jsx22(
17135
+ renderAddProjectIcon: () => /* @__PURE__ */ jsx23(
17189
17136
  NewWorkspaceLinedIcon,
17190
17137
  {
17191
17138
  "aria-hidden": true,
@@ -17249,15 +17196,15 @@ function AgentPermissionModeDropdown({
17249
17196
  "aria-label": labels.permissionLabel,
17250
17197
  "data-permission-tone": triggerTone,
17251
17198
  children: [
17252
- /* @__PURE__ */ jsx22("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx22("span", { className: "truncate", children: triggerLabel }) }),
17253
- /* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17199
+ /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx23("span", { className: "truncate", children: triggerLabel }) }),
17200
+ /* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17254
17201
  ]
17255
17202
  }
17256
17203
  );
17257
17204
  if (previewMode) {
17258
17205
  return trigger;
17259
17206
  }
17260
- const selectTrigger = /* @__PURE__ */ jsx22(
17207
+ const selectTrigger = /* @__PURE__ */ jsx23(
17261
17208
  SelectTrigger,
17262
17209
  {
17263
17210
  className: cn2(
@@ -17268,7 +17215,7 @@ function AgentPermissionModeDropdown({
17268
17215
  ),
17269
17216
  "aria-label": labels.permissionLabel,
17270
17217
  "data-permission-tone": triggerTone,
17271
- children: /* @__PURE__ */ jsx22("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx22("span", { className: "truncate", children: triggerLabel }) })
17218
+ children: /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx23("span", { className: "truncate", children: triggerLabel }) })
17272
17219
  }
17273
17220
  );
17274
17221
  return /* @__PURE__ */ jsxs11(
@@ -17285,11 +17232,11 @@ function AgentPermissionModeDropdown({
17285
17232
  // it. Target the tooltip at a focusable wrapper span (Radix's pattern
17286
17233
  // for disabled triggers) so hover/focus reliably surfaces the hint.
17287
17234
  /* @__PURE__ */ jsxs11(Tooltip2, { children: [
17288
- /* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx22("span", { className: "inline-flex", tabIndex: 0, children: selectTrigger }) }),
17289
- /* @__PURE__ */ jsx22(TooltipContent2, { side: "top", children: labels.loadingOptions })
17235
+ /* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: selectTrigger }) }),
17236
+ /* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
17290
17237
  ] })
17291
17238
  ) : selectTrigger,
17292
- isSelectOpen ? /* @__PURE__ */ jsx22(
17239
+ isSelectOpen ? /* @__PURE__ */ jsx23(
17293
17240
  SelectContent,
17294
17241
  {
17295
17242
  align: "end",
@@ -17300,7 +17247,7 @@ function AgentPermissionModeDropdown({
17300
17247
  AgentGUINode_styles_default.composerMenuContent,
17301
17248
  "w-max min-w-[220px] max-w-[calc(100vw-32px)] data-[side=top]:!translate-y-0"
17302
17249
  ),
17303
- children: permissionOptions.map((option) => /* @__PURE__ */ jsx22(
17250
+ children: permissionOptions.map((option) => /* @__PURE__ */ jsx23(
17304
17251
  SelectItem,
17305
17252
  {
17306
17253
  value: option.value,
@@ -17308,8 +17255,8 @@ function AgentPermissionModeDropdown({
17308
17255
  className: cn2(AgentGUINode_styles_default.composerMenuItem, "group/composer-option"),
17309
17256
  onPointerDown: (event) => handleSelectedItemPointerDown(event, option.value),
17310
17257
  children: /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
17311
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: option.label }),
17312
- option.description ? /* @__PURE__ */ jsx22(
17258
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: option.label }),
17259
+ option.description ? /* @__PURE__ */ jsx23(
17313
17260
  ComposerOptionInfoTooltip,
17314
17261
  {
17315
17262
  description: option.description,
@@ -17390,22 +17337,22 @@ function ComposerOptionInfoTooltip({
17390
17337
  event.preventDefault();
17391
17338
  event.stopPropagation();
17392
17339
  };
17393
- const trigger = /* @__PURE__ */ jsx22(
17340
+ const trigger = /* @__PURE__ */ jsx23(
17394
17341
  "span",
17395
17342
  {
17396
17343
  className: "pointer-events-none inline-flex shrink-0 cursor-help text-[var(--agent-gui-text-tertiary)] opacity-0 transition-opacity group-hover/composer-option:pointer-events-auto group-hover/composer-option:opacity-100 group-data-[highlighted]/composer-option:pointer-events-auto group-data-[highlighted]/composer-option:opacity-100",
17397
17344
  "data-agent-composer-option-info-trigger": "true",
17398
17345
  onClick: stopSelect,
17399
17346
  onPointerDown: stopSelect,
17400
- children: /* @__PURE__ */ jsx22(RoomsHintIcon, { "aria-hidden": true, className: "size-3" })
17347
+ children: /* @__PURE__ */ jsx23(RoomsHintIcon, { "aria-hidden": true, className: "size-3" })
17401
17348
  }
17402
17349
  );
17403
17350
  if (!tooltipsEnabled) {
17404
17351
  return trigger;
17405
17352
  }
17406
17353
  return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
17407
- /* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: trigger }),
17408
- /* @__PURE__ */ jsx22(TooltipContent2, { side: "right", className: "max-w-[240px] whitespace-normal", children: description })
17354
+ /* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: trigger }),
17355
+ /* @__PURE__ */ jsx23(TooltipContent2, { side: "right", className: "max-w-[240px] whitespace-normal", children: description })
17409
17356
  ] });
17410
17357
  }
17411
17358
  function resolvePermissionModeTriggerTone(value) {
@@ -17460,7 +17407,7 @@ function AgentModelReasoningDropdown({
17460
17407
  "data-agent-model-reasoning-trigger": "true",
17461
17408
  children: [
17462
17409
  /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
17463
- menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */ jsx22(
17410
+ menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */ jsx23(
17464
17411
  ZapIcon2,
17465
17412
  {
17466
17413
  "aria-hidden": true,
@@ -17469,12 +17416,12 @@ function AgentModelReasoningDropdown({
17469
17416
  strokeWidth: 2.5
17470
17417
  }
17471
17418
  ) : null,
17472
- menu.trigger.showCombined ? /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
17473
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: menu.trigger.modelLabel }),
17474
- /* @__PURE__ */ jsx22("span", { className: "shrink-0", children: menu.trigger.reasoningLabel })
17419
+ menu.trigger.showCombined ? /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
17420
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.modelLabel }),
17421
+ /* @__PURE__ */ jsx23("span", { className: "shrink-0", children: menu.trigger.reasoningLabel })
17475
17422
  ] })
17476
17423
  ] }),
17477
- /* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17424
+ /* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
17478
17425
  ]
17479
17426
  }
17480
17427
  );
@@ -17487,10 +17434,10 @@ function AgentModelReasoningDropdown({
17487
17434
  // it. Target the tooltip at a focusable wrapper span (Radix's pattern
17488
17435
  // for disabled triggers) so hover/focus reliably surfaces the hint.
17489
17436
  /* @__PURE__ */ jsxs11(Tooltip2, { children: [
17490
- /* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx22("span", { className: "inline-flex", tabIndex: 0, children: /* @__PURE__ */ jsx22(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }) }) }),
17491
- /* @__PURE__ */ jsx22(TooltipContent2, { side: "top", children: labels.loadingOptions })
17437
+ /* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }) }) }),
17438
+ /* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
17492
17439
  ] })
17493
- ) : /* @__PURE__ */ jsx22(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }),
17440
+ ) : /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }),
17494
17441
  /* @__PURE__ */ jsxs11(
17495
17442
  DropdownMenuContent2,
17496
17443
  {
@@ -17505,8 +17452,8 @@ function AgentModelReasoningDropdown({
17505
17452
  "data-agent-composer-settings-layout": "model-primary",
17506
17453
  children: [
17507
17454
  menu.model.show ? /* @__PURE__ */ jsxs11(Fragment4, { children: [
17508
- /* @__PURE__ */ jsx22(DropdownMenuLabel2, { children: labels.modelSelectionLabel }),
17509
- /* @__PURE__ */ jsx22(
17455
+ /* @__PURE__ */ jsx23(DropdownMenuLabel2, { children: labels.modelSelectionLabel }),
17456
+ /* @__PURE__ */ jsx23(
17510
17457
  ComposerMenuOptionItems,
17511
17458
  {
17512
17459
  options: menu.model.options,
@@ -17517,7 +17464,7 @@ function AgentModelReasoningDropdown({
17517
17464
  }
17518
17465
  )
17519
17466
  ] }) : null,
17520
- menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */ jsx22(DropdownMenuSeparator2, {}) : null,
17467
+ menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */ jsx23(DropdownMenuSeparator2, {}) : null,
17521
17468
  menu.reasoning.show ? /* @__PURE__ */ jsxs11(DropdownMenuSub2, { children: [
17522
17469
  /* @__PURE__ */ jsxs11(
17523
17470
  DropdownMenuSubTrigger2,
@@ -17525,17 +17472,17 @@ function AgentModelReasoningDropdown({
17525
17472
  className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
17526
17473
  "data-agent-reasoning-submenu-trigger": "true",
17527
17474
  children: [
17528
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 flex-1 truncate", children: labels.reasoningLabel }),
17529
- /* @__PURE__ */ jsx22("span", { className: "text-[var(--text-tertiary)]", children: menu.reasoning.selectedLabel })
17475
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 flex-1 truncate", children: labels.reasoningLabel }),
17476
+ /* @__PURE__ */ jsx23("span", { className: "text-[var(--text-tertiary)]", children: menu.reasoning.selectedLabel })
17530
17477
  ]
17531
17478
  }
17532
17479
  ),
17533
- /* @__PURE__ */ jsx22(
17480
+ /* @__PURE__ */ jsx23(
17534
17481
  DropdownMenuSubContent2,
17535
17482
  {
17536
17483
  className: cn2(AgentGUINode_styles_default.composerMenuContent, "min-w-[132px]"),
17537
17484
  "data-agent-composer-settings-layout": "model-submenu",
17538
- children: /* @__PURE__ */ jsx22(
17485
+ children: /* @__PURE__ */ jsx23(
17539
17486
  ComposerMenuOptionItems,
17540
17487
  {
17541
17488
  options: menu.reasoning.options,
@@ -17554,17 +17501,17 @@ function AgentModelReasoningDropdown({
17554
17501
  className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
17555
17502
  "data-agent-speed-submenu-trigger": "true",
17556
17503
  children: [
17557
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 flex-1 truncate", children: labels.speedLabel }),
17558
- /* @__PURE__ */ jsx22("span", { className: "text-[var(--text-tertiary)]", children: menu.speed.selectedLabel })
17504
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 flex-1 truncate", children: labels.speedLabel }),
17505
+ /* @__PURE__ */ jsx23("span", { className: "text-[var(--text-tertiary)]", children: menu.speed.selectedLabel })
17559
17506
  ]
17560
17507
  }
17561
17508
  ),
17562
- /* @__PURE__ */ jsx22(
17509
+ /* @__PURE__ */ jsx23(
17563
17510
  DropdownMenuSubContent2,
17564
17511
  {
17565
17512
  className: cn2(AgentGUINode_styles_default.composerMenuContent, "w-[200px]"),
17566
17513
  "data-agent-composer-settings-layout": "model-submenu",
17567
- children: /* @__PURE__ */ jsx22(
17514
+ children: /* @__PURE__ */ jsx23(
17568
17515
  ComposerMenuOptionItems,
17569
17516
  {
17570
17517
  options: menu.speed.options,
@@ -17589,7 +17536,7 @@ function ComposerMenuOptionItems({
17589
17536
  tooltipsEnabled = true,
17590
17537
  onSelect
17591
17538
  }) {
17592
- return /* @__PURE__ */ jsx22(Fragment4, { children: options.map((option) => {
17539
+ return /* @__PURE__ */ jsx23(Fragment4, { children: options.map((option) => {
17593
17540
  const hasDescription = Boolean(option.description);
17594
17541
  const showInlineDescription = descriptionPresentation === "inline" && hasDescription;
17595
17542
  const showModelTooltip = descriptionPresentation === "model-tooltip";
@@ -17615,8 +17562,8 @@ function ComposerMenuOptionItems({
17615
17562
  },
17616
17563
  children: [
17617
17564
  showModelTooltip ? /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden", children: [
17618
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
17619
- option.summary && option.summary.length > 0 ? /* @__PURE__ */ jsx22("span", { className: "flex min-w-0 shrink-0 items-baseline gap-1.5 overflow-hidden text-[var(--agent-gui-text-tertiary)]", children: option.summary.map((summary) => /* @__PURE__ */ jsx22(
17565
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
17566
+ option.summary && option.summary.length > 0 ? /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 shrink-0 items-baseline gap-1.5 overflow-hidden text-[var(--agent-gui-text-tertiary)]", children: option.summary.map((summary) => /* @__PURE__ */ jsx23(
17620
17567
  "span",
17621
17568
  {
17622
17569
  className: "max-w-[64px] truncate leading-[1.15]",
@@ -17633,8 +17580,8 @@ function ComposerMenuOptionItems({
17633
17580
  ),
17634
17581
  children: [
17635
17582
  /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
17636
- /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
17637
- showTooltipDescription && option.description ? /* @__PURE__ */ jsx22(
17583
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
17584
+ showTooltipDescription && option.description ? /* @__PURE__ */ jsx23(
17638
17585
  ComposerOptionInfoTooltip,
17639
17586
  {
17640
17587
  description: option.description,
@@ -17642,11 +17589,11 @@ function ComposerMenuOptionItems({
17642
17589
  }
17643
17590
  ) : null
17644
17591
  ] }),
17645
- showInlineDescription && option.description ? /* @__PURE__ */ jsx22("span", { className: "whitespace-normal text-[11px] leading-[1.2] text-[var(--text-tertiary)]", children: option.description }) : null
17592
+ showInlineDescription && option.description ? /* @__PURE__ */ jsx23("span", { className: "whitespace-normal text-[11px] leading-[1.2] text-[var(--text-tertiary)]", children: option.description }) : null
17646
17593
  ]
17647
17594
  }
17648
17595
  ),
17649
- /* @__PURE__ */ jsx22(
17596
+ /* @__PURE__ */ jsx23(
17650
17597
  CheckIcon,
17651
17598
  {
17652
17599
  "aria-hidden": true,
@@ -17660,7 +17607,7 @@ function ComposerMenuOptionItems({
17660
17607
  },
17661
17608
  option.value
17662
17609
  );
17663
- return showModelTooltip ? /* @__PURE__ */ jsx22(
17610
+ return showModelTooltip ? /* @__PURE__ */ jsx23(
17664
17611
  ComposerModelOptionTooltip,
17665
17612
  {
17666
17613
  option,
@@ -17680,7 +17627,7 @@ function ComposerModelOptionTooltip({
17680
17627
  return children;
17681
17628
  }
17682
17629
  return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
17683
- /* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: cloneElement(children, {
17630
+ /* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: cloneElement(children, {
17684
17631
  "data-agent-model-option-tooltip-trigger": "true"
17685
17632
  }) }),
17686
17633
  /* @__PURE__ */ jsxs11(
@@ -17692,10 +17639,10 @@ function ComposerModelOptionTooltip({
17692
17639
  className: "flex w-[320px] max-w-[calc(100vw-32px)] flex-col items-start gap-0 whitespace-normal rounded-lg border border-[var(--line-2)] bg-[var(--background-fronted)] px-4 py-3 text-[13px] leading-[1.3] text-[var(--text-primary)] shadow-lg",
17693
17640
  "data-agent-model-option-tooltip": "true",
17694
17641
  children: [
17695
- /* @__PURE__ */ jsx22("span", { className: "block text-[15px] font-semibold leading-[1.2]", children: option.tooltip.title }),
17696
- option.tooltip.description ? /* @__PURE__ */ jsx22("span", { className: "mt-1.5 block text-[13px] leading-[1.35]", children: option.tooltip.description }) : null,
17697
- option.tooltip.contextWindow ? /* @__PURE__ */ jsx22("span", { className: "mt-4 block", children: option.tooltip.contextWindow }) : null,
17698
- option.tooltip.version ? /* @__PURE__ */ jsx22("span", { className: "mt-4 block italic", children: option.tooltip.version }) : null
17642
+ /* @__PURE__ */ jsx23("span", { className: "block text-[15px] font-semibold leading-[1.2]", children: option.tooltip.title }),
17643
+ option.tooltip.description ? /* @__PURE__ */ jsx23("span", { className: "mt-1.5 block text-[13px] leading-[1.35]", children: option.tooltip.description }) : null,
17644
+ option.tooltip.contextWindow ? /* @__PURE__ */ jsx23("span", { className: "mt-4 block", children: option.tooltip.contextWindow }) : null,
17645
+ option.tooltip.version ? /* @__PURE__ */ jsx23("span", { className: "mt-4 block italic", children: option.tooltip.version }) : null
17699
17646
  ]
17700
17647
  }
17701
17648
  )
@@ -17714,7 +17661,11 @@ import {
17714
17661
  } from "react";
17715
17662
  import { createPortal } from "react-dom";
17716
17663
  import { Extension } from "@tiptap/core";
17717
- import { Plugin, PluginKey } from "@tiptap/pm/state";
17664
+ import {
17665
+ Plugin,
17666
+ PluginKey,
17667
+ TextSelection
17668
+ } from "@tiptap/pm/state";
17718
17669
  import { Decoration, DecorationSet } from "@tiptap/pm/view";
17719
17670
  import { EditorContent, useEditor } from "@tiptap/react";
17720
17671
 
@@ -17742,19 +17693,23 @@ function referenceMentionPath(item) {
17742
17693
  }
17743
17694
  return path;
17744
17695
  }
17745
- function createAgentMentionContent(items) {
17696
+ function createAgentMentionContent(items, options = {}) {
17746
17697
  return items.flatMap((item, index) => [
17747
- ...index > 0 ? [{ type: "text", text: " " }] : [],
17698
+ ...index === 0 && options.prefixCaretAnchor ? [
17699
+ { type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
17700
+ ] : index > 0 ? [{ type: "text", text: " " }] : [],
17748
17701
  { type: "agentFileMention", attrs: mentionItemToAttrs(item) },
17749
17702
  { type: "text", text: " " }
17750
17703
  ]);
17751
17704
  }
17752
- function createAgentFileMentionContent(items) {
17705
+ function createAgentFileMentionContent(items, options = {}) {
17753
17706
  return items.flatMap((item, index) => {
17754
17707
  const path = referenceMentionPath(item);
17755
17708
  const name = item.displayName?.trim() || basename(path);
17756
17709
  return [
17757
- ...index > 0 ? [{ type: "text", text: " " }] : [],
17710
+ ...index === 0 && options.prefixCaretAnchor ? [
17711
+ { type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
17712
+ ] : index > 0 ? [{ type: "text", text: " " }] : [],
17758
17713
  {
17759
17714
  type: "agentFileMention",
17760
17715
  attrs: {
@@ -17878,11 +17833,49 @@ function imageFilesFromDataTransfer(dataTransfer) {
17878
17833
  files.push(file);
17879
17834
  }
17880
17835
  }
17836
+ if (files.length === 0) {
17837
+ return Array.from(dataTransfer.files ?? []).filter(
17838
+ (file) => supportedPromptImageMimeType(file.type)
17839
+ );
17840
+ }
17841
+ return files;
17842
+ }
17843
+ function nonImageFilesFromDataTransfer(dataTransfer) {
17844
+ if (!dataTransfer) {
17845
+ return [];
17846
+ }
17847
+ const files = [];
17848
+ const items = dataTransfer.items;
17849
+ if (!items) {
17850
+ return Array.from(dataTransfer.files ?? []).filter(
17851
+ (file) => !supportedPromptImageMimeType(file.type) && !supportedPromptImageFileName(file.name)
17852
+ );
17853
+ }
17854
+ for (const item of Array.from(items)) {
17855
+ if (item.kind !== "file" || supportedPromptImageMimeType(item.type)) {
17856
+ continue;
17857
+ }
17858
+ const file = item.getAsFile();
17859
+ if (file && supportedPromptImageFileName(file.name)) {
17860
+ continue;
17861
+ }
17862
+ if (file) {
17863
+ files.push(file);
17864
+ }
17865
+ }
17866
+ if (files.length === 0) {
17867
+ return Array.from(dataTransfer.files ?? []).filter(
17868
+ (file) => !supportedPromptImageMimeType(file.type) && !supportedPromptImageFileName(file.name)
17869
+ );
17870
+ }
17881
17871
  return files;
17882
17872
  }
17883
17873
  function supportedPromptImageMimeType(value) {
17884
17874
  return value === "image/png" || value === "image/jpeg" || value === "image/webp";
17885
17875
  }
17876
+ function supportedPromptImageFileName(value) {
17877
+ return /\.(png|jpe?g|webp)$/i.test(value.trim());
17878
+ }
17886
17879
  async function readAgentRichTextPromptImages(files) {
17887
17880
  const images = await Promise.all(
17888
17881
  files.map(async (file) => {
@@ -17914,9 +17907,12 @@ function fileToBase64(file) {
17914
17907
  }
17915
17908
 
17916
17909
  // agent-gui/agentGuiNode/agentRichText/AgentRichTextEditor.tsx
17917
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
17918
- function buildWorkspaceFileMentionDropContent(entries) {
17919
- return entries.flatMap((entry) => [
17910
+ import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
17911
+ function buildWorkspaceFileMentionDropContent(entries, options = {}) {
17912
+ return entries.flatMap((entry, index) => [
17913
+ ...index === 0 && options.prefixCaretAnchor ? [
17914
+ { type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
17915
+ ] : [],
17920
17916
  {
17921
17917
  type: "agentFileMention",
17922
17918
  attrs: {
@@ -17930,6 +17926,79 @@ function buildWorkspaceFileMentionDropContent(entries) {
17930
17926
  { type: "text", text: " " }
17931
17927
  ]);
17932
17928
  }
17929
+ function isPromptVisualLineStart(editor, position) {
17930
+ if (position <= 1) {
17931
+ return true;
17932
+ }
17933
+ return editor.state.doc.textBetween(
17934
+ Math.max(1, position - 1),
17935
+ position,
17936
+ "\n",
17937
+ "\n"
17938
+ ) === "\n";
17939
+ }
17940
+ function findCaretAnchorBeforeAtomicRun(doc, position) {
17941
+ let anchorPosition = null;
17942
+ doc.descendants((node, nodePosition) => {
17943
+ if (nodePosition >= position) {
17944
+ return false;
17945
+ }
17946
+ if (node.isText) {
17947
+ const text = node.text ?? "";
17948
+ for (let offset = 0; offset < text.length; offset += 1) {
17949
+ const characterPosition = nodePosition + offset;
17950
+ if (characterPosition >= position) {
17951
+ return false;
17952
+ }
17953
+ if (text[offset] === AGENT_RICH_TEXT_CARET_ANCHOR) {
17954
+ anchorPosition = characterPosition;
17955
+ continue;
17956
+ }
17957
+ if (anchorPosition !== null) {
17958
+ anchorPosition = null;
17959
+ }
17960
+ }
17961
+ return true;
17962
+ }
17963
+ if (node.type.name === "agentFileMention") {
17964
+ return false;
17965
+ }
17966
+ if (node.isInline && anchorPosition !== null) {
17967
+ anchorPosition = null;
17968
+ }
17969
+ return true;
17970
+ });
17971
+ return anchorPosition;
17972
+ }
17973
+ function moveSelectionOverCaretAnchor(state, dispatch, key) {
17974
+ const { doc, selection } = state;
17975
+ if (!selection.empty) {
17976
+ return false;
17977
+ }
17978
+ const position = selection.from;
17979
+ if (key === "ArrowLeft") {
17980
+ const anchorPosition = findCaretAnchorBeforeAtomicRun(doc, position);
17981
+ if (anchorPosition === null) {
17982
+ return false;
17983
+ }
17984
+ dispatch(state.tr.setSelection(TextSelection.create(doc, anchorPosition)));
17985
+ return true;
17986
+ }
17987
+ if (key === "ArrowRight" && position < doc.content.size && doc.textBetween(position, position + 1) === AGENT_RICH_TEXT_CARET_ANCHOR) {
17988
+ const afterAnchor = position + 1;
17989
+ const mentionAfterAnchor = doc.resolve(afterAnchor).nodeAfter;
17990
+ dispatch(
17991
+ state.tr.setSelection(
17992
+ TextSelection.create(
17993
+ doc,
17994
+ afterAnchor + (mentionAfterAnchor?.type.name === "agentFileMention" ? mentionAfterAnchor.nodeSize : 0)
17995
+ )
17996
+ )
17997
+ );
17998
+ return true;
17999
+ }
18000
+ return false;
18001
+ }
17933
18002
  function createAgentRichTextPlaceholderExtension(getPlaceholder) {
17934
18003
  return Extension.create({
17935
18004
  name: "agentRichTextPlaceholder",
@@ -17957,6 +18026,34 @@ function createAgentRichTextPlaceholderExtension(getPlaceholder) {
17957
18026
  }
17958
18027
  });
17959
18028
  }
18029
+ function createAgentRichTextCaretAnchorExtension() {
18030
+ return Extension.create({
18031
+ name: "agentRichTextCaretAnchor",
18032
+ addProseMirrorPlugins() {
18033
+ return [
18034
+ new Plugin({
18035
+ key: new PluginKey("agentRichTextCaretAnchor"),
18036
+ props: {
18037
+ handleKeyDown(view, event) {
18038
+ if (event.key !== "ArrowLeft" && event.key !== "ArrowRight" || event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {
18039
+ return false;
18040
+ }
18041
+ if (moveSelectionOverCaretAnchor(
18042
+ view.state,
18043
+ (transaction) => view.dispatch(transaction),
18044
+ event.key
18045
+ )) {
18046
+ event.preventDefault();
18047
+ return true;
18048
+ }
18049
+ return false;
18050
+ }
18051
+ }
18052
+ })
18053
+ ];
18054
+ }
18055
+ });
18056
+ }
17960
18057
  function scrollEditorSelectionIntoView(editor) {
17961
18058
  const scrollContainer = editor.view.dom;
17962
18059
  if (!(scrollContainer instanceof HTMLElement)) {
@@ -18082,7 +18179,8 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18082
18179
  onLinkClick,
18083
18180
  promptImagesSupported = true,
18084
18181
  onPromptImagesUnsupported,
18085
- onPasteImages
18182
+ onPasteImages,
18183
+ getReferenceForFile
18086
18184
  }, ref) {
18087
18185
  "use memo";
18088
18186
  const { t } = useTranslation();
@@ -18102,6 +18200,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18102
18200
  const onPromptImagesUnsupportedRef = useRef9(onPromptImagesUnsupported);
18103
18201
  const onPasteImagesRef = useRef9(onPasteImages);
18104
18202
  const promptImagesSupportedRef = useRef9(promptImagesSupported);
18203
+ const getReferenceForFileRef = useRef9(getReferenceForFile);
18105
18204
  const placeholderRef = useRef9(placeholder);
18106
18205
  const removeMentionLabelRef = useRef9(removeMentionLabel);
18107
18206
  const availableSkillsRef = useRef9(availableSkills);
@@ -18194,6 +18293,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18194
18293
  { skills: availableSkillsRef.current },
18195
18294
  { capabilities: availableCapabilitiesRef.current }
18196
18295
  ),
18296
+ createAgentRichTextCaretAnchorExtension(),
18197
18297
  createAgentRichTextPlaceholderExtension(() => placeholderRef.current)
18198
18298
  ],
18199
18299
  [enableFileMentionSuggestions]
@@ -18208,6 +18308,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18208
18308
  onPromptImagesUnsupportedRef.current = onPromptImagesUnsupported;
18209
18309
  onPasteImagesRef.current = onPasteImages;
18210
18310
  promptImagesSupportedRef.current = promptImagesSupported;
18311
+ getReferenceForFileRef.current = getReferenceForFile;
18211
18312
  placeholderRef.current = placeholder;
18212
18313
  removeMentionLabelRef.current = removeMentionLabel;
18213
18314
  availableSkillsRef.current = availableSkills;
@@ -18318,6 +18419,44 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18318
18419
  });
18319
18420
  return true;
18320
18421
  }
18422
+ const getReferenceForFileFn = getReferenceForFileRef.current;
18423
+ if (getReferenceForFileFn) {
18424
+ const nonImageFiles = nonImageFilesFromDataTransfer(
18425
+ event.clipboardData
18426
+ );
18427
+ if (nonImageFiles.length > 0) {
18428
+ const references = nonImageFiles.map((file) => {
18429
+ try {
18430
+ return getReferenceForFileFn(file);
18431
+ } catch {
18432
+ return null;
18433
+ }
18434
+ }).filter(
18435
+ (reference) => Boolean(reference?.path)
18436
+ );
18437
+ if (references.length > 0) {
18438
+ event.preventDefault();
18439
+ const currentEditor2 = editorRef.current;
18440
+ if (!currentEditor2) {
18441
+ return true;
18442
+ }
18443
+ if (!currentEditor2.isFocused) {
18444
+ currentEditor2.commands.setTextSelection(
18445
+ currentEditor2.state.doc.content.size
18446
+ );
18447
+ }
18448
+ currentEditor2.commands.insertContent(
18449
+ createAgentFileMentionContent(references, {
18450
+ prefixCaretAnchor: isPromptVisualLineStart(
18451
+ currentEditor2,
18452
+ currentEditor2.state.selection.from
18453
+ )
18454
+ })
18455
+ );
18456
+ return true;
18457
+ }
18458
+ }
18459
+ }
18321
18460
  const html = event.clipboardData?.getData("text/html") ?? "";
18322
18461
  if (html.includes("data-agent-file-mention")) {
18323
18462
  return false;
@@ -18437,7 +18576,12 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18437
18576
  const insertPosition = coordinatePosition ?? (Number.isInteger(fallbackSelectionPosition) ? fallbackSelectionPosition : null) ?? currentEditor.state.doc.content.size;
18438
18577
  currentEditor.chain().focus().insertContentAt(
18439
18578
  insertPosition,
18440
- buildWorkspaceFileMentionDropContent(entries)
18579
+ buildWorkspaceFileMentionDropContent(entries, {
18580
+ prefixCaretAnchor: isPromptVisualLineStart(
18581
+ currentEditor,
18582
+ insertPosition
18583
+ )
18584
+ })
18441
18585
  ).run();
18442
18586
  return true;
18443
18587
  }
@@ -18470,6 +18614,18 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18470
18614
  event.stopPropagation();
18471
18615
  return;
18472
18616
  }
18617
+ if ((event.key === "ArrowLeft" || event.key === "ArrowRight") && !event.shiftKey && !event.metaKey && !event.ctrlKey && !event.altKey) {
18618
+ const currentEditor = editorRef.current;
18619
+ if (currentEditor && !currentEditor.isDestroyed && moveSelectionOverCaretAnchor(
18620
+ currentEditor.state,
18621
+ (transaction) => currentEditor.view.dispatch(transaction),
18622
+ event.key
18623
+ )) {
18624
+ event.preventDefault();
18625
+ event.stopPropagation();
18626
+ return;
18627
+ }
18628
+ }
18473
18629
  if (event.key === "Enter" && (event.metaKey || event.ctrlKey) && !event.shiftKey && !event.altKey) {
18474
18630
  event.preventDefault();
18475
18631
  event.stopPropagation();
@@ -18554,14 +18710,28 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18554
18710
  if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
18555
18711
  return;
18556
18712
  }
18557
- currentEditor.chain().focus().insertContent(createAgentFileMentionContent(items)).run();
18713
+ currentEditor.chain().focus().insertContent(
18714
+ createAgentFileMentionContent(items, {
18715
+ prefixCaretAnchor: isPromptVisualLineStart(
18716
+ currentEditor,
18717
+ currentEditor.state.selection.from
18718
+ )
18719
+ })
18720
+ ).run();
18558
18721
  },
18559
18722
  insertMentionItems(items) {
18560
18723
  const currentEditor = editorRef.current;
18561
18724
  if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
18562
18725
  return;
18563
18726
  }
18564
- currentEditor.chain().focus().insertContent(createAgentMentionContent(items)).run();
18727
+ currentEditor.chain().focus().insertContent(
18728
+ createAgentMentionContent(items, {
18729
+ prefixCaretAnchor: isPromptVisualLineStart(
18730
+ currentEditor,
18731
+ currentEditor.state.selection.from
18732
+ )
18733
+ })
18734
+ ).run();
18565
18735
  },
18566
18736
  replaceTextBeforeSelection(length, text) {
18567
18737
  const currentEditor = editorRef.current;
@@ -18613,7 +18783,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18613
18783
  lastEmittedPromptRef.current = value;
18614
18784
  }, [availableCapabilities, availableSkills, editor, value]);
18615
18785
  return /* @__PURE__ */ jsxs12("div", { className: "relative min-w-0", onKeyDownCapture: handleKeyDownCapture, children: [
18616
- editor ? /* @__PURE__ */ jsx23(EditorContent, { editor }) : /* @__PURE__ */ jsx23(
18786
+ editor ? /* @__PURE__ */ jsx24(EditorContent, { editor }) : /* @__PURE__ */ jsx24(
18617
18787
  "div",
18618
18788
  {
18619
18789
  role: "textbox",
@@ -18641,7 +18811,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18641
18811
  onContextMenu: (event) => event.preventDefault(),
18642
18812
  onPointerDown: (event) => event.stopPropagation(),
18643
18813
  children: [
18644
- /* @__PURE__ */ jsx23(
18814
+ /* @__PURE__ */ jsx24(
18645
18815
  AgentRichTextContextMenuButton,
18646
18816
  {
18647
18817
  disabled: !contextMenu.canEdit || !contextMenu.hasSelection,
@@ -18649,7 +18819,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18649
18819
  onSelect: cutSelection
18650
18820
  }
18651
18821
  ),
18652
- /* @__PURE__ */ jsx23(
18822
+ /* @__PURE__ */ jsx24(
18653
18823
  AgentRichTextContextMenuButton,
18654
18824
  {
18655
18825
  disabled: !contextMenu.hasSelection,
@@ -18657,7 +18827,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
18657
18827
  onSelect: copySelection
18658
18828
  }
18659
18829
  ),
18660
- /* @__PURE__ */ jsx23(
18830
+ /* @__PURE__ */ jsx24(
18661
18831
  AgentRichTextContextMenuButton,
18662
18832
  {
18663
18833
  disabled: !contextMenu.canEdit,
@@ -18687,7 +18857,7 @@ function AgentRichTextContextMenuButton({
18687
18857
  selectionStartedRef.current = false;
18688
18858
  });
18689
18859
  }, [disabled, onSelect]);
18690
- return /* @__PURE__ */ jsx23(
18860
+ return /* @__PURE__ */ jsx24(
18691
18861
  "button",
18692
18862
  {
18693
18863
  role: "menuitem",
@@ -18712,7 +18882,7 @@ function AgentRichTextContextMenuButton({
18712
18882
 
18713
18883
  // agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
18714
18884
  import { Fragment as Fragment5 } from "react";
18715
- import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
18885
+ import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
18716
18886
  function formatSlashStatusTokenCount(value) {
18717
18887
  if (typeof value !== "number" || !Number.isFinite(value)) {
18718
18888
  return "";
@@ -18754,8 +18924,8 @@ function AgentSlashStatusPanel({
18754
18924
  role: "status",
18755
18925
  children: [
18756
18926
  /* @__PURE__ */ jsxs13("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
18757
- /* @__PURE__ */ jsx24("h3", { className: "truncate text-[11px] font-semibold leading-4", children: labels.slashStatusTitle }),
18758
- /* @__PURE__ */ jsx24(
18927
+ /* @__PURE__ */ jsx25("h3", { className: "truncate text-[11px] font-semibold leading-4", children: labels.slashStatusTitle }),
18928
+ /* @__PURE__ */ jsx25(
18759
18929
  "button",
18760
18930
  {
18761
18931
  className: "nodrag shrink-0 rounded-[5px] px-1.5 py-0.5 text-[11px] leading-4 text-muted-foreground transition-colors hover:bg-background-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [-webkit-app-region:no-drag]",
@@ -18771,32 +18941,32 @@ function AgentSlashStatusPanel({
18771
18941
  labels.slashStatusSession,
18772
18942
  ":"
18773
18943
  ] }),
18774
- /* @__PURE__ */ jsx24("dd", { className: "min-w-0 truncate", children: agentSessionId }),
18944
+ /* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: agentSessionId }),
18775
18945
  baseUrl ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
18776
18946
  /* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
18777
18947
  labels.slashStatusBaseUrl,
18778
18948
  ":"
18779
18949
  ] }),
18780
- /* @__PURE__ */ jsx24("dd", { className: "min-w-0 truncate", children: baseUrl })
18950
+ /* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: baseUrl })
18781
18951
  ] }) : null,
18782
18952
  /* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
18783
18953
  labels.slashStatusContext,
18784
18954
  ":"
18785
18955
  ] }),
18786
- /* @__PURE__ */ jsx24("dd", { className: "min-w-0", children: slashStatusContextText(status, labels) })
18956
+ /* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: slashStatusContextText(status, labels) })
18787
18957
  ] }) : null,
18788
18958
  limits.map((limit) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
18789
18959
  /* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
18790
18960
  limit.label,
18791
18961
  ":"
18792
18962
  ] }),
18793
- /* @__PURE__ */ jsx24("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxs13("span", { className: "agent-gui-node__slash-status-limit", children: [
18794
- typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */ jsx24(
18963
+ /* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxs13("span", { className: "agent-gui-node__slash-status-limit", children: [
18964
+ typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */ jsx25(
18795
18965
  "span",
18796
18966
  {
18797
18967
  "aria-hidden": "true",
18798
18968
  className: "agent-gui-node__slash-status-limit-meter",
18799
- children: /* @__PURE__ */ jsx24(
18969
+ children: /* @__PURE__ */ jsx25(
18800
18970
  "span",
18801
18971
  {
18802
18972
  className: "agent-gui-node__slash-status-limit-meter-fill",
@@ -18826,7 +18996,7 @@ function AgentSlashStatusPanel({
18826
18996
  labels.slashStatusLimits,
18827
18997
  ":"
18828
18998
  ] }),
18829
- /* @__PURE__ */ jsx24("dd", { className: "min-w-0 text-muted-foreground", children: labels.slashStatusLimitsUnavailable })
18999
+ /* @__PURE__ */ jsx25("dd", { className: "min-w-0 text-muted-foreground", children: labels.slashStatusLimitsUnavailable })
18830
19000
  ] }) : null
18831
19001
  ] })
18832
19002
  ]
@@ -18930,7 +19100,7 @@ var AgentReviewBranchController = class {
18930
19100
  };
18931
19101
 
18932
19102
  // agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
18933
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
19103
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
18934
19104
  var reviewMenuStyles = {
18935
19105
  panel: "agent-gui-node__slash-status-panel nodrag flex max-h-[280px] flex-col gap-1 overflow-hidden [-webkit-app-region:no-drag]",
18936
19106
  search: "nodrag h-8 w-full shrink-0 rounded-[6px] border-0 bg-transparent px-2.5 text-[11px] leading-4 text-[var(--text-primary)] placeholder:text-[var(--text-secondary)] focus-visible:outline-none [-webkit-app-region:no-drag]",
@@ -19134,7 +19304,7 @@ function AgentReviewPickerPanel({
19134
19304
  role: "dialog",
19135
19305
  "aria-label": labels.title,
19136
19306
  children: [
19137
- /* @__PURE__ */ jsx25(
19307
+ /* @__PURE__ */ jsx26(
19138
19308
  "input",
19139
19309
  {
19140
19310
  ref: searchInputRef,
@@ -19150,15 +19320,15 @@ function AgentReviewPickerPanel({
19150
19320
  onKeyDown: handleKeyDown
19151
19321
  }
19152
19322
  ),
19153
- /* @__PURE__ */ jsx25(
19323
+ /* @__PURE__ */ jsx26(
19154
19324
  "div",
19155
19325
  {
19156
19326
  className: reviewMenuStyles.list,
19157
19327
  role: "listbox",
19158
19328
  "aria-label": labels.title,
19159
- children: entries.length === 0 ? /* @__PURE__ */ jsx25("div", { className: reviewMenuStyles.message, children: emptyMessage }) : entries.map((entry, index) => {
19329
+ children: entries.length === 0 ? /* @__PURE__ */ jsx26("div", { className: reviewMenuStyles.message, children: emptyMessage }) : entries.map((entry, index) => {
19160
19330
  const isHighlighted = index === safeHighlightedIndex;
19161
- return /* @__PURE__ */ jsx25(
19331
+ return /* @__PURE__ */ jsx26(
19162
19332
  "button",
19163
19333
  {
19164
19334
  ref: isHighlighted ? highlightedOptionRef : null,
@@ -19179,8 +19349,8 @@ function AgentReviewPickerPanel({
19179
19349
  }
19180
19350
  },
19181
19351
  children: /* @__PURE__ */ jsxs14("span", { className: reviewMenuStyles.copy, children: [
19182
- /* @__PURE__ */ jsx25("span", { className: reviewMenuStyles.name, children: entry.label }),
19183
- entry.description ? /* @__PURE__ */ jsx25("span", { className: reviewMenuStyles.description, children: entry.description }) : null
19352
+ /* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.name, children: entry.label }),
19353
+ entry.description ? /* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.description, children: entry.description }) : null
19184
19354
  ] })
19185
19355
  },
19186
19356
  entry.key
@@ -19204,7 +19374,7 @@ import {
19204
19374
  useState as useState10
19205
19375
  } from "react";
19206
19376
  import { createPortal as createPortal2 } from "react-dom";
19207
- import { jsx as jsx26 } from "react/jsx-runtime";
19377
+ import { jsx as jsx27 } from "react/jsx-runtime";
19208
19378
  var COMPOSER_MENU_GAP_PX = 8;
19209
19379
  var COMPOSER_MENU_VIEWPORT_PADDING_PX = 8;
19210
19380
  var COMPOSER_MENU_MIN_HEIGHT_PX = 280;
@@ -19422,7 +19592,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
19422
19592
  }
19423
19593
  const portalTarget = frame?.portalTarget ?? (anchorRef.current ? resolveComposerMenuPortalTarget(anchorRef.current) : document.body);
19424
19594
  return createPortal2(
19425
- /* @__PURE__ */ jsx26(
19595
+ /* @__PURE__ */ jsx27(
19426
19596
  "div",
19427
19597
  {
19428
19598
  "data-testid": testId,
@@ -19433,7 +19603,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
19433
19603
  className
19434
19604
  ),
19435
19605
  style,
19436
- children: contentClassName ? /* @__PURE__ */ jsx26("div", { className: contentClassName, children }) : children
19606
+ children: contentClassName ? /* @__PURE__ */ jsx27("div", { className: contentClassName, children }) : children
19437
19607
  }
19438
19608
  ),
19439
19609
  portalTarget
@@ -19441,13 +19611,16 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
19441
19611
  });
19442
19612
 
19443
19613
  // agent-gui/agentGuiNode/AgentComposer.tsx
19444
- import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
19614
+ import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
19445
19615
  var USAGE_POPOVER_HOVER_DELAY_MS = 120;
19446
19616
  var DOCK_COMPOSER_INPUT_MIN_HEIGHT = 56;
19447
- var DOCK_COMPOSER_INPUT_MAX_HEIGHT = 120;
19617
+ var DOCK_COMPOSER_TEXT_LINE_HEIGHT = 24;
19618
+ var DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES = 3.5;
19619
+ var DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT = 26;
19620
+ var DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT = DOCK_COMPOSER_TEXT_LINE_HEIGHT * DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES;
19621
+ var DOCK_COMPOSER_INPUT_MAX_HEIGHT = DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT + DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT;
19448
19622
  var DOCK_COMPOSER_INPUT_BORDER_HEIGHT = 2;
19449
19623
  var DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT = 24;
19450
- var DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT = 26;
19451
19624
  function agentUsageChipLevel(percentUsed) {
19452
19625
  if (percentUsed >= USAGE_CRITICAL_PERCENT) {
19453
19626
  return "critical";
@@ -19540,7 +19713,7 @@ function AgentUsageChip({
19540
19713
  },
19541
19714
  [clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]
19542
19715
  );
19543
- const trigger = /* @__PURE__ */ jsx27(
19716
+ const trigger = /* @__PURE__ */ jsx28(
19544
19717
  "button",
19545
19718
  {
19546
19719
  type: "button",
@@ -19564,7 +19737,7 @@ function AgentUsageChip({
19564
19737
  style: {
19565
19738
  background: `conic-gradient(${ringColor} ${clampedPercent}%, color-mix(in srgb, ${ringColor} 16%, transparent) 0)`
19566
19739
  },
19567
- children: /* @__PURE__ */ jsx27(
19740
+ children: /* @__PURE__ */ jsx28(
19568
19741
  "span",
19569
19742
  {
19570
19743
  "aria-hidden": "true",
@@ -19582,8 +19755,8 @@ function AgentUsageChip({
19582
19755
  open: usagePopoverOpen,
19583
19756
  onOpenChange: handleUsagePopoverOpenChange,
19584
19757
  children: [
19585
- /* @__PURE__ */ jsx27(PopoverTrigger, { asChild: true, children: trigger }),
19586
- usagePopoverOpen ? /* @__PURE__ */ jsx27(
19758
+ /* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: trigger }),
19759
+ usagePopoverOpen ? /* @__PURE__ */ jsx28(
19587
19760
  PopoverContent,
19588
19761
  {
19589
19762
  side: "bottom",
@@ -19594,8 +19767,8 @@ function AgentUsageChip({
19594
19767
  onPointerEnter: openUsagePopover,
19595
19768
  onPointerLeave: scheduleUsagePopoverClose,
19596
19769
  children: /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 flex-col gap-3", children: [
19597
- /* @__PURE__ */ jsx27("span", { className: "text-[13px] font-semibold leading-4", children: labels.usagePopoverTitle }),
19598
- showTokens ? /* @__PURE__ */ jsx27(
19770
+ /* @__PURE__ */ jsx28("span", { className: "text-[13px] font-semibold leading-4", children: labels.usagePopoverTitle }),
19771
+ showTokens ? /* @__PURE__ */ jsx28(
19599
19772
  AgentUsageMeter,
19600
19773
  {
19601
19774
  label: labels.usageContextWindowLabel,
@@ -19605,7 +19778,7 @@ function AgentUsageChip({
19605
19778
  testId: "agent-gui-usage-context-meter"
19606
19779
  }
19607
19780
  ) : null,
19608
- compactSupported && onCompact ? /* @__PURE__ */ jsx27(
19781
+ compactSupported && onCompact ? /* @__PURE__ */ jsx28(
19609
19782
  Button3,
19610
19783
  {
19611
19784
  type: "button",
@@ -19748,6 +19921,8 @@ function AgentComposer({
19748
19921
  const draftImages = draftContent.images;
19749
19922
  const draftFiles = draftContent.files ?? [];
19750
19923
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
19924
+ const agentHostApi = useOptionalAgentHostApi();
19925
+ const getReferenceForFile = agentHostApi?.workspace.getReferenceForFile;
19751
19926
  const [isPaletteOpen, setIsPaletteOpen] = useState11(true);
19752
19927
  const [isReviewPickerOpen, setIsReviewPickerOpen] = useState11(false);
19753
19928
  const [highlightedIndex, setHighlightedIndex] = useState11(0);
@@ -21206,7 +21381,10 @@ function AgentComposer({
21206
21381
  "--agent-gui-composer-attachment-height": `${dockComposerAttachmentHeight}px`,
21207
21382
  "--agent-gui-composer-input-height": `${dockComposerInputHeight}px`,
21208
21383
  "--agent-gui-composer-input-max-height": `${dockComposerInputMaxHeight}px`,
21209
- "--agent-gui-composer-text-height": `${dockComposerTextHeight}px`
21384
+ "--agent-gui-composer-text-height": `${dockComposerTextHeight}px`,
21385
+ "--agent-gui-composer-text-line-height": `${DOCK_COMPOSER_TEXT_LINE_HEIGHT}px`,
21386
+ "--agent-gui-composer-text-max-visible-lines": `${DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES}`,
21387
+ "--agent-gui-composer-text-viewport-height": `${DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT}px`
21210
21388
  },
21211
21389
  [
21212
21390
  dockComposerAttachmentHeight,
@@ -21267,7 +21445,7 @@ function AgentComposer({
21267
21445
  title: isInterrupting ? labels.stopping : labels.stop,
21268
21446
  onClick: onInterruptCurrentTurn,
21269
21447
  children: [
21270
- /* @__PURE__ */ jsx27(
21448
+ /* @__PURE__ */ jsx28(
21271
21449
  Spinner,
21272
21450
  {
21273
21451
  className: "size-7 text-[var(--text-primary)]",
@@ -21277,7 +21455,7 @@ function AgentComposer({
21277
21455
  testId: "agent-gui-composer-stop-spinner"
21278
21456
  }
21279
21457
  ),
21280
- /* @__PURE__ */ jsx27(
21458
+ /* @__PURE__ */ jsx28(
21281
21459
  "span",
21282
21460
  {
21283
21461
  "aria-hidden": "true",
@@ -21287,7 +21465,7 @@ function AgentComposer({
21287
21465
  )
21288
21466
  ]
21289
21467
  }
21290
- ) : /* @__PURE__ */ jsx27(
21468
+ ) : /* @__PURE__ */ jsx28(
21291
21469
  "button",
21292
21470
  {
21293
21471
  type: "submit",
@@ -21297,7 +21475,7 @@ function AgentComposer({
21297
21475
  "aria-label": labels.send,
21298
21476
  title: labels.send,
21299
21477
  "aria-busy": sendButtonBusy,
21300
- children: sendButtonBusy ? /* @__PURE__ */ jsx27(
21478
+ children: sendButtonBusy ? /* @__PURE__ */ jsx28(
21301
21479
  Spinner,
21302
21480
  {
21303
21481
  className: "text-[var(--text-primary)]",
@@ -21306,10 +21484,10 @@ function AgentComposer({
21306
21484
  trackColor: "var(--transparency-hover)",
21307
21485
  testId: "agent-gui-composer-send-spinner"
21308
21486
  }
21309
- ) : /* @__PURE__ */ jsx27(SendFilledIcon, {})
21487
+ ) : /* @__PURE__ */ jsx28(SendFilledIcon, {})
21310
21488
  }
21311
21489
  );
21312
- const promptTipNode = activePromptTip ? /* @__PURE__ */ jsx27(
21490
+ const promptTipNode = activePromptTip ? /* @__PURE__ */ jsx28(
21313
21491
  "span",
21314
21492
  {
21315
21493
  ref: promptTipRef,
@@ -21317,14 +21495,14 @@ function AgentComposer({
21317
21495
  "data-rotating": promptTips.length > 1 ? "true" : void 0,
21318
21496
  "data-testid": "agent-gui-prompt-tip",
21319
21497
  style: promptTipStyle,
21320
- children: /* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */ jsxs15(
21498
+ children: /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */ jsxs15(
21321
21499
  "span",
21322
21500
  {
21323
21501
  className: AgentGUINode_styles_default.composerPromptTipItem,
21324
21502
  "aria-hidden": index >= promptTips.length ? true : void 0,
21325
21503
  children: [
21326
- /* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipPrefix, children: labels.promptTipsPrefix }),
21327
- /* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipLabel, children: tip.label }),
21504
+ /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipPrefix, children: labels.promptTipsPrefix }),
21505
+ /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipLabel, children: tip.label }),
21328
21506
  /* @__PURE__ */ jsxs15("span", { className: AgentGUINode_styles_default.composerPromptTipText, children: [
21329
21507
  " \xB7 ",
21330
21508
  tip.prompt
@@ -21344,12 +21522,12 @@ function AgentComposer({
21344
21522
  "data-layout": layoutMode,
21345
21523
  onSubmit: submit,
21346
21524
  children: [
21347
- visibleActivePrompt ? /* @__PURE__ */ jsx27(
21525
+ visibleActivePrompt ? /* @__PURE__ */ jsx28(
21348
21526
  "div",
21349
21527
  {
21350
21528
  className: AgentGUINode_styles_default.composerFloatingPrompt,
21351
21529
  "data-testid": "agent-gui-composer-floating-prompt",
21352
- children: /* @__PURE__ */ jsx27(
21530
+ children: /* @__PURE__ */ jsx28(
21353
21531
  AgentInteractivePromptSurface,
21354
21532
  {
21355
21533
  prompt: visibleActivePrompt,
@@ -21381,7 +21559,7 @@ function AgentComposer({
21381
21559
  )
21382
21560
  }
21383
21561
  ) : null,
21384
- queuedPrompts.length > 0 ? /* @__PURE__ */ jsx27(
21562
+ queuedPrompts.length > 0 ? /* @__PURE__ */ jsx28(
21385
21563
  "div",
21386
21564
  {
21387
21565
  className: cn(
@@ -21389,7 +21567,7 @@ function AgentComposer({
21389
21567
  AgentGUINode_styles_default.composerQueuedPromptFloating
21390
21568
  ),
21391
21569
  "data-testid": "agent-gui-composer-queued-prompts",
21392
- children: /* @__PURE__ */ jsx27(
21570
+ children: /* @__PURE__ */ jsx28(
21393
21571
  AgentQueuedPromptPanel,
21394
21572
  {
21395
21573
  queuedPrompts,
@@ -21410,7 +21588,7 @@ function AgentComposer({
21410
21588
  )
21411
21589
  }
21412
21590
  ) : null,
21413
- showProjectMissingProbe ? /* @__PURE__ */ jsx27(
21591
+ showProjectMissingProbe ? /* @__PURE__ */ jsx28(
21414
21592
  AgentProjectMissingStatusProbe,
21415
21593
  {
21416
21594
  composerSettings,
@@ -21426,7 +21604,7 @@ function AgentComposer({
21426
21604
  ),
21427
21605
  "data-edge-glow": showEdgeGlow ? "true" : void 0,
21428
21606
  children: [
21429
- isSelectedProjectMissing ? /* @__PURE__ */ jsx27(
21607
+ isSelectedProjectMissing ? /* @__PURE__ */ jsx28(
21430
21608
  AgentChromeNotice,
21431
21609
  {
21432
21610
  tone: "danger",
@@ -21455,7 +21633,7 @@ function AgentComposer({
21455
21633
  onOpenChange: setIsPaletteOpen,
21456
21634
  modal: false,
21457
21635
  children: [
21458
- /* @__PURE__ */ jsx27(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs15(
21636
+ /* @__PURE__ */ jsx28(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs15(
21459
21637
  "div",
21460
21638
  {
21461
21639
  ref: promptInputAreaRef,
@@ -21466,12 +21644,12 @@ function AgentComposer({
21466
21644
  "data-has-draft-images": draftImages.length > 0 ? "true" : void 0,
21467
21645
  style: promptInputAreaStyle,
21468
21646
  children: [
21469
- draftImages.length > 0 ? /* @__PURE__ */ jsx27(
21647
+ draftImages.length > 0 ? /* @__PURE__ */ jsx28(
21470
21648
  "div",
21471
21649
  {
21472
21650
  className: "mb-2 flex w-full max-w-full flex-wrap items-start gap-2",
21473
21651
  "data-testid": "agent-gui-composer-image-drafts",
21474
- children: draftImages.map((image) => /* @__PURE__ */ jsx27(
21652
+ children: draftImages.map((image) => /* @__PURE__ */ jsx28(
21475
21653
  AgentComposerDraftImagePreview,
21476
21654
  {
21477
21655
  image,
@@ -21482,7 +21660,7 @@ function AgentComposer({
21482
21660
  ))
21483
21661
  }
21484
21662
  ) : null,
21485
- visibleDraftFiles.length > 0 ? /* @__PURE__ */ jsx27(
21663
+ visibleDraftFiles.length > 0 ? /* @__PURE__ */ jsx28(
21486
21664
  "div",
21487
21665
  {
21488
21666
  className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
@@ -21498,7 +21676,7 @@ function AgentComposer({
21498
21676
  "data-upload-error": file.uploadError ? "true" : void 0,
21499
21677
  title: file.hostPath ?? file.path ?? file.name,
21500
21678
  children: [
21501
- file.uploading ? /* @__PURE__ */ jsx27(
21679
+ file.uploading ? /* @__PURE__ */ jsx28(
21502
21680
  Spinner,
21503
21681
  {
21504
21682
  className: "shrink-0 text-[var(--text-primary)]",
@@ -21507,15 +21685,15 @@ function AgentComposer({
21507
21685
  trackColor: "var(--transparency-hover)",
21508
21686
  testId: "agent-gui-composer-file-upload-spinner"
21509
21687
  }
21510
- ) : /* @__PURE__ */ jsx27(
21688
+ ) : /* @__PURE__ */ jsx28(
21511
21689
  "span",
21512
21690
  {
21513
21691
  className: "size-2 shrink-0 rounded-full bg-[var(--text-tertiary)]",
21514
21692
  "aria-hidden": true
21515
21693
  }
21516
21694
  ),
21517
- /* @__PURE__ */ jsx27("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
21518
- /* @__PURE__ */ jsx27(
21695
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
21696
+ /* @__PURE__ */ jsx28(
21519
21697
  "button",
21520
21698
  {
21521
21699
  type: "button",
@@ -21523,7 +21701,7 @@ function AgentComposer({
21523
21701
  "aria-label": labels.removeMention,
21524
21702
  title: labels.removeMention,
21525
21703
  onClick: () => removeDraftFile(file.id),
21526
- children: /* @__PURE__ */ jsx27(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
21704
+ children: /* @__PURE__ */ jsx28(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
21527
21705
  }
21528
21706
  )
21529
21707
  ]
@@ -21540,7 +21718,7 @@ function AgentComposer({
21540
21718
  !isHeroLayout && "agent-gui-node__composer-prompt-input-line"
21541
21719
  ),
21542
21720
  children: [
21543
- /* @__PURE__ */ jsx27(
21721
+ /* @__PURE__ */ jsx28(
21544
21722
  AgentRichTextEditor,
21545
21723
  {
21546
21724
  ref: editorHandleRef,
@@ -21560,7 +21738,8 @@ function AgentComposer({
21560
21738
  onLinkClick: handleLinkClick,
21561
21739
  promptImagesSupported,
21562
21740
  onPromptImagesUnsupported,
21563
- onPasteImages: handlePastedImages
21741
+ onPasteImages: handlePastedImages,
21742
+ getReferenceForFile
21564
21743
  }
21565
21744
  ),
21566
21745
  !isHeroLayout ? composerActionButton : null
@@ -21571,7 +21750,7 @@ function AgentComposer({
21571
21750
  }
21572
21751
  ) }),
21573
21752
  showFileMentionPalette && mentionPaletteFrame ? createPortal3(
21574
- /* @__PURE__ */ jsx27(
21753
+ /* @__PURE__ */ jsx28(
21575
21754
  "div",
21576
21755
  {
21577
21756
  "data-testid": "agent-gui-mention-palette-surface",
@@ -21581,7 +21760,7 @@ function AgentComposer({
21581
21760
  "max-h-[320px] overflow-hidden border-[var(--line-1)] p-0"
21582
21761
  ),
21583
21762
  style: mentionPaletteStyle,
21584
- children: /* @__PURE__ */ jsx27(
21763
+ children: /* @__PURE__ */ jsx28(
21585
21764
  AgentFileMentionPalette,
21586
21765
  {
21587
21766
  state: mentionSearchState,
@@ -21607,7 +21786,7 @@ function AgentComposer({
21607
21786
  ),
21608
21787
  mentionPaletteFrame.portalTarget
21609
21788
  ) : null,
21610
- /* @__PURE__ */ jsx27(
21789
+ /* @__PURE__ */ jsx28(
21611
21790
  ComposerFloatingMenuSurface,
21612
21791
  {
21613
21792
  anchorRef: inputShellRef,
@@ -21620,7 +21799,7 @@ function AgentComposer({
21620
21799
  placement: "fixed-height",
21621
21800
  surfaceRef: paletteContentRef,
21622
21801
  testId: "agent-gui-slash-palette-surface",
21623
- children: /* @__PURE__ */ jsx27(
21802
+ children: /* @__PURE__ */ jsx28(
21624
21803
  AgentSlashCommandPalette,
21625
21804
  {
21626
21805
  entries: slashPaletteEntries,
@@ -21641,7 +21820,7 @@ function AgentComposer({
21641
21820
  )
21642
21821
  }
21643
21822
  ),
21644
- /* @__PURE__ */ jsx27(
21823
+ /* @__PURE__ */ jsx28(
21645
21824
  ComposerFloatingMenuSurface,
21646
21825
  {
21647
21826
  anchorRef: inputShellRef,
@@ -21653,7 +21832,7 @@ function AgentComposer({
21653
21832
  placement: "dynamic-above",
21654
21833
  surfaceRef: paletteContentRef,
21655
21834
  testId: "agent-gui-command-menu-surface",
21656
- children: /* @__PURE__ */ jsx27(
21835
+ children: /* @__PURE__ */ jsx28(
21657
21836
  AgentSlashStatusPanel,
21658
21837
  {
21659
21838
  status: slashStatus,
@@ -21673,7 +21852,7 @@ function AgentComposer({
21673
21852
  )
21674
21853
  }
21675
21854
  ),
21676
- /* @__PURE__ */ jsx27(
21855
+ /* @__PURE__ */ jsx28(
21677
21856
  ComposerFloatingMenuSurface,
21678
21857
  {
21679
21858
  anchorRef: inputShellRef,
@@ -21685,7 +21864,7 @@ function AgentComposer({
21685
21864
  placement: "dynamic-above",
21686
21865
  surfaceRef: paletteContentRef,
21687
21866
  testId: "agent-gui-command-menu-surface",
21688
- children: /* @__PURE__ */ jsx27(
21867
+ children: /* @__PURE__ */ jsx28(
21689
21868
  AgentReviewPickerPanel,
21690
21869
  {
21691
21870
  labels: labels.reviewPicker,
@@ -21701,7 +21880,7 @@ function AgentComposer({
21701
21880
  ),
21702
21881
  /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
21703
21882
  /* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
21704
- previewMode ? /* @__PURE__ */ jsx27(
21883
+ previewMode ? /* @__PURE__ */ jsx28(
21705
21884
  "button",
21706
21885
  {
21707
21886
  type: "button",
@@ -21712,7 +21891,7 @@ function AgentComposer({
21712
21891
  AgentGUINode_styles_default.composerReferenceTrigger,
21713
21892
  "w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
21714
21893
  ),
21715
- children: /* @__PURE__ */ jsx27(
21894
+ children: /* @__PURE__ */ jsx28(
21716
21895
  AddIcon,
21717
21896
  {
21718
21897
  "aria-hidden": true,
@@ -21721,7 +21900,7 @@ function AgentComposer({
21721
21900
  }
21722
21901
  )
21723
21902
  }
21724
- ) : /* @__PURE__ */ jsx27(
21903
+ ) : /* @__PURE__ */ jsx28(
21725
21904
  Select2,
21726
21905
  {
21727
21906
  open: false,
@@ -21737,7 +21916,7 @@ function AgentComposer({
21737
21916
  void handleWorkspaceReferencePicker();
21738
21917
  }
21739
21918
  },
21740
- children: /* @__PURE__ */ jsx27(
21919
+ children: /* @__PURE__ */ jsx28(
21741
21920
  SelectTrigger2,
21742
21921
  {
21743
21922
  size: "sm",
@@ -21748,7 +21927,7 @@ function AgentComposer({
21748
21927
  AgentGUINode_styles_default.composerReferenceTrigger,
21749
21928
  "w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
21750
21929
  ),
21751
- children: /* @__PURE__ */ jsx27(
21930
+ children: /* @__PURE__ */ jsx28(
21752
21931
  AddIcon,
21753
21932
  {
21754
21933
  "aria-hidden": true,
@@ -21760,7 +21939,7 @@ function AgentComposer({
21760
21939
  )
21761
21940
  }
21762
21941
  ),
21763
- composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */ jsx27(
21942
+ composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */ jsx28(
21764
21943
  "button",
21765
21944
  {
21766
21945
  type: "button",
@@ -21776,19 +21955,19 @@ function AgentComposer({
21776
21955
  onClick: () => onSettingsChange({ planMode: false }),
21777
21956
  children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
21778
21957
  /* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
21779
- /* @__PURE__ */ jsx27(
21958
+ /* @__PURE__ */ jsx28(
21780
21959
  ListChecks2,
21781
21960
  {
21782
21961
  "aria-hidden": true,
21783
21962
  className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
21784
21963
  }
21785
21964
  ),
21786
- /* @__PURE__ */ jsx27(
21965
+ /* @__PURE__ */ jsx28(
21787
21966
  "span",
21788
21967
  {
21789
21968
  "aria-hidden": true,
21790
21969
  className: "absolute inset-0 flex items-center justify-center rounded-full bg-[var(--text-secondary)] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 group-disabled:opacity-0",
21791
- children: /* @__PURE__ */ jsx27(
21970
+ children: /* @__PURE__ */ jsx28(
21792
21971
  X,
21793
21972
  {
21794
21973
  className: "size-2.5 text-[var(--background-fronted)]",
@@ -21798,11 +21977,11 @@ function AgentComposer({
21798
21977
  }
21799
21978
  )
21800
21979
  ] }),
21801
- /* @__PURE__ */ jsx27("span", { className: "min-w-0 truncate", children: labels.planModeLabel })
21980
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate", children: labels.planModeLabel })
21802
21981
  ] })
21803
21982
  }
21804
21983
  ) : null,
21805
- isGoalModeActive ? /* @__PURE__ */ jsx27(
21984
+ isGoalModeActive ? /* @__PURE__ */ jsx28(
21806
21985
  "button",
21807
21986
  {
21808
21987
  type: "button",
@@ -21818,19 +21997,19 @@ function AgentComposer({
21818
21997
  onClick: clearGoalModeBadge,
21819
21998
  children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
21820
21999
  /* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
21821
- /* @__PURE__ */ jsx27(
22000
+ /* @__PURE__ */ jsx28(
21822
22001
  Target3,
21823
22002
  {
21824
22003
  "aria-hidden": true,
21825
22004
  className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
21826
22005
  }
21827
22006
  ),
21828
- /* @__PURE__ */ jsx27(
22007
+ /* @__PURE__ */ jsx28(
21829
22008
  "span",
21830
22009
  {
21831
22010
  "aria-hidden": true,
21832
22011
  className: "absolute inset-0 flex items-center justify-center rounded-full bg-[var(--text-secondary)] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 group-disabled:opacity-0",
21833
- children: /* @__PURE__ */ jsx27(
22012
+ children: /* @__PURE__ */ jsx28(
21834
22013
  X,
21835
22014
  {
21836
22015
  className: "size-2.5 text-[var(--background-fronted)]",
@@ -21840,13 +22019,13 @@ function AgentComposer({
21840
22019
  }
21841
22020
  )
21842
22021
  ] }),
21843
- /* @__PURE__ */ jsx27("span", { className: "min-w-0 truncate", children: labels.goalLabel })
22022
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate", children: labels.goalLabel })
21844
22023
  ] })
21845
22024
  }
21846
22025
  ) : null
21847
22026
  ] }),
21848
22027
  /* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroupRight, children: [
21849
- usage && usage.percentUsed !== null ? /* @__PURE__ */ jsx27(
22028
+ usage && usage.percentUsed !== null ? /* @__PURE__ */ jsx28(
21850
22029
  AgentUsageChip,
21851
22030
  {
21852
22031
  percentUsed: usage.percentUsed,
@@ -21865,7 +22044,7 @@ function AgentComposer({
21865
22044
  }
21866
22045
  }
21867
22046
  ) : null,
21868
- composerSettings.supportsPermissionMode ? /* @__PURE__ */ jsx27(
22047
+ composerSettings.supportsPermissionMode ? /* @__PURE__ */ jsx28(
21869
22048
  AgentPermissionModeDropdown,
21870
22049
  {
21871
22050
  composerSettings,
@@ -21878,7 +22057,7 @@ function AgentComposer({
21878
22057
  onSettingsChange: (patch) => onSettingsChange(patch)
21879
22058
  }
21880
22059
  ) : null,
21881
- composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */ jsx27(
22060
+ composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */ jsx28(
21882
22061
  AgentModelReasoningDropdown,
21883
22062
  {
21884
22063
  composerSettings,
@@ -21926,7 +22105,7 @@ function AgentComposer({
21926
22105
  className: AgentGUINode_styles_default.composerProjectRow,
21927
22106
  "data-project-missing": isSelectedProjectMissing ? "true" : void 0,
21928
22107
  children: [
21929
- showHeroProjectSelector ? /* @__PURE__ */ jsx27(
22108
+ showHeroProjectSelector ? /* @__PURE__ */ jsx28(
21930
22109
  AgentProjectDropdown,
21931
22110
  {
21932
22111
  composerSettings,
@@ -21941,14 +22120,14 @@ function AgentComposer({
21941
22120
  onProjectPathChange
21942
22121
  }
21943
22122
  ) : null,
21944
- activePromptTip ? /* @__PURE__ */ jsx27(
22123
+ activePromptTip ? /* @__PURE__ */ jsx28(
21945
22124
  "div",
21946
22125
  {
21947
22126
  className: AgentGUINode_styles_default.composerPromptTips,
21948
22127
  "data-testid": "agent-gui-prompt-tips",
21949
- children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx27(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
21950
- /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: promptTipNode }),
21951
- /* @__PURE__ */ jsx27(
22128
+ children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
22129
+ /* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: promptTipNode }),
22130
+ /* @__PURE__ */ jsx28(
21952
22131
  TooltipContent,
21953
22132
  {
21954
22133
  align: "end",
@@ -22003,7 +22182,7 @@ function AgentComposerDraftImagePreview({
22003
22182
  "data-upload-error": image.uploadError ? "true" : void 0,
22004
22183
  style: previewStyle,
22005
22184
  children: [
22006
- /* @__PURE__ */ jsx27(
22185
+ /* @__PURE__ */ jsx28(
22007
22186
  ZoomableImage,
22008
22187
  {
22009
22188
  src: image.previewUrl,
@@ -22026,12 +22205,12 @@ function AgentComposerDraftImagePreview({
22026
22205
  }
22027
22206
  }
22028
22207
  ),
22029
- image.uploading ? /* @__PURE__ */ jsx27(
22208
+ image.uploading ? /* @__PURE__ */ jsx28(
22030
22209
  "div",
22031
22210
  {
22032
22211
  className: "absolute inset-0 grid place-items-center bg-[color-mix(in_srgb,var(--background-fronted)_62%,transparent)]",
22033
22212
  "data-testid": "agent-gui-composer-image-uploading",
22034
- children: /* @__PURE__ */ jsx27(
22213
+ children: /* @__PURE__ */ jsx28(
22035
22214
  Spinner,
22036
22215
  {
22037
22216
  className: "text-[var(--text-primary)]",
@@ -22043,7 +22222,7 @@ function AgentComposerDraftImagePreview({
22043
22222
  )
22044
22223
  }
22045
22224
  ) : null,
22046
- /* @__PURE__ */ jsx27(
22225
+ /* @__PURE__ */ jsx28(
22047
22226
  "button",
22048
22227
  {
22049
22228
  type: "button",
@@ -22051,7 +22230,7 @@ function AgentComposerDraftImagePreview({
22051
22230
  "aria-label": removeLabel,
22052
22231
  title: removeLabel,
22053
22232
  onClick: () => onRemove(image.id),
22054
- children: /* @__PURE__ */ jsx27(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
22233
+ children: /* @__PURE__ */ jsx28(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
22055
22234
  }
22056
22235
  )
22057
22236
  ]
@@ -22131,7 +22310,7 @@ function useStableEventCallback(callback) {
22131
22310
  }
22132
22311
  function SendFilledIcon() {
22133
22312
  "use memo";
22134
- return /* @__PURE__ */ jsx27(
22313
+ return /* @__PURE__ */ jsx28(
22135
22314
  "svg",
22136
22315
  {
22137
22316
  width: "24",
@@ -22139,7 +22318,7 @@ function SendFilledIcon() {
22139
22318
  viewBox: "0 0 24 24",
22140
22319
  fill: "none",
22141
22320
  "aria-hidden": "true",
22142
- children: /* @__PURE__ */ jsx27(
22321
+ children: /* @__PURE__ */ jsx28(
22143
22322
  "path",
22144
22323
  {
22145
22324
  d: "M2.74311 8.80587C2.84592 8.40096 3.14571 8.08844 3.54551 7.97033L18.5197 3.51569C18.9336 3.39383 19.3809 3.5054 19.6881 3.81262C19.9951 4.11984 20.1076 4.56798 19.9857 4.9817L15.5311 19.9559C15.413 20.3557 15.1005 20.6555 14.6956 20.7583C14.2895 20.8597 13.869 20.7438 13.5721 20.4469L10.455 15.1823C10.8585 14.6483 12.1563 12.9094 14.3475 9.96528C14.6086 9.70419 14.6382 9.31168 14.4138 9.08692C14.1891 8.86221 13.796 8.8913 13.5348 9.15252L8.31088 13.0423L3.05316 9.92799C2.7562 9.63104 2.64049 9.21071 2.74311 8.80587Z",
@@ -22166,7 +22345,7 @@ function agentGUIBottomDockStoreSnapshotsEqual(current, next) {
22166
22345
  }
22167
22346
 
22168
22347
  // agent-gui/agentGuiNode/AgentConversationListSkeleton.tsx
22169
- import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
22348
+ import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
22170
22349
  var SKELETON_ROWS = [
22171
22350
  { id: "first", size: "long" },
22172
22351
  { id: "second", size: "medium" },
@@ -22178,7 +22357,7 @@ function AgentConversationListSkeleton({
22178
22357
  label
22179
22358
  }) {
22180
22359
  "use memo";
22181
- return /* @__PURE__ */ jsx28(
22360
+ return /* @__PURE__ */ jsx29(
22182
22361
  "div",
22183
22362
  {
22184
22363
  className: "agent-gui-node__conversation-list-skeleton",
@@ -22192,9 +22371,9 @@ function AgentConversationListSkeleton({
22192
22371
  "data-size": row.size,
22193
22372
  "aria-hidden": "true",
22194
22373
  children: [
22195
- /* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-spine" }),
22196
- /* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-primary" }),
22197
- /* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-secondary" })
22374
+ /* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-spine" }),
22375
+ /* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-primary" }),
22376
+ /* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-secondary" })
22198
22377
  ]
22199
22378
  },
22200
22379
  row.id
@@ -22205,7 +22384,7 @@ function AgentConversationListSkeleton({
22205
22384
 
22206
22385
  // agent-gui/agentGuiNode/agentGuiNodeViewConversation.tsx
22207
22386
  import { AskLinedIcon } from "@tutti-os/ui-system/icons";
22208
- import { jsx as jsx29 } from "react/jsx-runtime";
22387
+ import { jsx as jsx30 } from "react/jsx-runtime";
22209
22388
  function ConversationMeta({
22210
22389
  item,
22211
22390
  nowMs,
@@ -22214,24 +22393,24 @@ function ConversationMeta({
22214
22393
  "use memo";
22215
22394
  const kind = conversationMetaKind(item);
22216
22395
  if (kind === "loading") {
22217
- return /* @__PURE__ */ jsx29(
22396
+ return /* @__PURE__ */ jsx30(
22218
22397
  "span",
22219
22398
  {
22220
22399
  className: AgentGUINode_styles_default.conversationMeta,
22221
22400
  "data-kind": kind,
22222
22401
  "data-testid": `agent-gui-conversation-meta-${item.id}`,
22223
- children: /* @__PURE__ */ jsx29(LoadingGlyph, {})
22402
+ children: /* @__PURE__ */ jsx30(LoadingGlyph, {})
22224
22403
  }
22225
22404
  );
22226
22405
  }
22227
22406
  if (kind === "waiting") {
22228
- return /* @__PURE__ */ jsx29(
22407
+ return /* @__PURE__ */ jsx30(
22229
22408
  "span",
22230
22409
  {
22231
22410
  className: AgentGUINode_styles_default.conversationMeta,
22232
22411
  "data-kind": kind,
22233
22412
  "data-testid": `agent-gui-conversation-meta-${item.id}`,
22234
- children: /* @__PURE__ */ jsx29(
22413
+ children: /* @__PURE__ */ jsx30(
22235
22414
  AskLinedIcon,
22236
22415
  {
22237
22416
  "aria-hidden": "true",
@@ -22242,34 +22421,34 @@ function ConversationMeta({
22242
22421
  );
22243
22422
  }
22244
22423
  if (kind === "failed") {
22245
- return /* @__PURE__ */ jsx29(
22424
+ return /* @__PURE__ */ jsx30(
22246
22425
  "span",
22247
22426
  {
22248
22427
  className: AgentGUINode_styles_default.conversationMeta,
22249
22428
  "data-kind": kind,
22250
22429
  "data-testid": `agent-gui-conversation-meta-${item.id}`,
22251
- children: /* @__PURE__ */ jsx29(AttentionGlyph, {})
22430
+ children: /* @__PURE__ */ jsx30(AttentionGlyph, {})
22252
22431
  }
22253
22432
  );
22254
22433
  }
22255
22434
  if (kind === "unread-complete") {
22256
- return /* @__PURE__ */ jsx29(
22435
+ return /* @__PURE__ */ jsx30(
22257
22436
  "span",
22258
22437
  {
22259
22438
  className: AgentGUINode_styles_default.conversationMeta,
22260
22439
  "data-kind": kind,
22261
22440
  "data-testid": `agent-gui-conversation-meta-${item.id}`,
22262
- children: /* @__PURE__ */ jsx29("span", { className: AgentGUINode_styles_default.conversationUnreadLamp, "aria-hidden": "true" })
22441
+ children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationUnreadLamp, "aria-hidden": "true" })
22263
22442
  }
22264
22443
  );
22265
22444
  }
22266
- return /* @__PURE__ */ jsx29(
22445
+ return /* @__PURE__ */ jsx30(
22267
22446
  "span",
22268
22447
  {
22269
22448
  className: AgentGUINode_styles_default.conversationMeta,
22270
22449
  "data-kind": kind,
22271
22450
  "data-testid": `agent-gui-conversation-meta-${item.id}`,
22272
- children: /* @__PURE__ */ jsx29("span", { className: AgentGUINode_styles_default.conversationTime, children: formatConversationRelativeTime(
22451
+ children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationTime, children: formatConversationRelativeTime(
22273
22452
  resolveAgentGUIConversationSortTimeUnixMs(item),
22274
22453
  nowMs,
22275
22454
  labels
@@ -22437,7 +22616,7 @@ function formatConversationRelativeTime(updatedAtUnixMs, nowMs, labels) {
22437
22616
  }
22438
22617
  function LoadingGlyph() {
22439
22618
  "use memo";
22440
- return /* @__PURE__ */ jsx29(
22619
+ return /* @__PURE__ */ jsx30(
22441
22620
  Spinner,
22442
22621
  {
22443
22622
  className: AgentGUINode_styles_default.conversationStatusGlyph,
@@ -22451,14 +22630,14 @@ function LoadingGlyph() {
22451
22630
  }
22452
22631
  function AttentionGlyph() {
22453
22632
  "use memo";
22454
- return /* @__PURE__ */ jsx29(
22633
+ return /* @__PURE__ */ jsx30(
22455
22634
  "svg",
22456
22635
  {
22457
22636
  viewBox: "0 0 24 24",
22458
22637
  fill: "none",
22459
22638
  "aria-hidden": "true",
22460
22639
  className: AgentGUINode_styles_default.conversationStatusGlyph,
22461
- children: /* @__PURE__ */ jsx29(
22640
+ children: /* @__PURE__ */ jsx30(
22462
22641
  "path",
22463
22642
  {
22464
22643
  d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.5 15C12.7761 15 13 15.2239 13 15.5V16.5C13 16.7761 12.7761 17 12.5 17H11.5C11.2239 17 11 16.7761 11 16.5V15.5C11 15.2239 11.2239 15 11.5 15H12.5ZM12.5 7C12.7761 7 13 7.22386 13 7.5V13.5C13 13.7761 12.7761 14 12.5 14H11.5C11.2239 14 11 13.7761 11 13.5V7.5C11 7.22386 11.2239 7 11.5 7H12.5Z",
@@ -22471,7 +22650,7 @@ function AttentionGlyph() {
22471
22650
 
22472
22651
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
22473
22652
  import { createRichTextMentionHref as createRichTextMentionHref2 } from "@tutti-os/ui-rich-text/core";
22474
- import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
22653
+ import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
22475
22654
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
22476
22655
  var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
22477
22656
  var AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX = 1;
@@ -23110,14 +23289,14 @@ function AgentGUINodeView({
23110
23289
  inert: previewMode ? true : void 0,
23111
23290
  style: layoutStyle,
23112
23291
  children: [
23113
- /* @__PURE__ */ jsx30(
23292
+ /* @__PURE__ */ jsx31(
23114
23293
  "aside",
23115
23294
  {
23116
23295
  id: "agent-gui-conversation-rail",
23117
23296
  className: `${AgentGUINode_styles_default.railPanel}${conversationRailCollapsed ? ` ${AgentGUINode_styles_default.railPanelCollapsed}` : ""}`,
23118
23297
  "aria-hidden": conversationRailCollapsed ? "true" : void 0,
23119
23298
  inert: conversationRailCollapsed ? true : void 0,
23120
- children: /* @__PURE__ */ jsx30(
23299
+ children: /* @__PURE__ */ jsx31(
23121
23300
  AgentGUIConversationRailStorePane,
23122
23301
  {
23123
23302
  conversations: viewModel.conversations,
@@ -23128,7 +23307,7 @@ function AgentGUINodeView({
23128
23307
  )
23129
23308
  }
23130
23309
  ),
23131
- /* @__PURE__ */ jsx30(
23310
+ /* @__PURE__ */ jsx31(
23132
23311
  "div",
23133
23312
  {
23134
23313
  id: "agent-gui-conversation-rail-resize",
@@ -23152,7 +23331,7 @@ function AgentGUINodeView({
23152
23331
  onPointerUp: endConversationRailResize
23153
23332
  }
23154
23333
  ),
23155
- /* @__PURE__ */ jsx30("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx30(
23334
+ /* @__PURE__ */ jsx31("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx31(
23156
23335
  AgentGUIDetailPane,
23157
23336
  {
23158
23337
  viewModel,
@@ -23181,7 +23360,7 @@ function AgentGUINodeView({
23181
23360
  ]
23182
23361
  }
23183
23362
  ),
23184
- referenceSourceAggregator ? /* @__PURE__ */ jsx30(
23363
+ referenceSourceAggregator ? /* @__PURE__ */ jsx31(
23185
23364
  ReferenceSourcePicker,
23186
23365
  {
23187
23366
  aggregator: referenceSourceAggregator,
@@ -23195,7 +23374,7 @@ function AgentGUINodeView({
23195
23374
  onConfirm: confirmWorkspaceReferencePicker,
23196
23375
  onConfirmBundles: confirmWorkspaceReferenceBundles
23197
23376
  }
23198
- ) : /* @__PURE__ */ jsx30(
23377
+ ) : /* @__PURE__ */ jsx31(
23199
23378
  WorkspaceFileReferencePicker,
23200
23379
  {
23201
23380
  copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
@@ -23209,7 +23388,7 @@ function AgentGUINodeView({
23209
23388
  }
23210
23389
  )
23211
23390
  ] });
23212
- return previewMode ? content : /* @__PURE__ */ jsx30(TooltipProvider2, { children: content });
23391
+ return previewMode ? content : /* @__PURE__ */ jsx31(TooltipProvider2, { children: content });
23213
23392
  }
23214
23393
  function mergeWorkspaceAppIconsFromCommands(input) {
23215
23394
  const seen = new Set(
@@ -23422,8 +23601,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
23422
23601
  className: AgentGUINode_styles_default.unavailableChatEmpty,
23423
23602
  "data-testid": "agent-gui-unavailable-chat-empty",
23424
23603
  children: [
23425
- /* @__PURE__ */ jsx30(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
23426
- /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
23604
+ /* @__PURE__ */ jsx31(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
23605
+ /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
23427
23606
  ]
23428
23607
  }
23429
23608
  ),
@@ -24122,7 +24301,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24122
24301
  viewModel.isLoadingOlderMessages
24123
24302
  ]);
24124
24303
  return /* @__PURE__ */ jsxs17("main", { className: AgentGUINode_styles_default.detail, children: [
24125
- /* @__PURE__ */ jsx30(
24304
+ /* @__PURE__ */ jsx31(
24126
24305
  AgentGUIDetailHeader,
24127
24306
  {
24128
24307
  activeConversation: viewModel.activeConversation,
@@ -24147,8 +24326,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24147
24326
  "data-testid": "agent-gui-provider-setup-notice",
24148
24327
  role: "status",
24149
24328
  children: [
24150
- /* @__PURE__ */ jsx30("span", { className: "inline-flex max-w-full items-center justify-center gap-[6px] text-center text-[13px] font-normal leading-normal", children: /* @__PURE__ */ jsx30("span", { className: "min-w-0 break-words", children: labels.installRequiredPlaceholder }) }),
24151
- /* @__PURE__ */ jsx30(
24329
+ /* @__PURE__ */ jsx31("span", { className: "inline-flex max-w-full items-center justify-center gap-[6px] text-center text-[13px] font-normal leading-normal", children: /* @__PURE__ */ jsx31("span", { className: "min-w-0 break-words", children: labels.installRequiredPlaceholder }) }),
24330
+ /* @__PURE__ */ jsx31(
24152
24331
  "button",
24153
24332
  {
24154
24333
  type: "button",
@@ -24168,7 +24347,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24168
24347
  ]
24169
24348
  }
24170
24349
  ) : null,
24171
- /* @__PURE__ */ jsx30(
24350
+ /* @__PURE__ */ jsx31(
24172
24351
  ScrollArea,
24173
24352
  {
24174
24353
  scrollbarMode: "native",
@@ -24177,7 +24356,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24177
24356
  viewportTestId: "agent-gui-timeline",
24178
24357
  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(),
24179
24358
  viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
24180
- children: !hasActiveConversation ? /* @__PURE__ */ jsx30(
24359
+ children: !hasActiveConversation ? /* @__PURE__ */ jsx31(
24181
24360
  AgentGUIEmptyHeroPane,
24182
24361
  {
24183
24362
  provider: viewModel.data.provider,
@@ -24192,7 +24371,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24192
24371
  chromeLabels,
24193
24372
  composerProps: emptyHeroComposerProps
24194
24373
  }
24195
- ) : /* @__PURE__ */ jsx30(
24374
+ ) : /* @__PURE__ */ jsx31(
24196
24375
  AgentGUIConversationTimelinePane,
24197
24376
  {
24198
24377
  conversation,
@@ -24210,7 +24389,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24210
24389
  )
24211
24390
  }
24212
24391
  ),
24213
- hasActiveConversation ? /* @__PURE__ */ jsx30(
24392
+ hasActiveConversation ? /* @__PURE__ */ jsx31(
24214
24393
  AgentGUIBottomDockPane,
24215
24394
  {
24216
24395
  bottomDockRef,
@@ -24250,8 +24429,8 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
24250
24429
  const statusTitle = showSyncIndicator ? syncLabel : void 0;
24251
24430
  return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.detailHeader, children: [
24252
24431
  /* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.detailHeaderTitleGroup, children: [
24253
- /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
24254
- runPath ? /* @__PURE__ */ jsx30(AgentRunPathInfo, { path: runPath, previewMode }) : null
24432
+ /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
24433
+ runPath ? /* @__PURE__ */ jsx31(AgentRunPathInfo, { path: runPath, previewMode }) : null
24255
24434
  ] }),
24256
24435
  /* @__PURE__ */ jsxs17(
24257
24436
  "span",
@@ -24259,7 +24438,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
24259
24438
  className: "inline-flex flex-none items-center gap-2 whitespace-nowrap",
24260
24439
  title: statusTitle,
24261
24440
  children: [
24262
- showSyncIndicator ? /* @__PURE__ */ jsx30(
24441
+ showSyncIndicator ? /* @__PURE__ */ jsx31(
24263
24442
  StatusDot,
24264
24443
  {
24265
24444
  tone: syncStateTone(syncStatus),
@@ -24269,7 +24448,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
24269
24448
  title: syncLabel
24270
24449
  }
24271
24450
  ) : null,
24272
- showFailedSyncLabel ? /* @__PURE__ */ jsx30("span", { className: "text-[13px] font-semibold leading-[18px] text-shell-warning", children: syncLabel }) : null
24451
+ showFailedSyncLabel ? /* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-[18px] text-shell-warning", children: syncLabel }) : null
24273
24452
  ]
24274
24453
  }
24275
24454
  )
@@ -24280,21 +24459,21 @@ function AgentRunPathInfo({
24280
24459
  previewMode
24281
24460
  }) {
24282
24461
  "use memo";
24283
- const trigger = /* @__PURE__ */ jsx30(
24462
+ const trigger = /* @__PURE__ */ jsx31(
24284
24463
  "button",
24285
24464
  {
24286
24465
  type: "button",
24287
24466
  className: AgentGUINode_styles_default.detailHeaderPathInfo,
24288
24467
  "aria-label": path,
24289
- children: /* @__PURE__ */ jsx30(Info2, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
24468
+ children: /* @__PURE__ */ jsx31(Info2, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
24290
24469
  }
24291
24470
  );
24292
24471
  if (previewMode) {
24293
24472
  return trigger;
24294
24473
  }
24295
24474
  return /* @__PURE__ */ jsxs17(Tooltip3, { children: [
24296
- /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: trigger }),
24297
- /* @__PURE__ */ jsx30(
24475
+ /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: trigger }),
24476
+ /* @__PURE__ */ jsx31(
24298
24477
  TooltipContent3,
24299
24478
  {
24300
24479
  side: "top",
@@ -24339,8 +24518,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
24339
24518
  }) {
24340
24519
  "use memo";
24341
24520
  const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
24342
- return /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.emptyHeroBody, children: [
24343
- /* @__PURE__ */ jsx30(
24521
+ return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.emptyHeroBody, children: [
24522
+ /* @__PURE__ */ jsx31(
24344
24523
  "img",
24345
24524
  {
24346
24525
  "aria-hidden": "true",
@@ -24350,8 +24529,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
24350
24529
  alt: ""
24351
24530
  }
24352
24531
  ),
24353
- /* @__PURE__ */ jsx30("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: /* @__PURE__ */ jsx30(EmptyHeroTitle, { label: emptyLabel, providerLabel: emptyProvider }) }),
24354
- inlineNoticeChrome ? /* @__PURE__ */ jsx30(
24532
+ /* @__PURE__ */ jsx31("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: /* @__PURE__ */ jsx31(EmptyHeroTitle, { label: emptyLabel, providerLabel: emptyProvider }) }),
24533
+ inlineNoticeChrome ? /* @__PURE__ */ jsx31(
24355
24534
  AgentSessionChrome,
24356
24535
  {
24357
24536
  chrome: inlineNoticeChrome,
@@ -24363,7 +24542,7 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
24363
24542
  labels: chromeLabels
24364
24543
  }
24365
24544
  ) : null,
24366
- /* @__PURE__ */ jsx30(AgentComposer, { ...composerProps })
24545
+ /* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
24367
24546
  ] }) });
24368
24547
  });
24369
24548
  function EmptyHeroTitle({
@@ -24372,12 +24551,12 @@ function EmptyHeroTitle({
24372
24551
  }) {
24373
24552
  const providerStart = providerLabel ? label.indexOf(providerLabel) : -1;
24374
24553
  if (!shouldEmphasizeEmptyHeroProvider(label) || providerStart < 0) {
24375
- return /* @__PURE__ */ jsx30(Fragment8, { children: label });
24554
+ return /* @__PURE__ */ jsx31(Fragment8, { children: label });
24376
24555
  }
24377
24556
  const providerEnd = providerStart + providerLabel.length;
24378
24557
  return /* @__PURE__ */ jsxs17(Fragment8, { children: [
24379
24558
  label.slice(0, providerStart),
24380
- /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.emptyHeroProvider, children: label.slice(providerStart, providerEnd) }),
24559
+ /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.emptyHeroProvider, children: label.slice(providerStart, providerEnd) }),
24381
24560
  label.slice(providerEnd)
24382
24561
  ] });
24383
24562
  }
@@ -24419,12 +24598,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24419
24598
  className: AgentGUINode_styles_default.bottomDock,
24420
24599
  "data-testid": "agent-gui-bottom-dock",
24421
24600
  children: [
24422
- bottomDockLiftedPrompt ? /* @__PURE__ */ jsx30(
24601
+ bottomDockLiftedPrompt ? /* @__PURE__ */ jsx31(
24423
24602
  "div",
24424
24603
  {
24425
24604
  className: AgentGUINode_styles_default.bottomDockPrompt,
24426
24605
  "data-testid": "agent-gui-bottom-dock-active-prompt",
24427
- children: /* @__PURE__ */ jsx30(
24606
+ children: /* @__PURE__ */ jsx31(
24428
24607
  AgentInteractivePromptSurface,
24429
24608
  {
24430
24609
  prompt: bottomDockLiftedPrompt,
@@ -24439,7 +24618,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24439
24618
  )
24440
24619
  }
24441
24620
  ) : null,
24442
- inlineNoticeChrome ? /* @__PURE__ */ jsx30(
24621
+ inlineNoticeChrome ? /* @__PURE__ */ jsx31(
24443
24622
  AgentSessionChrome,
24444
24623
  {
24445
24624
  chrome: inlineNoticeChrome,
@@ -24451,7 +24630,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24451
24630
  labels: chromeLabels
24452
24631
  }
24453
24632
  ) : null,
24454
- /* @__PURE__ */ jsx30(
24633
+ /* @__PURE__ */ jsx31(
24455
24634
  AgentSessionChrome,
24456
24635
  {
24457
24636
  chrome: sessionChrome,
@@ -24463,7 +24642,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24463
24642
  labels: chromeLabels
24464
24643
  }
24465
24644
  ),
24466
- showGoalBanner ? /* @__PURE__ */ jsx30(
24645
+ showGoalBanner ? /* @__PURE__ */ jsx31(
24467
24646
  AgentGoalBanner,
24468
24647
  {
24469
24648
  objective: goalObjective,
@@ -24473,12 +24652,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24473
24652
  labels: goalBannerLabels
24474
24653
  }
24475
24654
  ) : null,
24476
- bottomDockReplacementPrompt ? /* @__PURE__ */ jsx30(
24655
+ bottomDockReplacementPrompt ? /* @__PURE__ */ jsx31(
24477
24656
  "div",
24478
24657
  {
24479
24658
  className: AgentGUINode_styles_default.bottomDockPrompt,
24480
24659
  "data-testid": "agent-gui-bottom-dock-active-prompt",
24481
- children: /* @__PURE__ */ jsx30(
24660
+ children: /* @__PURE__ */ jsx31(
24482
24661
  AgentInteractivePromptSurface,
24483
24662
  {
24484
24663
  prompt: bottomDockReplacementPrompt,
@@ -24492,7 +24671,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
24492
24671
  }
24493
24672
  )
24494
24673
  }
24495
- ) : /* @__PURE__ */ jsx30(AgentComposer, { ...composerProps })
24674
+ ) : /* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
24496
24675
  ]
24497
24676
  }
24498
24677
  );
@@ -24518,7 +24697,7 @@ var AgentGUIConversationRailStorePane = memo(
24518
24697
  }) {
24519
24698
  "use memo";
24520
24699
  const state = useSnapshot(store);
24521
- return /* @__PURE__ */ jsx30(
24700
+ return /* @__PURE__ */ jsx31(
24522
24701
  AgentGUIConversationRailPane,
24523
24702
  {
24524
24703
  ...state,
@@ -24740,7 +24919,7 @@ var AgentGUIConversationRailPane = memo(
24740
24919
  "aria-hidden": isCollapsed ? "true" : void 0,
24741
24920
  children: [
24742
24921
  /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.railToolbar, children: [
24743
- /* @__PURE__ */ jsx30(
24922
+ /* @__PURE__ */ jsx31(
24744
24923
  TaskSearchField,
24745
24924
  {
24746
24925
  value: conversationQuery,
@@ -24759,14 +24938,14 @@ var AgentGUIConversationRailPane = memo(
24759
24938
  disabled: createConversationDisabled,
24760
24939
  onClick: () => onCreateConversation(),
24761
24940
  children: [
24762
- /* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" }),
24763
- /* @__PURE__ */ jsx30("span", { children: labels.newConversation })
24941
+ /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" }),
24942
+ /* @__PURE__ */ jsx31("span", { children: labels.newConversation })
24764
24943
  ]
24765
24944
  }
24766
24945
  )
24767
24946
  ] }),
24768
24947
  openclawGateway?.status === "starting" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "starting", children: [
24769
- /* @__PURE__ */ jsx30(
24948
+ /* @__PURE__ */ jsx31(
24770
24949
  StatusDot,
24771
24950
  {
24772
24951
  tone: "blue",
@@ -24775,10 +24954,10 @@ var AgentGUIConversationRailPane = memo(
24775
24954
  ariaLabel: labels.openclawGatewayStarting
24776
24955
  }
24777
24956
  ),
24778
- /* @__PURE__ */ jsx30("span", { children: labels.openclawGatewayStarting })
24957
+ /* @__PURE__ */ jsx31("span", { children: labels.openclawGatewayStarting })
24779
24958
  ] }) : openclawGateway?.status === "failed" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "failed", children: [
24780
- /* @__PURE__ */ jsx30("span", { children: openclawGateway.error || labels.openclawGatewayFailed }),
24781
- /* @__PURE__ */ jsx30(
24959
+ /* @__PURE__ */ jsx31("span", { children: openclawGateway.error || labels.openclawGatewayFailed }),
24960
+ /* @__PURE__ */ jsx31(
24782
24961
  "button",
24783
24962
  {
24784
24963
  type: "button",
@@ -24788,19 +24967,19 @@ var AgentGUIConversationRailPane = memo(
24788
24967
  }
24789
24968
  )
24790
24969
  ] }) : null,
24791
- /* @__PURE__ */ jsx30(
24970
+ /* @__PURE__ */ jsx31(
24792
24971
  ScrollArea,
24793
24972
  {
24794
24973
  scrollbarMode: "native",
24795
24974
  className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
24796
24975
  viewportRef: conversationListRef,
24797
24976
  viewportClassName: AgentGUINode_styles_default.conversationList,
24798
- children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx30(
24977
+ children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx31(
24799
24978
  AgentConversationListSkeleton,
24800
24979
  {
24801
24980
  label: labels.loadingConversations
24802
24981
  }
24803
- ) : groupedConversations.length === 0 ? /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.emptyState, children: /* @__PURE__ */ jsx30("span", { children: conversations.length === 0 ? labels.noConversations : conversationQuery.trim() ? labels.searchNoConversations : labels.conversationUnavailable }) }) : groupedConversations.map((section, sectionIndex) => {
24982
+ ) : groupedConversations.length === 0 ? /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyState, children: /* @__PURE__ */ jsx31("span", { children: conversations.length === 0 ? labels.noConversations : conversationQuery.trim() ? labels.searchNoConversations : labels.conversationUnavailable }) }) : groupedConversations.map((section, sectionIndex) => {
24804
24983
  const projectPath = section.kind === "project" ? section.project?.path ?? "" : "";
24805
24984
  const normalizedProjectPath = normalizeConversationRailProjectPath(projectPath);
24806
24985
  const projectLabel = section.kind === "project" ? section.label : "";
@@ -24809,7 +24988,7 @@ var AgentGUIConversationRailPane = memo(
24809
24988
  const isSectionCollapsed = isProjectSection && collapsedProjectSectionIds.has(section.id);
24810
24989
  const projectConversationCount = normalizedProjectPath ? projectConversationCountsByPath.get(normalizedProjectPath) ?? 0 : 0;
24811
24990
  return /* @__PURE__ */ jsxs17(Fragment7, { children: [
24812
- showProjectRailHeader ? /* @__PURE__ */ jsx30(
24991
+ showProjectRailHeader ? /* @__PURE__ */ jsx31(
24813
24992
  AgentGUIProjectRailHeader,
24814
24993
  {
24815
24994
  labels,
@@ -24817,7 +24996,7 @@ var AgentGUIConversationRailPane = memo(
24817
24996
  workspaceUserProjectI18n
24818
24997
  }
24819
24998
  ) : null,
24820
- /* @__PURE__ */ jsx30(
24999
+ /* @__PURE__ */ jsx31(
24821
25000
  AgentGUIConversationRailSection,
24822
25001
  {
24823
25002
  activeConversationId,
@@ -24850,8 +25029,8 @@ var AgentGUIConversationRailPane = memo(
24850
25029
  })
24851
25030
  }
24852
25031
  ),
24853
- /* @__PURE__ */ jsx30("div", { className: "shrink-0 px-2 py-1.5", children: /* @__PURE__ */ jsxs17(Popover, { children: [
24854
- /* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
25032
+ /* @__PURE__ */ jsx31("div", { className: "shrink-0 px-2 py-1.5", children: /* @__PURE__ */ jsxs17(Popover, { children: [
25033
+ /* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
24855
25034
  Button,
24856
25035
  {
24857
25036
  type: "button",
@@ -24860,7 +25039,7 @@ var AgentGUIConversationRailPane = memo(
24860
25039
  title: labels.agentConfig,
24861
25040
  disabled: previewMode,
24862
25041
  children: [
24863
- /* @__PURE__ */ jsx30(
25042
+ /* @__PURE__ */ jsx31(
24864
25043
  EnvironmentLinedIcon,
24865
25044
  {
24866
25045
  "aria-hidden": "true",
@@ -24868,11 +25047,11 @@ var AgentGUIConversationRailPane = memo(
24868
25047
  height: 16
24869
25048
  }
24870
25049
  ),
24871
- /* @__PURE__ */ jsx30("span", { children: labels.agentConfig })
25050
+ /* @__PURE__ */ jsx31("span", { children: labels.agentConfig })
24872
25051
  ]
24873
25052
  }
24874
25053
  ) }),
24875
- /* @__PURE__ */ jsx30(
25054
+ /* @__PURE__ */ jsx31(
24876
25055
  PopoverContent,
24877
25056
  {
24878
25057
  side: "top",
@@ -24882,8 +25061,8 @@ var AgentGUIConversationRailPane = memo(
24882
25061
  children: /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-3", children: [
24883
25062
  slashStatusLimits.length > 0 ? /* @__PURE__ */ jsxs17(Fragment8, { children: [
24884
25063
  /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-2", children: [
24885
- /* @__PURE__ */ jsx30("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
24886
- slashStatusLimits.map((limit) => /* @__PURE__ */ jsx30(
25064
+ /* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
25065
+ slashStatusLimits.map((limit) => /* @__PURE__ */ jsx31(
24887
25066
  AgentUsageMeter,
24888
25067
  {
24889
25068
  label: limit.label,
@@ -24893,7 +25072,7 @@ var AgentGUIConversationRailPane = memo(
24893
25072
  limit.id
24894
25073
  ))
24895
25074
  ] }),
24896
- /* @__PURE__ */ jsx30("span", { className: "h-px bg-[var(--border-1)]" })
25075
+ /* @__PURE__ */ jsx31("span", { className: "h-px bg-[var(--border-1)]" })
24897
25076
  ] }) : null,
24898
25077
  /* @__PURE__ */ jsxs17(
24899
25078
  "button",
@@ -24904,8 +25083,8 @@ var AgentGUIConversationRailPane = memo(
24904
25083
  disabled: previewMode,
24905
25084
  onClick: () => onOpenAgentEnvSetup(),
24906
25085
  children: [
24907
- /* @__PURE__ */ jsx30(Wrench, { "aria-hidden": "true", size: 16, strokeWidth: 1.8 }),
24908
- /* @__PURE__ */ jsx30("span", { children: labels.agentEnvSetup })
25086
+ /* @__PURE__ */ jsx31(Wrench, { "aria-hidden": "true", size: 16, strokeWidth: 1.8 }),
25087
+ /* @__PURE__ */ jsx31("span", { children: labels.agentEnvSetup })
24909
25088
  ]
24910
25089
  }
24911
25090
  )
@@ -24913,7 +25092,7 @@ var AgentGUIConversationRailPane = memo(
24913
25092
  }
24914
25093
  )
24915
25094
  ] }) }),
24916
- /* @__PURE__ */ jsx30(
25095
+ /* @__PURE__ */ jsx31(
24917
25096
  ConfirmationDialog,
24918
25097
  {
24919
25098
  cancelLabel: labels.cancel,
@@ -25036,7 +25215,7 @@ var AgentGUIConversationRailSection = memo(
25036
25215
  "aria-expanded": !isSectionCollapsed,
25037
25216
  onClick: () => onToggleProjectSectionCollapsed(section.id),
25038
25217
  children: [
25039
- /* @__PURE__ */ jsx30(
25218
+ /* @__PURE__ */ jsx31(
25040
25219
  ChevronRight2,
25041
25220
  {
25042
25221
  "aria-hidden": "true",
@@ -25044,20 +25223,20 @@ var AgentGUIConversationRailSection = memo(
25044
25223
  }
25045
25224
  ),
25046
25225
  /* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: [
25047
- /* @__PURE__ */ jsx30(
25226
+ /* @__PURE__ */ jsx31(
25048
25227
  FolderIcon2,
25049
25228
  {
25050
25229
  "aria-hidden": "true",
25051
25230
  className: AgentGUINode_styles_default.conversationSectionLabelIcon
25052
25231
  }
25053
25232
  ),
25054
- /* @__PURE__ */ jsx30("span", { children: section.label })
25233
+ /* @__PURE__ */ jsx31("span", { children: section.label })
25055
25234
  ] })
25056
25235
  ]
25057
25236
  }
25058
- ) : /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx30("span", { children: section.label }) }) }),
25237
+ ) : /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx31("span", { children: section.label }) }) }),
25059
25238
  canCreateConversationFromSection ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionActions, children: [
25060
- previewMode ? /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx30(
25239
+ previewMode ? /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx31(
25061
25240
  BareIconButton,
25062
25241
  {
25063
25242
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
@@ -25065,14 +25244,14 @@ var AgentGUIConversationRailSection = memo(
25065
25244
  size: "sm",
25066
25245
  disabled: createConversationDisabled,
25067
25246
  onClick: handleCreateConversation,
25068
- children: /* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" })
25247
+ children: /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" })
25069
25248
  }
25070
25249
  ) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
25071
- /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
25250
+ /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
25072
25251
  "span",
25073
25252
  {
25074
25253
  className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
25075
- children: /* @__PURE__ */ jsx30(
25254
+ children: /* @__PURE__ */ jsx31(
25076
25255
  BareIconButton,
25077
25256
  {
25078
25257
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
@@ -25080,12 +25259,12 @@ var AgentGUIConversationRailSection = memo(
25080
25259
  size: "sm",
25081
25260
  disabled: createConversationDisabled,
25082
25261
  onClick: handleCreateConversation,
25083
- children: /* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" })
25262
+ children: /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" })
25084
25263
  }
25085
25264
  )
25086
25265
  }
25087
25266
  ) }),
25088
- /* @__PURE__ */ jsx30(
25267
+ /* @__PURE__ */ jsx31(
25089
25268
  TooltipContent3,
25090
25269
  {
25091
25270
  side: "top",
@@ -25096,37 +25275,37 @@ var AgentGUIConversationRailSection = memo(
25096
25275
  )
25097
25276
  ] }),
25098
25277
  projectPath ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
25099
- previewMode ? /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
25278
+ previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
25100
25279
  "span",
25101
25280
  {
25102
25281
  className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
25103
- children: /* @__PURE__ */ jsx30(
25282
+ children: /* @__PURE__ */ jsx31(
25104
25283
  BareIconButton,
25105
25284
  {
25106
25285
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
25107
25286
  "aria-label": labels.projectSectionMoreActions,
25108
25287
  size: "sm",
25109
- children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
25288
+ children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
25110
25289
  }
25111
25290
  )
25112
25291
  }
25113
25292
  ) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
25114
- /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
25293
+ /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
25115
25294
  "span",
25116
25295
  {
25117
25296
  className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
25118
- children: /* @__PURE__ */ jsx30(
25297
+ children: /* @__PURE__ */ jsx31(
25119
25298
  BareIconButton,
25120
25299
  {
25121
25300
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
25122
25301
  "aria-label": labels.projectSectionMoreActions,
25123
25302
  size: "sm",
25124
- children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
25303
+ children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
25125
25304
  }
25126
25305
  )
25127
25306
  }
25128
25307
  ) }) }),
25129
- /* @__PURE__ */ jsx30(
25308
+ /* @__PURE__ */ jsx31(
25130
25309
  TooltipContent3,
25131
25310
  {
25132
25311
  side: "right",
@@ -25143,7 +25322,7 @@ var AgentGUIConversationRailSection = memo(
25143
25322
  className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
25144
25323
  sideOffset: 6,
25145
25324
  children: [
25146
- /* @__PURE__ */ jsx30(
25325
+ /* @__PURE__ */ jsx31(
25147
25326
  DropdownMenuItem,
25148
25327
  {
25149
25328
  className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
@@ -25158,10 +25337,10 @@ var AgentGUIConversationRailSection = memo(
25158
25337
  workspaceRoot: projectPath
25159
25338
  });
25160
25339
  },
25161
- children: /* @__PURE__ */ jsx30("span", { children: labels.projectSectionViewFiles })
25340
+ children: /* @__PURE__ */ jsx31("span", { children: labels.projectSectionViewFiles })
25162
25341
  }
25163
25342
  ),
25164
- projectConversationCount > 0 ? /* @__PURE__ */ jsx30(
25343
+ projectConversationCount > 0 ? /* @__PURE__ */ jsx31(
25165
25344
  DropdownMenuItem,
25166
25345
  {
25167
25346
  className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
@@ -25174,10 +25353,10 @@ var AgentGUIConversationRailSection = memo(
25174
25353
  path: projectPath
25175
25354
  });
25176
25355
  },
25177
- children: /* @__PURE__ */ jsx30("span", { children: labels.batchDeleteProjectSessions })
25356
+ children: /* @__PURE__ */ jsx31("span", { children: labels.batchDeleteProjectSessions })
25178
25357
  }
25179
25358
  ) : null,
25180
- /* @__PURE__ */ jsx30(
25359
+ /* @__PURE__ */ jsx31(
25181
25360
  DropdownMenuItem,
25182
25361
  {
25183
25362
  className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
@@ -25189,7 +25368,7 @@ var AgentGUIConversationRailSection = memo(
25189
25368
  path: projectPath
25190
25369
  });
25191
25370
  },
25192
- children: /* @__PURE__ */ jsx30("span", { children: labels.removeProject })
25371
+ children: /* @__PURE__ */ jsx31("span", { children: labels.removeProject })
25193
25372
  }
25194
25373
  )
25195
25374
  ]
@@ -25197,37 +25376,37 @@ var AgentGUIConversationRailSection = memo(
25197
25376
  )
25198
25377
  ] }) : null,
25199
25378
  !projectPath && section.kind === "conversations" && section.items.length > 0 ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
25200
- previewMode ? /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
25379
+ previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
25201
25380
  "span",
25202
25381
  {
25203
25382
  className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
25204
- children: /* @__PURE__ */ jsx30(
25383
+ children: /* @__PURE__ */ jsx31(
25205
25384
  BareIconButton,
25206
25385
  {
25207
25386
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
25208
25387
  "aria-label": labels.conversationsSectionMoreActions,
25209
25388
  size: "sm",
25210
- children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
25389
+ children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
25211
25390
  }
25212
25391
  )
25213
25392
  }
25214
25393
  ) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
25215
- /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
25394
+ /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
25216
25395
  "span",
25217
25396
  {
25218
25397
  className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
25219
- children: /* @__PURE__ */ jsx30(
25398
+ children: /* @__PURE__ */ jsx31(
25220
25399
  BareIconButton,
25221
25400
  {
25222
25401
  className: AgentGUINode_styles_default.conversationSectionMoreButton,
25223
25402
  "aria-label": labels.conversationsSectionMoreActions,
25224
25403
  size: "sm",
25225
- children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
25404
+ children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
25226
25405
  }
25227
25406
  )
25228
25407
  }
25229
25408
  ) }) }),
25230
- /* @__PURE__ */ jsx30(
25409
+ /* @__PURE__ */ jsx31(
25231
25410
  TooltipContent3,
25232
25411
  {
25233
25412
  side: "right",
@@ -25237,13 +25416,13 @@ var AgentGUIConversationRailSection = memo(
25237
25416
  }
25238
25417
  )
25239
25418
  ] }),
25240
- /* @__PURE__ */ jsx30(
25419
+ /* @__PURE__ */ jsx31(
25241
25420
  DropdownMenuContent,
25242
25421
  {
25243
25422
  align: "end",
25244
25423
  className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
25245
25424
  sideOffset: 6,
25246
- children: /* @__PURE__ */ jsx30(
25425
+ children: /* @__PURE__ */ jsx31(
25247
25426
  DropdownMenuItem,
25248
25427
  {
25249
25428
  className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
@@ -25255,7 +25434,7 @@ var AgentGUIConversationRailSection = memo(
25255
25434
  sessionIds: section.items.map((item) => item.id)
25256
25435
  });
25257
25436
  },
25258
- children: /* @__PURE__ */ jsx30("span", { children: labels.batchDeleteConversations })
25437
+ children: /* @__PURE__ */ jsx31("span", { children: labels.batchDeleteConversations })
25259
25438
  }
25260
25439
  )
25261
25440
  }
@@ -25263,14 +25442,14 @@ var AgentGUIConversationRailSection = memo(
25263
25442
  ] }) : null
25264
25443
  ] }) : null
25265
25444
  ] }),
25266
- /* @__PURE__ */ jsx30(
25445
+ /* @__PURE__ */ jsx31(
25267
25446
  "div",
25268
25447
  {
25269
25448
  className: AgentGUINode_styles_default.conversationSectionItems,
25270
25449
  "aria-hidden": isSectionCollapsed ? "true" : void 0,
25271
25450
  children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
25272
- !isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
25273
- visibleItems.map((item) => /* @__PURE__ */ jsx30(
25451
+ !isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
25452
+ visibleItems.map((item) => /* @__PURE__ */ jsx31(
25274
25453
  AgentGUIConversationRailItem,
25275
25454
  {
25276
25455
  active: item.id === activeConversationId,
@@ -25292,7 +25471,7 @@ var AgentGUIConversationRailSection = memo(
25292
25471
  item.id
25293
25472
  )),
25294
25473
  canShowMore || canShowLess ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
25295
- canShowMore ? /* @__PURE__ */ jsx30(
25474
+ canShowMore ? /* @__PURE__ */ jsx31(
25296
25475
  "button",
25297
25476
  {
25298
25477
  type: "button",
@@ -25301,7 +25480,7 @@ var AgentGUIConversationRailSection = memo(
25301
25480
  children: labels.showMoreConversations
25302
25481
  }
25303
25482
  ) : null,
25304
- canShowLess ? /* @__PURE__ */ jsx30(
25483
+ canShowLess ? /* @__PURE__ */ jsx31(
25305
25484
  "button",
25306
25485
  {
25307
25486
  type: "button",
@@ -25380,12 +25559,12 @@ var AgentGUIConversationRailItem = memo(
25380
25559
  className: AgentGUINode_styles_default.conversationSelect,
25381
25560
  onClick: handleSelect,
25382
25561
  children: [
25383
- /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationTitle, children: conversationPlainTitle(item, labels, uiLanguage) }),
25384
- /* @__PURE__ */ jsx30(ConversationMeta, { item, nowMs: currentTimeMs, labels })
25562
+ /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationTitle, children: conversationPlainTitle(item, labels, uiLanguage) }),
25563
+ /* @__PURE__ */ jsx31(ConversationMeta, { item, nowMs: currentTimeMs, labels })
25385
25564
  ]
25386
25565
  }
25387
25566
  ),
25388
- previewMode ? null : /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationActions, children: isPendingDeleteConversation ? /* @__PURE__ */ jsx30(
25567
+ previewMode ? null : /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationActions, children: isPendingDeleteConversation ? /* @__PURE__ */ jsx31(
25389
25568
  "button",
25390
25569
  {
25391
25570
  type: "button",
@@ -25397,10 +25576,10 @@ var AgentGUIConversationRailItem = memo(
25397
25576
  event.stopPropagation();
25398
25577
  onConfirmDeleteConversation();
25399
25578
  },
25400
- children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
25579
+ children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
25401
25580
  }
25402
25581
  ) : /* @__PURE__ */ jsxs17(Fragment8, { children: [
25403
- onOpenConversationWindow ? /* @__PURE__ */ jsx30(
25582
+ onOpenConversationWindow ? /* @__PURE__ */ jsx31(
25404
25583
  BareIconButton,
25405
25584
  {
25406
25585
  className: AgentGUINode_styles_default.conversationOpenWindowButton,
@@ -25417,10 +25596,10 @@ var AgentGUIConversationRailItem = memo(
25417
25596
  event.stopPropagation();
25418
25597
  handleOpenConversationWindow();
25419
25598
  },
25420
- children: /* @__PURE__ */ jsx30(ExternalLink, { "aria-hidden": "true" })
25599
+ children: /* @__PURE__ */ jsx31(ExternalLink, { "aria-hidden": "true" })
25421
25600
  }
25422
25601
  ) : null,
25423
- /* @__PURE__ */ jsx30(
25602
+ /* @__PURE__ */ jsx31(
25424
25603
  BareIconButton,
25425
25604
  {
25426
25605
  className: AgentGUINode_styles_default.conversationPinButton,
@@ -25437,10 +25616,10 @@ var AgentGUIConversationRailItem = memo(
25437
25616
  event.stopPropagation();
25438
25617
  handleTogglePinned();
25439
25618
  },
25440
- children: pinned ? /* @__PURE__ */ jsx30(PinFilledIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx30(PinLinedIcon, { "aria-hidden": "true" })
25619
+ children: pinned ? /* @__PURE__ */ jsx31(PinFilledIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx31(PinLinedIcon, { "aria-hidden": "true" })
25441
25620
  }
25442
25621
  ),
25443
- /* @__PURE__ */ jsx30(
25622
+ /* @__PURE__ */ jsx31(
25444
25623
  BareIconButton,
25445
25624
  {
25446
25625
  className: AgentGUINode_styles_default.conversationDeleteButton,
@@ -25457,7 +25636,7 @@ var AgentGUIConversationRailItem = memo(
25457
25636
  event.stopPropagation();
25458
25637
  handleRequestDelete();
25459
25638
  },
25460
- children: /* @__PURE__ */ jsx30(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
25639
+ children: /* @__PURE__ */ jsx31(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
25461
25640
  }
25462
25641
  )
25463
25642
  ] }) })
@@ -25485,9 +25664,9 @@ function AgentGUIProjectRailHeader({
25485
25664
  ]
25486
25665
  );
25487
25666
  return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
25488
- /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx30("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
25667
+ /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx31("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
25489
25668
  /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailAddProject, children: [
25490
- /* @__PURE__ */ jsx30(
25669
+ /* @__PURE__ */ jsx31(
25491
25670
  WorkspaceUserProjectSelect2,
25492
25671
  {
25493
25672
  api: userProjectApi,
@@ -25517,7 +25696,7 @@ function AgentGUIProjectRailHeader({
25517
25696
  "projectSelect.addProject"
25518
25697
  ])
25519
25698
  },
25520
- renderAddProjectIcon: () => /* @__PURE__ */ jsx30(
25699
+ renderAddProjectIcon: () => /* @__PURE__ */ jsx31(
25521
25700
  NewWorkspaceLinedIcon2,
25522
25701
  {
25523
25702
  "aria-hidden": true,
@@ -25535,7 +25714,7 @@ function AgentGUIProjectRailHeader({
25535
25714
  }
25536
25715
  }
25537
25716
  ),
25538
- /* @__PURE__ */ jsx30(
25717
+ /* @__PURE__ */ jsx31(
25539
25718
  NewWorkspaceLinedIcon2,
25540
25719
  {
25541
25720
  "aria-hidden": true,
@@ -25561,16 +25740,16 @@ var AgentGUIConversationTimelinePane = memo(
25561
25740
  }) {
25562
25741
  "use memo";
25563
25742
  return /* @__PURE__ */ jsxs17(Fragment8, { children: [
25564
- isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx30(
25743
+ isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx31(
25565
25744
  "div",
25566
25745
  {
25567
25746
  className: "mx-auto flex h-8 items-center justify-center text-[12px] text-[var(--text-secondary)]",
25568
25747
  "data-testid": "agent-gui-older-messages-loading",
25569
25748
  role: "status",
25570
- children: /* @__PURE__ */ jsx30("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
25749
+ children: /* @__PURE__ */ jsx31("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
25571
25750
  }
25572
25751
  ) : null,
25573
- /* @__PURE__ */ jsx30(
25752
+ /* @__PURE__ */ jsx31(
25574
25753
  AgentConversationFlow,
25575
25754
  {
25576
25755
  conversation,
@@ -25791,7 +25970,7 @@ import {
25791
25970
  useState as useState13
25792
25971
  } from "react";
25793
25972
  import { createPortal as createPortal4 } from "react-dom";
25794
- import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
25973
+ import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
25795
25974
  var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
25796
25975
  var POPOVER_DEFAULT_WIDTH_PX = 260;
25797
25976
  function dockAgentProbeLineKey(line) {
@@ -25805,7 +25984,7 @@ function renderDockAgentProbeLine(line) {
25805
25984
  line.primary,
25806
25985
  line.secondary ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
25807
25986
  " ",
25808
- /* @__PURE__ */ jsx31("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
25987
+ /* @__PURE__ */ jsx32("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
25809
25988
  ] }) : null
25810
25989
  ] });
25811
25990
  }
@@ -25882,7 +26061,7 @@ function AgentProbeInfoPopover({
25882
26061
  if (lines.length === 0) {
25883
26062
  return null;
25884
26063
  }
25885
- const popover = /* @__PURE__ */ jsx31(
26064
+ const popover = /* @__PURE__ */ jsx32(
25886
26065
  "div",
25887
26066
  {
25888
26067
  ref: popoverRef,
@@ -25891,7 +26070,7 @@ function AgentProbeInfoPopover({
25891
26070
  style: popoverStyle ?? void 0,
25892
26071
  onMouseEnter: () => setIsOpen(true),
25893
26072
  onMouseLeave: closeIfPointerLeavesPopover,
25894
- children: /* @__PURE__ */ jsx31("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
26073
+ children: /* @__PURE__ */ jsx32("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
25895
26074
  const label = getDockAgentProbeLineLabel(line);
25896
26075
  const valueText = formatDockAgentProbeLineText(line);
25897
26076
  return /* @__PURE__ */ jsxs18(
@@ -25900,8 +26079,8 @@ function AgentProbeInfoPopover({
25900
26079
  className: "desktop-dock-popup__agent-info-item",
25901
26080
  "data-has-label": label ? "true" : "false",
25902
26081
  children: [
25903
- label ? /* @__PURE__ */ jsx31("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
25904
- /* @__PURE__ */ jsx31(
26082
+ label ? /* @__PURE__ */ jsx32("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
26083
+ /* @__PURE__ */ jsx32(
25905
26084
  "span",
25906
26085
  {
25907
26086
  className: "desktop-dock-popup__agent-info-value",
@@ -25936,7 +26115,7 @@ function AgentProbeInfoPopover({
25936
26115
  },
25937
26116
  onBlur: () => setIsOpen(false),
25938
26117
  children: [
25939
- /* @__PURE__ */ jsx31(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
26118
+ /* @__PURE__ */ jsx32(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
25940
26119
  isOpen ? createPortal4(popover, document.body) : null
25941
26120
  ]
25942
26121
  }
@@ -26079,7 +26258,7 @@ function getAgentHostManagedToolchainAgentByName(name) {
26079
26258
  }
26080
26259
 
26081
26260
  // agent-gui/agentGuiNode/AgentGUINode.tsx
26082
- import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
26261
+ import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
26083
26262
  var workspaceFileReferenceLocaleKeyByPickerKey = {
26084
26263
  "actions.cancel": "common.cancel",
26085
26264
  "referencePicker.confirm": "agentHost.agentGui.referencePicker.confirm",
@@ -27057,13 +27236,13 @@ var AgentGUINode = memo2(function AgentGUINode2({
27057
27236
  onAgentProbeDemandChange(null, probeSourceId);
27058
27237
  };
27059
27238
  }, [activeProbeProvider, nodeId, onAgentProbeDemandChange, previewMode]);
27060
- return /* @__PURE__ */ jsx32(
27239
+ return /* @__PURE__ */ jsx33(
27061
27240
  WorkspaceNodeWindow,
27062
27241
  {
27063
27242
  nodeId,
27064
27243
  kind: "agentGui",
27065
27244
  title: windowTitle,
27066
- titleIcon: windowTitleIconUrl ? /* @__PURE__ */ jsx32(
27245
+ titleIcon: windowTitleIconUrl ? /* @__PURE__ */ jsx33(
27067
27246
  "img",
27068
27247
  {
27069
27248
  src: windowTitleIconUrl,
@@ -27084,7 +27263,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27084
27263
  bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
27085
27264
  hideHeader: embedded,
27086
27265
  titleAccessory: /* @__PURE__ */ jsxs19("span", { className: "inline-flex flex-none items-center gap-1", children: [
27087
- /* @__PURE__ */ jsx32(
27266
+ /* @__PURE__ */ jsx33(
27088
27267
  AgentProbeInfoPopover,
27089
27268
  {
27090
27269
  lines: agentProbeLines,
@@ -27092,7 +27271,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27092
27271
  className: AgentGUINode_styles_default.windowAgentInfo
27093
27272
  }
27094
27273
  ),
27095
- /* @__PURE__ */ jsx32(
27274
+ /* @__PURE__ */ jsx33(
27096
27275
  CanvasNodeGhostIconButton,
27097
27276
  {
27098
27277
  "aria-label": isConversationRailCollapsed ? t("agentHost.agentGui.expandConversationRail") : t("agentHost.agentGui.collapseConversationRail"),
@@ -27104,7 +27283,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27104
27283
  event.stopPropagation();
27105
27284
  handleConversationRailToggle();
27106
27285
  },
27107
- children: /* @__PURE__ */ jsx32(
27286
+ children: /* @__PURE__ */ jsx33(
27108
27287
  CanvasNodePanelLinedIcon,
27109
27288
  {
27110
27289
  width: 18,
@@ -27125,7 +27304,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27125
27304
  children: (renderFrame) => {
27126
27305
  const renderedWidth = renderFrame.size.width;
27127
27306
  const isRenderedConversationRailCollapsed = isConversationRailCollapsed || shouldAutoCollapseAgentGUIConversationRail(renderedWidth);
27128
- return /* @__PURE__ */ jsx32(
27307
+ return /* @__PURE__ */ jsx33(
27129
27308
  AgentGUINodeView,
27130
27309
  {
27131
27310
  viewModel,
@@ -27175,23 +27354,24 @@ var AgentGUINode = memo2(function AgentGUINode2({
27175
27354
  }, areAgentGUINodePropsEqual);
27176
27355
 
27177
27356
  // AgentGUI.tsx
27178
- import { jsx as jsx33 } from "react/jsx-runtime";
27357
+ import { jsx as jsx34 } from "react/jsx-runtime";
27179
27358
  var AgentGUI = memo3(function AgentGUI2({
27180
27359
  agentActivityRuntime,
27360
+ agentQueuedPromptRuntime,
27181
27361
  agentHostApi,
27182
27362
  i18n,
27183
27363
  locale,
27184
27364
  ...props
27185
27365
  }) {
27186
- const content = /* @__PURE__ */ jsx33(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx33(
27366
+ const content = /* @__PURE__ */ jsx34(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx34(
27187
27367
  AgentActivityHostProvider,
27188
27368
  {
27189
27369
  agentActivityRuntime,
27190
27370
  agentHostApi,
27191
- children: /* @__PURE__ */ jsx33(AgentGUINode, { ...props })
27371
+ children: /* @__PURE__ */ jsx34(AgentQueuedPromptRuntimeProvider, { runtime: agentQueuedPromptRuntime, children: /* @__PURE__ */ jsx34(AgentGUINode, { ...props }) })
27192
27372
  }
27193
27373
  ) });
27194
- return props.previewMode ? content : /* @__PURE__ */ jsx33(TooltipProvider3, { delayDuration: 120, skipDelayDuration: 0, children: content });
27374
+ return props.previewMode ? content : /* @__PURE__ */ jsx34(TooltipProvider3, { delayDuration: 120, skipDelayDuration: 0, children: content });
27195
27375
  });
27196
27376
 
27197
27377
  // index.ts
@@ -27205,6 +27385,7 @@ export {
27205
27385
  AgentActivityRuntimeProvider,
27206
27386
  AgentGUI,
27207
27387
  AgentGuiI18nProvider,
27388
+ AgentQueuedPromptRuntimeProvider,
27208
27389
  agentGUIDefaultTargetProviders,
27209
27390
  agentGuiDockIconUrl,
27210
27391
  agentGuiDockIconUrls,
@@ -27212,6 +27393,7 @@ export {
27212
27393
  agentGuiI18nResources,
27213
27394
  agentHostSnapshotFromAgentActivitySnapshot,
27214
27395
  buildAgentActivitySnapshotProjection,
27396
+ createAgentQueuedPromptRuntime,
27215
27397
  createLocalAgentGUIProviderTarget,
27216
27398
  createLocalAgentGUIProviderTargets,
27217
27399
  getAgentActivityRuntime,
@@ -27221,14 +27403,18 @@ export {
27221
27403
  preloadAgentMentionBrowse,
27222
27404
  projectCoreSessionStatus,
27223
27405
  resetAgentActivityRuntimeForTests,
27406
+ resetAgentQueuedPromptRuntimeForTests,
27224
27407
  resolveAgentGUIExpandedWindowFrame,
27225
27408
  resolveAgentGUIProviderTarget,
27226
27409
  selectNeedsAttentionCount2 as selectNeedsAttentionCount,
27227
27410
  selectNeedsAttentionItems2 as selectNeedsAttentionItems,
27228
27411
  setAgentActivityRuntimeForTests,
27412
+ setAgentQueuedPromptRuntimeForTests,
27229
27413
  shouldAutoCollapseAgentGUIConversationRail,
27230
27414
  useAgentActivityRuntime,
27231
27415
  useAgentActivitySnapshot,
27416
+ useAgentQueuedPromptRuntime,
27417
+ useAgentQueuedPromptSessionSnapshot,
27232
27418
  useOptionalAgentActivityRuntime
27233
27419
  };
27234
27420
  //# sourceMappingURL=index.js.map