@tutti-os/agent-gui 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentMentionSearchController-D5ks45fN.d.ts → AgentMentionSearchController-CExFPobz.d.ts} +1 -1
- package/dist/AgentMessageMarkdown-DeYPURtF.d.ts +7 -0
- package/dist/agent-conversation/index.d.ts +5 -4
- package/dist/agent-conversation/index.js +8 -8
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +36 -14
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-1QgRwvwZ.d.ts → agentConversationVM-DSXrFL9v.d.ts} +19 -1
- package/dist/{AgentMessageMarkdown-Cts0dAIm.d.ts → agentGuiNodeTypes-Bp1G8pOj.d.ts} +45 -11
- package/dist/app/renderer/agentactivity.css +145 -12
- package/dist/{chunk-AMNXH4DJ.js → chunk-2RYZ4EBF.js} +2 -2
- package/dist/{chunk-QT45WUPQ.js → chunk-6YN7HQL5.js} +366 -52
- package/dist/chunk-6YN7HQL5.js.map +1 -0
- package/dist/{chunk-D6IYEVDT.js → chunk-7W3VWU5R.js} +10 -6
- package/dist/chunk-7W3VWU5R.js.map +1 -0
- package/dist/{chunk-NZ2BGOJU.js → chunk-EUOGIKT7.js} +2 -2
- package/dist/{chunk-BAQTM6VS.js → chunk-LWMC2YA3.js} +1260 -442
- package/dist/chunk-LWMC2YA3.js.map +1 -0
- package/dist/{chunk-EIC7XS3C.js → chunk-N6HRVMIS.js} +2 -2
- package/dist/{chunk-VFQR7AZI.js → chunk-NETHPCSA.js} +35 -5
- package/dist/chunk-NETHPCSA.js.map +1 -0
- package/dist/{chunk-OL54R6OL.js → chunk-OB43QOMC.js} +2 -2
- package/dist/{chunk-FRG36S6N.js → chunk-OYQZRLJQ.js} +5 -5
- package/dist/chunk-OYQZRLJQ.js.map +1 -0
- package/dist/{chunk-EU7RWKHE.js → chunk-R6GOICRO.js} +5 -5
- package/dist/{chunk-ZJ7OSY4T.js → chunk-RNIY43TA.js} +9 -9
- package/dist/{chunk-ZJ7OSY4T.js.map → chunk-RNIY43TA.js.map} +1 -1
- package/dist/chunk-SD56WDSC.js +359 -0
- package/dist/chunk-SD56WDSC.js.map +1 -0
- package/dist/{chunk-TXXWUG2J.js → chunk-U6JWW45G.js} +2 -1
- package/dist/chunk-U6JWW45G.js.map +1 -0
- package/dist/{chunk-62QOR3TC.js → chunk-VGDPBC6W.js} +37 -7
- package/dist/chunk-VGDPBC6W.js.map +1 -0
- package/dist/{chunk-FJG2EH4V.js → chunk-ZVKRNEOF.js} +2 -2
- package/dist/context-mention-palette/index.d.ts +3 -3
- package/dist/context-mention-palette/index.js +9 -9
- package/dist/i18n/index.d.ts +34 -4
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +308 -10
- package/dist/index.js +1023 -843
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +97 -0
- package/dist/queued-prompt-runtime.js +9 -0
- package/dist/queued-prompt-runtime.js.map +1 -0
- package/dist/workbench/contribution.js +3 -3
- package/dist/workbench/index.js +9 -9
- package/dist/workbench/launch.js +2 -2
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/dist/{workspaceAgentActivityListViewModel-DLnMBMoh.d.ts → workspaceAgentActivityListViewModel-B5viw5Da.d.ts} +1 -1
- package/package.json +21 -14
- package/dist/chunk-62QOR3TC.js.map +0 -1
- package/dist/chunk-BAQTM6VS.js.map +0 -1
- package/dist/chunk-D6IYEVDT.js.map +0 -1
- package/dist/chunk-FRG36S6N.js.map +0 -1
- package/dist/chunk-QT45WUPQ.js.map +0 -1
- package/dist/chunk-TXXWUG2J.js.map +0 -1
- package/dist/chunk-VFQR7AZI.js.map +0 -1
- /package/dist/{chunk-AMNXH4DJ.js.map → chunk-2RYZ4EBF.js.map} +0 -0
- /package/dist/{chunk-NZ2BGOJU.js.map → chunk-EUOGIKT7.js.map} +0 -0
- /package/dist/{chunk-EIC7XS3C.js.map → chunk-N6HRVMIS.js.map} +0 -0
- /package/dist/{chunk-OL54R6OL.js.map → chunk-OB43QOMC.js.map} +0 -0
- /package/dist/{chunk-EU7RWKHE.js.map → chunk-R6GOICRO.js.map} +0 -0
- /package/dist/{chunk-FJG2EH4V.js.map → chunk-ZVKRNEOF.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-
|
|
25
|
+
} from "./chunk-VGDPBC6W.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-
|
|
44
|
+
} from "./chunk-ZVKRNEOF.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-
|
|
63
|
+
} from "./chunk-LWMC2YA3.js";
|
|
62
64
|
import {
|
|
63
65
|
AgentMessageMarkdown,
|
|
64
66
|
ZoomableImage,
|
|
65
67
|
cn,
|
|
66
68
|
resolveWorkspaceLinkAction
|
|
67
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6YN7HQL5.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-
|
|
77
|
+
} from "./chunk-RNIY43TA.js";
|
|
76
78
|
import {
|
|
77
79
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
78
80
|
buildWorkspaceAgentActivityListViewModel,
|
|
@@ -82,13 +84,13 @@ import {
|
|
|
82
84
|
isWorkspaceAgentUntitledTask,
|
|
83
85
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
84
86
|
selectWorkspaceAgentActivityOverlayMessages
|
|
85
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-7W3VWU5R.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-
|
|
93
|
+
} from "./chunk-EUOGIKT7.js";
|
|
92
94
|
import {
|
|
93
95
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
94
96
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -100,8 +102,9 @@ import {
|
|
|
100
102
|
mentionItemToAttrs,
|
|
101
103
|
normalizeAgentSessionMentionTitle,
|
|
102
104
|
parseMentionItemFromHref
|
|
103
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-OYQZRLJQ.js";
|
|
104
106
|
import "./chunk-Y35GDLP2.js";
|
|
107
|
+
import "./chunk-LUGELG5V.js";
|
|
105
108
|
import {
|
|
106
109
|
AgentActivityHostProvider,
|
|
107
110
|
AgentActivityRuntimeProvider,
|
|
@@ -113,24 +116,26 @@ import {
|
|
|
113
116
|
useAgentActivityRuntime,
|
|
114
117
|
useAgentActivitySnapshot,
|
|
115
118
|
useAgentHostApi,
|
|
116
|
-
useOptionalAgentActivityRuntime
|
|
117
|
-
|
|
119
|
+
useOptionalAgentActivityRuntime,
|
|
120
|
+
useOptionalAgentHostApi
|
|
121
|
+
} from "./chunk-U6JWW45G.js";
|
|
118
122
|
import "./chunk-TYGL25EL.js";
|
|
123
|
+
import "./chunk-PJP5BUU6.js";
|
|
119
124
|
import {
|
|
120
125
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
121
126
|
} from "./chunk-JM24HADP.js";
|
|
122
127
|
import "./chunk-GCBDIQDX.js";
|
|
128
|
+
import {
|
|
129
|
+
createAgentQueuedPromptRuntime
|
|
130
|
+
} from "./chunk-SD56WDSC.js";
|
|
123
131
|
import {
|
|
124
132
|
AgentGuiI18nProvider,
|
|
125
133
|
agentGuiI18nModule,
|
|
126
134
|
agentGuiI18nResources,
|
|
127
|
-
getActiveUiLanguage,
|
|
128
135
|
translate,
|
|
129
136
|
useTranslation
|
|
130
|
-
} from "./chunk-
|
|
131
|
-
import "./chunk-
|
|
132
|
-
import "./chunk-LUGELG5V.js";
|
|
133
|
-
import "./chunk-PJP5BUU6.js";
|
|
137
|
+
} from "./chunk-N6HRVMIS.js";
|
|
138
|
+
import "./chunk-NETHPCSA.js";
|
|
134
139
|
|
|
135
140
|
// shared/agentActivitySnapshotProjection.ts
|
|
136
141
|
import {
|
|
@@ -300,145 +305,6 @@ import { memo as memo2, useCallback as useCallback13, useEffect as useEffect14,
|
|
|
300
305
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
301
306
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
302
307
|
|
|
303
|
-
// shared/errors/appError.ts
|
|
304
|
-
function createMessageMap() {
|
|
305
|
-
return {
|
|
306
|
-
"common.invalid_input": "The request was invalid.",
|
|
307
|
-
"common.approved_path_required": "The selected path is outside approved workspaces.",
|
|
308
|
-
"common.unavailable": "This feature is unavailable.",
|
|
309
|
-
"common.unexpected": "Something went wrong. Please try again.",
|
|
310
|
-
"session.not_found": "Session not found.",
|
|
311
|
-
"control_surface.unauthorized": "Unauthorized request.",
|
|
312
|
-
"workspace.select_directory_failed": "Unable to open the directory picker.",
|
|
313
|
-
"workspace.select_files_failed": "Unable to open the file picker.",
|
|
314
|
-
"workspace.ensure_directory_failed": "Unable to create the directory.",
|
|
315
|
-
"workspace.import_files_failed": "Unable to import the selected files.",
|
|
316
|
-
"workspace.read_file_failed": "Unable to load the selected file.",
|
|
317
|
-
"workspace.write_file_failed": "Unable to save the selected file.",
|
|
318
|
-
"workspace.export_file_failed": "Unable to export the selected file.",
|
|
319
|
-
"workspace.copy_path_failed": "Unable to copy the path.",
|
|
320
|
-
"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.",
|
|
321
|
-
"workspace.runtime_artifact_unavailable": "Unable to prepare the workspace environment required by tsh. Check your network connection and try again.",
|
|
322
|
-
"runtime.guest_agent_lane_unavailable": "The workspace environment connection is unavailable. Refresh and try again.",
|
|
323
|
-
"workspace.room_full": "Room is full.",
|
|
324
|
-
"workspace.room_delete_forbidden": "Only the space owner can delete this space.",
|
|
325
|
-
"workspace.room_delete_not_found": "This space no longer exists.",
|
|
326
|
-
"filesystem.create_directory_failed": "Unable to create the directory.",
|
|
327
|
-
"filesystem.read_file_bytes_failed": "Unable to read the file.",
|
|
328
|
-
"filesystem.read_file_text_failed": "Unable to read the file.",
|
|
329
|
-
"filesystem.write_file_text_failed": "Unable to save the file.",
|
|
330
|
-
"filesystem.copy_entry_failed": "Unable to copy the file or folder.",
|
|
331
|
-
"filesystem.move_entry_failed": "Unable to move the file or folder.",
|
|
332
|
-
"filesystem.rename_entry_failed": "Unable to rename the file or folder.",
|
|
333
|
-
"filesystem.delete_entry_failed": "Unable to delete the file or folder.",
|
|
334
|
-
"filesystem.read_directory_failed": "Unable to load the directory.",
|
|
335
|
-
"filesystem.stat_failed": "Unable to read file details.",
|
|
336
|
-
"terminal.spawn_failed": "Unable to start the terminal.",
|
|
337
|
-
"terminal.write_failed": "Unable to write to the terminal.",
|
|
338
|
-
"terminal.resize_failed": "Unable to resize the terminal.",
|
|
339
|
-
"terminal.close_failed": "Unable to close the terminal.",
|
|
340
|
-
"terminal.attach_failed": "Unable to attach the terminal session.",
|
|
341
|
-
"terminal.detach_failed": "Unable to detach the terminal session.",
|
|
342
|
-
"terminal.snapshot_failed": "Unable to read terminal output.",
|
|
343
|
-
"agent.list_models_failed": "Unable to load models for this provider.",
|
|
344
|
-
"agent.launch_failed": "Unable to start the agent.",
|
|
345
|
-
"agent.read_last_message_failed": "Unable to read the last agent message.",
|
|
346
|
-
"agent.provider_session_not_found": "The previous agent session can no longer be restored.",
|
|
347
|
-
"agent.resume_session_not_local": "The previous agent session is not available on this machine.",
|
|
348
|
-
"agent.resume_session_resolve_failed": "Unable to resolve the previous agent session.",
|
|
349
|
-
"agent.settings_require_new_session": "This model can only be used in a new session to preserve context.",
|
|
350
|
-
"task.suggest_title_failed": "Unable to generate task details.",
|
|
351
|
-
"persistence.unavailable": "Storage is unavailable; changes will not be saved.",
|
|
352
|
-
"persistence.quota_exceeded": "Storage quota was exceeded.",
|
|
353
|
-
"persistence.payload_too_large": "Workspace state is too large to save.",
|
|
354
|
-
"persistence.io_failed": "Unable to save data to storage.",
|
|
355
|
-
"persistence.invalid_state": "The workspace state could not be saved.",
|
|
356
|
-
"persistence.invalid_node_id": "The terminal history could not be saved.",
|
|
357
|
-
"update.get_state_failed": "Unable to read the update status.",
|
|
358
|
-
"update.configure_failed": "Unable to apply update settings.",
|
|
359
|
-
"update.check_failed": "Unable to check for updates.",
|
|
360
|
-
"update.download_failed": "Unable to download the update.",
|
|
361
|
-
"update.install_failed": "Unable to install the update.",
|
|
362
|
-
PACKAGE_DOWNLOAD_INTERRUPTED: "The agent package download was interrupted. Check your network connection and retry.",
|
|
363
|
-
PACKAGE_DOWNLOAD_HTTP_STATUS: "The agent package server rejected the download. Retry later or contact support.",
|
|
364
|
-
PACKAGE_DOWNLOAD_INVALID: "The downloaded agent package failed integrity checks. Retry the download.",
|
|
365
|
-
PACKAGE_DOWNLOAD_DISK_ERROR: "Unable to write the agent package cache. Check disk permissions and free space."
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
var APP_ERROR_MESSAGES = createMessageMap();
|
|
369
|
-
function createAppErrorDescriptor(code, options = {}) {
|
|
370
|
-
return {
|
|
371
|
-
code,
|
|
372
|
-
...options.params ? { params: options.params } : {},
|
|
373
|
-
...options.debugMessage ? { debugMessage: options.debugMessage } : {}
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
function isAppErrorDescriptor(value) {
|
|
377
|
-
if (!value || typeof value !== "object") {
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
380
|
-
const record = value;
|
|
381
|
-
return typeof record.code === "string" && record.code in APP_ERROR_MESSAGES;
|
|
382
|
-
}
|
|
383
|
-
function getAppErrorCode(error) {
|
|
384
|
-
if (error instanceof TshAppError) {
|
|
385
|
-
return error.code;
|
|
386
|
-
}
|
|
387
|
-
if (isAppErrorDescriptor(error)) {
|
|
388
|
-
return error.code;
|
|
389
|
-
}
|
|
390
|
-
if (error && typeof error === "object") {
|
|
391
|
-
const code = error.code;
|
|
392
|
-
if (typeof code === "string" && code in APP_ERROR_MESSAGES) {
|
|
393
|
-
return code;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
return null;
|
|
397
|
-
}
|
|
398
|
-
var TshAppError = class extends Error {
|
|
399
|
-
code;
|
|
400
|
-
params;
|
|
401
|
-
debugMessage;
|
|
402
|
-
constructor(descriptor) {
|
|
403
|
-
super(formatAppErrorMessage(descriptor));
|
|
404
|
-
this.name = "TshAppError";
|
|
405
|
-
this.code = descriptor.code;
|
|
406
|
-
this.params = descriptor.params;
|
|
407
|
-
this.debugMessage = descriptor.debugMessage;
|
|
408
|
-
}
|
|
409
|
-
toDescriptor() {
|
|
410
|
-
return createAppErrorDescriptor(this.code, {
|
|
411
|
-
params: this.params,
|
|
412
|
-
debugMessage: this.debugMessage
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
function formatAppErrorMessage(error) {
|
|
417
|
-
const descriptor = error instanceof TshAppError ? error.toDescriptor() : error;
|
|
418
|
-
return APP_ERROR_MESSAGES[descriptor.code] ?? APP_ERROR_MESSAGES["common.unexpected"];
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
// app/renderer/shell/utils/format.ts
|
|
422
|
-
var shortDateTimeFormatterByLanguage = /* @__PURE__ */ new Map();
|
|
423
|
-
function getShortDateTimeFormatter(language) {
|
|
424
|
-
const cached = shortDateTimeFormatterByLanguage.get(language);
|
|
425
|
-
if (cached) {
|
|
426
|
-
return cached;
|
|
427
|
-
}
|
|
428
|
-
const formatter = new Intl.DateTimeFormat(language, {
|
|
429
|
-
month: language === "en" ? "short" : "numeric",
|
|
430
|
-
day: "numeric",
|
|
431
|
-
hour: "2-digit",
|
|
432
|
-
minute: "2-digit",
|
|
433
|
-
hourCycle: "h23"
|
|
434
|
-
});
|
|
435
|
-
shortDateTimeFormatterByLanguage.set(language, formatter);
|
|
436
|
-
return formatter;
|
|
437
|
-
}
|
|
438
|
-
function toLocalShortDateTime(value, language = getActiveUiLanguage()) {
|
|
439
|
-
return getShortDateTimeFormatter(language).format(value);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
308
|
// utils/workspaceNodeSizing.ts
|
|
443
309
|
var MIN_SIZE_BY_KIND = {
|
|
444
310
|
terminal: { width: 400, height: 160 },
|
|
@@ -2307,6 +2173,67 @@ import {
|
|
|
2307
2173
|
} from "react";
|
|
2308
2174
|
import { debounce } from "lodash";
|
|
2309
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
|
|
2310
2237
|
import {
|
|
2311
2238
|
resolveAgentActivityCapability as resolveAgentActivityCapability2,
|
|
2312
2239
|
resolveAgentActivityUsage,
|
|
@@ -3334,6 +3261,24 @@ function normalizeOptionalWorkspaceAgentStatus(input) {
|
|
|
3334
3261
|
}
|
|
3335
3262
|
return { kind: "completed" };
|
|
3336
3263
|
}
|
|
3264
|
+
const waitKind = waitingKindFromTokens([currentPhase, turnPhase]);
|
|
3265
|
+
if (waitKind) {
|
|
3266
|
+
return { kind: "waiting", waitKind };
|
|
3267
|
+
}
|
|
3268
|
+
if ([currentPhase, turnPhase].some((token) => WAITING_STATUS_TOKENS.has(token))) {
|
|
3269
|
+
return { kind: "waiting" };
|
|
3270
|
+
}
|
|
3271
|
+
if ([currentPhase, turnPhase].some((token) => WORKING_STATUS_TOKENS.has(token))) {
|
|
3272
|
+
return { kind: "working" };
|
|
3273
|
+
}
|
|
3274
|
+
if ([currentPhase, turnPhase].some((token) => CANCELED_STATUS_TOKENS.has(token))) {
|
|
3275
|
+
return { kind: "canceled" };
|
|
3276
|
+
}
|
|
3277
|
+
if ([currentPhase, turnPhase].some(
|
|
3278
|
+
(token) => COMPLETED_STATUS_TOKENS.has(token)
|
|
3279
|
+
)) {
|
|
3280
|
+
return { kind: "completed" };
|
|
3281
|
+
}
|
|
3337
3282
|
if ([lifecycleStatus, effectiveStatus, sessionStatus, currentPhase].some(
|
|
3338
3283
|
(token) => FAILED_STATUS_TOKENS.has(token)
|
|
3339
3284
|
)) {
|
|
@@ -3349,14 +3294,14 @@ function normalizeOptionalWorkspaceAgentStatus(input) {
|
|
|
3349
3294
|
)) {
|
|
3350
3295
|
return { kind: "completed" };
|
|
3351
3296
|
}
|
|
3352
|
-
const
|
|
3297
|
+
const fallbackWaitKind = waitingKindFromTokens([
|
|
3353
3298
|
currentPhase,
|
|
3354
3299
|
turnPhase,
|
|
3355
3300
|
effectiveStatus,
|
|
3356
3301
|
sessionStatus
|
|
3357
3302
|
]);
|
|
3358
|
-
if (
|
|
3359
|
-
return { kind: "waiting", waitKind };
|
|
3303
|
+
if (fallbackWaitKind) {
|
|
3304
|
+
return { kind: "waiting", waitKind: fallbackWaitKind };
|
|
3360
3305
|
}
|
|
3361
3306
|
if ([currentPhase, turnPhase, effectiveStatus, sessionStatus].some(
|
|
3362
3307
|
(token) => WAITING_STATUS_TOKENS.has(token)
|
|
@@ -4022,7 +3967,7 @@ function subscribeCoalesced(type, options, callback) {
|
|
|
4022
3967
|
}
|
|
4023
3968
|
|
|
4024
3969
|
// contexts/workspace/presentation/renderer/agentSessions/agentSessionViewStore.ts
|
|
4025
|
-
import { useSyncExternalStore } from "react";
|
|
3970
|
+
import { useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
4026
3971
|
var STREAM_LINGER_MS = 15e3;
|
|
4027
3972
|
var EMPTY_AGENT_SESSION_VIEW_STORE_SNAPSHOT = {
|
|
4028
3973
|
sessionViewsBySessionKey: {}
|
|
@@ -4048,7 +3993,7 @@ function getAgentSessionView(ref) {
|
|
|
4048
3993
|
}
|
|
4049
3994
|
function useAgentSessionView(ref) {
|
|
4050
3995
|
const sessionKey = createAgentSessionViewKey(ref);
|
|
4051
|
-
return
|
|
3996
|
+
return useSyncExternalStore2(
|
|
4052
3997
|
subscribeAgentSessionViewStore,
|
|
4053
3998
|
() => sessionKey ? snapshot.sessionViewsBySessionKey[sessionKey] ?? null : null,
|
|
4054
3999
|
() => sessionKey ? snapshot.sessionViewsBySessionKey[sessionKey] ?? null : null
|
|
@@ -6129,13 +6074,13 @@ function markLocalDeletedAgentGUIConversation(input) {
|
|
|
6129
6074
|
}
|
|
6130
6075
|
|
|
6131
6076
|
// contexts/workspace/presentation/renderer/agentGuiConversationList/useAgentGuiConversationList.ts
|
|
6132
|
-
import { useCallback as useCallback2, useSyncExternalStore as
|
|
6077
|
+
import { useCallback as useCallback2, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
6133
6078
|
function useAgentGuiConversationList(query) {
|
|
6134
6079
|
const getSnapshot = useCallback2(
|
|
6135
6080
|
() => getOrCreateAgentGUIConversationListQuerySnapshot(query),
|
|
6136
6081
|
[query]
|
|
6137
6082
|
);
|
|
6138
|
-
return
|
|
6083
|
+
return useSyncExternalStore3(
|
|
6139
6084
|
subscribeAgentGUIConversationListStore,
|
|
6140
6085
|
getSnapshot,
|
|
6141
6086
|
getSnapshot
|
|
@@ -6383,8 +6328,9 @@ function resolveEffectiveComposerSettings(input) {
|
|
|
6383
6328
|
input.settings.speed
|
|
6384
6329
|
) ?? null,
|
|
6385
6330
|
planMode: Boolean(input.settings.planMode),
|
|
6386
|
-
// Browser use
|
|
6331
|
+
// Browser/computer use default on; preserve explicit opt-outs.
|
|
6387
6332
|
browserUse: input.settings.browserUse ?? true,
|
|
6333
|
+
computerUse: input.settings.computerUse ?? true,
|
|
6388
6334
|
permissionModeId: normalizePermissionModeId(input.settings.permissionModeId)
|
|
6389
6335
|
};
|
|
6390
6336
|
}
|
|
@@ -6473,7 +6419,7 @@ function cloneComposerSettings(settings) {
|
|
|
6473
6419
|
return { ...settings };
|
|
6474
6420
|
}
|
|
6475
6421
|
function sameComposerSettings(left, right) {
|
|
6476
|
-
return (left?.model ?? null) === (right?.model ?? null) && (left?.reasoningEffort ?? null) === (right?.reasoningEffort ?? null) && (left?.speed ?? null) === (right?.speed ?? null) && Boolean(left?.planMode) === Boolean(right?.planMode) && (left?.browserUse ?? true) === (right?.browserUse ?? true) && (left?.permissionModeId ?? null) === (right?.permissionModeId ?? null);
|
|
6422
|
+
return (left?.model ?? null) === (right?.model ?? null) && (left?.reasoningEffort ?? null) === (right?.reasoningEffort ?? null) && (left?.speed ?? null) === (right?.speed ?? null) && Boolean(left?.planMode) === Boolean(right?.planMode) && (left?.browserUse ?? true) === (right?.browserUse ?? true) && (left?.computerUse ?? true) === (right?.computerUse ?? true) && (left?.permissionModeId ?? null) === (right?.permissionModeId ?? null);
|
|
6477
6423
|
}
|
|
6478
6424
|
function buildNodeDefaultComposerSettings(data, options) {
|
|
6479
6425
|
const composerOverrides = nodeComposerOverridesForProvider(data) ?? {};
|
|
@@ -6487,6 +6433,7 @@ function buildNodeDefaultComposerSettings(data, options) {
|
|
|
6487
6433
|
) ?? options?.defaultSpeed ?? null,
|
|
6488
6434
|
planMode: Boolean(composerOverrides.planMode),
|
|
6489
6435
|
browserUse: composerOverrides.browserUse ?? true,
|
|
6436
|
+
computerUse: composerOverrides.computerUse ?? true,
|
|
6490
6437
|
permissionModeId: normalizePermissionModeId(
|
|
6491
6438
|
composerOverrides.permissionModeId
|
|
6492
6439
|
)
|
|
@@ -6522,6 +6469,7 @@ function nodeDataFromComposerSettings(current, settings) {
|
|
|
6522
6469
|
// Raw passthrough (no Boolean coercion): undefined means "default on", so
|
|
6523
6470
|
// only an explicit false persists as an opt-out.
|
|
6524
6471
|
browserUse: settings.browserUse,
|
|
6472
|
+
computerUse: settings.computerUse,
|
|
6525
6473
|
permissionModeId: normalizePermissionModeId(settings.permissionModeId)
|
|
6526
6474
|
};
|
|
6527
6475
|
return {
|
|
@@ -7411,6 +7359,23 @@ function retargetOptimisticPromptMessages(messages, input) {
|
|
|
7411
7359
|
});
|
|
7412
7360
|
return { changed, messages: retargeted };
|
|
7413
7361
|
}
|
|
7362
|
+
function removeOptimisticPromptMessagesByClientSubmitId(messages, clientSubmitId) {
|
|
7363
|
+
const normalizedClientSubmitId = clientSubmitId.trim();
|
|
7364
|
+
if (!normalizedClientSubmitId || messages.length === 0) {
|
|
7365
|
+
return { changed: false, messages: [...messages] };
|
|
7366
|
+
}
|
|
7367
|
+
const filtered = messages.filter((message) => {
|
|
7368
|
+
if (!isWorkspaceAgentActivityOptimisticMessage(message)) {
|
|
7369
|
+
return true;
|
|
7370
|
+
}
|
|
7371
|
+
const messageClientSubmitId = message.payload?.clientSubmitId;
|
|
7372
|
+
return typeof messageClientSubmitId !== "string" || messageClientSubmitId.trim() !== normalizedClientSubmitId;
|
|
7373
|
+
});
|
|
7374
|
+
return {
|
|
7375
|
+
changed: filtered.length !== messages.length,
|
|
7376
|
+
messages: filtered
|
|
7377
|
+
};
|
|
7378
|
+
}
|
|
7414
7379
|
function shouldRetargetOptimisticPromptFromMessage(message, trace) {
|
|
7415
7380
|
const turnId = message.turnId?.trim() ?? "";
|
|
7416
7381
|
if (!turnId || trace.turnId) {
|
|
@@ -8124,11 +8089,11 @@ function permissionModeDescription(provider, option) {
|
|
|
8124
8089
|
}
|
|
8125
8090
|
return void 0;
|
|
8126
8091
|
}
|
|
8127
|
-
function removeQueuedPromptById(queue, queuedPromptId) {
|
|
8128
|
-
return queue.filter((queuedPrompt) => queuedPrompt.id !== queuedPromptId);
|
|
8129
|
-
}
|
|
8130
8092
|
var NODE_DEFAULT_DRAFT_KEY = "__agent_gui_node_defaults__";
|
|
8131
8093
|
var EMPTY_AGENT_COMPOSER_DRAFT = emptyAgentComposerDraft();
|
|
8094
|
+
var EMPTY_QUEUED_PROMPTS = Object.freeze(
|
|
8095
|
+
[]
|
|
8096
|
+
);
|
|
8132
8097
|
function areAgentComposerDraftsEqual(left, right) {
|
|
8133
8098
|
const leftFiles = left.files ?? [];
|
|
8134
8099
|
const rightFiles = right.files ?? [];
|
|
@@ -8442,6 +8407,7 @@ function useAgentGUINodeController({
|
|
|
8442
8407
|
onShowMessage
|
|
8443
8408
|
}) {
|
|
8444
8409
|
const agentActivityRuntime = useAgentActivityRuntime();
|
|
8410
|
+
const agentQueuedPromptRuntime = useAgentQueuedPromptRuntime();
|
|
8445
8411
|
const agentHostApi = useAgentHostApi();
|
|
8446
8412
|
const agentActivitySnapshot = useAgentActivitySnapshot(workspaceId);
|
|
8447
8413
|
const normalizedExplicitProviderTargets = useMemo4(
|
|
@@ -8506,6 +8472,15 @@ function useAgentGUINodeController({
|
|
|
8506
8472
|
);
|
|
8507
8473
|
const pendingCreateOwnerKey = nodeId?.trim() ?? "";
|
|
8508
8474
|
const conversationListActiveOwnerKey = pendingCreateOwnerKey || generatedControllerOwnerKey;
|
|
8475
|
+
const queuedPromptOwnerId = conversationListActiveOwnerKey;
|
|
8476
|
+
useEffect4(() => {
|
|
8477
|
+
if (previewMode) {
|
|
8478
|
+
return;
|
|
8479
|
+
}
|
|
8480
|
+
return () => {
|
|
8481
|
+
agentQueuedPromptRuntime.releaseOwner(queuedPromptOwnerId);
|
|
8482
|
+
};
|
|
8483
|
+
}, [agentQueuedPromptRuntime, previewMode, queuedPromptOwnerId]);
|
|
8509
8484
|
const resolvePendingCreateConversationId = useCallback4(
|
|
8510
8485
|
() => conversationListQuery && pendingCreateOwnerKey ? getAgentGUIConversationCreatePending({
|
|
8511
8486
|
query: conversationListQuery,
|
|
@@ -8532,7 +8507,6 @@ function useAgentGUINodeController({
|
|
|
8532
8507
|
const [draftBySessionId, setDraftBySessionId] = useState4({});
|
|
8533
8508
|
const draftBySessionIdRef = useRef4(draftBySessionId);
|
|
8534
8509
|
const [draftSettingsBySessionId, setDraftSettingsBySessionId] = useState4({});
|
|
8535
|
-
const [queuedPromptsBySessionId, setQueuedPromptsBySessionId] = useState4({});
|
|
8536
8510
|
const hasLoadedConversations = conversationListState?.initialized ?? false;
|
|
8537
8511
|
const isLoadingConversations = conversationListState?.isLoading ?? false;
|
|
8538
8512
|
const [isLoadingMessages, setIsLoadingMessages] = useState4(false);
|
|
@@ -8549,16 +8523,15 @@ function useAgentGUINodeController({
|
|
|
8549
8523
|
const [isPendingSubmit, setIsPendingSubmit] = useState4(resolvePendingSubmit);
|
|
8550
8524
|
const [localIsSubmitting, setLocalIsSubmitting] = useState4(false);
|
|
8551
8525
|
const isSubmitting = localIsSubmitting || isPendingSubmit;
|
|
8552
|
-
const
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
const
|
|
8558
|
-
const
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
] = useState4({});
|
|
8526
|
+
const activeQueuedPromptSnapshot = useAgentQueuedPromptSessionSnapshot({
|
|
8527
|
+
workspaceId,
|
|
8528
|
+
agentSessionId: activeConversationId
|
|
8529
|
+
});
|
|
8530
|
+
const activeQueuedPrompts = activeQueuedPromptSnapshot?.prompts ?? EMPTY_QUEUED_PROMPTS;
|
|
8531
|
+
const activeQueuedPromptClaim = activeQueuedPromptSnapshot?.claim ?? null;
|
|
8532
|
+
const activeFailedQueuedPromptId = activeQueuedPromptSnapshot?.failedPromptId ?? null;
|
|
8533
|
+
const activeQueuedPromptRetryBlock = activeQueuedPromptSnapshot?.retryBlock ?? null;
|
|
8534
|
+
const activeSendNextQueuedPromptId = activeQueuedPromptSnapshot?.sendNextPromptId ?? null;
|
|
8562
8535
|
const [interruptingSessionIds, setInterruptingSessionIds] = useState4({});
|
|
8563
8536
|
const [pendingInterruptSessionIds, setPendingInterruptSessionIds] = useState4({});
|
|
8564
8537
|
const [
|
|
@@ -9428,6 +9401,7 @@ function useAgentGUINodeController({
|
|
|
9428
9401
|
},
|
|
9429
9402
|
[
|
|
9430
9403
|
activation,
|
|
9404
|
+
agentQueuedPromptRuntime,
|
|
9431
9405
|
agentActivityRuntime,
|
|
9432
9406
|
conversationListQuery,
|
|
9433
9407
|
currentUserId,
|
|
@@ -9900,6 +9874,10 @@ function useAgentGUINodeController({
|
|
|
9900
9874
|
"local-delete"
|
|
9901
9875
|
);
|
|
9902
9876
|
}
|
|
9877
|
+
agentQueuedPromptRuntime.cleanupSession({
|
|
9878
|
+
workspaceId,
|
|
9879
|
+
agentSessionId
|
|
9880
|
+
});
|
|
9903
9881
|
deleteAgentSessionView(sessionViewRef(agentSessionId));
|
|
9904
9882
|
reportAgentGUIActiveConversationCleared({
|
|
9905
9883
|
details: {
|
|
@@ -9934,6 +9912,7 @@ function useAgentGUINodeController({
|
|
|
9934
9912
|
}
|
|
9935
9913
|
},
|
|
9936
9914
|
[
|
|
9915
|
+
agentQueuedPromptRuntime,
|
|
9937
9916
|
agentActivityRuntime,
|
|
9938
9917
|
applySessionStateSnapshot,
|
|
9939
9918
|
clearFailedLiveState,
|
|
@@ -10666,6 +10645,41 @@ function useAgentGUINodeController({
|
|
|
10666
10645
|
},
|
|
10667
10646
|
[sessionViewRef]
|
|
10668
10647
|
);
|
|
10648
|
+
const removeOptimisticPrompt = useCallback4(
|
|
10649
|
+
(agentSessionId, clientSubmitId) => {
|
|
10650
|
+
const normalizedAgentSessionId = agentSessionId.trim();
|
|
10651
|
+
if (!normalizedAgentSessionId || !clientSubmitId.trim()) {
|
|
10652
|
+
return;
|
|
10653
|
+
}
|
|
10654
|
+
const sessionView = getAgentSessionView(
|
|
10655
|
+
sessionViewRef(normalizedAgentSessionId)
|
|
10656
|
+
);
|
|
10657
|
+
if (!sessionView) {
|
|
10658
|
+
return;
|
|
10659
|
+
}
|
|
10660
|
+
const detail = removeOptimisticPromptMessagesByClientSubmitId(
|
|
10661
|
+
sessionView.detailMessages,
|
|
10662
|
+
clientSubmitId
|
|
10663
|
+
);
|
|
10664
|
+
if (detail.changed) {
|
|
10665
|
+
setAgentSessionViewDetailMessages(
|
|
10666
|
+
sessionViewRef(normalizedAgentSessionId),
|
|
10667
|
+
detail.messages
|
|
10668
|
+
);
|
|
10669
|
+
}
|
|
10670
|
+
const overlay = removeOptimisticPromptMessagesByClientSubmitId(
|
|
10671
|
+
sessionView.overlayMessages,
|
|
10672
|
+
clientSubmitId
|
|
10673
|
+
);
|
|
10674
|
+
if (overlay.changed) {
|
|
10675
|
+
setAgentSessionViewOverlayMessages(
|
|
10676
|
+
sessionViewRef(normalizedAgentSessionId),
|
|
10677
|
+
overlay.messages
|
|
10678
|
+
);
|
|
10679
|
+
}
|
|
10680
|
+
},
|
|
10681
|
+
[sessionViewRef]
|
|
10682
|
+
);
|
|
10669
10683
|
const applyStatePatch = useCallback4(
|
|
10670
10684
|
(patch) => {
|
|
10671
10685
|
const agentSessionId = patch.agentSessionId.trim();
|
|
@@ -11614,7 +11628,7 @@ function useAgentGUINodeController({
|
|
|
11614
11628
|
workspaceId
|
|
11615
11629
|
]);
|
|
11616
11630
|
const executePrompt = useCallback4(
|
|
11617
|
-
(agentSessionId, content, queuedPromptId, displayPrompt) => {
|
|
11631
|
+
(agentSessionId, content, queuedPromptId, displayPrompt, queuedPromptClaim) => {
|
|
11618
11632
|
const normalizedContent = normalizeAgentPromptContentBlocks(content);
|
|
11619
11633
|
if (!agentSessionId || normalizedContent.length === 0) {
|
|
11620
11634
|
return;
|
|
@@ -11685,6 +11699,13 @@ function useAgentGUINodeController({
|
|
|
11685
11699
|
)
|
|
11686
11700
|
} : current
|
|
11687
11701
|
);
|
|
11702
|
+
const pendingOptimisticTurnId = createPendingOptimisticTurnId(
|
|
11703
|
+
submitTrace.clientSubmitId
|
|
11704
|
+
);
|
|
11705
|
+
pendingTurnIdBySessionIdRef.current = {
|
|
11706
|
+
...pendingTurnIdBySessionIdRef.current,
|
|
11707
|
+
[agentSessionId]: pendingOptimisticTurnId
|
|
11708
|
+
};
|
|
11688
11709
|
applyStatePatch({
|
|
11689
11710
|
agentSessionId,
|
|
11690
11711
|
currentPhase: "working",
|
|
@@ -11696,10 +11717,29 @@ function useAgentGUINodeController({
|
|
|
11696
11717
|
trace: submitTrace,
|
|
11697
11718
|
workspaceId
|
|
11698
11719
|
});
|
|
11720
|
+
let queuedPromptClaimCompleted = false;
|
|
11721
|
+
const shouldRecordPendingOptimisticPrompt = queuedPromptId === void 0;
|
|
11722
|
+
if (shouldRecordPendingOptimisticPrompt) {
|
|
11723
|
+
recordLocalMessages(agentSessionId, [
|
|
11724
|
+
createOptimisticPromptMessage({
|
|
11725
|
+
workspaceId,
|
|
11726
|
+
agentSessionId,
|
|
11727
|
+
turnId: pendingOptimisticTurnId,
|
|
11728
|
+
clientSubmitId: submitTrace.clientSubmitId,
|
|
11729
|
+
userId: currentUserId?.trim() || "user",
|
|
11730
|
+
prompt: submittedPromptText,
|
|
11731
|
+
content: normalizedContent,
|
|
11732
|
+
occurredAtUnixMs: submittedAtUnixMs
|
|
11733
|
+
})
|
|
11734
|
+
]);
|
|
11735
|
+
reportAgentSubmitTraceDiagnostic({
|
|
11736
|
+
event: "optimistic_user_message_recorded",
|
|
11737
|
+
runtime: agentActivityRuntime,
|
|
11738
|
+
trace: submitTrace,
|
|
11739
|
+
workspaceId
|
|
11740
|
+
});
|
|
11741
|
+
}
|
|
11699
11742
|
void Promise.resolve().then(() => {
|
|
11700
|
-
if (!isCurrentConversation(agentSessionId)) {
|
|
11701
|
-
return null;
|
|
11702
|
-
}
|
|
11703
11743
|
reportAgentSubmitTraceDiagnostic({
|
|
11704
11744
|
event: "send_input.requested",
|
|
11705
11745
|
runtime: agentActivityRuntime,
|
|
@@ -11714,7 +11754,7 @@ function useAgentGUINodeController({
|
|
|
11714
11754
|
metadata: agentSubmitTraceMetadata(submitTrace)
|
|
11715
11755
|
});
|
|
11716
11756
|
}).then((result) => {
|
|
11717
|
-
if (!result
|
|
11757
|
+
if (!result) {
|
|
11718
11758
|
return;
|
|
11719
11759
|
}
|
|
11720
11760
|
submitTrace.turnId = result.turnId.trim() || null;
|
|
@@ -11774,34 +11814,14 @@ function useAgentGUINodeController({
|
|
|
11774
11814
|
});
|
|
11775
11815
|
}
|
|
11776
11816
|
if (queuedPromptId) {
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
};
|
|
11786
|
-
});
|
|
11787
|
-
setSendNextQueuedPromptIdBySessionId((current) => {
|
|
11788
|
-
if (current[agentSessionId] !== queuedPromptId) {
|
|
11789
|
-
return current;
|
|
11790
|
-
}
|
|
11791
|
-
return { ...current, [agentSessionId]: null };
|
|
11792
|
-
});
|
|
11793
|
-
setFailedQueuedPromptIdBySessionId((current) => {
|
|
11794
|
-
if (current[agentSessionId] !== queuedPromptId) {
|
|
11795
|
-
return current;
|
|
11796
|
-
}
|
|
11797
|
-
return { ...current, [agentSessionId]: null };
|
|
11798
|
-
});
|
|
11799
|
-
setQueuedPromptRetryBlockBySessionId((current) => {
|
|
11800
|
-
if (current[agentSessionId]?.queuedPromptId !== queuedPromptId) {
|
|
11801
|
-
return current;
|
|
11802
|
-
}
|
|
11803
|
-
return { ...current, [agentSessionId]: null };
|
|
11804
|
-
});
|
|
11817
|
+
if (queuedPromptClaim) {
|
|
11818
|
+
queuedPromptClaimCompleted = agentQueuedPromptRuntime.completeClaim({
|
|
11819
|
+
workspaceId,
|
|
11820
|
+
agentSessionId,
|
|
11821
|
+
ownerId: queuedPromptClaim.ownerId,
|
|
11822
|
+
claimId: queuedPromptClaim.claimId
|
|
11823
|
+
});
|
|
11824
|
+
}
|
|
11805
11825
|
}
|
|
11806
11826
|
const submittedTurnId = result.turnId.trim();
|
|
11807
11827
|
if (submittedTurnId) {
|
|
@@ -11809,24 +11829,32 @@ function useAgentGUINodeController({
|
|
|
11809
11829
|
...pendingTurnIdBySessionIdRef.current,
|
|
11810
11830
|
[agentSessionId]: submittedTurnId
|
|
11811
11831
|
};
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
workspaceId,
|
|
11832
|
+
if (shouldRecordPendingOptimisticPrompt) {
|
|
11833
|
+
retargetOptimisticPromptTurn(
|
|
11815
11834
|
agentSessionId,
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11835
|
+
submitTrace.clientSubmitId,
|
|
11836
|
+
submittedTurnId
|
|
11837
|
+
);
|
|
11838
|
+
} else {
|
|
11839
|
+
recordLocalMessages(agentSessionId, [
|
|
11840
|
+
createOptimisticPromptMessage({
|
|
11841
|
+
workspaceId,
|
|
11842
|
+
agentSessionId,
|
|
11843
|
+
turnId: submittedTurnId,
|
|
11844
|
+
clientSubmitId: submitTrace.clientSubmitId,
|
|
11845
|
+
userId: currentUserId?.trim() || "user",
|
|
11846
|
+
prompt: submittedPromptText,
|
|
11847
|
+
content: normalizedContent,
|
|
11848
|
+
occurredAtUnixMs: Date.now()
|
|
11849
|
+
})
|
|
11850
|
+
]);
|
|
11851
|
+
reportAgentSubmitTraceDiagnostic({
|
|
11852
|
+
event: "optimistic_user_message_recorded",
|
|
11853
|
+
runtime: agentActivityRuntime,
|
|
11854
|
+
trace: submitTrace,
|
|
11855
|
+
workspaceId
|
|
11856
|
+
});
|
|
11857
|
+
}
|
|
11830
11858
|
scheduleAgentSubmitTracePaint({
|
|
11831
11859
|
runtime: agentActivityRuntime,
|
|
11832
11860
|
trace: submitTrace,
|
|
@@ -11844,6 +11872,12 @@ function useAgentGUINodeController({
|
|
|
11844
11872
|
const nextTraces = { ...submitTraceBySessionIdRef.current };
|
|
11845
11873
|
delete nextTraces[agentSessionId];
|
|
11846
11874
|
submitTraceBySessionIdRef.current = nextTraces;
|
|
11875
|
+
if (shouldRecordPendingOptimisticPrompt) {
|
|
11876
|
+
removeOptimisticPrompt(agentSessionId, submitTrace.clientSubmitId);
|
|
11877
|
+
}
|
|
11878
|
+
const nextPendingTurns = { ...pendingTurnIdBySessionIdRef.current };
|
|
11879
|
+
delete nextPendingTurns[agentSessionId];
|
|
11880
|
+
pendingTurnIdBySessionIdRef.current = nextPendingTurns;
|
|
11847
11881
|
reportAgentSubmitTraceDiagnostic({
|
|
11848
11882
|
event: "submit.failed",
|
|
11849
11883
|
runtime: agentActivityRuntime,
|
|
@@ -11894,19 +11928,21 @@ function useAgentGUINodeController({
|
|
|
11894
11928
|
}
|
|
11895
11929
|
if (queuedPromptId) {
|
|
11896
11930
|
if (shouldRetryQueuedPromptOnNextActivity) {
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11931
|
+
agentQueuedPromptRuntime.setRetryBlock({
|
|
11932
|
+
workspaceId,
|
|
11933
|
+
agentSessionId,
|
|
11934
|
+
retryBlock: {
|
|
11900
11935
|
queuedPromptId,
|
|
11901
11936
|
sessionStateUpdatedAtUnixMs: currentSessionState?.updatedAtUnixMs ?? null,
|
|
11902
11937
|
conversationUpdatedAtUnixMs: currentConversationSummary?.updatedAtUnixMs ?? null
|
|
11903
11938
|
}
|
|
11904
|
-
})
|
|
11939
|
+
});
|
|
11905
11940
|
} else {
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11941
|
+
agentQueuedPromptRuntime.markPromptFailed({
|
|
11942
|
+
workspaceId,
|
|
11943
|
+
agentSessionId,
|
|
11944
|
+
promptId: queuedPromptId
|
|
11945
|
+
});
|
|
11910
11946
|
}
|
|
11911
11947
|
}
|
|
11912
11948
|
}).finally(() => {
|
|
@@ -11917,12 +11953,18 @@ function useAgentGUINodeController({
|
|
|
11917
11953
|
});
|
|
11918
11954
|
}
|
|
11919
11955
|
setLocalIsSubmitting(false);
|
|
11920
|
-
|
|
11921
|
-
(
|
|
11922
|
-
|
|
11956
|
+
if (queuedPromptClaim && !queuedPromptClaimCompleted) {
|
|
11957
|
+
agentQueuedPromptRuntime.releaseClaim({
|
|
11958
|
+
workspaceId,
|
|
11959
|
+
agentSessionId,
|
|
11960
|
+
ownerId: queuedPromptClaim.ownerId,
|
|
11961
|
+
claimId: queuedPromptClaim.claimId
|
|
11962
|
+
});
|
|
11963
|
+
}
|
|
11923
11964
|
});
|
|
11924
11965
|
},
|
|
11925
11966
|
[
|
|
11967
|
+
agentQueuedPromptRuntime,
|
|
11926
11968
|
currentUserId,
|
|
11927
11969
|
isCurrentConversation,
|
|
11928
11970
|
applyStatePatch,
|
|
@@ -11932,6 +11974,8 @@ function useAgentGUINodeController({
|
|
|
11932
11974
|
loadSessionState,
|
|
11933
11975
|
refreshMessagesFromSnapshot,
|
|
11934
11976
|
recordLocalMessages,
|
|
11977
|
+
removeOptimisticPrompt,
|
|
11978
|
+
retargetOptimisticPromptTurn,
|
|
11935
11979
|
sessionViewRef,
|
|
11936
11980
|
setTransientConversation,
|
|
11937
11981
|
patchConversation,
|
|
@@ -11954,17 +11998,18 @@ function useAgentGUINodeController({
|
|
|
11954
11998
|
...displayPrompt && displayPrompt.trim() ? { displayPrompt } : {},
|
|
11955
11999
|
createdAtUnixMs: Date.now()
|
|
11956
12000
|
};
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
12001
|
+
agentQueuedPromptRuntime.enqueue({
|
|
12002
|
+
workspaceId,
|
|
12003
|
+
agentSessionId,
|
|
12004
|
+
prompt: queuedPrompt
|
|
12005
|
+
});
|
|
11961
12006
|
setDraftBySessionId((current) => ({
|
|
11962
12007
|
...current,
|
|
11963
12008
|
[agentSessionId]: emptyAgentComposerDraft()
|
|
11964
12009
|
}));
|
|
11965
12010
|
setDetailError(null);
|
|
11966
12011
|
},
|
|
11967
|
-
[]
|
|
12012
|
+
[agentQueuedPromptRuntime, workspaceId]
|
|
11968
12013
|
);
|
|
11969
12014
|
const shouldQueuePromptLocally = useCallback4(
|
|
11970
12015
|
(agentSessionId) => {
|
|
@@ -11978,11 +12023,20 @@ function useAgentGUINodeController({
|
|
|
11978
12023
|
if (pendingTurnIdBySessionIdRef.current[normalizedAgentSessionId]) {
|
|
11979
12024
|
return true;
|
|
11980
12025
|
}
|
|
12026
|
+
const sessionState = getAgentSessionView(sessionViewRef(normalizedAgentSessionId))?.controlState ?? null;
|
|
12027
|
+
if (sessionState?.pendingInteractive) {
|
|
12028
|
+
return true;
|
|
12029
|
+
}
|
|
11981
12030
|
return agentActivityDisplayStatusBusy(
|
|
11982
12031
|
agentActivityDisplayStatuses.get(normalizedAgentSessionId)
|
|
11983
12032
|
);
|
|
11984
12033
|
},
|
|
11985
|
-
[
|
|
12034
|
+
[
|
|
12035
|
+
agentActivityDisplayStatuses,
|
|
12036
|
+
isRespondingApproval,
|
|
12037
|
+
isSubmitting,
|
|
12038
|
+
sessionViewRef
|
|
12039
|
+
]
|
|
11986
12040
|
);
|
|
11987
12041
|
const submitExistingPrompt = useCallback4(
|
|
11988
12042
|
(agentSessionId, normalizedContent, displayPromptText, options) => {
|
|
@@ -12029,6 +12083,9 @@ function useAgentGUINodeController({
|
|
|
12029
12083
|
);
|
|
12030
12084
|
const submitPrompt = useCallback4(
|
|
12031
12085
|
(content, displayPrompt) => {
|
|
12086
|
+
if (previewMode) {
|
|
12087
|
+
return;
|
|
12088
|
+
}
|
|
12032
12089
|
const agentSessionId = activeConversationIdRef.current;
|
|
12033
12090
|
const normalizedContent = normalizeAgentPromptContentBlocks(content);
|
|
12034
12091
|
if (normalizedContent.length === 0) {
|
|
@@ -12089,6 +12146,7 @@ function useAgentGUINodeController({
|
|
|
12089
12146
|
[
|
|
12090
12147
|
agentActivityRuntime,
|
|
12091
12148
|
conversationListQuery,
|
|
12149
|
+
previewMode,
|
|
12092
12150
|
resolvedPromptImagesSupported,
|
|
12093
12151
|
persistActiveConversation,
|
|
12094
12152
|
startConversation,
|
|
@@ -12165,7 +12223,6 @@ function useAgentGUINodeController({
|
|
|
12165
12223
|
}
|
|
12166
12224
|
setIsRespondingApproval(true);
|
|
12167
12225
|
setDetailError(null);
|
|
12168
|
-
const submittedPrompt = activePendingPromptRef.current;
|
|
12169
12226
|
void Promise.resolve().then(() => {
|
|
12170
12227
|
if (!isCurrentConversation(agentSessionId)) {
|
|
12171
12228
|
return null;
|
|
@@ -12182,12 +12239,6 @@ function useAgentGUINodeController({
|
|
|
12182
12239
|
if (!result || !isCurrentConversation(agentSessionId)) {
|
|
12183
12240
|
return;
|
|
12184
12241
|
}
|
|
12185
|
-
if (submittedPrompt?.requestId === normalizedRequestId && submittedPrompt.kind === "exit-plan" && input.action === "allow") {
|
|
12186
|
-
updateComposerSettingsRef.current({
|
|
12187
|
-
planMode: false,
|
|
12188
|
-
...normalizedOptionId ? { permissionModeId: normalizedOptionId } : {}
|
|
12189
|
-
});
|
|
12190
|
-
}
|
|
12191
12242
|
void refreshMessagesFromSnapshot(agentSessionId);
|
|
12192
12243
|
void loadSessionState(agentSessionId);
|
|
12193
12244
|
void syncConversationListProjection(agentSessionId);
|
|
@@ -12674,41 +12725,50 @@ function useAgentGUINodeController({
|
|
|
12674
12725
|
if (!activeConversationId) {
|
|
12675
12726
|
return;
|
|
12676
12727
|
}
|
|
12677
|
-
const queuedPrompt =
|
|
12678
|
-
const failedQueuedPromptId = failedQueuedPromptIdBySessionId[activeConversationId] ?? null;
|
|
12679
|
-
const queuedPromptRetryBlock = queuedPromptRetryBlockBySessionId[activeConversationId] ?? null;
|
|
12728
|
+
const queuedPrompt = activeQueuedPrompts[0] ?? null;
|
|
12680
12729
|
const activeSessionState2 = getAgentSessionView(sessionViewRef(activeConversationId))?.controlState ?? null;
|
|
12681
12730
|
const activeConversationSummary = resolveConversationSummaryById(
|
|
12682
12731
|
conversations,
|
|
12683
12732
|
activeConversationId,
|
|
12684
12733
|
transientConversationRef.current
|
|
12685
12734
|
);
|
|
12686
|
-
const blockedByStaleActiveTurnConflict = queuedPrompt !== null &&
|
|
12687
|
-
const canDrainQueuedPrompt = queuedPrompt !== null && queuedPrompt.id !==
|
|
12735
|
+
const blockedByStaleActiveTurnConflict = queuedPrompt !== null && activeQueuedPromptRetryBlock?.queuedPromptId === queuedPrompt.id && activeQueuedPromptRetryBlock.sessionStateUpdatedAtUnixMs === (activeSessionState2?.updatedAtUnixMs ?? null) && activeQueuedPromptRetryBlock.conversationUpdatedAtUnixMs === (activeConversationSummary?.updatedAtUnixMs ?? null);
|
|
12736
|
+
const canDrainQueuedPrompt = queuedPrompt !== null && queuedPrompt.id !== activeFailedQueuedPromptId && !blockedByStaleActiveTurnConflict && activeQueuedPromptClaim === null && !isSubmitting && !isRespondingApproval && !activeSessionState2?.pendingInteractive && !agentActivityDisplayStatusBusy(
|
|
12688
12737
|
agentActivityDisplayStatuses.get(activeConversationId)
|
|
12689
12738
|
);
|
|
12690
12739
|
if (!canDrainQueuedPrompt) {
|
|
12691
12740
|
return;
|
|
12692
12741
|
}
|
|
12693
|
-
|
|
12742
|
+
const claimResult = agentQueuedPromptRuntime.claimNextToDrain({
|
|
12743
|
+
workspaceId,
|
|
12744
|
+
agentSessionId: activeConversationId,
|
|
12745
|
+
ownerId: queuedPromptOwnerId
|
|
12746
|
+
});
|
|
12747
|
+
if (!claimResult) {
|
|
12748
|
+
return;
|
|
12749
|
+
}
|
|
12694
12750
|
executePrompt(
|
|
12695
12751
|
activeConversationId,
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12752
|
+
claimResult.prompt.content,
|
|
12753
|
+
claimResult.prompt.id,
|
|
12754
|
+
claimResult.prompt.displayPrompt,
|
|
12755
|
+
claimResult.claim
|
|
12699
12756
|
);
|
|
12700
12757
|
}, [
|
|
12701
12758
|
activeConversationId,
|
|
12759
|
+
activeFailedQueuedPromptId,
|
|
12760
|
+
activeQueuedPromptClaim,
|
|
12761
|
+
activeQueuedPromptRetryBlock,
|
|
12762
|
+
activeQueuedPrompts,
|
|
12763
|
+
agentQueuedPromptRuntime,
|
|
12702
12764
|
agentActivityDisplayStatuses,
|
|
12703
12765
|
conversations,
|
|
12704
|
-
drainingQueuedPromptSessionId,
|
|
12705
12766
|
executePrompt,
|
|
12706
12767
|
isRespondingApproval,
|
|
12707
12768
|
isSubmitting,
|
|
12708
|
-
failedQueuedPromptIdBySessionId,
|
|
12709
12769
|
previewMode,
|
|
12710
|
-
|
|
12711
|
-
|
|
12770
|
+
queuedPromptOwnerId,
|
|
12771
|
+
workspaceId
|
|
12712
12772
|
]);
|
|
12713
12773
|
useEffect4(() => {
|
|
12714
12774
|
if (previewMode) {
|
|
@@ -12717,9 +12777,7 @@ function useAgentGUINodeController({
|
|
|
12717
12777
|
if (!activeConversationId) {
|
|
12718
12778
|
return;
|
|
12719
12779
|
}
|
|
12720
|
-
|
|
12721
|
-
const queuedPrompts2 = queuedPromptsBySessionId[activeConversationId] ?? [];
|
|
12722
|
-
if (!sendNextQueuedPromptId || queuedPrompts2[0]?.id !== sendNextQueuedPromptId) {
|
|
12780
|
+
if (!activeSendNextQueuedPromptId || activeQueuedPrompts[0]?.id !== activeSendNextQueuedPromptId) {
|
|
12723
12781
|
return;
|
|
12724
12782
|
}
|
|
12725
12783
|
const activeSessionState2 = getAgentSessionView(sessionViewRef(activeConversationId))?.controlState ?? null;
|
|
@@ -12729,7 +12787,7 @@ function useAgentGUINodeController({
|
|
|
12729
12787
|
transientConversationRef.current
|
|
12730
12788
|
);
|
|
12731
12789
|
const activeActivityDisplayStatus2 = agentActivityDisplayStatuses.get(activeConversationId) ?? null;
|
|
12732
|
-
const shouldInterrupt =
|
|
12790
|
+
const shouldInterrupt = activeQueuedPromptClaim === null && !isSubmitting && activeActivityDisplayStatus2 === "working";
|
|
12733
12791
|
if (!shouldInterrupt || interruptingSessionIds[activeConversationId]) {
|
|
12734
12792
|
return;
|
|
12735
12793
|
}
|
|
@@ -12792,9 +12850,11 @@ function useAgentGUINodeController({
|
|
|
12792
12850
|
});
|
|
12793
12851
|
}, [
|
|
12794
12852
|
activeConversationId,
|
|
12853
|
+
activeQueuedPromptClaim,
|
|
12854
|
+
activeQueuedPrompts,
|
|
12855
|
+
activeSendNextQueuedPromptId,
|
|
12795
12856
|
agentActivityDisplayStatuses,
|
|
12796
12857
|
conversations,
|
|
12797
|
-
drainingQueuedPromptSessionId,
|
|
12798
12858
|
interruptingSessionIds,
|
|
12799
12859
|
isCurrentConversation,
|
|
12800
12860
|
isSubmitting,
|
|
@@ -12802,11 +12862,9 @@ function useAgentGUINodeController({
|
|
|
12802
12862
|
loadSessionState,
|
|
12803
12863
|
refreshMessagesFromSnapshot,
|
|
12804
12864
|
previewMode,
|
|
12805
|
-
queuedPromptsBySessionId,
|
|
12806
12865
|
runtimeSessionsBySessionId,
|
|
12807
12866
|
workspaceId,
|
|
12808
12867
|
sessionViewRef,
|
|
12809
|
-
sendNextQueuedPromptIdBySessionId,
|
|
12810
12868
|
agentActivityRuntime
|
|
12811
12869
|
]);
|
|
12812
12870
|
const requestDeleteConversation = useCallback4(
|
|
@@ -12832,64 +12890,39 @@ function useAgentGUINodeController({
|
|
|
12832
12890
|
}
|
|
12833
12891
|
setPendingDeleteConversation(null);
|
|
12834
12892
|
}, [isDeletingConversation]);
|
|
12835
|
-
const removeQueuedPrompt = useCallback4(
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
return;
|
|
12840
|
-
}
|
|
12841
|
-
setQueuedPromptsBySessionId((current) => {
|
|
12842
|
-
const queue = current[agentSessionId] ?? [];
|
|
12843
|
-
const queuedPrompt = queue.find((item) => item.id === normalizedQueuedPromptId) ?? null;
|
|
12844
|
-
if (!queuedPrompt) {
|
|
12845
|
-
return current;
|
|
12846
|
-
}
|
|
12847
|
-
return {
|
|
12848
|
-
...current,
|
|
12849
|
-
[agentSessionId]: removeQueuedPromptById(
|
|
12850
|
-
queue,
|
|
12851
|
-
normalizedQueuedPromptId
|
|
12852
|
-
)
|
|
12853
|
-
};
|
|
12854
|
-
});
|
|
12855
|
-
setSendNextQueuedPromptIdBySessionId((current) => {
|
|
12856
|
-
if (current[agentSessionId] !== normalizedQueuedPromptId) {
|
|
12857
|
-
return current;
|
|
12858
|
-
}
|
|
12859
|
-
return { ...current, [agentSessionId]: null };
|
|
12860
|
-
});
|
|
12861
|
-
setFailedQueuedPromptIdBySessionId((current) => {
|
|
12862
|
-
if (current[agentSessionId] !== normalizedQueuedPromptId) {
|
|
12863
|
-
return current;
|
|
12893
|
+
const removeQueuedPrompt = useCallback4(
|
|
12894
|
+
(queuedPromptId) => {
|
|
12895
|
+
if (previewMode) {
|
|
12896
|
+
return;
|
|
12864
12897
|
}
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
return current;
|
|
12898
|
+
const agentSessionId = activeConversationIdRef.current;
|
|
12899
|
+
const normalizedQueuedPromptId = queuedPromptId.trim();
|
|
12900
|
+
if (!agentSessionId || !normalizedQueuedPromptId) {
|
|
12901
|
+
return;
|
|
12870
12902
|
}
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12903
|
+
agentQueuedPromptRuntime.removePrompt({
|
|
12904
|
+
workspaceId,
|
|
12905
|
+
agentSessionId,
|
|
12906
|
+
promptId: normalizedQueuedPromptId
|
|
12907
|
+
});
|
|
12908
|
+
},
|
|
12909
|
+
[agentQueuedPromptRuntime, previewMode, workspaceId]
|
|
12910
|
+
);
|
|
12874
12911
|
const editQueuedPrompt = useCallback4(
|
|
12875
12912
|
(queuedPromptId) => {
|
|
12876
12913
|
const agentSessionId = activeConversationIdRef.current;
|
|
12877
12914
|
const normalizedQueuedPromptId = queuedPromptId.trim();
|
|
12878
|
-
if (!agentSessionId || !normalizedQueuedPromptId) {
|
|
12915
|
+
if (previewMode || !agentSessionId || !normalizedQueuedPromptId) {
|
|
12879
12916
|
return;
|
|
12880
12917
|
}
|
|
12881
|
-
const
|
|
12882
|
-
|
|
12918
|
+
const queuedPrompt = agentQueuedPromptRuntime.removePrompt({
|
|
12919
|
+
workspaceId,
|
|
12920
|
+
agentSessionId,
|
|
12921
|
+
promptId: normalizedQueuedPromptId
|
|
12922
|
+
});
|
|
12883
12923
|
if (!queuedPrompt) {
|
|
12884
12924
|
return;
|
|
12885
12925
|
}
|
|
12886
|
-
setQueuedPromptsBySessionId((current) => ({
|
|
12887
|
-
...current,
|
|
12888
|
-
[agentSessionId]: removeQueuedPromptById(
|
|
12889
|
-
current[agentSessionId] ?? [],
|
|
12890
|
-
normalizedQueuedPromptId
|
|
12891
|
-
)
|
|
12892
|
-
}));
|
|
12893
12926
|
setDraftBySessionId((current) => ({
|
|
12894
12927
|
...current,
|
|
12895
12928
|
[agentSessionId]: agentPromptContentToComposerDraft(
|
|
@@ -12897,67 +12930,23 @@ function useAgentGUINodeController({
|
|
|
12897
12930
|
`restore-${queuedPrompt.id}`
|
|
12898
12931
|
)
|
|
12899
12932
|
}));
|
|
12900
|
-
setSendNextQueuedPromptIdBySessionId((current) => {
|
|
12901
|
-
if (current[agentSessionId] !== normalizedQueuedPromptId) {
|
|
12902
|
-
return current;
|
|
12903
|
-
}
|
|
12904
|
-
return { ...current, [agentSessionId]: null };
|
|
12905
|
-
});
|
|
12906
|
-
setFailedQueuedPromptIdBySessionId((current) => {
|
|
12907
|
-
if (current[agentSessionId] !== normalizedQueuedPromptId) {
|
|
12908
|
-
return current;
|
|
12909
|
-
}
|
|
12910
|
-
return { ...current, [agentSessionId]: null };
|
|
12911
|
-
});
|
|
12912
|
-
setQueuedPromptRetryBlockBySessionId((current) => {
|
|
12913
|
-
if (current[agentSessionId]?.queuedPromptId !== normalizedQueuedPromptId) {
|
|
12914
|
-
return current;
|
|
12915
|
-
}
|
|
12916
|
-
return { ...current, [agentSessionId]: null };
|
|
12917
|
-
});
|
|
12918
12933
|
},
|
|
12919
|
-
[
|
|
12934
|
+
[agentQueuedPromptRuntime, previewMode, workspaceId]
|
|
12920
12935
|
);
|
|
12921
12936
|
const sendQueuedPromptNext = useCallback4(
|
|
12922
12937
|
(queuedPromptId) => {
|
|
12923
12938
|
const agentSessionId = activeConversationIdRef.current;
|
|
12924
12939
|
const normalizedQueuedPromptId = queuedPromptId.trim();
|
|
12925
|
-
if (!agentSessionId || !normalizedQueuedPromptId) {
|
|
12926
|
-
return;
|
|
12927
|
-
}
|
|
12928
|
-
const queue = [...queuedPromptsBySessionId[agentSessionId] ?? []];
|
|
12929
|
-
const queueIndex = queue.findIndex(
|
|
12930
|
-
(item) => item.id === normalizedQueuedPromptId
|
|
12931
|
-
);
|
|
12932
|
-
if (queueIndex < 0) {
|
|
12940
|
+
if (previewMode || !agentSessionId || !normalizedQueuedPromptId) {
|
|
12933
12941
|
return;
|
|
12934
12942
|
}
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
setQueuedPromptsBySessionId((current) => ({
|
|
12940
|
-
...current,
|
|
12941
|
-
[agentSessionId]: queue
|
|
12942
|
-
}));
|
|
12943
|
-
setSendNextQueuedPromptIdBySessionId((current) => ({
|
|
12944
|
-
...current,
|
|
12945
|
-
[agentSessionId]: normalizedQueuedPromptId
|
|
12946
|
-
}));
|
|
12947
|
-
setFailedQueuedPromptIdBySessionId((current) => {
|
|
12948
|
-
if (current[agentSessionId] !== normalizedQueuedPromptId) {
|
|
12949
|
-
return current;
|
|
12950
|
-
}
|
|
12951
|
-
return { ...current, [agentSessionId]: null };
|
|
12952
|
-
});
|
|
12953
|
-
setQueuedPromptRetryBlockBySessionId((current) => {
|
|
12954
|
-
if (current[agentSessionId]?.queuedPromptId !== normalizedQueuedPromptId) {
|
|
12955
|
-
return current;
|
|
12956
|
-
}
|
|
12957
|
-
return { ...current, [agentSessionId]: null };
|
|
12943
|
+
agentQueuedPromptRuntime.promotePrompt({
|
|
12944
|
+
workspaceId,
|
|
12945
|
+
agentSessionId,
|
|
12946
|
+
promptId: normalizedQueuedPromptId
|
|
12958
12947
|
});
|
|
12959
12948
|
},
|
|
12960
|
-
[
|
|
12949
|
+
[agentQueuedPromptRuntime, previewMode, workspaceId]
|
|
12961
12950
|
);
|
|
12962
12951
|
const removeProject = useCallback4(
|
|
12963
12952
|
(path) => {
|
|
@@ -13061,37 +13050,9 @@ function useAgentGUINodeController({
|
|
|
13061
13050
|
delete next[target.id];
|
|
13062
13051
|
return next;
|
|
13063
13052
|
});
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
}
|
|
13068
|
-
const next = { ...current };
|
|
13069
|
-
delete next[target.id];
|
|
13070
|
-
return next;
|
|
13071
|
-
});
|
|
13072
|
-
setSendNextQueuedPromptIdBySessionId((current) => {
|
|
13073
|
-
if (!(target.id in current)) {
|
|
13074
|
-
return current;
|
|
13075
|
-
}
|
|
13076
|
-
const next = { ...current };
|
|
13077
|
-
delete next[target.id];
|
|
13078
|
-
return next;
|
|
13079
|
-
});
|
|
13080
|
-
setFailedQueuedPromptIdBySessionId((current) => {
|
|
13081
|
-
if (!(target.id in current)) {
|
|
13082
|
-
return current;
|
|
13083
|
-
}
|
|
13084
|
-
const next = { ...current };
|
|
13085
|
-
delete next[target.id];
|
|
13086
|
-
return next;
|
|
13087
|
-
});
|
|
13088
|
-
setQueuedPromptRetryBlockBySessionId((current) => {
|
|
13089
|
-
if (!(target.id in current)) {
|
|
13090
|
-
return current;
|
|
13091
|
-
}
|
|
13092
|
-
const next = { ...current };
|
|
13093
|
-
delete next[target.id];
|
|
13094
|
-
return next;
|
|
13053
|
+
agentQueuedPromptRuntime.cleanupSession({
|
|
13054
|
+
workspaceId,
|
|
13055
|
+
agentSessionId: target.id
|
|
13095
13056
|
});
|
|
13096
13057
|
deleteAgentSessionView(sessionViewRef(target.id));
|
|
13097
13058
|
const currentConversations = conversationsRef.current;
|
|
@@ -13147,6 +13108,7 @@ function useAgentGUINodeController({
|
|
|
13147
13108
|
workspaceId,
|
|
13148
13109
|
sessionViewRef,
|
|
13149
13110
|
agentActivityRuntime,
|
|
13111
|
+
agentQueuedPromptRuntime,
|
|
13150
13112
|
removeConversations
|
|
13151
13113
|
]);
|
|
13152
13114
|
const finalizeConversationBatchDeletion = useCallback4(
|
|
@@ -13173,18 +13135,12 @@ function useAgentGUINodeController({
|
|
|
13173
13135
|
setDraftBySessionId(
|
|
13174
13136
|
(current) => omitConversationLocalState(current, targetIds)
|
|
13175
13137
|
);
|
|
13176
|
-
|
|
13177
|
-
(
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
setFailedQueuedPromptIdBySessionId(
|
|
13183
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13184
|
-
);
|
|
13185
|
-
setQueuedPromptRetryBlockBySessionId(
|
|
13186
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13187
|
-
);
|
|
13138
|
+
for (const id of targetIds) {
|
|
13139
|
+
agentQueuedPromptRuntime.cleanupSession({
|
|
13140
|
+
workspaceId,
|
|
13141
|
+
agentSessionId: id
|
|
13142
|
+
});
|
|
13143
|
+
}
|
|
13188
13144
|
const nextConversations = conversationsRef.current.filter(
|
|
13189
13145
|
(conversation2) => !targetIds.has(conversation2.id)
|
|
13190
13146
|
);
|
|
@@ -13210,8 +13166,10 @@ function useAgentGUINodeController({
|
|
|
13210
13166
|
clearSelectedConversationNotFoundRetry,
|
|
13211
13167
|
markSelectedConversationDetailPending,
|
|
13212
13168
|
persistActiveConversation,
|
|
13169
|
+
agentQueuedPromptRuntime,
|
|
13213
13170
|
sessionViewRef,
|
|
13214
13171
|
setTransientConversation,
|
|
13172
|
+
workspaceId,
|
|
13215
13173
|
removeConversations
|
|
13216
13174
|
]
|
|
13217
13175
|
);
|
|
@@ -13743,11 +13701,8 @@ function useAgentGUINodeController({
|
|
|
13743
13701
|
const serverInteractivePrompt = hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingInteractivePrompt;
|
|
13744
13702
|
const isInterrupting = activeConversationId !== null && Boolean(interruptingSessionIds[activeConversationId]);
|
|
13745
13703
|
const isCancelPending = activeConversationId !== null && Boolean(pendingInterruptSessionIds[activeConversationId]);
|
|
13746
|
-
const queuedPrompts =
|
|
13747
|
-
|
|
13748
|
-
[activeConversationId, queuedPromptsBySessionId]
|
|
13749
|
-
);
|
|
13750
|
-
const drainingQueuedPromptId = drainingQueuedPromptSessionId === activeConversationId ? queuedPrompts[0]?.id ?? null : null;
|
|
13704
|
+
const queuedPrompts = activeConversationId ? [...activeQueuedPrompts] : [];
|
|
13705
|
+
const drainingQueuedPromptId = activeQueuedPromptClaim?.promptId ?? null;
|
|
13751
13706
|
const sessionSettings = useStableComposerSettings(
|
|
13752
13707
|
cloneComposerSettings(activeSessionState?.settings ?? null)
|
|
13753
13708
|
);
|
|
@@ -13854,7 +13809,7 @@ function useAgentGUINodeController({
|
|
|
13854
13809
|
pendingApproval
|
|
13855
13810
|
]);
|
|
13856
13811
|
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;
|
|
13857
|
-
const canQueueWhileBusy = Boolean(activeConversationId) && (activeConversationBusy || isSubmitting);
|
|
13812
|
+
const canQueueWhileBusy = Boolean(activeConversationId) && (activeConversationBusy || isSubmitting || Boolean(activeSessionState?.pendingInteractive));
|
|
13858
13813
|
useEffect4(() => {
|
|
13859
13814
|
const firstVersion = minFiniteMessageVersion(activeMessages);
|
|
13860
13815
|
const lastVersion = maxFiniteMessageVersion(activeMessages);
|
|
@@ -14341,7 +14296,10 @@ function interactivePromptFromSessionState(state) {
|
|
|
14341
14296
|
return {
|
|
14342
14297
|
kind: "exit-plan",
|
|
14343
14298
|
requestId: prompt.requestId.trim(),
|
|
14344
|
-
title: prompt.toolName?.trim() || "Exit plan mode"
|
|
14299
|
+
title: prompt.toolName?.trim() || "Exit plan mode",
|
|
14300
|
+
// Legacy exitplanmode session-state prompt carries no runtime mode
|
|
14301
|
+
// options; the surface falls back to the curated default list.
|
|
14302
|
+
options: []
|
|
14345
14303
|
};
|
|
14346
14304
|
}
|
|
14347
14305
|
if (toolName !== "askuserquestion") {
|
|
@@ -14469,7 +14427,7 @@ var USAGE_WARN_PERCENT = 80;
|
|
|
14469
14427
|
var USAGE_CRITICAL_PERCENT = 95;
|
|
14470
14428
|
|
|
14471
14429
|
// agent-gui/agentGuiNode/AgentUsageMeter.tsx
|
|
14472
|
-
import { jsx as
|
|
14430
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
14473
14431
|
function agentUsageBarColor(percentUsed) {
|
|
14474
14432
|
if (percentUsed >= USAGE_CRITICAL_PERCENT) {
|
|
14475
14433
|
return "var(--state-danger)";
|
|
@@ -14489,15 +14447,15 @@ function AgentUsageMeter({
|
|
|
14489
14447
|
const clampedPercent = typeof percent === "number" && Number.isFinite(percent) ? Math.max(0, Math.min(100, percent)) : null;
|
|
14490
14448
|
return /* @__PURE__ */ jsxs4("div", { className: "grid min-w-0 gap-1", "data-testid": testId, children: [
|
|
14491
14449
|
/* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 items-center justify-between gap-3", children: [
|
|
14492
|
-
/* @__PURE__ */
|
|
14493
|
-
/* @__PURE__ */
|
|
14450
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate text-[var(--text-secondary)]", children: label }),
|
|
14451
|
+
/* @__PURE__ */ jsx12("span", { className: "shrink-0 whitespace-nowrap text-[var(--text-secondary)]", children: value })
|
|
14494
14452
|
] }),
|
|
14495
|
-
clampedPercent !== null ? /* @__PURE__ */
|
|
14453
|
+
clampedPercent !== null ? /* @__PURE__ */ jsx12(
|
|
14496
14454
|
"span",
|
|
14497
14455
|
{
|
|
14498
14456
|
"aria-hidden": "true",
|
|
14499
14457
|
className: "relative h-1.5 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--text-primary)_10%,transparent)]",
|
|
14500
|
-
children: /* @__PURE__ */
|
|
14458
|
+
children: /* @__PURE__ */ jsx12(
|
|
14501
14459
|
"span",
|
|
14502
14460
|
{
|
|
14503
14461
|
className: "absolute inset-y-0 left-0 min-w-0.5 rounded-full",
|
|
@@ -14536,10 +14494,10 @@ import {
|
|
|
14536
14494
|
} from "@tutti-os/ui-system/icons";
|
|
14537
14495
|
|
|
14538
14496
|
// app/renderer/components/icons/PinFilledIcon.tsx
|
|
14539
|
-
import { jsx as
|
|
14497
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
14540
14498
|
function PinFilledIcon(props) {
|
|
14541
14499
|
"use memo";
|
|
14542
|
-
return /* @__PURE__ */
|
|
14500
|
+
return /* @__PURE__ */ jsx13(
|
|
14543
14501
|
"svg",
|
|
14544
14502
|
{
|
|
14545
14503
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14547,16 +14505,16 @@ function PinFilledIcon(props) {
|
|
|
14547
14505
|
fill: "currentColor",
|
|
14548
14506
|
"aria-hidden": true,
|
|
14549
14507
|
...props,
|
|
14550
|
-
children: /* @__PURE__ */
|
|
14508
|
+
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" })
|
|
14551
14509
|
}
|
|
14552
14510
|
);
|
|
14553
14511
|
}
|
|
14554
14512
|
|
|
14555
14513
|
// app/renderer/components/icons/PinLinedIcon.tsx
|
|
14556
|
-
import { jsx as
|
|
14514
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
14557
14515
|
function PinLinedIcon(props) {
|
|
14558
14516
|
"use memo";
|
|
14559
|
-
return /* @__PURE__ */
|
|
14517
|
+
return /* @__PURE__ */ jsx14(
|
|
14560
14518
|
"svg",
|
|
14561
14519
|
{
|
|
14562
14520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14564,16 +14522,16 @@ function PinLinedIcon(props) {
|
|
|
14564
14522
|
fill: "currentColor",
|
|
14565
14523
|
"aria-hidden": true,
|
|
14566
14524
|
...props,
|
|
14567
|
-
children: /* @__PURE__ */
|
|
14525
|
+
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" })
|
|
14568
14526
|
}
|
|
14569
14527
|
);
|
|
14570
14528
|
}
|
|
14571
14529
|
|
|
14572
14530
|
// app/renderer/components/icons/UnavailableChatIcon.tsx
|
|
14573
|
-
import { jsx as
|
|
14531
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
14574
14532
|
function UnavailableChatIcon(props) {
|
|
14575
14533
|
"use memo";
|
|
14576
|
-
return /* @__PURE__ */
|
|
14534
|
+
return /* @__PURE__ */ jsx15(
|
|
14577
14535
|
"svg",
|
|
14578
14536
|
{
|
|
14579
14537
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14581,16 +14539,16 @@ function UnavailableChatIcon(props) {
|
|
|
14581
14539
|
fill: "currentColor",
|
|
14582
14540
|
"aria-hidden": true,
|
|
14583
14541
|
...props,
|
|
14584
|
-
children: /* @__PURE__ */
|
|
14542
|
+
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" })
|
|
14585
14543
|
}
|
|
14586
14544
|
);
|
|
14587
14545
|
}
|
|
14588
14546
|
|
|
14589
14547
|
// app/renderer/components/icons/EnvironmentLinedIcon.tsx
|
|
14590
|
-
import { jsx as
|
|
14548
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
14591
14549
|
function EnvironmentLinedIcon(props) {
|
|
14592
14550
|
"use memo";
|
|
14593
|
-
return /* @__PURE__ */
|
|
14551
|
+
return /* @__PURE__ */ jsx16(
|
|
14594
14552
|
"svg",
|
|
14595
14553
|
{
|
|
14596
14554
|
width: "24",
|
|
@@ -14599,7 +14557,7 @@ function EnvironmentLinedIcon(props) {
|
|
|
14599
14557
|
fill: "none",
|
|
14600
14558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14601
14559
|
...props,
|
|
14602
|
-
children: /* @__PURE__ */
|
|
14560
|
+
children: /* @__PURE__ */ jsx16(
|
|
14603
14561
|
"path",
|
|
14604
14562
|
{
|
|
14605
14563
|
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",
|
|
@@ -14959,7 +14917,7 @@ var styles = {
|
|
|
14959
14917
|
var RoomIssueNode_styles_default = styles;
|
|
14960
14918
|
|
|
14961
14919
|
// agent-gui/RoomIssueNode/TaskSearchField.tsx
|
|
14962
|
-
import { jsx as
|
|
14920
|
+
import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
14963
14921
|
function TaskSearchField({
|
|
14964
14922
|
ariaLabel,
|
|
14965
14923
|
className,
|
|
@@ -14979,7 +14937,7 @@ function TaskSearchField({
|
|
|
14979
14937
|
className: `${RoomIssueNode_styles_default.searchField} ${className ?? ""}`.trim(),
|
|
14980
14938
|
"data-has-value": searchInput.value ? "true" : "false",
|
|
14981
14939
|
children: [
|
|
14982
|
-
/* @__PURE__ */
|
|
14940
|
+
/* @__PURE__ */ jsx17(
|
|
14983
14941
|
Input,
|
|
14984
14942
|
{
|
|
14985
14943
|
type: "search",
|
|
@@ -15002,7 +14960,7 @@ function TaskSearchField({
|
|
|
15002
14960
|
"data-testid": dataTestId
|
|
15003
14961
|
}
|
|
15004
14962
|
),
|
|
15005
|
-
searchInput.value ? /* @__PURE__ */
|
|
14963
|
+
searchInput.value ? /* @__PURE__ */ jsx17(
|
|
15006
14964
|
"button",
|
|
15007
14965
|
{
|
|
15008
14966
|
type: "button",
|
|
@@ -15010,7 +14968,7 @@ function TaskSearchField({
|
|
|
15010
14968
|
"aria-label": clearAriaLabel ?? t("common.clear"),
|
|
15011
14969
|
onMouseDown: (event) => event.preventDefault(),
|
|
15012
14970
|
onClick: searchInput.clearValue,
|
|
15013
|
-
children: /* @__PURE__ */
|
|
14971
|
+
children: /* @__PURE__ */ jsx17(CloseLinedIcon, { "aria-hidden": "true" })
|
|
15014
14972
|
}
|
|
15015
14973
|
) : null
|
|
15016
14974
|
]
|
|
@@ -15049,7 +15007,7 @@ import {
|
|
|
15049
15007
|
useAnimation,
|
|
15050
15008
|
useReducedMotion
|
|
15051
15009
|
} from "framer-motion";
|
|
15052
|
-
import { jsx as
|
|
15010
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
15053
15011
|
var CAST_VARIANTS = {
|
|
15054
15012
|
normal: { opacity: 1 },
|
|
15055
15013
|
animate: (custom) => ({
|
|
@@ -15117,7 +15075,7 @@ var CastIcon = forwardRef2(
|
|
|
15117
15075
|
},
|
|
15118
15076
|
[onMouseLeave, stopAnimation]
|
|
15119
15077
|
);
|
|
15120
|
-
return /* @__PURE__ */
|
|
15078
|
+
return /* @__PURE__ */ jsx18(
|
|
15121
15079
|
"div",
|
|
15122
15080
|
{
|
|
15123
15081
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -15137,8 +15095,8 @@ var CastIcon = forwardRef2(
|
|
|
15137
15095
|
width: size,
|
|
15138
15096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15139
15097
|
children: [
|
|
15140
|
-
/* @__PURE__ */
|
|
15141
|
-
/* @__PURE__ */
|
|
15098
|
+
/* @__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" }),
|
|
15099
|
+
/* @__PURE__ */ jsx18(
|
|
15142
15100
|
motion.path,
|
|
15143
15101
|
{
|
|
15144
15102
|
animate: controls,
|
|
@@ -15147,7 +15105,7 @@ var CastIcon = forwardRef2(
|
|
|
15147
15105
|
variants: CAST_VARIANTS
|
|
15148
15106
|
}
|
|
15149
15107
|
),
|
|
15150
|
-
/* @__PURE__ */
|
|
15108
|
+
/* @__PURE__ */ jsx18(
|
|
15151
15109
|
motion.path,
|
|
15152
15110
|
{
|
|
15153
15111
|
animate: controls,
|
|
@@ -15156,7 +15114,7 @@ var CastIcon = forwardRef2(
|
|
|
15156
15114
|
variants: CAST_VARIANTS
|
|
15157
15115
|
}
|
|
15158
15116
|
),
|
|
15159
|
-
/* @__PURE__ */
|
|
15117
|
+
/* @__PURE__ */ jsx18(
|
|
15160
15118
|
motion.line,
|
|
15161
15119
|
{
|
|
15162
15120
|
animate: controls,
|
|
@@ -15206,7 +15164,7 @@ var styles2 = {
|
|
|
15206
15164
|
var AgentGUIChrome_styles_default = styles2;
|
|
15207
15165
|
|
|
15208
15166
|
// agent-gui/agentGuiNode/AgentSessionChrome.tsx
|
|
15209
|
-
import { Fragment as Fragment2, jsx as
|
|
15167
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
15210
15168
|
function splitTrailingEllipsis(message) {
|
|
15211
15169
|
const match = message.match(/^(.*?)(\.{3}|…)\s*$/);
|
|
15212
15170
|
if (!match) {
|
|
@@ -15220,9 +15178,9 @@ function splitTrailingEllipsis(message) {
|
|
|
15220
15178
|
function LoadingEllipsis() {
|
|
15221
15179
|
"use memo";
|
|
15222
15180
|
return /* @__PURE__ */ jsxs7("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
15223
|
-
/* @__PURE__ */
|
|
15224
|
-
/* @__PURE__ */
|
|
15225
|
-
/* @__PURE__ */
|
|
15181
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
15182
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
15183
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
15226
15184
|
] });
|
|
15227
15185
|
}
|
|
15228
15186
|
function AgentChromeNotice({
|
|
@@ -15235,7 +15193,7 @@ function AgentChromeNotice({
|
|
|
15235
15193
|
}) {
|
|
15236
15194
|
"use memo";
|
|
15237
15195
|
const fullMessage = description ? `${title} ${description}` : title;
|
|
15238
|
-
return /* @__PURE__ */
|
|
15196
|
+
return /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx19(
|
|
15239
15197
|
"section",
|
|
15240
15198
|
{
|
|
15241
15199
|
className: cn(
|
|
@@ -15246,16 +15204,16 @@ function AgentChromeNotice({
|
|
|
15246
15204
|
"data-expanded": "false",
|
|
15247
15205
|
role,
|
|
15248
15206
|
"data-testid": testId,
|
|
15249
|
-
children: /* @__PURE__ */
|
|
15250
|
-
icon ? /* @__PURE__ */
|
|
15207
|
+
children: /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15208
|
+
icon ? /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: icon }) : null,
|
|
15251
15209
|
/* @__PURE__ */ jsxs7(
|
|
15252
15210
|
"p",
|
|
15253
15211
|
{
|
|
15254
15212
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
15255
15213
|
title: fullMessage,
|
|
15256
15214
|
children: [
|
|
15257
|
-
/* @__PURE__ */
|
|
15258
|
-
description ? /* @__PURE__ */
|
|
15215
|
+
/* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: title }),
|
|
15216
|
+
description ? /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description }) : null
|
|
15259
15217
|
]
|
|
15260
15218
|
}
|
|
15261
15219
|
)
|
|
@@ -15404,7 +15362,7 @@ function AgentSessionChrome({
|
|
|
15404
15362
|
event.stopPropagation();
|
|
15405
15363
|
};
|
|
15406
15364
|
return /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: [
|
|
15407
|
-
visibleAuth ? /* @__PURE__ */
|
|
15365
|
+
visibleAuth ? /* @__PURE__ */ jsx19(
|
|
15408
15366
|
"section",
|
|
15409
15367
|
{
|
|
15410
15368
|
ref: authCardRef,
|
|
@@ -15416,7 +15374,7 @@ function AgentSessionChrome({
|
|
|
15416
15374
|
onKeyDown: handleExpandableCardKeyDown("auth"),
|
|
15417
15375
|
children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15418
15376
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15419
|
-
/* @__PURE__ */
|
|
15377
|
+
/* @__PURE__ */ jsx19(
|
|
15420
15378
|
"p",
|
|
15421
15379
|
{
|
|
15422
15380
|
ref: authMessageRef,
|
|
@@ -15425,7 +15383,7 @@ function AgentSessionChrome({
|
|
|
15425
15383
|
children: visibleAuth.message
|
|
15426
15384
|
}
|
|
15427
15385
|
),
|
|
15428
|
-
/* @__PURE__ */
|
|
15386
|
+
/* @__PURE__ */ jsx19(
|
|
15429
15387
|
ChevronDown,
|
|
15430
15388
|
{
|
|
15431
15389
|
"aria-hidden": "true",
|
|
@@ -15438,7 +15396,7 @@ function AgentSessionChrome({
|
|
|
15438
15396
|
)
|
|
15439
15397
|
] }),
|
|
15440
15398
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: [
|
|
15441
|
-
onAuthLogin ? /* @__PURE__ */
|
|
15399
|
+
onAuthLogin ? /* @__PURE__ */ jsx19(
|
|
15442
15400
|
Button2,
|
|
15443
15401
|
{
|
|
15444
15402
|
type: "button",
|
|
@@ -15451,7 +15409,7 @@ function AgentSessionChrome({
|
|
|
15451
15409
|
children: labels.authLogin ?? labels.retryActivation
|
|
15452
15410
|
}
|
|
15453
15411
|
) : null,
|
|
15454
|
-
/* @__PURE__ */
|
|
15412
|
+
/* @__PURE__ */ jsx19(
|
|
15455
15413
|
Button2,
|
|
15456
15414
|
{
|
|
15457
15415
|
type: "button",
|
|
@@ -15469,9 +15427,9 @@ function AgentSessionChrome({
|
|
|
15469
15427
|
}
|
|
15470
15428
|
) : null,
|
|
15471
15429
|
chrome.approval ? /* @__PURE__ */ jsxs7("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardAction), children: [
|
|
15472
|
-
/* @__PURE__ */
|
|
15473
|
-
/* @__PURE__ */
|
|
15474
|
-
/* @__PURE__ */
|
|
15430
|
+
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeTitle, children: labels.approvalRequired }),
|
|
15431
|
+
/* @__PURE__ */ jsx19("p", { className: AgentGUIChrome_styles_default.chromeMessage, children: chrome.approval.title }),
|
|
15432
|
+
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeActions, children: chrome.approval.options.map((option) => /* @__PURE__ */ jsx19(
|
|
15475
15433
|
"button",
|
|
15476
15434
|
{
|
|
15477
15435
|
type: "button",
|
|
@@ -15485,7 +15443,7 @@ function AgentSessionChrome({
|
|
|
15485
15443
|
option.id
|
|
15486
15444
|
)) })
|
|
15487
15445
|
] }) : null,
|
|
15488
|
-
visibleRecovery ? /* @__PURE__ */
|
|
15446
|
+
visibleRecovery ? /* @__PURE__ */ jsx19(
|
|
15489
15447
|
"section",
|
|
15490
15448
|
{
|
|
15491
15449
|
ref: recoveryCardRef,
|
|
@@ -15503,7 +15461,7 @@ function AgentSessionChrome({
|
|
|
15503
15461
|
onKeyDown: handleExpandableCardKeyDown("recovery"),
|
|
15504
15462
|
children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15505
15463
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15506
|
-
visibleRecovery.kind === "activating" ? /* @__PURE__ */
|
|
15464
|
+
visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx19(
|
|
15507
15465
|
CastIcon,
|
|
15508
15466
|
{
|
|
15509
15467
|
active: true,
|
|
@@ -15513,7 +15471,7 @@ function AgentSessionChrome({
|
|
|
15513
15471
|
size: 16
|
|
15514
15472
|
}
|
|
15515
15473
|
) : null,
|
|
15516
|
-
/* @__PURE__ */
|
|
15474
|
+
/* @__PURE__ */ jsx19(
|
|
15517
15475
|
"p",
|
|
15518
15476
|
{
|
|
15519
15477
|
ref: recoveryMessageRef,
|
|
@@ -15521,12 +15479,12 @@ function AgentSessionChrome({
|
|
|
15521
15479
|
"aria-label": visibleRecovery.kind === "activating" ? recoveryMessage : void 0,
|
|
15522
15480
|
title: recoveryMessage,
|
|
15523
15481
|
children: visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
15524
|
-
/* @__PURE__ */
|
|
15525
|
-
activatingMessage.ellipsis ? /* @__PURE__ */
|
|
15482
|
+
/* @__PURE__ */ jsx19("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
|
|
15483
|
+
activatingMessage.ellipsis ? /* @__PURE__ */ jsx19(LoadingEllipsis, {}) : null
|
|
15526
15484
|
] }) : recoveryMessage
|
|
15527
15485
|
}
|
|
15528
15486
|
),
|
|
15529
|
-
/* @__PURE__ */
|
|
15487
|
+
/* @__PURE__ */ jsx19(
|
|
15530
15488
|
ChevronDown,
|
|
15531
15489
|
{
|
|
15532
15490
|
"aria-hidden": "true",
|
|
@@ -15538,7 +15496,7 @@ function AgentSessionChrome({
|
|
|
15538
15496
|
}
|
|
15539
15497
|
)
|
|
15540
15498
|
] }),
|
|
15541
|
-
/* @__PURE__ */
|
|
15499
|
+
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: visibleRecovery.kind === "failed" && visibleRecovery.followupAction === "continue-in-new-conversation" ? /* @__PURE__ */ jsx19(
|
|
15542
15500
|
Button2,
|
|
15543
15501
|
{
|
|
15544
15502
|
type: "button",
|
|
@@ -15551,7 +15509,7 @@ function AgentSessionChrome({
|
|
|
15551
15509
|
},
|
|
15552
15510
|
children: labels.continueInNewConversation
|
|
15553
15511
|
}
|
|
15554
|
-
) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */
|
|
15512
|
+
) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */ jsx19(
|
|
15555
15513
|
Button2,
|
|
15556
15514
|
{
|
|
15557
15515
|
type: "button",
|
|
@@ -15573,7 +15531,7 @@ function AgentSessionChrome({
|
|
|
15573
15531
|
|
|
15574
15532
|
// agent-gui/agentGuiNode/AgentGoalBanner.tsx
|
|
15575
15533
|
import { Target } from "lucide-react";
|
|
15576
|
-
import { jsx as
|
|
15534
|
+
import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
15577
15535
|
var TERMINAL_GOAL_STATUSES = /* @__PURE__ */ new Set(["complete", "completed", "done"]);
|
|
15578
15536
|
function normalizeGoalStatus(status) {
|
|
15579
15537
|
return (status ?? "").trim().toLowerCase();
|
|
@@ -15627,7 +15585,7 @@ function AgentGoalBanner({
|
|
|
15627
15585
|
labels
|
|
15628
15586
|
});
|
|
15629
15587
|
const fullMessage = `${labels.goalLabel} ${description}`;
|
|
15630
|
-
return /* @__PURE__ */
|
|
15588
|
+
return /* @__PURE__ */ jsx20("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx20(
|
|
15631
15589
|
"section",
|
|
15632
15590
|
{
|
|
15633
15591
|
className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardMuted),
|
|
@@ -15637,20 +15595,20 @@ function AgentGoalBanner({
|
|
|
15637
15595
|
"data-testid": "agent-gui-goal-banner",
|
|
15638
15596
|
children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15639
15597
|
/* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15640
|
-
/* @__PURE__ */
|
|
15598
|
+
/* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx20(Target, { "aria-hidden": true, className: "size-3.5" }) }),
|
|
15641
15599
|
/* @__PURE__ */ jsxs8(
|
|
15642
15600
|
"p",
|
|
15643
15601
|
{
|
|
15644
15602
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
15645
15603
|
title: fullMessage,
|
|
15646
15604
|
children: [
|
|
15647
|
-
/* @__PURE__ */
|
|
15648
|
-
/* @__PURE__ */
|
|
15605
|
+
/* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: labels.goalLabel }),
|
|
15606
|
+
/* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description })
|
|
15649
15607
|
]
|
|
15650
15608
|
}
|
|
15651
15609
|
)
|
|
15652
15610
|
] }),
|
|
15653
|
-
/* @__PURE__ */
|
|
15611
|
+
/* @__PURE__ */ jsx20(
|
|
15654
15612
|
"span",
|
|
15655
15613
|
{
|
|
15656
15614
|
className: AgentGUIChrome_styles_default.chromeGoalHint,
|
|
@@ -16138,7 +16096,7 @@ import {
|
|
|
16138
16096
|
Target as Target2,
|
|
16139
16097
|
ZapIcon
|
|
16140
16098
|
} from "lucide-react";
|
|
16141
|
-
import { jsx as
|
|
16099
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
16142
16100
|
var paletteStyles = {
|
|
16143
16101
|
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]",
|
|
16144
16102
|
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",
|
|
@@ -16186,11 +16144,11 @@ function AgentSlashCommandPalette({
|
|
|
16186
16144
|
firstEntryIndexByType.set(groupType, index);
|
|
16187
16145
|
}
|
|
16188
16146
|
});
|
|
16189
|
-
return /* @__PURE__ */
|
|
16147
|
+
return /* @__PURE__ */ jsx21("div", { className: paletteStyles.palette, role: "listbox", "aria-label": label, children: entries.map((entry, index) => {
|
|
16190
16148
|
const isHighlighted = index === highlightedIndex;
|
|
16191
16149
|
const groupType = entryGroupType(entry);
|
|
16192
16150
|
const entryIcon = slashPaletteEntryIcon(entry);
|
|
16193
|
-
const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */
|
|
16151
|
+
const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */ jsx21(
|
|
16194
16152
|
"div",
|
|
16195
16153
|
{
|
|
16196
16154
|
"aria-hidden": "true",
|
|
@@ -16239,15 +16197,15 @@ function AgentSlashCommandPalette({
|
|
|
16239
16197
|
onSelectSkill(entry.skill);
|
|
16240
16198
|
},
|
|
16241
16199
|
children: [
|
|
16242
|
-
entryIcon ? /* @__PURE__ */
|
|
16200
|
+
entryIcon ? /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: paletteStyles.icon, children: entryIcon }) : null,
|
|
16243
16201
|
/* @__PURE__ */ jsxs9("span", { className: paletteStyles.copy, children: [
|
|
16244
16202
|
/* @__PURE__ */ jsxs9("span", { className: paletteStyles.name, children: [
|
|
16245
|
-
/* @__PURE__ */
|
|
16246
|
-
entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */
|
|
16203
|
+
/* @__PURE__ */ jsx21("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
|
|
16204
|
+
entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx21("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
|
|
16247
16205
|
] }),
|
|
16248
|
-
entry.description ? /* @__PURE__ */
|
|
16206
|
+
entry.description ? /* @__PURE__ */ jsx21("span", { className: paletteStyles.descriptionText, children: entry.description }) : null
|
|
16249
16207
|
] }),
|
|
16250
|
-
entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */
|
|
16208
|
+
entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */ jsx21(
|
|
16251
16209
|
"button",
|
|
16252
16210
|
{
|
|
16253
16211
|
"aria-label": entry.settingsAriaLabel ?? entry.settingsLabel,
|
|
@@ -16302,24 +16260,24 @@ function labelForEntryGroupType(groupType, labels) {
|
|
|
16302
16260
|
var SLASH_PALETTE_ICON_CLASS = "size-3";
|
|
16303
16261
|
function slashPaletteEntryIcon(entry) {
|
|
16304
16262
|
if (entry.type === "capability") {
|
|
16305
|
-
return entry.capability.capability === "computerUse" ? /* @__PURE__ */
|
|
16263
|
+
return entry.capability.capability === "computerUse" ? /* @__PURE__ */ jsx21(Monitor, { className: SLASH_PALETTE_ICON_CLASS }) : /* @__PURE__ */ jsx21(Globe, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16306
16264
|
}
|
|
16307
16265
|
if (entry.type !== "command") {
|
|
16308
16266
|
return null;
|
|
16309
16267
|
}
|
|
16310
16268
|
switch (entry.command.name.trim().toLowerCase()) {
|
|
16311
16269
|
case "compact":
|
|
16312
|
-
return /* @__PURE__ */
|
|
16270
|
+
return /* @__PURE__ */ jsx21(Minimize2, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16313
16271
|
case "fast":
|
|
16314
|
-
return /* @__PURE__ */
|
|
16272
|
+
return /* @__PURE__ */ jsx21(ZapIcon, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16315
16273
|
case "goal":
|
|
16316
|
-
return /* @__PURE__ */
|
|
16274
|
+
return /* @__PURE__ */ jsx21(Target2, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16317
16275
|
case "plan":
|
|
16318
|
-
return /* @__PURE__ */
|
|
16276
|
+
return /* @__PURE__ */ jsx21(ListChecks, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16319
16277
|
case "review":
|
|
16320
|
-
return /* @__PURE__ */
|
|
16278
|
+
return /* @__PURE__ */ jsx21(Search, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16321
16279
|
case "status":
|
|
16322
|
-
return /* @__PURE__ */
|
|
16280
|
+
return /* @__PURE__ */ jsx21(Info, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16323
16281
|
default:
|
|
16324
16282
|
return null;
|
|
16325
16283
|
}
|
|
@@ -16470,7 +16428,7 @@ var styles3 = {
|
|
|
16470
16428
|
var AgentGUINode_styles_default = styles3;
|
|
16471
16429
|
|
|
16472
16430
|
// agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
|
|
16473
|
-
import { jsx as
|
|
16431
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
16474
16432
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
16475
16433
|
function queuedPromptImages(queuedPrompt) {
|
|
16476
16434
|
return agentPromptContentImageBlocks(
|
|
@@ -16597,9 +16555,9 @@ function AgentQueuedPromptPanel({
|
|
|
16597
16555
|
onKeyDown: handleKeyDown,
|
|
16598
16556
|
children: [
|
|
16599
16557
|
/* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptHeader, children: [
|
|
16600
|
-
/* @__PURE__ */
|
|
16601
|
-
/* @__PURE__ */
|
|
16602
|
-
canExpand ? /* @__PURE__ */
|
|
16558
|
+
/* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptLabel, children: labels.queuedLabel }),
|
|
16559
|
+
/* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptCount, children: queuedPrompts.length }),
|
|
16560
|
+
canExpand ? /* @__PURE__ */ jsx22(
|
|
16603
16561
|
ChevronRight,
|
|
16604
16562
|
{
|
|
16605
16563
|
"aria-hidden": "true",
|
|
@@ -16610,7 +16568,7 @@ function AgentQueuedPromptPanel({
|
|
|
16610
16568
|
}
|
|
16611
16569
|
) : null
|
|
16612
16570
|
] }),
|
|
16613
|
-
/* @__PURE__ */
|
|
16571
|
+
/* @__PURE__ */ jsx22(
|
|
16614
16572
|
"div",
|
|
16615
16573
|
{
|
|
16616
16574
|
ref: queuedPromptListRef,
|
|
@@ -16629,8 +16587,8 @@ function AgentQueuedPromptPanel({
|
|
|
16629
16587
|
"data-testid": `agent-gui-composer-queued-prompt-${queuedPrompt.id}`,
|
|
16630
16588
|
"data-draining": isDraining ? "true" : "false",
|
|
16631
16589
|
children: [
|
|
16632
|
-
/* @__PURE__ */
|
|
16633
|
-
displayText ? /* @__PURE__ */
|
|
16590
|
+
/* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptBody, title, children: [
|
|
16591
|
+
displayText ? /* @__PURE__ */ jsx22(
|
|
16634
16592
|
"div",
|
|
16635
16593
|
{
|
|
16636
16594
|
ref: queuedPrompts.length === 1 ? singlePromptTextRef : void 0,
|
|
@@ -16640,7 +16598,7 @@ function AgentQueuedPromptPanel({
|
|
|
16640
16598
|
event.stopPropagation();
|
|
16641
16599
|
}
|
|
16642
16600
|
},
|
|
16643
|
-
children: /* @__PURE__ */
|
|
16601
|
+
children: /* @__PURE__ */ jsx22(
|
|
16644
16602
|
AgentMessageMarkdown,
|
|
16645
16603
|
{
|
|
16646
16604
|
content: displayText,
|
|
@@ -16652,53 +16610,58 @@ function AgentQueuedPromptPanel({
|
|
|
16652
16610
|
)
|
|
16653
16611
|
}
|
|
16654
16612
|
) : null,
|
|
16655
|
-
images.length > 0 ? /* @__PURE__ */
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16613
|
+
images.length > 0 ? /* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptImages, children: images.slice(0, 3).map((image, index) => {
|
|
16614
|
+
const src = `data:${image.mimeType};base64,${image.data}`;
|
|
16615
|
+
return /* @__PURE__ */ jsx22(
|
|
16616
|
+
ZoomableImage,
|
|
16617
|
+
{
|
|
16618
|
+
alt: image.name?.trim() || "",
|
|
16619
|
+
className: AgentGUINode_styles_default.composerQueuedPromptImage,
|
|
16620
|
+
draggable: false,
|
|
16621
|
+
src,
|
|
16622
|
+
wrapElement: "span"
|
|
16623
|
+
},
|
|
16624
|
+
`${queuedPrompt.id}:image:${index}`
|
|
16625
|
+
);
|
|
16626
|
+
}) }) : null
|
|
16664
16627
|
] }) }),
|
|
16665
16628
|
/* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptActions, children: [
|
|
16666
|
-
/* @__PURE__ */
|
|
16629
|
+
/* @__PURE__ */ jsx22(
|
|
16667
16630
|
CanvasNodeGhostIconButton,
|
|
16668
16631
|
{
|
|
16669
16632
|
"aria-label": labels.sendQueuedPromptNext,
|
|
16670
16633
|
disabled: isDraining,
|
|
16671
16634
|
onClick: () => onSendQueuedPromptNext(queuedPrompt.id),
|
|
16672
|
-
children: /* @__PURE__ */
|
|
16635
|
+
children: /* @__PURE__ */ jsx22(CanvasNodeGuideLinedIcon, { "aria-hidden": "true" })
|
|
16673
16636
|
}
|
|
16674
16637
|
),
|
|
16675
|
-
/* @__PURE__ */
|
|
16638
|
+
/* @__PURE__ */ jsx22(
|
|
16676
16639
|
CanvasNodeGhostIconButton,
|
|
16677
16640
|
{
|
|
16678
16641
|
"aria-label": labels.deleteQueuedPrompt,
|
|
16679
16642
|
disabled: isDraining,
|
|
16680
16643
|
onClick: () => onRemoveQueuedPrompt(queuedPrompt.id),
|
|
16681
|
-
children: /* @__PURE__ */
|
|
16644
|
+
children: /* @__PURE__ */ jsx22(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
16682
16645
|
}
|
|
16683
16646
|
),
|
|
16684
16647
|
/* @__PURE__ */ jsxs10(DropdownMenu, { children: [
|
|
16685
|
-
/* @__PURE__ */
|
|
16648
|
+
/* @__PURE__ */ jsx22(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx22(
|
|
16686
16649
|
CanvasNodeGhostIconButton,
|
|
16687
16650
|
{
|
|
16688
16651
|
"aria-label": labels.queuedPromptMoreActions,
|
|
16689
16652
|
disabled: isDraining,
|
|
16690
16653
|
stopsEventPropagation: false,
|
|
16691
16654
|
onClick: (event) => event.stopPropagation(),
|
|
16692
|
-
children: /* @__PURE__ */
|
|
16655
|
+
children: /* @__PURE__ */ jsx22(CanvasNodeMoreLinedIcon, { "aria-hidden": "true" })
|
|
16693
16656
|
}
|
|
16694
16657
|
) }),
|
|
16695
|
-
/* @__PURE__ */
|
|
16658
|
+
/* @__PURE__ */ jsx22(
|
|
16696
16659
|
DropdownMenuContent,
|
|
16697
16660
|
{
|
|
16698
16661
|
align: "end",
|
|
16699
16662
|
className: AgentGUINode_styles_default.composerMenuContent,
|
|
16700
16663
|
sideOffset: 8,
|
|
16701
|
-
children: /* @__PURE__ */
|
|
16664
|
+
children: /* @__PURE__ */ jsx22(
|
|
16702
16665
|
DropdownMenuItem,
|
|
16703
16666
|
{
|
|
16704
16667
|
className: AgentGUINode_styles_default.composerMenuItem,
|
|
@@ -16712,7 +16675,7 @@ function AgentQueuedPromptPanel({
|
|
|
16712
16675
|
onSelect: () => {
|
|
16713
16676
|
handleEditQueuedPromptSelect(queuedPrompt.id);
|
|
16714
16677
|
},
|
|
16715
|
-
children: /* @__PURE__ */
|
|
16678
|
+
children: /* @__PURE__ */ jsx22("span", { children: labels.editQueuedPrompt })
|
|
16716
16679
|
}
|
|
16717
16680
|
)
|
|
16718
16681
|
}
|
|
@@ -17096,7 +17059,7 @@ function optionsWithSelectedValue(options, selectedValue) {
|
|
|
17096
17059
|
}
|
|
17097
17060
|
|
|
17098
17061
|
// agent-gui/agentGuiNode/AgentComposerSettingsMenus.tsx
|
|
17099
|
-
import { Fragment as Fragment4, jsx as
|
|
17062
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
17100
17063
|
function basenameProjectPath(path) {
|
|
17101
17064
|
const normalized = path.trim().replaceAll("\\", "/").replace(/\/+$/, "");
|
|
17102
17065
|
return normalized.split("/").filter(Boolean).at(-1) ?? path;
|
|
@@ -17148,7 +17111,7 @@ function AgentProjectDropdown({
|
|
|
17148
17111
|
className: "workspace-user-project-trigger-label",
|
|
17149
17112
|
"data-workspace-user-project-trigger-label": "true",
|
|
17150
17113
|
children: [
|
|
17151
|
-
selectedPath ? /* @__PURE__ */
|
|
17114
|
+
selectedPath ? /* @__PURE__ */ jsx23(FolderIcon, { "aria-hidden": true, className: "shrink-0", size: 15 }) : /* @__PURE__ */ jsx23(
|
|
17152
17115
|
NoWorkspaceLinedIcon,
|
|
17153
17116
|
{
|
|
17154
17117
|
"aria-hidden": true,
|
|
@@ -17157,16 +17120,16 @@ function AgentProjectDropdown({
|
|
|
17157
17120
|
size: 15
|
|
17158
17121
|
}
|
|
17159
17122
|
),
|
|
17160
|
-
/* @__PURE__ */
|
|
17123
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: triggerLabel })
|
|
17161
17124
|
]
|
|
17162
17125
|
}
|
|
17163
17126
|
),
|
|
17164
|
-
/* @__PURE__ */
|
|
17127
|
+
/* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17165
17128
|
]
|
|
17166
17129
|
}
|
|
17167
17130
|
);
|
|
17168
17131
|
}
|
|
17169
|
-
return /* @__PURE__ */
|
|
17132
|
+
return /* @__PURE__ */ jsx23(
|
|
17170
17133
|
WorkspaceUserProjectSelect,
|
|
17171
17134
|
{
|
|
17172
17135
|
api: userProjectApi,
|
|
@@ -17186,7 +17149,7 @@ function AgentProjectDropdown({
|
|
|
17186
17149
|
i18n,
|
|
17187
17150
|
labels,
|
|
17188
17151
|
projectLocked: Boolean(composerSettings.projectLocked),
|
|
17189
|
-
renderAddProjectIcon: () => /* @__PURE__ */
|
|
17152
|
+
renderAddProjectIcon: () => /* @__PURE__ */ jsx23(
|
|
17190
17153
|
NewWorkspaceLinedIcon,
|
|
17191
17154
|
{
|
|
17192
17155
|
"aria-hidden": true,
|
|
@@ -17250,15 +17213,15 @@ function AgentPermissionModeDropdown({
|
|
|
17250
17213
|
"aria-label": labels.permissionLabel,
|
|
17251
17214
|
"data-permission-tone": triggerTone,
|
|
17252
17215
|
children: [
|
|
17253
|
-
/* @__PURE__ */
|
|
17254
|
-
/* @__PURE__ */
|
|
17216
|
+
/* @__PURE__ */ jsx23("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx23("span", { className: "truncate", children: triggerLabel }) }),
|
|
17217
|
+
/* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17255
17218
|
]
|
|
17256
17219
|
}
|
|
17257
17220
|
);
|
|
17258
17221
|
if (previewMode) {
|
|
17259
17222
|
return trigger;
|
|
17260
17223
|
}
|
|
17261
|
-
const selectTrigger = /* @__PURE__ */
|
|
17224
|
+
const selectTrigger = /* @__PURE__ */ jsx23(
|
|
17262
17225
|
SelectTrigger,
|
|
17263
17226
|
{
|
|
17264
17227
|
className: cn2(
|
|
@@ -17269,7 +17232,7 @@ function AgentPermissionModeDropdown({
|
|
|
17269
17232
|
),
|
|
17270
17233
|
"aria-label": labels.permissionLabel,
|
|
17271
17234
|
"data-permission-tone": triggerTone,
|
|
17272
|
-
children: /* @__PURE__ */
|
|
17235
|
+
children: /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx23("span", { className: "truncate", children: triggerLabel }) })
|
|
17273
17236
|
}
|
|
17274
17237
|
);
|
|
17275
17238
|
return /* @__PURE__ */ jsxs11(
|
|
@@ -17286,11 +17249,11 @@ function AgentPermissionModeDropdown({
|
|
|
17286
17249
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
17287
17250
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
17288
17251
|
/* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17289
|
-
/* @__PURE__ */
|
|
17290
|
-
/* @__PURE__ */
|
|
17252
|
+
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: selectTrigger }) }),
|
|
17253
|
+
/* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
17291
17254
|
] })
|
|
17292
17255
|
) : selectTrigger,
|
|
17293
|
-
isSelectOpen ? /* @__PURE__ */
|
|
17256
|
+
isSelectOpen ? /* @__PURE__ */ jsx23(
|
|
17294
17257
|
SelectContent,
|
|
17295
17258
|
{
|
|
17296
17259
|
align: "end",
|
|
@@ -17301,7 +17264,7 @@ function AgentPermissionModeDropdown({
|
|
|
17301
17264
|
AgentGUINode_styles_default.composerMenuContent,
|
|
17302
17265
|
"w-max min-w-[220px] max-w-[calc(100vw-32px)] data-[side=top]:!translate-y-0"
|
|
17303
17266
|
),
|
|
17304
|
-
children: permissionOptions.map((option) => /* @__PURE__ */
|
|
17267
|
+
children: permissionOptions.map((option) => /* @__PURE__ */ jsx23(
|
|
17305
17268
|
SelectItem,
|
|
17306
17269
|
{
|
|
17307
17270
|
value: option.value,
|
|
@@ -17309,8 +17272,8 @@ function AgentPermissionModeDropdown({
|
|
|
17309
17272
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "group/composer-option"),
|
|
17310
17273
|
onPointerDown: (event) => handleSelectedItemPointerDown(event, option.value),
|
|
17311
17274
|
children: /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
17312
|
-
/* @__PURE__ */
|
|
17313
|
-
option.description ? /* @__PURE__ */
|
|
17275
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: option.label }),
|
|
17276
|
+
option.description ? /* @__PURE__ */ jsx23(
|
|
17314
17277
|
ComposerOptionInfoTooltip,
|
|
17315
17278
|
{
|
|
17316
17279
|
description: option.description,
|
|
@@ -17391,22 +17354,22 @@ function ComposerOptionInfoTooltip({
|
|
|
17391
17354
|
event.preventDefault();
|
|
17392
17355
|
event.stopPropagation();
|
|
17393
17356
|
};
|
|
17394
|
-
const trigger = /* @__PURE__ */
|
|
17357
|
+
const trigger = /* @__PURE__ */ jsx23(
|
|
17395
17358
|
"span",
|
|
17396
17359
|
{
|
|
17397
17360
|
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",
|
|
17398
17361
|
"data-agent-composer-option-info-trigger": "true",
|
|
17399
17362
|
onClick: stopSelect,
|
|
17400
17363
|
onPointerDown: stopSelect,
|
|
17401
|
-
children: /* @__PURE__ */
|
|
17364
|
+
children: /* @__PURE__ */ jsx23(RoomsHintIcon, { "aria-hidden": true, className: "size-3" })
|
|
17402
17365
|
}
|
|
17403
17366
|
);
|
|
17404
17367
|
if (!tooltipsEnabled) {
|
|
17405
17368
|
return trigger;
|
|
17406
17369
|
}
|
|
17407
17370
|
return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17408
|
-
/* @__PURE__ */
|
|
17409
|
-
/* @__PURE__ */
|
|
17371
|
+
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: trigger }),
|
|
17372
|
+
/* @__PURE__ */ jsx23(TooltipContent2, { side: "right", className: "max-w-[240px] whitespace-normal", children: description })
|
|
17410
17373
|
] });
|
|
17411
17374
|
}
|
|
17412
17375
|
function resolvePermissionModeTriggerTone(value) {
|
|
@@ -17461,7 +17424,7 @@ function AgentModelReasoningDropdown({
|
|
|
17461
17424
|
"data-agent-model-reasoning-trigger": "true",
|
|
17462
17425
|
children: [
|
|
17463
17426
|
/* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
17464
|
-
menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */
|
|
17427
|
+
menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */ jsx23(
|
|
17465
17428
|
ZapIcon2,
|
|
17466
17429
|
{
|
|
17467
17430
|
"aria-hidden": true,
|
|
@@ -17470,12 +17433,12 @@ function AgentModelReasoningDropdown({
|
|
|
17470
17433
|
strokeWidth: 2.5
|
|
17471
17434
|
}
|
|
17472
17435
|
) : null,
|
|
17473
|
-
menu.trigger.showCombined ? /* @__PURE__ */
|
|
17474
|
-
/* @__PURE__ */
|
|
17475
|
-
/* @__PURE__ */
|
|
17436
|
+
menu.trigger.showCombined ? /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
17437
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.modelLabel }),
|
|
17438
|
+
/* @__PURE__ */ jsx23("span", { className: "shrink-0", children: menu.trigger.reasoningLabel })
|
|
17476
17439
|
] })
|
|
17477
17440
|
] }),
|
|
17478
|
-
/* @__PURE__ */
|
|
17441
|
+
/* @__PURE__ */ jsx23(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17479
17442
|
]
|
|
17480
17443
|
}
|
|
17481
17444
|
);
|
|
@@ -17488,10 +17451,10 @@ function AgentModelReasoningDropdown({
|
|
|
17488
17451
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
17489
17452
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
17490
17453
|
/* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17491
|
-
/* @__PURE__ */
|
|
17492
|
-
/* @__PURE__ */
|
|
17454
|
+
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }) }) }),
|
|
17455
|
+
/* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
17493
17456
|
] })
|
|
17494
|
-
) : /* @__PURE__ */
|
|
17457
|
+
) : /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }),
|
|
17495
17458
|
/* @__PURE__ */ jsxs11(
|
|
17496
17459
|
DropdownMenuContent2,
|
|
17497
17460
|
{
|
|
@@ -17506,8 +17469,8 @@ function AgentModelReasoningDropdown({
|
|
|
17506
17469
|
"data-agent-composer-settings-layout": "model-primary",
|
|
17507
17470
|
children: [
|
|
17508
17471
|
menu.model.show ? /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
17509
|
-
/* @__PURE__ */
|
|
17510
|
-
/* @__PURE__ */
|
|
17472
|
+
/* @__PURE__ */ jsx23(DropdownMenuLabel2, { children: labels.modelSelectionLabel }),
|
|
17473
|
+
/* @__PURE__ */ jsx23(
|
|
17511
17474
|
ComposerMenuOptionItems,
|
|
17512
17475
|
{
|
|
17513
17476
|
options: menu.model.options,
|
|
@@ -17518,7 +17481,7 @@ function AgentModelReasoningDropdown({
|
|
|
17518
17481
|
}
|
|
17519
17482
|
)
|
|
17520
17483
|
] }) : null,
|
|
17521
|
-
menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */
|
|
17484
|
+
menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */ jsx23(DropdownMenuSeparator2, {}) : null,
|
|
17522
17485
|
menu.reasoning.show ? /* @__PURE__ */ jsxs11(DropdownMenuSub2, { children: [
|
|
17523
17486
|
/* @__PURE__ */ jsxs11(
|
|
17524
17487
|
DropdownMenuSubTrigger2,
|
|
@@ -17526,17 +17489,17 @@ function AgentModelReasoningDropdown({
|
|
|
17526
17489
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
17527
17490
|
"data-agent-reasoning-submenu-trigger": "true",
|
|
17528
17491
|
children: [
|
|
17529
|
-
/* @__PURE__ */
|
|
17530
|
-
/* @__PURE__ */
|
|
17492
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 flex-1 truncate", children: labels.reasoningLabel }),
|
|
17493
|
+
/* @__PURE__ */ jsx23("span", { className: "text-[var(--text-tertiary)]", children: menu.reasoning.selectedLabel })
|
|
17531
17494
|
]
|
|
17532
17495
|
}
|
|
17533
17496
|
),
|
|
17534
|
-
/* @__PURE__ */
|
|
17497
|
+
/* @__PURE__ */ jsx23(
|
|
17535
17498
|
DropdownMenuSubContent2,
|
|
17536
17499
|
{
|
|
17537
17500
|
className: cn2(AgentGUINode_styles_default.composerMenuContent, "min-w-[132px]"),
|
|
17538
17501
|
"data-agent-composer-settings-layout": "model-submenu",
|
|
17539
|
-
children: /* @__PURE__ */
|
|
17502
|
+
children: /* @__PURE__ */ jsx23(
|
|
17540
17503
|
ComposerMenuOptionItems,
|
|
17541
17504
|
{
|
|
17542
17505
|
options: menu.reasoning.options,
|
|
@@ -17555,17 +17518,17 @@ function AgentModelReasoningDropdown({
|
|
|
17555
17518
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
17556
17519
|
"data-agent-speed-submenu-trigger": "true",
|
|
17557
17520
|
children: [
|
|
17558
|
-
/* @__PURE__ */
|
|
17559
|
-
/* @__PURE__ */
|
|
17521
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 flex-1 truncate", children: labels.speedLabel }),
|
|
17522
|
+
/* @__PURE__ */ jsx23("span", { className: "text-[var(--text-tertiary)]", children: menu.speed.selectedLabel })
|
|
17560
17523
|
]
|
|
17561
17524
|
}
|
|
17562
17525
|
),
|
|
17563
|
-
/* @__PURE__ */
|
|
17526
|
+
/* @__PURE__ */ jsx23(
|
|
17564
17527
|
DropdownMenuSubContent2,
|
|
17565
17528
|
{
|
|
17566
17529
|
className: cn2(AgentGUINode_styles_default.composerMenuContent, "w-[200px]"),
|
|
17567
17530
|
"data-agent-composer-settings-layout": "model-submenu",
|
|
17568
|
-
children: /* @__PURE__ */
|
|
17531
|
+
children: /* @__PURE__ */ jsx23(
|
|
17569
17532
|
ComposerMenuOptionItems,
|
|
17570
17533
|
{
|
|
17571
17534
|
options: menu.speed.options,
|
|
@@ -17590,7 +17553,7 @@ function ComposerMenuOptionItems({
|
|
|
17590
17553
|
tooltipsEnabled = true,
|
|
17591
17554
|
onSelect
|
|
17592
17555
|
}) {
|
|
17593
|
-
return /* @__PURE__ */
|
|
17556
|
+
return /* @__PURE__ */ jsx23(Fragment4, { children: options.map((option) => {
|
|
17594
17557
|
const hasDescription = Boolean(option.description);
|
|
17595
17558
|
const showInlineDescription = descriptionPresentation === "inline" && hasDescription;
|
|
17596
17559
|
const showModelTooltip = descriptionPresentation === "model-tooltip";
|
|
@@ -17616,8 +17579,8 @@ function ComposerMenuOptionItems({
|
|
|
17616
17579
|
},
|
|
17617
17580
|
children: [
|
|
17618
17581
|
showModelTooltip ? /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden", children: [
|
|
17619
|
-
/* @__PURE__ */
|
|
17620
|
-
option.summary && option.summary.length > 0 ? /* @__PURE__ */
|
|
17582
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
17583
|
+
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(
|
|
17621
17584
|
"span",
|
|
17622
17585
|
{
|
|
17623
17586
|
className: "max-w-[64px] truncate leading-[1.15]",
|
|
@@ -17634,8 +17597,8 @@ function ComposerMenuOptionItems({
|
|
|
17634
17597
|
),
|
|
17635
17598
|
children: [
|
|
17636
17599
|
/* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
17637
|
-
/* @__PURE__ */
|
|
17638
|
-
showTooltipDescription && option.description ? /* @__PURE__ */
|
|
17600
|
+
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
17601
|
+
showTooltipDescription && option.description ? /* @__PURE__ */ jsx23(
|
|
17639
17602
|
ComposerOptionInfoTooltip,
|
|
17640
17603
|
{
|
|
17641
17604
|
description: option.description,
|
|
@@ -17643,11 +17606,11 @@ function ComposerMenuOptionItems({
|
|
|
17643
17606
|
}
|
|
17644
17607
|
) : null
|
|
17645
17608
|
] }),
|
|
17646
|
-
showInlineDescription && option.description ? /* @__PURE__ */
|
|
17609
|
+
showInlineDescription && option.description ? /* @__PURE__ */ jsx23("span", { className: "whitespace-normal text-[11px] leading-[1.2] text-[var(--text-tertiary)]", children: option.description }) : null
|
|
17647
17610
|
]
|
|
17648
17611
|
}
|
|
17649
17612
|
),
|
|
17650
|
-
/* @__PURE__ */
|
|
17613
|
+
/* @__PURE__ */ jsx23(
|
|
17651
17614
|
CheckIcon,
|
|
17652
17615
|
{
|
|
17653
17616
|
"aria-hidden": true,
|
|
@@ -17661,7 +17624,7 @@ function ComposerMenuOptionItems({
|
|
|
17661
17624
|
},
|
|
17662
17625
|
option.value
|
|
17663
17626
|
);
|
|
17664
|
-
return showModelTooltip ? /* @__PURE__ */
|
|
17627
|
+
return showModelTooltip ? /* @__PURE__ */ jsx23(
|
|
17665
17628
|
ComposerModelOptionTooltip,
|
|
17666
17629
|
{
|
|
17667
17630
|
option,
|
|
@@ -17681,7 +17644,7 @@ function ComposerModelOptionTooltip({
|
|
|
17681
17644
|
return children;
|
|
17682
17645
|
}
|
|
17683
17646
|
return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17684
|
-
/* @__PURE__ */
|
|
17647
|
+
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: cloneElement(children, {
|
|
17685
17648
|
"data-agent-model-option-tooltip-trigger": "true"
|
|
17686
17649
|
}) }),
|
|
17687
17650
|
/* @__PURE__ */ jsxs11(
|
|
@@ -17693,10 +17656,10 @@ function ComposerModelOptionTooltip({
|
|
|
17693
17656
|
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",
|
|
17694
17657
|
"data-agent-model-option-tooltip": "true",
|
|
17695
17658
|
children: [
|
|
17696
|
-
/* @__PURE__ */
|
|
17697
|
-
option.tooltip.description ? /* @__PURE__ */
|
|
17698
|
-
option.tooltip.contextWindow ? /* @__PURE__ */
|
|
17699
|
-
option.tooltip.version ? /* @__PURE__ */
|
|
17659
|
+
/* @__PURE__ */ jsx23("span", { className: "block text-[15px] font-semibold leading-[1.2]", children: option.tooltip.title }),
|
|
17660
|
+
option.tooltip.description ? /* @__PURE__ */ jsx23("span", { className: "mt-1.5 block text-[13px] leading-[1.35]", children: option.tooltip.description }) : null,
|
|
17661
|
+
option.tooltip.contextWindow ? /* @__PURE__ */ jsx23("span", { className: "mt-4 block", children: option.tooltip.contextWindow }) : null,
|
|
17662
|
+
option.tooltip.version ? /* @__PURE__ */ jsx23("span", { className: "mt-4 block italic", children: option.tooltip.version }) : null
|
|
17700
17663
|
]
|
|
17701
17664
|
}
|
|
17702
17665
|
)
|
|
@@ -17763,7 +17726,7 @@ function createAgentFileMentionContent(items, options = {}) {
|
|
|
17763
17726
|
return [
|
|
17764
17727
|
...index === 0 && options.prefixCaretAnchor ? [
|
|
17765
17728
|
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
17766
|
-
] :
|
|
17729
|
+
] : [],
|
|
17767
17730
|
{
|
|
17768
17731
|
type: "agentFileMention",
|
|
17769
17732
|
attrs: {
|
|
@@ -17887,11 +17850,80 @@ function imageFilesFromDataTransfer(dataTransfer) {
|
|
|
17887
17850
|
files.push(file);
|
|
17888
17851
|
}
|
|
17889
17852
|
}
|
|
17853
|
+
if (files.length === 0) {
|
|
17854
|
+
return Array.from(dataTransfer.files ?? []).filter(
|
|
17855
|
+
(file) => supportedPromptImageMimeType(file.type)
|
|
17856
|
+
);
|
|
17857
|
+
}
|
|
17890
17858
|
return files;
|
|
17891
17859
|
}
|
|
17860
|
+
function nonImageFilesFromDataTransfer(dataTransfer) {
|
|
17861
|
+
if (!dataTransfer) {
|
|
17862
|
+
return [];
|
|
17863
|
+
}
|
|
17864
|
+
const files = [];
|
|
17865
|
+
const items = dataTransfer.items;
|
|
17866
|
+
if (!items) {
|
|
17867
|
+
return Array.from(dataTransfer.files ?? []).filter(
|
|
17868
|
+
(file) => !supportedPromptImageMimeType(file.type) && !supportedPromptImageFileName(file.name)
|
|
17869
|
+
);
|
|
17870
|
+
}
|
|
17871
|
+
for (const item of Array.from(items)) {
|
|
17872
|
+
if (item.kind !== "file" || supportedPromptImageMimeType(item.type)) {
|
|
17873
|
+
continue;
|
|
17874
|
+
}
|
|
17875
|
+
const file = item.getAsFile();
|
|
17876
|
+
if (file && supportedPromptImageFileName(file.name)) {
|
|
17877
|
+
continue;
|
|
17878
|
+
}
|
|
17879
|
+
if (file) {
|
|
17880
|
+
files.push(file);
|
|
17881
|
+
}
|
|
17882
|
+
}
|
|
17883
|
+
if (files.length === 0) {
|
|
17884
|
+
return Array.from(dataTransfer.files ?? []).filter(
|
|
17885
|
+
(file) => !supportedPromptImageMimeType(file.type) && !supportedPromptImageFileName(file.name)
|
|
17886
|
+
);
|
|
17887
|
+
}
|
|
17888
|
+
return files;
|
|
17889
|
+
}
|
|
17890
|
+
function systemFileDragInfoFromDataTransfer(dataTransfer) {
|
|
17891
|
+
if (!dataTransfer) {
|
|
17892
|
+
return { hasImageFiles: false, hasRegularFiles: false };
|
|
17893
|
+
}
|
|
17894
|
+
const items = dataTransfer.items;
|
|
17895
|
+
if (items) {
|
|
17896
|
+
let hasImageFiles2 = false;
|
|
17897
|
+
let hasRegularFiles2 = false;
|
|
17898
|
+
for (const item of Array.from(items)) {
|
|
17899
|
+
if (item.kind !== "file") {
|
|
17900
|
+
continue;
|
|
17901
|
+
}
|
|
17902
|
+
if (supportedPromptImageMimeType(item.type)) {
|
|
17903
|
+
hasImageFiles2 = true;
|
|
17904
|
+
} else {
|
|
17905
|
+
hasRegularFiles2 = true;
|
|
17906
|
+
}
|
|
17907
|
+
}
|
|
17908
|
+
return { hasImageFiles: hasImageFiles2, hasRegularFiles: hasRegularFiles2 };
|
|
17909
|
+
}
|
|
17910
|
+
let hasImageFiles = false;
|
|
17911
|
+
let hasRegularFiles = false;
|
|
17912
|
+
for (const file of Array.from(dataTransfer.files ?? [])) {
|
|
17913
|
+
if (supportedPromptImageMimeType(file.type) || supportedPromptImageFileName(file.name)) {
|
|
17914
|
+
hasImageFiles = true;
|
|
17915
|
+
} else {
|
|
17916
|
+
hasRegularFiles = true;
|
|
17917
|
+
}
|
|
17918
|
+
}
|
|
17919
|
+
return { hasImageFiles, hasRegularFiles };
|
|
17920
|
+
}
|
|
17892
17921
|
function supportedPromptImageMimeType(value) {
|
|
17893
17922
|
return value === "image/png" || value === "image/jpeg" || value === "image/webp";
|
|
17894
17923
|
}
|
|
17924
|
+
function supportedPromptImageFileName(value) {
|
|
17925
|
+
return /\.(png|jpe?g|webp)$/i.test(value.trim());
|
|
17926
|
+
}
|
|
17895
17927
|
async function readAgentRichTextPromptImages(files) {
|
|
17896
17928
|
const images = await Promise.all(
|
|
17897
17929
|
files.map(async (file) => {
|
|
@@ -17923,7 +17955,7 @@ function fileToBase64(file) {
|
|
|
17923
17955
|
}
|
|
17924
17956
|
|
|
17925
17957
|
// agent-gui/agentGuiNode/agentRichText/AgentRichTextEditor.tsx
|
|
17926
|
-
import { jsx as
|
|
17958
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
17927
17959
|
function buildWorkspaceFileMentionDropContent(entries, options = {}) {
|
|
17928
17960
|
return entries.flatMap((entry, index) => [
|
|
17929
17961
|
...index === 0 && options.prefixCaretAnchor ? [
|
|
@@ -18195,7 +18227,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18195
18227
|
onLinkClick,
|
|
18196
18228
|
promptImagesSupported = true,
|
|
18197
18229
|
onPromptImagesUnsupported,
|
|
18198
|
-
onPasteImages
|
|
18230
|
+
onPasteImages,
|
|
18231
|
+
getReferenceForFile,
|
|
18232
|
+
onDropFiles
|
|
18199
18233
|
}, ref) {
|
|
18200
18234
|
"use memo";
|
|
18201
18235
|
const { t } = useTranslation();
|
|
@@ -18214,7 +18248,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18214
18248
|
const onLinkClickRef = useRef9(onLinkClick);
|
|
18215
18249
|
const onPromptImagesUnsupportedRef = useRef9(onPromptImagesUnsupported);
|
|
18216
18250
|
const onPasteImagesRef = useRef9(onPasteImages);
|
|
18251
|
+
const onDropFilesRef = useRef9(onDropFiles);
|
|
18217
18252
|
const promptImagesSupportedRef = useRef9(promptImagesSupported);
|
|
18253
|
+
const getReferenceForFileRef = useRef9(getReferenceForFile);
|
|
18218
18254
|
const placeholderRef = useRef9(placeholder);
|
|
18219
18255
|
const removeMentionLabelRef = useRef9(removeMentionLabel);
|
|
18220
18256
|
const availableSkillsRef = useRef9(availableSkills);
|
|
@@ -18321,7 +18357,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18321
18357
|
onLinkClickRef.current = onLinkClick;
|
|
18322
18358
|
onPromptImagesUnsupportedRef.current = onPromptImagesUnsupported;
|
|
18323
18359
|
onPasteImagesRef.current = onPasteImages;
|
|
18360
|
+
onDropFilesRef.current = onDropFiles;
|
|
18324
18361
|
promptImagesSupportedRef.current = promptImagesSupported;
|
|
18362
|
+
getReferenceForFileRef.current = getReferenceForFile;
|
|
18325
18363
|
placeholderRef.current = placeholder;
|
|
18326
18364
|
removeMentionLabelRef.current = removeMentionLabel;
|
|
18327
18365
|
availableSkillsRef.current = availableSkills;
|
|
@@ -18432,6 +18470,44 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18432
18470
|
});
|
|
18433
18471
|
return true;
|
|
18434
18472
|
}
|
|
18473
|
+
const getReferenceForFileFn = getReferenceForFileRef.current;
|
|
18474
|
+
if (getReferenceForFileFn) {
|
|
18475
|
+
const nonImageFiles = nonImageFilesFromDataTransfer(
|
|
18476
|
+
event.clipboardData
|
|
18477
|
+
);
|
|
18478
|
+
if (nonImageFiles.length > 0) {
|
|
18479
|
+
const references = nonImageFiles.map((file) => {
|
|
18480
|
+
try {
|
|
18481
|
+
return getReferenceForFileFn(file);
|
|
18482
|
+
} catch {
|
|
18483
|
+
return null;
|
|
18484
|
+
}
|
|
18485
|
+
}).filter(
|
|
18486
|
+
(reference) => Boolean(reference?.path)
|
|
18487
|
+
);
|
|
18488
|
+
if (references.length > 0) {
|
|
18489
|
+
event.preventDefault();
|
|
18490
|
+
const currentEditor2 = editorRef.current;
|
|
18491
|
+
if (!currentEditor2) {
|
|
18492
|
+
return true;
|
|
18493
|
+
}
|
|
18494
|
+
if (!currentEditor2.isFocused) {
|
|
18495
|
+
currentEditor2.commands.setTextSelection(
|
|
18496
|
+
currentEditor2.state.doc.content.size
|
|
18497
|
+
);
|
|
18498
|
+
}
|
|
18499
|
+
currentEditor2.commands.insertContent(
|
|
18500
|
+
createAgentFileMentionContent(references, {
|
|
18501
|
+
prefixCaretAnchor: isPromptVisualLineStart(
|
|
18502
|
+
currentEditor2,
|
|
18503
|
+
currentEditor2.state.selection.from
|
|
18504
|
+
)
|
|
18505
|
+
})
|
|
18506
|
+
);
|
|
18507
|
+
return true;
|
|
18508
|
+
}
|
|
18509
|
+
}
|
|
18510
|
+
}
|
|
18435
18511
|
const html = event.clipboardData?.getData("text/html") ?? "";
|
|
18436
18512
|
if (html.includes("data-agent-file-mention")) {
|
|
18437
18513
|
return false;
|
|
@@ -18491,10 +18567,11 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18491
18567
|
if (!dataTransfer || disabled) {
|
|
18492
18568
|
return false;
|
|
18493
18569
|
}
|
|
18494
|
-
const
|
|
18495
|
-
|
|
18570
|
+
const systemFileDragInfo = systemFileDragInfoFromDataTransfer(dataTransfer);
|
|
18571
|
+
const canDropRegularSystemFiles = systemFileDragInfo.hasRegularFiles && Boolean(onDropFilesRef.current);
|
|
18572
|
+
if (systemFileDragInfo.hasImageFiles || canDropRegularSystemFiles) {
|
|
18496
18573
|
event.preventDefault();
|
|
18497
|
-
dataTransfer.dropEffect = promptImagesSupportedRef.current ? "copy" : "none";
|
|
18574
|
+
dataTransfer.dropEffect = canDropRegularSystemFiles || systemFileDragInfo.hasImageFiles && promptImagesSupportedRef.current ? "copy" : "none";
|
|
18498
18575
|
return true;
|
|
18499
18576
|
}
|
|
18500
18577
|
if (!hasWorkspaceFileDropData(dataTransfer)) {
|
|
@@ -18516,8 +18593,27 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18516
18593
|
return false;
|
|
18517
18594
|
}
|
|
18518
18595
|
const imageFiles = imageFilesFromDataTransfer(dataTransfer);
|
|
18519
|
-
|
|
18596
|
+
const imageFileSet = new Set(imageFiles);
|
|
18597
|
+
const regularFiles = nonImageFilesFromDataTransfer(
|
|
18598
|
+
dataTransfer
|
|
18599
|
+
).filter((file) => !imageFileSet.has(file));
|
|
18600
|
+
const canHandleRegularFiles = Boolean(onDropFilesRef.current);
|
|
18601
|
+
if (imageFiles.length > 0 || regularFiles.length > 0 && canHandleRegularFiles) {
|
|
18520
18602
|
event.preventDefault();
|
|
18603
|
+
const currentEditor2 = editorRef.current;
|
|
18604
|
+
if (regularFiles.length > 0 && onDropFilesRef.current && currentEditor2 && !currentEditor2.isDestroyed) {
|
|
18605
|
+
const coordinatePosition2 = currentEditor2.view.posAtCoords({
|
|
18606
|
+
left: event.clientX,
|
|
18607
|
+
top: event.clientY
|
|
18608
|
+
})?.pos;
|
|
18609
|
+
const fallbackSelectionPosition2 = currentEditor2.state.selection.from;
|
|
18610
|
+
const insertPosition2 = coordinatePosition2 ?? (Number.isInteger(fallbackSelectionPosition2) ? fallbackSelectionPosition2 : null) ?? currentEditor2.state.doc.content.size;
|
|
18611
|
+
currentEditor2.chain().focus().setTextSelection(insertPosition2).run();
|
|
18612
|
+
onDropFilesRef.current(regularFiles);
|
|
18613
|
+
}
|
|
18614
|
+
if (imageFiles.length === 0) {
|
|
18615
|
+
return true;
|
|
18616
|
+
}
|
|
18521
18617
|
if (!promptImagesSupportedRef.current) {
|
|
18522
18618
|
onPromptImagesUnsupportedRef.current?.();
|
|
18523
18619
|
return true;
|
|
@@ -18758,7 +18854,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18758
18854
|
lastEmittedPromptRef.current = value;
|
|
18759
18855
|
}, [availableCapabilities, availableSkills, editor, value]);
|
|
18760
18856
|
return /* @__PURE__ */ jsxs12("div", { className: "relative min-w-0", onKeyDownCapture: handleKeyDownCapture, children: [
|
|
18761
|
-
editor ? /* @__PURE__ */
|
|
18857
|
+
editor ? /* @__PURE__ */ jsx24(EditorContent, { editor }) : /* @__PURE__ */ jsx24(
|
|
18762
18858
|
"div",
|
|
18763
18859
|
{
|
|
18764
18860
|
role: "textbox",
|
|
@@ -18786,7 +18882,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18786
18882
|
onContextMenu: (event) => event.preventDefault(),
|
|
18787
18883
|
onPointerDown: (event) => event.stopPropagation(),
|
|
18788
18884
|
children: [
|
|
18789
|
-
/* @__PURE__ */
|
|
18885
|
+
/* @__PURE__ */ jsx24(
|
|
18790
18886
|
AgentRichTextContextMenuButton,
|
|
18791
18887
|
{
|
|
18792
18888
|
disabled: !contextMenu.canEdit || !contextMenu.hasSelection,
|
|
@@ -18794,7 +18890,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18794
18890
|
onSelect: cutSelection
|
|
18795
18891
|
}
|
|
18796
18892
|
),
|
|
18797
|
-
/* @__PURE__ */
|
|
18893
|
+
/* @__PURE__ */ jsx24(
|
|
18798
18894
|
AgentRichTextContextMenuButton,
|
|
18799
18895
|
{
|
|
18800
18896
|
disabled: !contextMenu.hasSelection,
|
|
@@ -18802,7 +18898,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18802
18898
|
onSelect: copySelection
|
|
18803
18899
|
}
|
|
18804
18900
|
),
|
|
18805
|
-
/* @__PURE__ */
|
|
18901
|
+
/* @__PURE__ */ jsx24(
|
|
18806
18902
|
AgentRichTextContextMenuButton,
|
|
18807
18903
|
{
|
|
18808
18904
|
disabled: !contextMenu.canEdit,
|
|
@@ -18832,7 +18928,7 @@ function AgentRichTextContextMenuButton({
|
|
|
18832
18928
|
selectionStartedRef.current = false;
|
|
18833
18929
|
});
|
|
18834
18930
|
}, [disabled, onSelect]);
|
|
18835
|
-
return /* @__PURE__ */
|
|
18931
|
+
return /* @__PURE__ */ jsx24(
|
|
18836
18932
|
"button",
|
|
18837
18933
|
{
|
|
18838
18934
|
role: "menuitem",
|
|
@@ -18857,7 +18953,7 @@ function AgentRichTextContextMenuButton({
|
|
|
18857
18953
|
|
|
18858
18954
|
// agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
|
|
18859
18955
|
import { Fragment as Fragment5 } from "react";
|
|
18860
|
-
import { Fragment as Fragment6, jsx as
|
|
18956
|
+
import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
18861
18957
|
function formatSlashStatusTokenCount(value) {
|
|
18862
18958
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
18863
18959
|
return "";
|
|
@@ -18899,8 +18995,8 @@ function AgentSlashStatusPanel({
|
|
|
18899
18995
|
role: "status",
|
|
18900
18996
|
children: [
|
|
18901
18997
|
/* @__PURE__ */ jsxs13("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
18902
|
-
/* @__PURE__ */
|
|
18903
|
-
/* @__PURE__ */
|
|
18998
|
+
/* @__PURE__ */ jsx25("h3", { className: "truncate text-[11px] font-semibold leading-4", children: labels.slashStatusTitle }),
|
|
18999
|
+
/* @__PURE__ */ jsx25(
|
|
18904
19000
|
"button",
|
|
18905
19001
|
{
|
|
18906
19002
|
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]",
|
|
@@ -18916,32 +19012,32 @@ function AgentSlashStatusPanel({
|
|
|
18916
19012
|
labels.slashStatusSession,
|
|
18917
19013
|
":"
|
|
18918
19014
|
] }),
|
|
18919
|
-
/* @__PURE__ */
|
|
19015
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: agentSessionId }),
|
|
18920
19016
|
baseUrl ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
18921
19017
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18922
19018
|
labels.slashStatusBaseUrl,
|
|
18923
19019
|
":"
|
|
18924
19020
|
] }),
|
|
18925
|
-
/* @__PURE__ */
|
|
19021
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: baseUrl })
|
|
18926
19022
|
] }) : null,
|
|
18927
19023
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18928
19024
|
labels.slashStatusContext,
|
|
18929
19025
|
":"
|
|
18930
19026
|
] }),
|
|
18931
|
-
/* @__PURE__ */
|
|
19027
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: slashStatusContextText(status, labels) })
|
|
18932
19028
|
] }) : null,
|
|
18933
19029
|
limits.map((limit) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
18934
19030
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18935
19031
|
limit.label,
|
|
18936
19032
|
":"
|
|
18937
19033
|
] }),
|
|
18938
|
-
/* @__PURE__ */
|
|
18939
|
-
typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */
|
|
19034
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxs13("span", { className: "agent-gui-node__slash-status-limit", children: [
|
|
19035
|
+
typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */ jsx25(
|
|
18940
19036
|
"span",
|
|
18941
19037
|
{
|
|
18942
19038
|
"aria-hidden": "true",
|
|
18943
19039
|
className: "agent-gui-node__slash-status-limit-meter",
|
|
18944
|
-
children: /* @__PURE__ */
|
|
19040
|
+
children: /* @__PURE__ */ jsx25(
|
|
18945
19041
|
"span",
|
|
18946
19042
|
{
|
|
18947
19043
|
className: "agent-gui-node__slash-status-limit-meter-fill",
|
|
@@ -18971,7 +19067,7 @@ function AgentSlashStatusPanel({
|
|
|
18971
19067
|
labels.slashStatusLimits,
|
|
18972
19068
|
":"
|
|
18973
19069
|
] }),
|
|
18974
|
-
/* @__PURE__ */
|
|
19070
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0 text-muted-foreground", children: labels.slashStatusLimitsUnavailable })
|
|
18975
19071
|
] }) : null
|
|
18976
19072
|
] })
|
|
18977
19073
|
]
|
|
@@ -19075,7 +19171,7 @@ var AgentReviewBranchController = class {
|
|
|
19075
19171
|
};
|
|
19076
19172
|
|
|
19077
19173
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
19078
|
-
import { jsx as
|
|
19174
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
19079
19175
|
var reviewMenuStyles = {
|
|
19080
19176
|
panel: "agent-gui-node__slash-status-panel nodrag flex max-h-[280px] flex-col gap-1 overflow-hidden [-webkit-app-region:no-drag]",
|
|
19081
19177
|
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]",
|
|
@@ -19279,7 +19375,7 @@ function AgentReviewPickerPanel({
|
|
|
19279
19375
|
role: "dialog",
|
|
19280
19376
|
"aria-label": labels.title,
|
|
19281
19377
|
children: [
|
|
19282
|
-
/* @__PURE__ */
|
|
19378
|
+
/* @__PURE__ */ jsx26(
|
|
19283
19379
|
"input",
|
|
19284
19380
|
{
|
|
19285
19381
|
ref: searchInputRef,
|
|
@@ -19295,15 +19391,15 @@ function AgentReviewPickerPanel({
|
|
|
19295
19391
|
onKeyDown: handleKeyDown
|
|
19296
19392
|
}
|
|
19297
19393
|
),
|
|
19298
|
-
/* @__PURE__ */
|
|
19394
|
+
/* @__PURE__ */ jsx26(
|
|
19299
19395
|
"div",
|
|
19300
19396
|
{
|
|
19301
19397
|
className: reviewMenuStyles.list,
|
|
19302
19398
|
role: "listbox",
|
|
19303
19399
|
"aria-label": labels.title,
|
|
19304
|
-
children: entries.length === 0 ? /* @__PURE__ */
|
|
19400
|
+
children: entries.length === 0 ? /* @__PURE__ */ jsx26("div", { className: reviewMenuStyles.message, children: emptyMessage }) : entries.map((entry, index) => {
|
|
19305
19401
|
const isHighlighted = index === safeHighlightedIndex;
|
|
19306
|
-
return /* @__PURE__ */
|
|
19402
|
+
return /* @__PURE__ */ jsx26(
|
|
19307
19403
|
"button",
|
|
19308
19404
|
{
|
|
19309
19405
|
ref: isHighlighted ? highlightedOptionRef : null,
|
|
@@ -19324,8 +19420,8 @@ function AgentReviewPickerPanel({
|
|
|
19324
19420
|
}
|
|
19325
19421
|
},
|
|
19326
19422
|
children: /* @__PURE__ */ jsxs14("span", { className: reviewMenuStyles.copy, children: [
|
|
19327
|
-
/* @__PURE__ */
|
|
19328
|
-
entry.description ? /* @__PURE__ */
|
|
19423
|
+
/* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.name, children: entry.label }),
|
|
19424
|
+
entry.description ? /* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.description, children: entry.description }) : null
|
|
19329
19425
|
] })
|
|
19330
19426
|
},
|
|
19331
19427
|
entry.key
|
|
@@ -19349,7 +19445,7 @@ import {
|
|
|
19349
19445
|
useState as useState10
|
|
19350
19446
|
} from "react";
|
|
19351
19447
|
import { createPortal as createPortal2 } from "react-dom";
|
|
19352
|
-
import { jsx as
|
|
19448
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
19353
19449
|
var COMPOSER_MENU_GAP_PX = 8;
|
|
19354
19450
|
var COMPOSER_MENU_VIEWPORT_PADDING_PX = 8;
|
|
19355
19451
|
var COMPOSER_MENU_MIN_HEIGHT_PX = 280;
|
|
@@ -19567,7 +19663,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19567
19663
|
}
|
|
19568
19664
|
const portalTarget = frame?.portalTarget ?? (anchorRef.current ? resolveComposerMenuPortalTarget(anchorRef.current) : document.body);
|
|
19569
19665
|
return createPortal2(
|
|
19570
|
-
/* @__PURE__ */
|
|
19666
|
+
/* @__PURE__ */ jsx27(
|
|
19571
19667
|
"div",
|
|
19572
19668
|
{
|
|
19573
19669
|
"data-testid": testId,
|
|
@@ -19578,7 +19674,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19578
19674
|
className
|
|
19579
19675
|
),
|
|
19580
19676
|
style,
|
|
19581
|
-
children: contentClassName ? /* @__PURE__ */
|
|
19677
|
+
children: contentClassName ? /* @__PURE__ */ jsx27("div", { className: contentClassName, children }) : children
|
|
19582
19678
|
}
|
|
19583
19679
|
),
|
|
19584
19680
|
portalTarget
|
|
@@ -19586,7 +19682,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19586
19682
|
});
|
|
19587
19683
|
|
|
19588
19684
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
19589
|
-
import { jsx as
|
|
19685
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
19590
19686
|
var USAGE_POPOVER_HOVER_DELAY_MS = 120;
|
|
19591
19687
|
var DOCK_COMPOSER_INPUT_MIN_HEIGHT = 56;
|
|
19592
19688
|
var DOCK_COMPOSER_TEXT_LINE_HEIGHT = 24;
|
|
@@ -19688,7 +19784,7 @@ function AgentUsageChip({
|
|
|
19688
19784
|
},
|
|
19689
19785
|
[clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]
|
|
19690
19786
|
);
|
|
19691
|
-
const trigger = /* @__PURE__ */
|
|
19787
|
+
const trigger = /* @__PURE__ */ jsx28(
|
|
19692
19788
|
"button",
|
|
19693
19789
|
{
|
|
19694
19790
|
type: "button",
|
|
@@ -19712,7 +19808,7 @@ function AgentUsageChip({
|
|
|
19712
19808
|
style: {
|
|
19713
19809
|
background: `conic-gradient(${ringColor} ${clampedPercent}%, color-mix(in srgb, ${ringColor} 16%, transparent) 0)`
|
|
19714
19810
|
},
|
|
19715
|
-
children: /* @__PURE__ */
|
|
19811
|
+
children: /* @__PURE__ */ jsx28(
|
|
19716
19812
|
"span",
|
|
19717
19813
|
{
|
|
19718
19814
|
"aria-hidden": "true",
|
|
@@ -19730,8 +19826,8 @@ function AgentUsageChip({
|
|
|
19730
19826
|
open: usagePopoverOpen,
|
|
19731
19827
|
onOpenChange: handleUsagePopoverOpenChange,
|
|
19732
19828
|
children: [
|
|
19733
|
-
/* @__PURE__ */
|
|
19734
|
-
usagePopoverOpen ? /* @__PURE__ */
|
|
19829
|
+
/* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: trigger }),
|
|
19830
|
+
usagePopoverOpen ? /* @__PURE__ */ jsx28(
|
|
19735
19831
|
PopoverContent,
|
|
19736
19832
|
{
|
|
19737
19833
|
side: "bottom",
|
|
@@ -19742,8 +19838,8 @@ function AgentUsageChip({
|
|
|
19742
19838
|
onPointerEnter: openUsagePopover,
|
|
19743
19839
|
onPointerLeave: scheduleUsagePopoverClose,
|
|
19744
19840
|
children: /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
19745
|
-
/* @__PURE__ */
|
|
19746
|
-
showTokens ? /* @__PURE__ */
|
|
19841
|
+
/* @__PURE__ */ jsx28("span", { className: "text-[13px] font-semibold leading-4", children: labels.usagePopoverTitle }),
|
|
19842
|
+
showTokens ? /* @__PURE__ */ jsx28(
|
|
19747
19843
|
AgentUsageMeter,
|
|
19748
19844
|
{
|
|
19749
19845
|
label: labels.usageContextWindowLabel,
|
|
@@ -19753,7 +19849,7 @@ function AgentUsageChip({
|
|
|
19753
19849
|
testId: "agent-gui-usage-context-meter"
|
|
19754
19850
|
}
|
|
19755
19851
|
) : null,
|
|
19756
|
-
compactSupported && onCompact ? /* @__PURE__ */
|
|
19852
|
+
compactSupported && onCompact ? /* @__PURE__ */ jsx28(
|
|
19757
19853
|
Button3,
|
|
19758
19854
|
{
|
|
19759
19855
|
type: "button",
|
|
@@ -19885,6 +19981,7 @@ function AgentComposer({
|
|
|
19885
19981
|
onCapabilitySettingsRequest,
|
|
19886
19982
|
onLinkAction,
|
|
19887
19983
|
onRequestWorkspaceReferences = null,
|
|
19984
|
+
resolveDroppedFileReferences = null,
|
|
19888
19985
|
selectProjectDirectory,
|
|
19889
19986
|
onRequestGitBranches = null,
|
|
19890
19987
|
contextMentionProviders = EMPTY_CONTEXT_MENTION_PROVIDERS
|
|
@@ -19896,6 +19993,14 @@ function AgentComposer({
|
|
|
19896
19993
|
const draftImages = draftContent.images;
|
|
19897
19994
|
const draftFiles = draftContent.files ?? [];
|
|
19898
19995
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
19996
|
+
const agentHostApi = useOptionalAgentHostApi();
|
|
19997
|
+
const getReferenceForFile = agentHostApi?.workspace.getReferenceForFile;
|
|
19998
|
+
const promptFileUploadSupported = Boolean(
|
|
19999
|
+
agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true)
|
|
20000
|
+
);
|
|
20001
|
+
const promptFilesSupported = Boolean(
|
|
20002
|
+
resolveDroppedFileReferences && promptFileUploadSupported
|
|
20003
|
+
);
|
|
19899
20004
|
const [isPaletteOpen, setIsPaletteOpen] = useState11(true);
|
|
19900
20005
|
const [isReviewPickerOpen, setIsReviewPickerOpen] = useState11(false);
|
|
19901
20006
|
const [highlightedIndex, setHighlightedIndex] = useState11(0);
|
|
@@ -20814,7 +20919,7 @@ function AgentComposer({
|
|
|
20814
20919
|
if (remainingSlots === 0) {
|
|
20815
20920
|
return;
|
|
20816
20921
|
}
|
|
20817
|
-
const uploadPromptContent = agentActivityRuntime?.uploadPromptContent;
|
|
20922
|
+
const uploadPromptContent = agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.image ?? true) ? agentActivityRuntime.uploadPromptContent : void 0;
|
|
20818
20923
|
const nextImages = images.slice(0, remainingSlots).map((image) => ({
|
|
20819
20924
|
id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,
|
|
20820
20925
|
name: image.name,
|
|
@@ -20925,7 +21030,7 @@ function AgentComposer({
|
|
|
20925
21030
|
const applyReferencePickResult = useCallback10(
|
|
20926
21031
|
async (result) => {
|
|
20927
21032
|
if (result.files.length > 0) {
|
|
20928
|
-
const uploadPromptContent = agentActivityRuntime?.uploadPromptContent;
|
|
21033
|
+
const uploadPromptContent = promptFileUploadSupported ? agentActivityRuntime?.uploadPromptContent : void 0;
|
|
20929
21034
|
const uploadedFiles = await Promise.all(
|
|
20930
21035
|
result.files.map(async (file) => {
|
|
20931
21036
|
const hostPath = file.hostPath?.trim() ?? "";
|
|
@@ -20969,7 +21074,7 @@ function AgentComposer({
|
|
|
20969
21074
|
editorHandleRef.current?.insertMentionItems(result.mentionItems);
|
|
20970
21075
|
}
|
|
20971
21076
|
},
|
|
20972
|
-
[agentActivityRuntime, workspaceId]
|
|
21077
|
+
[agentActivityRuntime, promptFileUploadSupported, workspaceId]
|
|
20973
21078
|
);
|
|
20974
21079
|
const handleWorkspaceReferencePicker = useCallback10(async () => {
|
|
20975
21080
|
if (!onRequestWorkspaceReferences) {
|
|
@@ -20977,6 +21082,23 @@ function AgentComposer({
|
|
|
20977
21082
|
}
|
|
20978
21083
|
await applyReferencePickResult(await onRequestWorkspaceReferences());
|
|
20979
21084
|
}, [applyReferencePickResult, onRequestWorkspaceReferences]);
|
|
21085
|
+
const applyDroppedFileReferences = useCallback10(
|
|
21086
|
+
async (files) => {
|
|
21087
|
+
if (!promptFilesSupported || !resolveDroppedFileReferences || files.length === 0) {
|
|
21088
|
+
return;
|
|
21089
|
+
}
|
|
21090
|
+
const references = await resolveDroppedFileReferences(files);
|
|
21091
|
+
if (references.length === 0) {
|
|
21092
|
+
return;
|
|
21093
|
+
}
|
|
21094
|
+
await applyReferencePickResult({ files: references, mentionItems: [] });
|
|
21095
|
+
},
|
|
21096
|
+
[
|
|
21097
|
+
applyReferencePickResult,
|
|
21098
|
+
promptFilesSupported,
|
|
21099
|
+
resolveDroppedFileReferences
|
|
21100
|
+
]
|
|
21101
|
+
);
|
|
20980
21102
|
const handleOpenReferencesForEntity = useCallback10(
|
|
20981
21103
|
(entity) => {
|
|
20982
21104
|
clearActiveFileMentionTrigger();
|
|
@@ -21109,21 +21231,41 @@ function AgentComposer({
|
|
|
21109
21231
|
const target = event.target;
|
|
21110
21232
|
return target instanceof Node && dropTarget.contains(target);
|
|
21111
21233
|
};
|
|
21112
|
-
const
|
|
21234
|
+
const systemFileDrag = (event) => {
|
|
21113
21235
|
if (event.defaultPrevented || inputDisabled || !containsEventTarget(event) || hasWorkspaceFileDropData(event.dataTransfer)) {
|
|
21114
|
-
return
|
|
21236
|
+
return null;
|
|
21237
|
+
}
|
|
21238
|
+
const dragInfo = systemFileDragInfoFromDataTransfer(event.dataTransfer);
|
|
21239
|
+
const hasRegularFiles = dragInfo.hasRegularFiles && promptFilesSupported;
|
|
21240
|
+
if (!dragInfo.hasImageFiles && !hasRegularFiles) {
|
|
21241
|
+
return null;
|
|
21115
21242
|
}
|
|
21116
|
-
return
|
|
21243
|
+
return { hasImageFiles: dragInfo.hasImageFiles, hasRegularFiles };
|
|
21244
|
+
};
|
|
21245
|
+
const systemFileDrop = (event) => {
|
|
21246
|
+
if (event.defaultPrevented || inputDisabled || !containsEventTarget(event) || hasWorkspaceFileDropData(event.dataTransfer)) {
|
|
21247
|
+
return null;
|
|
21248
|
+
}
|
|
21249
|
+
const imageFiles = imageFilesFromDataTransfer(event.dataTransfer);
|
|
21250
|
+
const imageFileSet = new Set(imageFiles);
|
|
21251
|
+
const regularFiles = promptFilesSupported ? nonImageFilesFromDataTransfer(event.dataTransfer).filter(
|
|
21252
|
+
(file) => !imageFileSet.has(file)
|
|
21253
|
+
) : [];
|
|
21254
|
+
if (imageFiles.length === 0 && regularFiles.length === 0) {
|
|
21255
|
+
return null;
|
|
21256
|
+
}
|
|
21257
|
+
return { imageFiles, regularFiles };
|
|
21117
21258
|
};
|
|
21118
21259
|
const handleDragOver = (event) => {
|
|
21119
21260
|
if (!isDragEvent(event)) {
|
|
21120
21261
|
return;
|
|
21121
21262
|
}
|
|
21122
|
-
|
|
21263
|
+
const drag = systemFileDrag(event);
|
|
21264
|
+
if (!drag) {
|
|
21123
21265
|
return;
|
|
21124
21266
|
}
|
|
21125
21267
|
event.preventDefault();
|
|
21126
|
-
if (!promptImagesSupported) {
|
|
21268
|
+
if (!drag.hasRegularFiles && drag.hasImageFiles && !promptImagesSupported) {
|
|
21127
21269
|
return;
|
|
21128
21270
|
}
|
|
21129
21271
|
if (event.dataTransfer) {
|
|
@@ -21134,17 +21276,28 @@ function AgentComposer({
|
|
|
21134
21276
|
if (!isDragEvent(event)) {
|
|
21135
21277
|
return;
|
|
21136
21278
|
}
|
|
21137
|
-
|
|
21279
|
+
const drop = systemFileDrop(event);
|
|
21280
|
+
if (!drop) {
|
|
21138
21281
|
return;
|
|
21139
21282
|
}
|
|
21140
21283
|
event.preventDefault();
|
|
21141
21284
|
event.stopPropagation();
|
|
21285
|
+
if (drop.regularFiles.length > 0) {
|
|
21286
|
+
editorHandleRef.current?.focusAtEnd();
|
|
21287
|
+
void applyDroppedFileReferences(drop.regularFiles).then(() => {
|
|
21288
|
+
if (!isDisposed) {
|
|
21289
|
+
scheduleComposerFocus();
|
|
21290
|
+
}
|
|
21291
|
+
});
|
|
21292
|
+
}
|
|
21293
|
+
if (drop.imageFiles.length === 0) {
|
|
21294
|
+
return;
|
|
21295
|
+
}
|
|
21142
21296
|
if (!promptImagesSupported) {
|
|
21143
21297
|
onPromptImagesUnsupported?.();
|
|
21144
21298
|
return;
|
|
21145
21299
|
}
|
|
21146
|
-
|
|
21147
|
-
void readAgentRichTextPromptImages(imageFiles).then((images) => {
|
|
21300
|
+
void readAgentRichTextPromptImages(drop.imageFiles).then((images) => {
|
|
21148
21301
|
if (isDisposed || images.length === 0) {
|
|
21149
21302
|
return;
|
|
21150
21303
|
}
|
|
@@ -21161,8 +21314,10 @@ function AgentComposer({
|
|
|
21161
21314
|
};
|
|
21162
21315
|
}, [
|
|
21163
21316
|
addDraftImages,
|
|
21317
|
+
applyDroppedFileReferences,
|
|
21164
21318
|
inputDisabled,
|
|
21165
21319
|
onPromptImagesUnsupported,
|
|
21320
|
+
promptFilesSupported,
|
|
21166
21321
|
promptImagesSupported,
|
|
21167
21322
|
scheduleComposerFocus
|
|
21168
21323
|
]);
|
|
@@ -21418,7 +21573,7 @@ function AgentComposer({
|
|
|
21418
21573
|
title: isInterrupting ? labels.stopping : labels.stop,
|
|
21419
21574
|
onClick: onInterruptCurrentTurn,
|
|
21420
21575
|
children: [
|
|
21421
|
-
/* @__PURE__ */
|
|
21576
|
+
/* @__PURE__ */ jsx28(
|
|
21422
21577
|
Spinner,
|
|
21423
21578
|
{
|
|
21424
21579
|
className: "size-7 text-[var(--text-primary)]",
|
|
@@ -21428,7 +21583,7 @@ function AgentComposer({
|
|
|
21428
21583
|
testId: "agent-gui-composer-stop-spinner"
|
|
21429
21584
|
}
|
|
21430
21585
|
),
|
|
21431
|
-
/* @__PURE__ */
|
|
21586
|
+
/* @__PURE__ */ jsx28(
|
|
21432
21587
|
"span",
|
|
21433
21588
|
{
|
|
21434
21589
|
"aria-hidden": "true",
|
|
@@ -21438,7 +21593,7 @@ function AgentComposer({
|
|
|
21438
21593
|
)
|
|
21439
21594
|
]
|
|
21440
21595
|
}
|
|
21441
|
-
) : /* @__PURE__ */
|
|
21596
|
+
) : /* @__PURE__ */ jsx28(
|
|
21442
21597
|
"button",
|
|
21443
21598
|
{
|
|
21444
21599
|
type: "submit",
|
|
@@ -21448,7 +21603,7 @@ function AgentComposer({
|
|
|
21448
21603
|
"aria-label": labels.send,
|
|
21449
21604
|
title: labels.send,
|
|
21450
21605
|
"aria-busy": sendButtonBusy,
|
|
21451
|
-
children: sendButtonBusy ? /* @__PURE__ */
|
|
21606
|
+
children: sendButtonBusy ? /* @__PURE__ */ jsx28(
|
|
21452
21607
|
Spinner,
|
|
21453
21608
|
{
|
|
21454
21609
|
className: "text-[var(--text-primary)]",
|
|
@@ -21457,10 +21612,10 @@ function AgentComposer({
|
|
|
21457
21612
|
trackColor: "var(--transparency-hover)",
|
|
21458
21613
|
testId: "agent-gui-composer-send-spinner"
|
|
21459
21614
|
}
|
|
21460
|
-
) : /* @__PURE__ */
|
|
21615
|
+
) : /* @__PURE__ */ jsx28(SendFilledIcon, {})
|
|
21461
21616
|
}
|
|
21462
21617
|
);
|
|
21463
|
-
const promptTipNode = activePromptTip ? /* @__PURE__ */
|
|
21618
|
+
const promptTipNode = activePromptTip ? /* @__PURE__ */ jsx28(
|
|
21464
21619
|
"span",
|
|
21465
21620
|
{
|
|
21466
21621
|
ref: promptTipRef,
|
|
@@ -21468,14 +21623,14 @@ function AgentComposer({
|
|
|
21468
21623
|
"data-rotating": promptTips.length > 1 ? "true" : void 0,
|
|
21469
21624
|
"data-testid": "agent-gui-prompt-tip",
|
|
21470
21625
|
style: promptTipStyle,
|
|
21471
|
-
children: /* @__PURE__ */
|
|
21626
|
+
children: /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */ jsxs15(
|
|
21472
21627
|
"span",
|
|
21473
21628
|
{
|
|
21474
21629
|
className: AgentGUINode_styles_default.composerPromptTipItem,
|
|
21475
21630
|
"aria-hidden": index >= promptTips.length ? true : void 0,
|
|
21476
21631
|
children: [
|
|
21477
|
-
/* @__PURE__ */
|
|
21478
|
-
/* @__PURE__ */
|
|
21632
|
+
/* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipPrefix, children: labels.promptTipsPrefix }),
|
|
21633
|
+
/* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipLabel, children: tip.label }),
|
|
21479
21634
|
/* @__PURE__ */ jsxs15("span", { className: AgentGUINode_styles_default.composerPromptTipText, children: [
|
|
21480
21635
|
" \xB7 ",
|
|
21481
21636
|
tip.prompt
|
|
@@ -21495,12 +21650,12 @@ function AgentComposer({
|
|
|
21495
21650
|
"data-layout": layoutMode,
|
|
21496
21651
|
onSubmit: submit,
|
|
21497
21652
|
children: [
|
|
21498
|
-
visibleActivePrompt ? /* @__PURE__ */
|
|
21653
|
+
visibleActivePrompt ? /* @__PURE__ */ jsx28(
|
|
21499
21654
|
"div",
|
|
21500
21655
|
{
|
|
21501
21656
|
className: AgentGUINode_styles_default.composerFloatingPrompt,
|
|
21502
21657
|
"data-testid": "agent-gui-composer-floating-prompt",
|
|
21503
|
-
children: /* @__PURE__ */
|
|
21658
|
+
children: /* @__PURE__ */ jsx28(
|
|
21504
21659
|
AgentInteractivePromptSurface,
|
|
21505
21660
|
{
|
|
21506
21661
|
prompt: visibleActivePrompt,
|
|
@@ -21532,7 +21687,7 @@ function AgentComposer({
|
|
|
21532
21687
|
)
|
|
21533
21688
|
}
|
|
21534
21689
|
) : null,
|
|
21535
|
-
queuedPrompts.length > 0 ? /* @__PURE__ */
|
|
21690
|
+
queuedPrompts.length > 0 ? /* @__PURE__ */ jsx28(
|
|
21536
21691
|
"div",
|
|
21537
21692
|
{
|
|
21538
21693
|
className: cn(
|
|
@@ -21540,7 +21695,7 @@ function AgentComposer({
|
|
|
21540
21695
|
AgentGUINode_styles_default.composerQueuedPromptFloating
|
|
21541
21696
|
),
|
|
21542
21697
|
"data-testid": "agent-gui-composer-queued-prompts",
|
|
21543
|
-
children: /* @__PURE__ */
|
|
21698
|
+
children: /* @__PURE__ */ jsx28(
|
|
21544
21699
|
AgentQueuedPromptPanel,
|
|
21545
21700
|
{
|
|
21546
21701
|
queuedPrompts,
|
|
@@ -21561,7 +21716,7 @@ function AgentComposer({
|
|
|
21561
21716
|
)
|
|
21562
21717
|
}
|
|
21563
21718
|
) : null,
|
|
21564
|
-
showProjectMissingProbe ? /* @__PURE__ */
|
|
21719
|
+
showProjectMissingProbe ? /* @__PURE__ */ jsx28(
|
|
21565
21720
|
AgentProjectMissingStatusProbe,
|
|
21566
21721
|
{
|
|
21567
21722
|
composerSettings,
|
|
@@ -21577,7 +21732,7 @@ function AgentComposer({
|
|
|
21577
21732
|
),
|
|
21578
21733
|
"data-edge-glow": showEdgeGlow ? "true" : void 0,
|
|
21579
21734
|
children: [
|
|
21580
|
-
isSelectedProjectMissing ? /* @__PURE__ */
|
|
21735
|
+
isSelectedProjectMissing ? /* @__PURE__ */ jsx28(
|
|
21581
21736
|
AgentChromeNotice,
|
|
21582
21737
|
{
|
|
21583
21738
|
tone: "danger",
|
|
@@ -21606,7 +21761,7 @@ function AgentComposer({
|
|
|
21606
21761
|
onOpenChange: setIsPaletteOpen,
|
|
21607
21762
|
modal: false,
|
|
21608
21763
|
children: [
|
|
21609
|
-
/* @__PURE__ */
|
|
21764
|
+
/* @__PURE__ */ jsx28(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
21610
21765
|
"div",
|
|
21611
21766
|
{
|
|
21612
21767
|
ref: promptInputAreaRef,
|
|
@@ -21617,12 +21772,12 @@ function AgentComposer({
|
|
|
21617
21772
|
"data-has-draft-images": draftImages.length > 0 ? "true" : void 0,
|
|
21618
21773
|
style: promptInputAreaStyle,
|
|
21619
21774
|
children: [
|
|
21620
|
-
draftImages.length > 0 ? /* @__PURE__ */
|
|
21775
|
+
draftImages.length > 0 ? /* @__PURE__ */ jsx28(
|
|
21621
21776
|
"div",
|
|
21622
21777
|
{
|
|
21623
21778
|
className: "mb-2 flex w-full max-w-full flex-wrap items-start gap-2",
|
|
21624
21779
|
"data-testid": "agent-gui-composer-image-drafts",
|
|
21625
|
-
children: draftImages.map((image) => /* @__PURE__ */
|
|
21780
|
+
children: draftImages.map((image) => /* @__PURE__ */ jsx28(
|
|
21626
21781
|
AgentComposerDraftImagePreview,
|
|
21627
21782
|
{
|
|
21628
21783
|
image,
|
|
@@ -21633,7 +21788,7 @@ function AgentComposer({
|
|
|
21633
21788
|
))
|
|
21634
21789
|
}
|
|
21635
21790
|
) : null,
|
|
21636
|
-
visibleDraftFiles.length > 0 ? /* @__PURE__ */
|
|
21791
|
+
visibleDraftFiles.length > 0 ? /* @__PURE__ */ jsx28(
|
|
21637
21792
|
"div",
|
|
21638
21793
|
{
|
|
21639
21794
|
className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
|
|
@@ -21649,7 +21804,7 @@ function AgentComposer({
|
|
|
21649
21804
|
"data-upload-error": file.uploadError ? "true" : void 0,
|
|
21650
21805
|
title: file.hostPath ?? file.path ?? file.name,
|
|
21651
21806
|
children: [
|
|
21652
|
-
file.uploading ? /* @__PURE__ */
|
|
21807
|
+
file.uploading ? /* @__PURE__ */ jsx28(
|
|
21653
21808
|
Spinner,
|
|
21654
21809
|
{
|
|
21655
21810
|
className: "shrink-0 text-[var(--text-primary)]",
|
|
@@ -21658,15 +21813,15 @@ function AgentComposer({
|
|
|
21658
21813
|
trackColor: "var(--transparency-hover)",
|
|
21659
21814
|
testId: "agent-gui-composer-file-upload-spinner"
|
|
21660
21815
|
}
|
|
21661
|
-
) : /* @__PURE__ */
|
|
21816
|
+
) : /* @__PURE__ */ jsx28(
|
|
21662
21817
|
"span",
|
|
21663
21818
|
{
|
|
21664
21819
|
className: "size-2 shrink-0 rounded-full bg-[var(--text-tertiary)]",
|
|
21665
21820
|
"aria-hidden": true
|
|
21666
21821
|
}
|
|
21667
21822
|
),
|
|
21668
|
-
/* @__PURE__ */
|
|
21669
|
-
/* @__PURE__ */
|
|
21823
|
+
/* @__PURE__ */ jsx28("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
|
|
21824
|
+
/* @__PURE__ */ jsx28(
|
|
21670
21825
|
"button",
|
|
21671
21826
|
{
|
|
21672
21827
|
type: "button",
|
|
@@ -21674,7 +21829,7 @@ function AgentComposer({
|
|
|
21674
21829
|
"aria-label": labels.removeMention,
|
|
21675
21830
|
title: labels.removeMention,
|
|
21676
21831
|
onClick: () => removeDraftFile(file.id),
|
|
21677
|
-
children: /* @__PURE__ */
|
|
21832
|
+
children: /* @__PURE__ */ jsx28(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
21678
21833
|
}
|
|
21679
21834
|
)
|
|
21680
21835
|
]
|
|
@@ -21691,7 +21846,7 @@ function AgentComposer({
|
|
|
21691
21846
|
!isHeroLayout && "agent-gui-node__composer-prompt-input-line"
|
|
21692
21847
|
),
|
|
21693
21848
|
children: [
|
|
21694
|
-
/* @__PURE__ */
|
|
21849
|
+
/* @__PURE__ */ jsx28(
|
|
21695
21850
|
AgentRichTextEditor,
|
|
21696
21851
|
{
|
|
21697
21852
|
ref: editorHandleRef,
|
|
@@ -21711,7 +21866,9 @@ function AgentComposer({
|
|
|
21711
21866
|
onLinkClick: handleLinkClick,
|
|
21712
21867
|
promptImagesSupported,
|
|
21713
21868
|
onPromptImagesUnsupported,
|
|
21714
|
-
onPasteImages: handlePastedImages
|
|
21869
|
+
onPasteImages: handlePastedImages,
|
|
21870
|
+
getReferenceForFile,
|
|
21871
|
+
onDropFiles: promptFilesSupported ? applyDroppedFileReferences : void 0
|
|
21715
21872
|
}
|
|
21716
21873
|
),
|
|
21717
21874
|
!isHeroLayout ? composerActionButton : null
|
|
@@ -21722,7 +21879,7 @@ function AgentComposer({
|
|
|
21722
21879
|
}
|
|
21723
21880
|
) }),
|
|
21724
21881
|
showFileMentionPalette && mentionPaletteFrame ? createPortal3(
|
|
21725
|
-
/* @__PURE__ */
|
|
21882
|
+
/* @__PURE__ */ jsx28(
|
|
21726
21883
|
"div",
|
|
21727
21884
|
{
|
|
21728
21885
|
"data-testid": "agent-gui-mention-palette-surface",
|
|
@@ -21732,7 +21889,7 @@ function AgentComposer({
|
|
|
21732
21889
|
"max-h-[320px] overflow-hidden border-[var(--line-1)] p-0"
|
|
21733
21890
|
),
|
|
21734
21891
|
style: mentionPaletteStyle,
|
|
21735
|
-
children: /* @__PURE__ */
|
|
21892
|
+
children: /* @__PURE__ */ jsx28(
|
|
21736
21893
|
AgentFileMentionPalette,
|
|
21737
21894
|
{
|
|
21738
21895
|
state: mentionSearchState,
|
|
@@ -21758,7 +21915,7 @@ function AgentComposer({
|
|
|
21758
21915
|
),
|
|
21759
21916
|
mentionPaletteFrame.portalTarget
|
|
21760
21917
|
) : null,
|
|
21761
|
-
/* @__PURE__ */
|
|
21918
|
+
/* @__PURE__ */ jsx28(
|
|
21762
21919
|
ComposerFloatingMenuSurface,
|
|
21763
21920
|
{
|
|
21764
21921
|
anchorRef: inputShellRef,
|
|
@@ -21771,7 +21928,7 @@ function AgentComposer({
|
|
|
21771
21928
|
placement: "fixed-height",
|
|
21772
21929
|
surfaceRef: paletteContentRef,
|
|
21773
21930
|
testId: "agent-gui-slash-palette-surface",
|
|
21774
|
-
children: /* @__PURE__ */
|
|
21931
|
+
children: /* @__PURE__ */ jsx28(
|
|
21775
21932
|
AgentSlashCommandPalette,
|
|
21776
21933
|
{
|
|
21777
21934
|
entries: slashPaletteEntries,
|
|
@@ -21792,7 +21949,7 @@ function AgentComposer({
|
|
|
21792
21949
|
)
|
|
21793
21950
|
}
|
|
21794
21951
|
),
|
|
21795
|
-
/* @__PURE__ */
|
|
21952
|
+
/* @__PURE__ */ jsx28(
|
|
21796
21953
|
ComposerFloatingMenuSurface,
|
|
21797
21954
|
{
|
|
21798
21955
|
anchorRef: inputShellRef,
|
|
@@ -21804,7 +21961,7 @@ function AgentComposer({
|
|
|
21804
21961
|
placement: "dynamic-above",
|
|
21805
21962
|
surfaceRef: paletteContentRef,
|
|
21806
21963
|
testId: "agent-gui-command-menu-surface",
|
|
21807
|
-
children: /* @__PURE__ */
|
|
21964
|
+
children: /* @__PURE__ */ jsx28(
|
|
21808
21965
|
AgentSlashStatusPanel,
|
|
21809
21966
|
{
|
|
21810
21967
|
status: slashStatus,
|
|
@@ -21824,7 +21981,7 @@ function AgentComposer({
|
|
|
21824
21981
|
)
|
|
21825
21982
|
}
|
|
21826
21983
|
),
|
|
21827
|
-
/* @__PURE__ */
|
|
21984
|
+
/* @__PURE__ */ jsx28(
|
|
21828
21985
|
ComposerFloatingMenuSurface,
|
|
21829
21986
|
{
|
|
21830
21987
|
anchorRef: inputShellRef,
|
|
@@ -21836,7 +21993,7 @@ function AgentComposer({
|
|
|
21836
21993
|
placement: "dynamic-above",
|
|
21837
21994
|
surfaceRef: paletteContentRef,
|
|
21838
21995
|
testId: "agent-gui-command-menu-surface",
|
|
21839
|
-
children: /* @__PURE__ */
|
|
21996
|
+
children: /* @__PURE__ */ jsx28(
|
|
21840
21997
|
AgentReviewPickerPanel,
|
|
21841
21998
|
{
|
|
21842
21999
|
labels: labels.reviewPicker,
|
|
@@ -21852,7 +22009,7 @@ function AgentComposer({
|
|
|
21852
22009
|
),
|
|
21853
22010
|
/* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
|
|
21854
22011
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
|
|
21855
|
-
previewMode ? /* @__PURE__ */
|
|
22012
|
+
previewMode ? /* @__PURE__ */ jsx28(
|
|
21856
22013
|
"button",
|
|
21857
22014
|
{
|
|
21858
22015
|
type: "button",
|
|
@@ -21863,7 +22020,7 @@ function AgentComposer({
|
|
|
21863
22020
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
21864
22021
|
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
|
|
21865
22022
|
),
|
|
21866
|
-
children: /* @__PURE__ */
|
|
22023
|
+
children: /* @__PURE__ */ jsx28(
|
|
21867
22024
|
AddIcon,
|
|
21868
22025
|
{
|
|
21869
22026
|
"aria-hidden": true,
|
|
@@ -21872,7 +22029,7 @@ function AgentComposer({
|
|
|
21872
22029
|
}
|
|
21873
22030
|
)
|
|
21874
22031
|
}
|
|
21875
|
-
) : /* @__PURE__ */
|
|
22032
|
+
) : /* @__PURE__ */ jsx28(
|
|
21876
22033
|
Select2,
|
|
21877
22034
|
{
|
|
21878
22035
|
open: false,
|
|
@@ -21888,7 +22045,7 @@ function AgentComposer({
|
|
|
21888
22045
|
void handleWorkspaceReferencePicker();
|
|
21889
22046
|
}
|
|
21890
22047
|
},
|
|
21891
|
-
children: /* @__PURE__ */
|
|
22048
|
+
children: /* @__PURE__ */ jsx28(
|
|
21892
22049
|
SelectTrigger2,
|
|
21893
22050
|
{
|
|
21894
22051
|
size: "sm",
|
|
@@ -21899,7 +22056,7 @@ function AgentComposer({
|
|
|
21899
22056
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
21900
22057
|
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
|
|
21901
22058
|
),
|
|
21902
|
-
children: /* @__PURE__ */
|
|
22059
|
+
children: /* @__PURE__ */ jsx28(
|
|
21903
22060
|
AddIcon,
|
|
21904
22061
|
{
|
|
21905
22062
|
"aria-hidden": true,
|
|
@@ -21911,7 +22068,7 @@ function AgentComposer({
|
|
|
21911
22068
|
)
|
|
21912
22069
|
}
|
|
21913
22070
|
),
|
|
21914
|
-
composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */
|
|
22071
|
+
composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */ jsx28(
|
|
21915
22072
|
"button",
|
|
21916
22073
|
{
|
|
21917
22074
|
type: "button",
|
|
@@ -21927,19 +22084,19 @@ function AgentComposer({
|
|
|
21927
22084
|
onClick: () => onSettingsChange({ planMode: false }),
|
|
21928
22085
|
children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
21929
22086
|
/* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
21930
|
-
/* @__PURE__ */
|
|
22087
|
+
/* @__PURE__ */ jsx28(
|
|
21931
22088
|
ListChecks2,
|
|
21932
22089
|
{
|
|
21933
22090
|
"aria-hidden": true,
|
|
21934
22091
|
className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
21935
22092
|
}
|
|
21936
22093
|
),
|
|
21937
|
-
/* @__PURE__ */
|
|
22094
|
+
/* @__PURE__ */ jsx28(
|
|
21938
22095
|
"span",
|
|
21939
22096
|
{
|
|
21940
22097
|
"aria-hidden": true,
|
|
21941
22098
|
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",
|
|
21942
|
-
children: /* @__PURE__ */
|
|
22099
|
+
children: /* @__PURE__ */ jsx28(
|
|
21943
22100
|
X,
|
|
21944
22101
|
{
|
|
21945
22102
|
className: "size-2.5 text-[var(--background-fronted)]",
|
|
@@ -21949,11 +22106,11 @@ function AgentComposer({
|
|
|
21949
22106
|
}
|
|
21950
22107
|
)
|
|
21951
22108
|
] }),
|
|
21952
|
-
/* @__PURE__ */
|
|
22109
|
+
/* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate", children: labels.planModeLabel })
|
|
21953
22110
|
] })
|
|
21954
22111
|
}
|
|
21955
22112
|
) : null,
|
|
21956
|
-
isGoalModeActive ? /* @__PURE__ */
|
|
22113
|
+
isGoalModeActive ? /* @__PURE__ */ jsx28(
|
|
21957
22114
|
"button",
|
|
21958
22115
|
{
|
|
21959
22116
|
type: "button",
|
|
@@ -21969,19 +22126,19 @@ function AgentComposer({
|
|
|
21969
22126
|
onClick: clearGoalModeBadge,
|
|
21970
22127
|
children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
21971
22128
|
/* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
21972
|
-
/* @__PURE__ */
|
|
22129
|
+
/* @__PURE__ */ jsx28(
|
|
21973
22130
|
Target3,
|
|
21974
22131
|
{
|
|
21975
22132
|
"aria-hidden": true,
|
|
21976
22133
|
className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
21977
22134
|
}
|
|
21978
22135
|
),
|
|
21979
|
-
/* @__PURE__ */
|
|
22136
|
+
/* @__PURE__ */ jsx28(
|
|
21980
22137
|
"span",
|
|
21981
22138
|
{
|
|
21982
22139
|
"aria-hidden": true,
|
|
21983
22140
|
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",
|
|
21984
|
-
children: /* @__PURE__ */
|
|
22141
|
+
children: /* @__PURE__ */ jsx28(
|
|
21985
22142
|
X,
|
|
21986
22143
|
{
|
|
21987
22144
|
className: "size-2.5 text-[var(--background-fronted)]",
|
|
@@ -21991,13 +22148,13 @@ function AgentComposer({
|
|
|
21991
22148
|
}
|
|
21992
22149
|
)
|
|
21993
22150
|
] }),
|
|
21994
|
-
/* @__PURE__ */
|
|
22151
|
+
/* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate", children: labels.goalLabel })
|
|
21995
22152
|
] })
|
|
21996
22153
|
}
|
|
21997
22154
|
) : null
|
|
21998
22155
|
] }),
|
|
21999
22156
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroupRight, children: [
|
|
22000
|
-
usage && usage.percentUsed !== null ? /* @__PURE__ */
|
|
22157
|
+
usage && usage.percentUsed !== null ? /* @__PURE__ */ jsx28(
|
|
22001
22158
|
AgentUsageChip,
|
|
22002
22159
|
{
|
|
22003
22160
|
percentUsed: usage.percentUsed,
|
|
@@ -22016,7 +22173,7 @@ function AgentComposer({
|
|
|
22016
22173
|
}
|
|
22017
22174
|
}
|
|
22018
22175
|
) : null,
|
|
22019
|
-
composerSettings.supportsPermissionMode ? /* @__PURE__ */
|
|
22176
|
+
composerSettings.supportsPermissionMode ? /* @__PURE__ */ jsx28(
|
|
22020
22177
|
AgentPermissionModeDropdown,
|
|
22021
22178
|
{
|
|
22022
22179
|
composerSettings,
|
|
@@ -22029,7 +22186,7 @@ function AgentComposer({
|
|
|
22029
22186
|
onSettingsChange: (patch) => onSettingsChange(patch)
|
|
22030
22187
|
}
|
|
22031
22188
|
) : null,
|
|
22032
|
-
composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */
|
|
22189
|
+
composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */ jsx28(
|
|
22033
22190
|
AgentModelReasoningDropdown,
|
|
22034
22191
|
{
|
|
22035
22192
|
composerSettings,
|
|
@@ -22077,7 +22234,7 @@ function AgentComposer({
|
|
|
22077
22234
|
className: AgentGUINode_styles_default.composerProjectRow,
|
|
22078
22235
|
"data-project-missing": isSelectedProjectMissing ? "true" : void 0,
|
|
22079
22236
|
children: [
|
|
22080
|
-
showHeroProjectSelector ? /* @__PURE__ */
|
|
22237
|
+
showHeroProjectSelector ? /* @__PURE__ */ jsx28(
|
|
22081
22238
|
AgentProjectDropdown,
|
|
22082
22239
|
{
|
|
22083
22240
|
composerSettings,
|
|
@@ -22092,14 +22249,14 @@ function AgentComposer({
|
|
|
22092
22249
|
onProjectPathChange
|
|
22093
22250
|
}
|
|
22094
22251
|
) : null,
|
|
22095
|
-
activePromptTip ? /* @__PURE__ */
|
|
22252
|
+
activePromptTip ? /* @__PURE__ */ jsx28(
|
|
22096
22253
|
"div",
|
|
22097
22254
|
{
|
|
22098
22255
|
className: AgentGUINode_styles_default.composerPromptTips,
|
|
22099
22256
|
"data-testid": "agent-gui-prompt-tips",
|
|
22100
|
-
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */
|
|
22101
|
-
/* @__PURE__ */
|
|
22102
|
-
/* @__PURE__ */
|
|
22257
|
+
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
|
|
22258
|
+
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: promptTipNode }),
|
|
22259
|
+
/* @__PURE__ */ jsx28(
|
|
22103
22260
|
TooltipContent,
|
|
22104
22261
|
{
|
|
22105
22262
|
align: "end",
|
|
@@ -22154,7 +22311,7 @@ function AgentComposerDraftImagePreview({
|
|
|
22154
22311
|
"data-upload-error": image.uploadError ? "true" : void 0,
|
|
22155
22312
|
style: previewStyle,
|
|
22156
22313
|
children: [
|
|
22157
|
-
/* @__PURE__ */
|
|
22314
|
+
/* @__PURE__ */ jsx28(
|
|
22158
22315
|
ZoomableImage,
|
|
22159
22316
|
{
|
|
22160
22317
|
src: image.previewUrl,
|
|
@@ -22177,12 +22334,12 @@ function AgentComposerDraftImagePreview({
|
|
|
22177
22334
|
}
|
|
22178
22335
|
}
|
|
22179
22336
|
),
|
|
22180
|
-
image.uploading ? /* @__PURE__ */
|
|
22337
|
+
image.uploading ? /* @__PURE__ */ jsx28(
|
|
22181
22338
|
"div",
|
|
22182
22339
|
{
|
|
22183
22340
|
className: "absolute inset-0 grid place-items-center bg-[color-mix(in_srgb,var(--background-fronted)_62%,transparent)]",
|
|
22184
22341
|
"data-testid": "agent-gui-composer-image-uploading",
|
|
22185
|
-
children: /* @__PURE__ */
|
|
22342
|
+
children: /* @__PURE__ */ jsx28(
|
|
22186
22343
|
Spinner,
|
|
22187
22344
|
{
|
|
22188
22345
|
className: "text-[var(--text-primary)]",
|
|
@@ -22194,7 +22351,7 @@ function AgentComposerDraftImagePreview({
|
|
|
22194
22351
|
)
|
|
22195
22352
|
}
|
|
22196
22353
|
) : null,
|
|
22197
|
-
/* @__PURE__ */
|
|
22354
|
+
/* @__PURE__ */ jsx28(
|
|
22198
22355
|
"button",
|
|
22199
22356
|
{
|
|
22200
22357
|
type: "button",
|
|
@@ -22202,7 +22359,7 @@ function AgentComposerDraftImagePreview({
|
|
|
22202
22359
|
"aria-label": removeLabel,
|
|
22203
22360
|
title: removeLabel,
|
|
22204
22361
|
onClick: () => onRemove(image.id),
|
|
22205
|
-
children: /* @__PURE__ */
|
|
22362
|
+
children: /* @__PURE__ */ jsx28(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
22206
22363
|
}
|
|
22207
22364
|
)
|
|
22208
22365
|
]
|
|
@@ -22282,7 +22439,7 @@ function useStableEventCallback(callback) {
|
|
|
22282
22439
|
}
|
|
22283
22440
|
function SendFilledIcon() {
|
|
22284
22441
|
"use memo";
|
|
22285
|
-
return /* @__PURE__ */
|
|
22442
|
+
return /* @__PURE__ */ jsx28(
|
|
22286
22443
|
"svg",
|
|
22287
22444
|
{
|
|
22288
22445
|
width: "24",
|
|
@@ -22290,7 +22447,7 @@ function SendFilledIcon() {
|
|
|
22290
22447
|
viewBox: "0 0 24 24",
|
|
22291
22448
|
fill: "none",
|
|
22292
22449
|
"aria-hidden": "true",
|
|
22293
|
-
children: /* @__PURE__ */
|
|
22450
|
+
children: /* @__PURE__ */ jsx28(
|
|
22294
22451
|
"path",
|
|
22295
22452
|
{
|
|
22296
22453
|
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",
|
|
@@ -22317,7 +22474,7 @@ function agentGUIBottomDockStoreSnapshotsEqual(current, next) {
|
|
|
22317
22474
|
}
|
|
22318
22475
|
|
|
22319
22476
|
// agent-gui/agentGuiNode/AgentConversationListSkeleton.tsx
|
|
22320
|
-
import { jsx as
|
|
22477
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
22321
22478
|
var SKELETON_ROWS = [
|
|
22322
22479
|
{ id: "first", size: "long" },
|
|
22323
22480
|
{ id: "second", size: "medium" },
|
|
@@ -22329,7 +22486,7 @@ function AgentConversationListSkeleton({
|
|
|
22329
22486
|
label
|
|
22330
22487
|
}) {
|
|
22331
22488
|
"use memo";
|
|
22332
|
-
return /* @__PURE__ */
|
|
22489
|
+
return /* @__PURE__ */ jsx29(
|
|
22333
22490
|
"div",
|
|
22334
22491
|
{
|
|
22335
22492
|
className: "agent-gui-node__conversation-list-skeleton",
|
|
@@ -22343,9 +22500,9 @@ function AgentConversationListSkeleton({
|
|
|
22343
22500
|
"data-size": row.size,
|
|
22344
22501
|
"aria-hidden": "true",
|
|
22345
22502
|
children: [
|
|
22346
|
-
/* @__PURE__ */
|
|
22347
|
-
/* @__PURE__ */
|
|
22348
|
-
/* @__PURE__ */
|
|
22503
|
+
/* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-spine" }),
|
|
22504
|
+
/* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-primary" }),
|
|
22505
|
+
/* @__PURE__ */ jsx29("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-secondary" })
|
|
22349
22506
|
]
|
|
22350
22507
|
},
|
|
22351
22508
|
row.id
|
|
@@ -22356,7 +22513,7 @@ function AgentConversationListSkeleton({
|
|
|
22356
22513
|
|
|
22357
22514
|
// agent-gui/agentGuiNode/agentGuiNodeViewConversation.tsx
|
|
22358
22515
|
import { AskLinedIcon } from "@tutti-os/ui-system/icons";
|
|
22359
|
-
import { jsx as
|
|
22516
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
22360
22517
|
function ConversationMeta({
|
|
22361
22518
|
item,
|
|
22362
22519
|
nowMs,
|
|
@@ -22365,24 +22522,24 @@ function ConversationMeta({
|
|
|
22365
22522
|
"use memo";
|
|
22366
22523
|
const kind = conversationMetaKind(item);
|
|
22367
22524
|
if (kind === "loading") {
|
|
22368
|
-
return /* @__PURE__ */
|
|
22525
|
+
return /* @__PURE__ */ jsx30(
|
|
22369
22526
|
"span",
|
|
22370
22527
|
{
|
|
22371
22528
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
22372
22529
|
"data-kind": kind,
|
|
22373
22530
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
22374
|
-
children: /* @__PURE__ */
|
|
22531
|
+
children: /* @__PURE__ */ jsx30(LoadingGlyph, {})
|
|
22375
22532
|
}
|
|
22376
22533
|
);
|
|
22377
22534
|
}
|
|
22378
22535
|
if (kind === "waiting") {
|
|
22379
|
-
return /* @__PURE__ */
|
|
22536
|
+
return /* @__PURE__ */ jsx30(
|
|
22380
22537
|
"span",
|
|
22381
22538
|
{
|
|
22382
22539
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
22383
22540
|
"data-kind": kind,
|
|
22384
22541
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
22385
|
-
children: /* @__PURE__ */
|
|
22542
|
+
children: /* @__PURE__ */ jsx30(
|
|
22386
22543
|
AskLinedIcon,
|
|
22387
22544
|
{
|
|
22388
22545
|
"aria-hidden": "true",
|
|
@@ -22393,34 +22550,34 @@ function ConversationMeta({
|
|
|
22393
22550
|
);
|
|
22394
22551
|
}
|
|
22395
22552
|
if (kind === "failed") {
|
|
22396
|
-
return /* @__PURE__ */
|
|
22553
|
+
return /* @__PURE__ */ jsx30(
|
|
22397
22554
|
"span",
|
|
22398
22555
|
{
|
|
22399
22556
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
22400
22557
|
"data-kind": kind,
|
|
22401
22558
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
22402
|
-
children: /* @__PURE__ */
|
|
22559
|
+
children: /* @__PURE__ */ jsx30(AttentionGlyph, {})
|
|
22403
22560
|
}
|
|
22404
22561
|
);
|
|
22405
22562
|
}
|
|
22406
22563
|
if (kind === "unread-complete") {
|
|
22407
|
-
return /* @__PURE__ */
|
|
22564
|
+
return /* @__PURE__ */ jsx30(
|
|
22408
22565
|
"span",
|
|
22409
22566
|
{
|
|
22410
22567
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
22411
22568
|
"data-kind": kind,
|
|
22412
22569
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
22413
|
-
children: /* @__PURE__ */
|
|
22570
|
+
children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationUnreadLamp, "aria-hidden": "true" })
|
|
22414
22571
|
}
|
|
22415
22572
|
);
|
|
22416
22573
|
}
|
|
22417
|
-
return /* @__PURE__ */
|
|
22574
|
+
return /* @__PURE__ */ jsx30(
|
|
22418
22575
|
"span",
|
|
22419
22576
|
{
|
|
22420
22577
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
22421
22578
|
"data-kind": kind,
|
|
22422
22579
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
22423
|
-
children: /* @__PURE__ */
|
|
22580
|
+
children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationTime, children: formatConversationRelativeTime(
|
|
22424
22581
|
resolveAgentGUIConversationSortTimeUnixMs(item),
|
|
22425
22582
|
nowMs,
|
|
22426
22583
|
labels
|
|
@@ -22588,7 +22745,7 @@ function formatConversationRelativeTime(updatedAtUnixMs, nowMs, labels) {
|
|
|
22588
22745
|
}
|
|
22589
22746
|
function LoadingGlyph() {
|
|
22590
22747
|
"use memo";
|
|
22591
|
-
return /* @__PURE__ */
|
|
22748
|
+
return /* @__PURE__ */ jsx30(
|
|
22592
22749
|
Spinner,
|
|
22593
22750
|
{
|
|
22594
22751
|
className: AgentGUINode_styles_default.conversationStatusGlyph,
|
|
@@ -22602,14 +22759,14 @@ function LoadingGlyph() {
|
|
|
22602
22759
|
}
|
|
22603
22760
|
function AttentionGlyph() {
|
|
22604
22761
|
"use memo";
|
|
22605
|
-
return /* @__PURE__ */
|
|
22762
|
+
return /* @__PURE__ */ jsx30(
|
|
22606
22763
|
"svg",
|
|
22607
22764
|
{
|
|
22608
22765
|
viewBox: "0 0 24 24",
|
|
22609
22766
|
fill: "none",
|
|
22610
22767
|
"aria-hidden": "true",
|
|
22611
22768
|
className: AgentGUINode_styles_default.conversationStatusGlyph,
|
|
22612
|
-
children: /* @__PURE__ */
|
|
22769
|
+
children: /* @__PURE__ */ jsx30(
|
|
22613
22770
|
"path",
|
|
22614
22771
|
{
|
|
22615
22772
|
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",
|
|
@@ -22622,7 +22779,7 @@ function AttentionGlyph() {
|
|
|
22622
22779
|
|
|
22623
22780
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
22624
22781
|
import { createRichTextMentionHref as createRichTextMentionHref2 } from "@tutti-os/ui-rich-text/core";
|
|
22625
|
-
import { Fragment as Fragment8, jsx as
|
|
22782
|
+
import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
22626
22783
|
var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
22627
22784
|
var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
|
|
22628
22785
|
var AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX = 1;
|
|
@@ -22844,6 +23001,7 @@ function AgentGUINodeView({
|
|
|
22844
23001
|
detailMinWidthPx,
|
|
22845
23002
|
uiLanguage,
|
|
22846
23003
|
onWorkspaceFileReferencesAdded,
|
|
23004
|
+
resolveDroppedFileReferences = null,
|
|
22847
23005
|
onConversationRailWidthChanged,
|
|
22848
23006
|
labels,
|
|
22849
23007
|
workspaceUserProjectI18n,
|
|
@@ -22855,6 +23013,7 @@ function AgentGUINodeView({
|
|
|
22855
23013
|
onRequestGitBranches = null,
|
|
22856
23014
|
contextMentionProviders,
|
|
22857
23015
|
referenceSourceAggregator = null,
|
|
23016
|
+
resolveWorkspaceReferenceEntryIconUrl,
|
|
22858
23017
|
resolveMentionReferenceTarget = null,
|
|
22859
23018
|
resolveWorkspaceReferenceInitialTarget = null,
|
|
22860
23019
|
workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS3
|
|
@@ -23261,14 +23420,14 @@ function AgentGUINodeView({
|
|
|
23261
23420
|
inert: previewMode ? true : void 0,
|
|
23262
23421
|
style: layoutStyle,
|
|
23263
23422
|
children: [
|
|
23264
|
-
/* @__PURE__ */
|
|
23423
|
+
/* @__PURE__ */ jsx31(
|
|
23265
23424
|
"aside",
|
|
23266
23425
|
{
|
|
23267
23426
|
id: "agent-gui-conversation-rail",
|
|
23268
23427
|
className: `${AgentGUINode_styles_default.railPanel}${conversationRailCollapsed ? ` ${AgentGUINode_styles_default.railPanelCollapsed}` : ""}`,
|
|
23269
23428
|
"aria-hidden": conversationRailCollapsed ? "true" : void 0,
|
|
23270
23429
|
inert: conversationRailCollapsed ? true : void 0,
|
|
23271
|
-
children: /* @__PURE__ */
|
|
23430
|
+
children: /* @__PURE__ */ jsx31(
|
|
23272
23431
|
AgentGUIConversationRailStorePane,
|
|
23273
23432
|
{
|
|
23274
23433
|
conversations: viewModel.conversations,
|
|
@@ -23279,7 +23438,7 @@ function AgentGUINodeView({
|
|
|
23279
23438
|
)
|
|
23280
23439
|
}
|
|
23281
23440
|
),
|
|
23282
|
-
/* @__PURE__ */
|
|
23441
|
+
/* @__PURE__ */ jsx31(
|
|
23283
23442
|
"div",
|
|
23284
23443
|
{
|
|
23285
23444
|
id: "agent-gui-conversation-rail-resize",
|
|
@@ -23303,7 +23462,7 @@ function AgentGUINodeView({
|
|
|
23303
23462
|
onPointerUp: endConversationRailResize
|
|
23304
23463
|
}
|
|
23305
23464
|
),
|
|
23306
|
-
/* @__PURE__ */
|
|
23465
|
+
/* @__PURE__ */ jsx31("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx31(
|
|
23307
23466
|
AgentGUIDetailPane,
|
|
23308
23467
|
{
|
|
23309
23468
|
viewModel,
|
|
@@ -23321,6 +23480,7 @@ function AgentGUINodeView({
|
|
|
23321
23480
|
onCapabilitySettingsRequest,
|
|
23322
23481
|
onAgentProviderLogin,
|
|
23323
23482
|
onRequestWorkspaceReferences: requestWorkspaceReferences,
|
|
23483
|
+
resolveDroppedFileReferences,
|
|
23324
23484
|
selectProjectDirectory,
|
|
23325
23485
|
onRequestGitBranches,
|
|
23326
23486
|
contextMentionProviders,
|
|
@@ -23332,7 +23492,7 @@ function AgentGUINodeView({
|
|
|
23332
23492
|
]
|
|
23333
23493
|
}
|
|
23334
23494
|
),
|
|
23335
|
-
referenceSourceAggregator ? /* @__PURE__ */
|
|
23495
|
+
referenceSourceAggregator ? /* @__PURE__ */ jsx31(
|
|
23336
23496
|
ReferenceSourcePicker,
|
|
23337
23497
|
{
|
|
23338
23498
|
aggregator: referenceSourceAggregator,
|
|
@@ -23341,12 +23501,13 @@ function AgentGUINodeView({
|
|
|
23341
23501
|
isNodeSelectable: isWorkspaceReferencePickerNodeSelectable,
|
|
23342
23502
|
fileManagerCopy: workspaceFileManagerCopy ?? void 0,
|
|
23343
23503
|
open: workspaceReferencePickerOpen,
|
|
23504
|
+
resolveEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
23344
23505
|
workspaceId: viewModel.workspaceId,
|
|
23345
23506
|
onClose: closeWorkspaceReferencePicker,
|
|
23346
23507
|
onConfirm: confirmWorkspaceReferencePicker,
|
|
23347
23508
|
onConfirmBundles: confirmWorkspaceReferenceBundles
|
|
23348
23509
|
}
|
|
23349
|
-
) : /* @__PURE__ */
|
|
23510
|
+
) : /* @__PURE__ */ jsx31(
|
|
23350
23511
|
WorkspaceFileReferencePicker,
|
|
23351
23512
|
{
|
|
23352
23513
|
copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
|
|
@@ -23360,7 +23521,7 @@ function AgentGUINodeView({
|
|
|
23360
23521
|
}
|
|
23361
23522
|
)
|
|
23362
23523
|
] });
|
|
23363
|
-
return previewMode ? content : /* @__PURE__ */
|
|
23524
|
+
return previewMode ? content : /* @__PURE__ */ jsx31(TooltipProvider2, { children: content });
|
|
23364
23525
|
}
|
|
23365
23526
|
function mergeWorkspaceAppIconsFromCommands(input) {
|
|
23366
23527
|
const seen = new Set(
|
|
@@ -23438,6 +23599,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23438
23599
|
onCapabilitySettingsRequest,
|
|
23439
23600
|
onAgentProviderLogin,
|
|
23440
23601
|
onRequestWorkspaceReferences,
|
|
23602
|
+
resolveDroppedFileReferences = null,
|
|
23441
23603
|
selectProjectDirectory,
|
|
23442
23604
|
onRequestGitBranches,
|
|
23443
23605
|
contextMentionProviders,
|
|
@@ -23573,8 +23735,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23573
23735
|
className: AgentGUINode_styles_default.unavailableChatEmpty,
|
|
23574
23736
|
"data-testid": "agent-gui-unavailable-chat-empty",
|
|
23575
23737
|
children: [
|
|
23576
|
-
/* @__PURE__ */
|
|
23577
|
-
/* @__PURE__ */
|
|
23738
|
+
/* @__PURE__ */ jsx31(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
|
|
23739
|
+
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
|
|
23578
23740
|
]
|
|
23579
23741
|
}
|
|
23580
23742
|
),
|
|
@@ -23987,6 +24149,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23987
24149
|
onCapabilitySettingsRequest,
|
|
23988
24150
|
onLinkAction: stableLinkAction,
|
|
23989
24151
|
onRequestWorkspaceReferences: stableRequestWorkspaceReferences,
|
|
24152
|
+
resolveDroppedFileReferences,
|
|
23990
24153
|
selectProjectDirectory: stableSelectProjectDirectory,
|
|
23991
24154
|
onRequestGitBranches: stableRequestGitBranches,
|
|
23992
24155
|
contextMentionProviders
|
|
@@ -24010,6 +24173,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24010
24173
|
onCapabilitySettingsRequest,
|
|
24011
24174
|
contextMentionProviders,
|
|
24012
24175
|
removeQueuedPrompt,
|
|
24176
|
+
resolveDroppedFileReferences,
|
|
24013
24177
|
sendQueuedPromptNext,
|
|
24014
24178
|
showPromptImagesUnsupported,
|
|
24015
24179
|
showStopButton,
|
|
@@ -24273,7 +24437,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24273
24437
|
viewModel.isLoadingOlderMessages
|
|
24274
24438
|
]);
|
|
24275
24439
|
return /* @__PURE__ */ jsxs17("main", { className: AgentGUINode_styles_default.detail, children: [
|
|
24276
|
-
/* @__PURE__ */
|
|
24440
|
+
/* @__PURE__ */ jsx31(
|
|
24277
24441
|
AgentGUIDetailHeader,
|
|
24278
24442
|
{
|
|
24279
24443
|
activeConversation: viewModel.activeConversation,
|
|
@@ -24298,8 +24462,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24298
24462
|
"data-testid": "agent-gui-provider-setup-notice",
|
|
24299
24463
|
role: "status",
|
|
24300
24464
|
children: [
|
|
24301
|
-
/* @__PURE__ */
|
|
24302
|
-
/* @__PURE__ */
|
|
24465
|
+
/* @__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 }) }),
|
|
24466
|
+
/* @__PURE__ */ jsx31(
|
|
24303
24467
|
"button",
|
|
24304
24468
|
{
|
|
24305
24469
|
type: "button",
|
|
@@ -24319,7 +24483,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24319
24483
|
]
|
|
24320
24484
|
}
|
|
24321
24485
|
) : null,
|
|
24322
|
-
/* @__PURE__ */
|
|
24486
|
+
/* @__PURE__ */ jsx31(
|
|
24323
24487
|
ScrollArea,
|
|
24324
24488
|
{
|
|
24325
24489
|
scrollbarMode: "native",
|
|
@@ -24328,7 +24492,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24328
24492
|
viewportTestId: "agent-gui-timeline",
|
|
24329
24493
|
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(),
|
|
24330
24494
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
24331
|
-
children: !hasActiveConversation ? /* @__PURE__ */
|
|
24495
|
+
children: !hasActiveConversation ? /* @__PURE__ */ jsx31(
|
|
24332
24496
|
AgentGUIEmptyHeroPane,
|
|
24333
24497
|
{
|
|
24334
24498
|
provider: viewModel.data.provider,
|
|
@@ -24343,7 +24507,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24343
24507
|
chromeLabels,
|
|
24344
24508
|
composerProps: emptyHeroComposerProps
|
|
24345
24509
|
}
|
|
24346
|
-
) : /* @__PURE__ */
|
|
24510
|
+
) : /* @__PURE__ */ jsx31(
|
|
24347
24511
|
AgentGUIConversationTimelinePane,
|
|
24348
24512
|
{
|
|
24349
24513
|
conversation,
|
|
@@ -24361,7 +24525,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24361
24525
|
)
|
|
24362
24526
|
}
|
|
24363
24527
|
),
|
|
24364
|
-
hasActiveConversation ? /* @__PURE__ */
|
|
24528
|
+
hasActiveConversation ? /* @__PURE__ */ jsx31(
|
|
24365
24529
|
AgentGUIBottomDockPane,
|
|
24366
24530
|
{
|
|
24367
24531
|
bottomDockRef,
|
|
@@ -24401,8 +24565,8 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
24401
24565
|
const statusTitle = showSyncIndicator ? syncLabel : void 0;
|
|
24402
24566
|
return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.detailHeader, children: [
|
|
24403
24567
|
/* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.detailHeaderTitleGroup, children: [
|
|
24404
|
-
/* @__PURE__ */
|
|
24405
|
-
runPath ? /* @__PURE__ */
|
|
24568
|
+
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
|
|
24569
|
+
runPath ? /* @__PURE__ */ jsx31(AgentRunPathInfo, { path: runPath, previewMode }) : null
|
|
24406
24570
|
] }),
|
|
24407
24571
|
/* @__PURE__ */ jsxs17(
|
|
24408
24572
|
"span",
|
|
@@ -24410,7 +24574,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
24410
24574
|
className: "inline-flex flex-none items-center gap-2 whitespace-nowrap",
|
|
24411
24575
|
title: statusTitle,
|
|
24412
24576
|
children: [
|
|
24413
|
-
showSyncIndicator ? /* @__PURE__ */
|
|
24577
|
+
showSyncIndicator ? /* @__PURE__ */ jsx31(
|
|
24414
24578
|
StatusDot,
|
|
24415
24579
|
{
|
|
24416
24580
|
tone: syncStateTone(syncStatus),
|
|
@@ -24420,7 +24584,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
24420
24584
|
title: syncLabel
|
|
24421
24585
|
}
|
|
24422
24586
|
) : null,
|
|
24423
|
-
showFailedSyncLabel ? /* @__PURE__ */
|
|
24587
|
+
showFailedSyncLabel ? /* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-[18px] text-shell-warning", children: syncLabel }) : null
|
|
24424
24588
|
]
|
|
24425
24589
|
}
|
|
24426
24590
|
)
|
|
@@ -24431,21 +24595,21 @@ function AgentRunPathInfo({
|
|
|
24431
24595
|
previewMode
|
|
24432
24596
|
}) {
|
|
24433
24597
|
"use memo";
|
|
24434
|
-
const trigger = /* @__PURE__ */
|
|
24598
|
+
const trigger = /* @__PURE__ */ jsx31(
|
|
24435
24599
|
"button",
|
|
24436
24600
|
{
|
|
24437
24601
|
type: "button",
|
|
24438
24602
|
className: AgentGUINode_styles_default.detailHeaderPathInfo,
|
|
24439
24603
|
"aria-label": path,
|
|
24440
|
-
children: /* @__PURE__ */
|
|
24604
|
+
children: /* @__PURE__ */ jsx31(Info2, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
|
|
24441
24605
|
}
|
|
24442
24606
|
);
|
|
24443
24607
|
if (previewMode) {
|
|
24444
24608
|
return trigger;
|
|
24445
24609
|
}
|
|
24446
24610
|
return /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
24447
|
-
/* @__PURE__ */
|
|
24448
|
-
/* @__PURE__ */
|
|
24611
|
+
/* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: trigger }),
|
|
24612
|
+
/* @__PURE__ */ jsx31(
|
|
24449
24613
|
TooltipContent3,
|
|
24450
24614
|
{
|
|
24451
24615
|
side: "top",
|
|
@@ -24490,8 +24654,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
24490
24654
|
}) {
|
|
24491
24655
|
"use memo";
|
|
24492
24656
|
const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
|
|
24493
|
-
return /* @__PURE__ */
|
|
24494
|
-
/* @__PURE__ */
|
|
24657
|
+
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.emptyHeroBody, children: [
|
|
24658
|
+
/* @__PURE__ */ jsx31(
|
|
24495
24659
|
"img",
|
|
24496
24660
|
{
|
|
24497
24661
|
"aria-hidden": "true",
|
|
@@ -24501,8 +24665,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
24501
24665
|
alt: ""
|
|
24502
24666
|
}
|
|
24503
24667
|
),
|
|
24504
|
-
/* @__PURE__ */
|
|
24505
|
-
inlineNoticeChrome ? /* @__PURE__ */
|
|
24668
|
+
/* @__PURE__ */ jsx31("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: /* @__PURE__ */ jsx31(EmptyHeroTitle, { label: emptyLabel, providerLabel: emptyProvider }) }),
|
|
24669
|
+
inlineNoticeChrome ? /* @__PURE__ */ jsx31(
|
|
24506
24670
|
AgentSessionChrome,
|
|
24507
24671
|
{
|
|
24508
24672
|
chrome: inlineNoticeChrome,
|
|
@@ -24514,7 +24678,7 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
24514
24678
|
labels: chromeLabels
|
|
24515
24679
|
}
|
|
24516
24680
|
) : null,
|
|
24517
|
-
/* @__PURE__ */
|
|
24681
|
+
/* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
|
|
24518
24682
|
] }) });
|
|
24519
24683
|
});
|
|
24520
24684
|
function EmptyHeroTitle({
|
|
@@ -24523,12 +24687,12 @@ function EmptyHeroTitle({
|
|
|
24523
24687
|
}) {
|
|
24524
24688
|
const providerStart = providerLabel ? label.indexOf(providerLabel) : -1;
|
|
24525
24689
|
if (!shouldEmphasizeEmptyHeroProvider(label) || providerStart < 0) {
|
|
24526
|
-
return /* @__PURE__ */
|
|
24690
|
+
return /* @__PURE__ */ jsx31(Fragment8, { children: label });
|
|
24527
24691
|
}
|
|
24528
24692
|
const providerEnd = providerStart + providerLabel.length;
|
|
24529
24693
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
24530
24694
|
label.slice(0, providerStart),
|
|
24531
|
-
/* @__PURE__ */
|
|
24695
|
+
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.emptyHeroProvider, children: label.slice(providerStart, providerEnd) }),
|
|
24532
24696
|
label.slice(providerEnd)
|
|
24533
24697
|
] });
|
|
24534
24698
|
}
|
|
@@ -24570,12 +24734,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24570
24734
|
className: AgentGUINode_styles_default.bottomDock,
|
|
24571
24735
|
"data-testid": "agent-gui-bottom-dock",
|
|
24572
24736
|
children: [
|
|
24573
|
-
bottomDockLiftedPrompt ? /* @__PURE__ */
|
|
24737
|
+
bottomDockLiftedPrompt ? /* @__PURE__ */ jsx31(
|
|
24574
24738
|
"div",
|
|
24575
24739
|
{
|
|
24576
24740
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
24577
24741
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
24578
|
-
children: /* @__PURE__ */
|
|
24742
|
+
children: /* @__PURE__ */ jsx31(
|
|
24579
24743
|
AgentInteractivePromptSurface,
|
|
24580
24744
|
{
|
|
24581
24745
|
prompt: bottomDockLiftedPrompt,
|
|
@@ -24590,7 +24754,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24590
24754
|
)
|
|
24591
24755
|
}
|
|
24592
24756
|
) : null,
|
|
24593
|
-
inlineNoticeChrome ? /* @__PURE__ */
|
|
24757
|
+
inlineNoticeChrome ? /* @__PURE__ */ jsx31(
|
|
24594
24758
|
AgentSessionChrome,
|
|
24595
24759
|
{
|
|
24596
24760
|
chrome: inlineNoticeChrome,
|
|
@@ -24602,7 +24766,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24602
24766
|
labels: chromeLabels
|
|
24603
24767
|
}
|
|
24604
24768
|
) : null,
|
|
24605
|
-
/* @__PURE__ */
|
|
24769
|
+
/* @__PURE__ */ jsx31(
|
|
24606
24770
|
AgentSessionChrome,
|
|
24607
24771
|
{
|
|
24608
24772
|
chrome: sessionChrome,
|
|
@@ -24614,7 +24778,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24614
24778
|
labels: chromeLabels
|
|
24615
24779
|
}
|
|
24616
24780
|
),
|
|
24617
|
-
showGoalBanner ? /* @__PURE__ */
|
|
24781
|
+
showGoalBanner ? /* @__PURE__ */ jsx31(
|
|
24618
24782
|
AgentGoalBanner,
|
|
24619
24783
|
{
|
|
24620
24784
|
objective: goalObjective,
|
|
@@ -24624,12 +24788,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24624
24788
|
labels: goalBannerLabels
|
|
24625
24789
|
}
|
|
24626
24790
|
) : null,
|
|
24627
|
-
bottomDockReplacementPrompt ? /* @__PURE__ */
|
|
24791
|
+
bottomDockReplacementPrompt ? /* @__PURE__ */ jsx31(
|
|
24628
24792
|
"div",
|
|
24629
24793
|
{
|
|
24630
24794
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
24631
24795
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
24632
|
-
children: /* @__PURE__ */
|
|
24796
|
+
children: /* @__PURE__ */ jsx31(
|
|
24633
24797
|
AgentInteractivePromptSurface,
|
|
24634
24798
|
{
|
|
24635
24799
|
prompt: bottomDockReplacementPrompt,
|
|
@@ -24643,7 +24807,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24643
24807
|
}
|
|
24644
24808
|
)
|
|
24645
24809
|
}
|
|
24646
|
-
) : /* @__PURE__ */
|
|
24810
|
+
) : /* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
|
|
24647
24811
|
]
|
|
24648
24812
|
}
|
|
24649
24813
|
);
|
|
@@ -24669,7 +24833,7 @@ var AgentGUIConversationRailStorePane = memo(
|
|
|
24669
24833
|
}) {
|
|
24670
24834
|
"use memo";
|
|
24671
24835
|
const state = useSnapshot(store);
|
|
24672
|
-
return /* @__PURE__ */
|
|
24836
|
+
return /* @__PURE__ */ jsx31(
|
|
24673
24837
|
AgentGUIConversationRailPane,
|
|
24674
24838
|
{
|
|
24675
24839
|
...state,
|
|
@@ -24891,7 +25055,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24891
25055
|
"aria-hidden": isCollapsed ? "true" : void 0,
|
|
24892
25056
|
children: [
|
|
24893
25057
|
/* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.railToolbar, children: [
|
|
24894
|
-
/* @__PURE__ */
|
|
25058
|
+
/* @__PURE__ */ jsx31(
|
|
24895
25059
|
TaskSearchField,
|
|
24896
25060
|
{
|
|
24897
25061
|
value: conversationQuery,
|
|
@@ -24910,14 +25074,14 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24910
25074
|
disabled: createConversationDisabled,
|
|
24911
25075
|
onClick: () => onCreateConversation(),
|
|
24912
25076
|
children: [
|
|
24913
|
-
/* @__PURE__ */
|
|
24914
|
-
/* @__PURE__ */
|
|
25077
|
+
/* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" }),
|
|
25078
|
+
/* @__PURE__ */ jsx31("span", { children: labels.newConversation })
|
|
24915
25079
|
]
|
|
24916
25080
|
}
|
|
24917
25081
|
)
|
|
24918
25082
|
] }),
|
|
24919
25083
|
openclawGateway?.status === "starting" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "starting", children: [
|
|
24920
|
-
/* @__PURE__ */
|
|
25084
|
+
/* @__PURE__ */ jsx31(
|
|
24921
25085
|
StatusDot,
|
|
24922
25086
|
{
|
|
24923
25087
|
tone: "blue",
|
|
@@ -24926,10 +25090,10 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24926
25090
|
ariaLabel: labels.openclawGatewayStarting
|
|
24927
25091
|
}
|
|
24928
25092
|
),
|
|
24929
|
-
/* @__PURE__ */
|
|
25093
|
+
/* @__PURE__ */ jsx31("span", { children: labels.openclawGatewayStarting })
|
|
24930
25094
|
] }) : openclawGateway?.status === "failed" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "failed", children: [
|
|
24931
|
-
/* @__PURE__ */
|
|
24932
|
-
/* @__PURE__ */
|
|
25095
|
+
/* @__PURE__ */ jsx31("span", { children: openclawGateway.error || labels.openclawGatewayFailed }),
|
|
25096
|
+
/* @__PURE__ */ jsx31(
|
|
24933
25097
|
"button",
|
|
24934
25098
|
{
|
|
24935
25099
|
type: "button",
|
|
@@ -24939,19 +25103,19 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24939
25103
|
}
|
|
24940
25104
|
)
|
|
24941
25105
|
] }) : null,
|
|
24942
|
-
/* @__PURE__ */
|
|
25106
|
+
/* @__PURE__ */ jsx31(
|
|
24943
25107
|
ScrollArea,
|
|
24944
25108
|
{
|
|
24945
25109
|
scrollbarMode: "native",
|
|
24946
25110
|
className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
24947
25111
|
viewportRef: conversationListRef,
|
|
24948
25112
|
viewportClassName: AgentGUINode_styles_default.conversationList,
|
|
24949
|
-
children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */
|
|
25113
|
+
children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx31(
|
|
24950
25114
|
AgentConversationListSkeleton,
|
|
24951
25115
|
{
|
|
24952
25116
|
label: labels.loadingConversations
|
|
24953
25117
|
}
|
|
24954
|
-
) : groupedConversations.length === 0 ? /* @__PURE__ */
|
|
25118
|
+
) : 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) => {
|
|
24955
25119
|
const projectPath = section.kind === "project" ? section.project?.path ?? "" : "";
|
|
24956
25120
|
const normalizedProjectPath = normalizeConversationRailProjectPath(projectPath);
|
|
24957
25121
|
const projectLabel = section.kind === "project" ? section.label : "";
|
|
@@ -24960,7 +25124,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24960
25124
|
const isSectionCollapsed = isProjectSection && collapsedProjectSectionIds.has(section.id);
|
|
24961
25125
|
const projectConversationCount = normalizedProjectPath ? projectConversationCountsByPath.get(normalizedProjectPath) ?? 0 : 0;
|
|
24962
25126
|
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
24963
|
-
showProjectRailHeader ? /* @__PURE__ */
|
|
25127
|
+
showProjectRailHeader ? /* @__PURE__ */ jsx31(
|
|
24964
25128
|
AgentGUIProjectRailHeader,
|
|
24965
25129
|
{
|
|
24966
25130
|
labels,
|
|
@@ -24968,7 +25132,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24968
25132
|
workspaceUserProjectI18n
|
|
24969
25133
|
}
|
|
24970
25134
|
) : null,
|
|
24971
|
-
/* @__PURE__ */
|
|
25135
|
+
/* @__PURE__ */ jsx31(
|
|
24972
25136
|
AgentGUIConversationRailSection,
|
|
24973
25137
|
{
|
|
24974
25138
|
activeConversationId,
|
|
@@ -25001,8 +25165,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25001
25165
|
})
|
|
25002
25166
|
}
|
|
25003
25167
|
),
|
|
25004
|
-
/* @__PURE__ */
|
|
25005
|
-
/* @__PURE__ */
|
|
25168
|
+
/* @__PURE__ */ jsx31("div", { className: "shrink-0 px-2 py-1.5", children: /* @__PURE__ */ jsxs17(Popover, { children: [
|
|
25169
|
+
/* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
25006
25170
|
Button,
|
|
25007
25171
|
{
|
|
25008
25172
|
type: "button",
|
|
@@ -25011,7 +25175,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25011
25175
|
title: labels.agentConfig,
|
|
25012
25176
|
disabled: previewMode,
|
|
25013
25177
|
children: [
|
|
25014
|
-
/* @__PURE__ */
|
|
25178
|
+
/* @__PURE__ */ jsx31(
|
|
25015
25179
|
EnvironmentLinedIcon,
|
|
25016
25180
|
{
|
|
25017
25181
|
"aria-hidden": "true",
|
|
@@ -25019,11 +25183,11 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25019
25183
|
height: 16
|
|
25020
25184
|
}
|
|
25021
25185
|
),
|
|
25022
|
-
/* @__PURE__ */
|
|
25186
|
+
/* @__PURE__ */ jsx31("span", { children: labels.agentConfig })
|
|
25023
25187
|
]
|
|
25024
25188
|
}
|
|
25025
25189
|
) }),
|
|
25026
|
-
/* @__PURE__ */
|
|
25190
|
+
/* @__PURE__ */ jsx31(
|
|
25027
25191
|
PopoverContent,
|
|
25028
25192
|
{
|
|
25029
25193
|
side: "top",
|
|
@@ -25033,8 +25197,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25033
25197
|
children: /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
25034
25198
|
slashStatusLimits.length > 0 ? /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
25035
25199
|
/* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
25036
|
-
/* @__PURE__ */
|
|
25037
|
-
slashStatusLimits.map((limit) => /* @__PURE__ */
|
|
25200
|
+
/* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
|
|
25201
|
+
slashStatusLimits.map((limit) => /* @__PURE__ */ jsx31(
|
|
25038
25202
|
AgentUsageMeter,
|
|
25039
25203
|
{
|
|
25040
25204
|
label: limit.label,
|
|
@@ -25044,19 +25208,19 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25044
25208
|
limit.id
|
|
25045
25209
|
))
|
|
25046
25210
|
] }),
|
|
25047
|
-
/* @__PURE__ */
|
|
25211
|
+
/* @__PURE__ */ jsx31("span", { className: "h-px bg-[var(--border-1)]" })
|
|
25048
25212
|
] }) : null,
|
|
25049
25213
|
/* @__PURE__ */ jsxs17(
|
|
25050
25214
|
"button",
|
|
25051
25215
|
{
|
|
25052
25216
|
type: "button",
|
|
25053
25217
|
"data-testid": "agent-gui-config-env-setup",
|
|
25054
|
-
className: "nodrag -mx-1 flex w-[calc(100%+0.5rem)] items-center gap-2 rounded-[6px] px-2 py-1 text-[13px] text-
|
|
25218
|
+
className: "nodrag -mx-1 flex w-[calc(100%+0.5rem)] items-center gap-2 rounded-[6px] px-2 py-1 text-[13px] text-white transition-colors hover:bg-background-hover hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:text-white/50 [-webkit-app-region:no-drag]",
|
|
25055
25219
|
disabled: previewMode,
|
|
25056
25220
|
onClick: () => onOpenAgentEnvSetup(),
|
|
25057
25221
|
children: [
|
|
25058
|
-
/* @__PURE__ */
|
|
25059
|
-
/* @__PURE__ */
|
|
25222
|
+
/* @__PURE__ */ jsx31(Wrench, { "aria-hidden": "true", size: 16, strokeWidth: 1.8 }),
|
|
25223
|
+
/* @__PURE__ */ jsx31("span", { children: labels.agentEnvSetup })
|
|
25060
25224
|
]
|
|
25061
25225
|
}
|
|
25062
25226
|
)
|
|
@@ -25064,7 +25228,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25064
25228
|
}
|
|
25065
25229
|
)
|
|
25066
25230
|
] }) }),
|
|
25067
|
-
/* @__PURE__ */
|
|
25231
|
+
/* @__PURE__ */ jsx31(
|
|
25068
25232
|
ConfirmationDialog,
|
|
25069
25233
|
{
|
|
25070
25234
|
cancelLabel: labels.cancel,
|
|
@@ -25187,7 +25351,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25187
25351
|
"aria-expanded": !isSectionCollapsed,
|
|
25188
25352
|
onClick: () => onToggleProjectSectionCollapsed(section.id),
|
|
25189
25353
|
children: [
|
|
25190
|
-
/* @__PURE__ */
|
|
25354
|
+
/* @__PURE__ */ jsx31(
|
|
25191
25355
|
ChevronRight2,
|
|
25192
25356
|
{
|
|
25193
25357
|
"aria-hidden": "true",
|
|
@@ -25195,20 +25359,20 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25195
25359
|
}
|
|
25196
25360
|
),
|
|
25197
25361
|
/* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: [
|
|
25198
|
-
/* @__PURE__ */
|
|
25362
|
+
/* @__PURE__ */ jsx31(
|
|
25199
25363
|
FolderIcon2,
|
|
25200
25364
|
{
|
|
25201
25365
|
"aria-hidden": "true",
|
|
25202
25366
|
className: AgentGUINode_styles_default.conversationSectionLabelIcon
|
|
25203
25367
|
}
|
|
25204
25368
|
),
|
|
25205
|
-
/* @__PURE__ */
|
|
25369
|
+
/* @__PURE__ */ jsx31("span", { children: section.label })
|
|
25206
25370
|
] })
|
|
25207
25371
|
]
|
|
25208
25372
|
}
|
|
25209
|
-
) : /* @__PURE__ */
|
|
25373
|
+
) : /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx31("span", { children: section.label }) }) }),
|
|
25210
25374
|
canCreateConversationFromSection ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionActions, children: [
|
|
25211
|
-
previewMode ? /* @__PURE__ */
|
|
25375
|
+
previewMode ? /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx31(
|
|
25212
25376
|
BareIconButton,
|
|
25213
25377
|
{
|
|
25214
25378
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -25216,14 +25380,14 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25216
25380
|
size: "sm",
|
|
25217
25381
|
disabled: createConversationDisabled,
|
|
25218
25382
|
onClick: handleCreateConversation,
|
|
25219
|
-
children: /* @__PURE__ */
|
|
25383
|
+
children: /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" })
|
|
25220
25384
|
}
|
|
25221
25385
|
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
25222
|
-
/* @__PURE__ */
|
|
25386
|
+
/* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
25223
25387
|
"span",
|
|
25224
25388
|
{
|
|
25225
25389
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25226
|
-
children: /* @__PURE__ */
|
|
25390
|
+
children: /* @__PURE__ */ jsx31(
|
|
25227
25391
|
BareIconButton,
|
|
25228
25392
|
{
|
|
25229
25393
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -25231,12 +25395,12 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25231
25395
|
size: "sm",
|
|
25232
25396
|
disabled: createConversationDisabled,
|
|
25233
25397
|
onClick: handleCreateConversation,
|
|
25234
|
-
children: /* @__PURE__ */
|
|
25398
|
+
children: /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" })
|
|
25235
25399
|
}
|
|
25236
25400
|
)
|
|
25237
25401
|
}
|
|
25238
25402
|
) }),
|
|
25239
|
-
/* @__PURE__ */
|
|
25403
|
+
/* @__PURE__ */ jsx31(
|
|
25240
25404
|
TooltipContent3,
|
|
25241
25405
|
{
|
|
25242
25406
|
side: "top",
|
|
@@ -25247,37 +25411,37 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25247
25411
|
)
|
|
25248
25412
|
] }),
|
|
25249
25413
|
projectPath ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
|
|
25250
|
-
previewMode ? /* @__PURE__ */
|
|
25414
|
+
previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
25251
25415
|
"span",
|
|
25252
25416
|
{
|
|
25253
25417
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25254
|
-
children: /* @__PURE__ */
|
|
25418
|
+
children: /* @__PURE__ */ jsx31(
|
|
25255
25419
|
BareIconButton,
|
|
25256
25420
|
{
|
|
25257
25421
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25258
25422
|
"aria-label": labels.projectSectionMoreActions,
|
|
25259
25423
|
size: "sm",
|
|
25260
|
-
children: /* @__PURE__ */
|
|
25424
|
+
children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25261
25425
|
}
|
|
25262
25426
|
)
|
|
25263
25427
|
}
|
|
25264
25428
|
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
25265
|
-
/* @__PURE__ */
|
|
25429
|
+
/* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
25266
25430
|
"span",
|
|
25267
25431
|
{
|
|
25268
25432
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25269
|
-
children: /* @__PURE__ */
|
|
25433
|
+
children: /* @__PURE__ */ jsx31(
|
|
25270
25434
|
BareIconButton,
|
|
25271
25435
|
{
|
|
25272
25436
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25273
25437
|
"aria-label": labels.projectSectionMoreActions,
|
|
25274
25438
|
size: "sm",
|
|
25275
|
-
children: /* @__PURE__ */
|
|
25439
|
+
children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25276
25440
|
}
|
|
25277
25441
|
)
|
|
25278
25442
|
}
|
|
25279
25443
|
) }) }),
|
|
25280
|
-
/* @__PURE__ */
|
|
25444
|
+
/* @__PURE__ */ jsx31(
|
|
25281
25445
|
TooltipContent3,
|
|
25282
25446
|
{
|
|
25283
25447
|
side: "right",
|
|
@@ -25294,7 +25458,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25294
25458
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
25295
25459
|
sideOffset: 6,
|
|
25296
25460
|
children: [
|
|
25297
|
-
/* @__PURE__ */
|
|
25461
|
+
/* @__PURE__ */ jsx31(
|
|
25298
25462
|
DropdownMenuItem,
|
|
25299
25463
|
{
|
|
25300
25464
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -25309,10 +25473,10 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25309
25473
|
workspaceRoot: projectPath
|
|
25310
25474
|
});
|
|
25311
25475
|
},
|
|
25312
|
-
children: /* @__PURE__ */
|
|
25476
|
+
children: /* @__PURE__ */ jsx31("span", { children: labels.projectSectionViewFiles })
|
|
25313
25477
|
}
|
|
25314
25478
|
),
|
|
25315
|
-
projectConversationCount > 0 ? /* @__PURE__ */
|
|
25479
|
+
projectConversationCount > 0 ? /* @__PURE__ */ jsx31(
|
|
25316
25480
|
DropdownMenuItem,
|
|
25317
25481
|
{
|
|
25318
25482
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -25325,10 +25489,10 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25325
25489
|
path: projectPath
|
|
25326
25490
|
});
|
|
25327
25491
|
},
|
|
25328
|
-
children: /* @__PURE__ */
|
|
25492
|
+
children: /* @__PURE__ */ jsx31("span", { children: labels.batchDeleteProjectSessions })
|
|
25329
25493
|
}
|
|
25330
25494
|
) : null,
|
|
25331
|
-
/* @__PURE__ */
|
|
25495
|
+
/* @__PURE__ */ jsx31(
|
|
25332
25496
|
DropdownMenuItem,
|
|
25333
25497
|
{
|
|
25334
25498
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -25340,7 +25504,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25340
25504
|
path: projectPath
|
|
25341
25505
|
});
|
|
25342
25506
|
},
|
|
25343
|
-
children: /* @__PURE__ */
|
|
25507
|
+
children: /* @__PURE__ */ jsx31("span", { children: labels.removeProject })
|
|
25344
25508
|
}
|
|
25345
25509
|
)
|
|
25346
25510
|
]
|
|
@@ -25348,37 +25512,37 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25348
25512
|
)
|
|
25349
25513
|
] }) : null,
|
|
25350
25514
|
!projectPath && section.kind === "conversations" && section.items.length > 0 ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
|
|
25351
|
-
previewMode ? /* @__PURE__ */
|
|
25515
|
+
previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
25352
25516
|
"span",
|
|
25353
25517
|
{
|
|
25354
25518
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25355
|
-
children: /* @__PURE__ */
|
|
25519
|
+
children: /* @__PURE__ */ jsx31(
|
|
25356
25520
|
BareIconButton,
|
|
25357
25521
|
{
|
|
25358
25522
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25359
25523
|
"aria-label": labels.conversationsSectionMoreActions,
|
|
25360
25524
|
size: "sm",
|
|
25361
|
-
children: /* @__PURE__ */
|
|
25525
|
+
children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25362
25526
|
}
|
|
25363
25527
|
)
|
|
25364
25528
|
}
|
|
25365
25529
|
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
25366
|
-
/* @__PURE__ */
|
|
25530
|
+
/* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
25367
25531
|
"span",
|
|
25368
25532
|
{
|
|
25369
25533
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25370
|
-
children: /* @__PURE__ */
|
|
25534
|
+
children: /* @__PURE__ */ jsx31(
|
|
25371
25535
|
BareIconButton,
|
|
25372
25536
|
{
|
|
25373
25537
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25374
25538
|
"aria-label": labels.conversationsSectionMoreActions,
|
|
25375
25539
|
size: "sm",
|
|
25376
|
-
children: /* @__PURE__ */
|
|
25540
|
+
children: /* @__PURE__ */ jsx31(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25377
25541
|
}
|
|
25378
25542
|
)
|
|
25379
25543
|
}
|
|
25380
25544
|
) }) }),
|
|
25381
|
-
/* @__PURE__ */
|
|
25545
|
+
/* @__PURE__ */ jsx31(
|
|
25382
25546
|
TooltipContent3,
|
|
25383
25547
|
{
|
|
25384
25548
|
side: "right",
|
|
@@ -25388,13 +25552,13 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25388
25552
|
}
|
|
25389
25553
|
)
|
|
25390
25554
|
] }),
|
|
25391
|
-
/* @__PURE__ */
|
|
25555
|
+
/* @__PURE__ */ jsx31(
|
|
25392
25556
|
DropdownMenuContent,
|
|
25393
25557
|
{
|
|
25394
25558
|
align: "end",
|
|
25395
25559
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
25396
25560
|
sideOffset: 6,
|
|
25397
|
-
children: /* @__PURE__ */
|
|
25561
|
+
children: /* @__PURE__ */ jsx31(
|
|
25398
25562
|
DropdownMenuItem,
|
|
25399
25563
|
{
|
|
25400
25564
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -25406,7 +25570,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25406
25570
|
sessionIds: section.items.map((item) => item.id)
|
|
25407
25571
|
});
|
|
25408
25572
|
},
|
|
25409
|
-
children: /* @__PURE__ */
|
|
25573
|
+
children: /* @__PURE__ */ jsx31("span", { children: labels.batchDeleteConversations })
|
|
25410
25574
|
}
|
|
25411
25575
|
)
|
|
25412
25576
|
}
|
|
@@ -25414,14 +25578,14 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25414
25578
|
] }) : null
|
|
25415
25579
|
] }) : null
|
|
25416
25580
|
] }),
|
|
25417
|
-
/* @__PURE__ */
|
|
25581
|
+
/* @__PURE__ */ jsx31(
|
|
25418
25582
|
"div",
|
|
25419
25583
|
{
|
|
25420
25584
|
className: AgentGUINode_styles_default.conversationSectionItems,
|
|
25421
25585
|
"aria-hidden": isSectionCollapsed ? "true" : void 0,
|
|
25422
25586
|
children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
|
|
25423
|
-
!isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */
|
|
25424
|
-
visibleItems.map((item) => /* @__PURE__ */
|
|
25587
|
+
!isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
|
|
25588
|
+
visibleItems.map((item) => /* @__PURE__ */ jsx31(
|
|
25425
25589
|
AgentGUIConversationRailItem,
|
|
25426
25590
|
{
|
|
25427
25591
|
active: item.id === activeConversationId,
|
|
@@ -25443,7 +25607,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25443
25607
|
item.id
|
|
25444
25608
|
)),
|
|
25445
25609
|
canShowMore || canShowLess ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
|
|
25446
|
-
canShowMore ? /* @__PURE__ */
|
|
25610
|
+
canShowMore ? /* @__PURE__ */ jsx31(
|
|
25447
25611
|
"button",
|
|
25448
25612
|
{
|
|
25449
25613
|
type: "button",
|
|
@@ -25452,7 +25616,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25452
25616
|
children: labels.showMoreConversations
|
|
25453
25617
|
}
|
|
25454
25618
|
) : null,
|
|
25455
|
-
canShowLess ? /* @__PURE__ */
|
|
25619
|
+
canShowLess ? /* @__PURE__ */ jsx31(
|
|
25456
25620
|
"button",
|
|
25457
25621
|
{
|
|
25458
25622
|
type: "button",
|
|
@@ -25531,12 +25695,12 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25531
25695
|
className: AgentGUINode_styles_default.conversationSelect,
|
|
25532
25696
|
onClick: handleSelect,
|
|
25533
25697
|
children: [
|
|
25534
|
-
/* @__PURE__ */
|
|
25535
|
-
/* @__PURE__ */
|
|
25698
|
+
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationTitle, children: conversationPlainTitle(item, labels, uiLanguage) }),
|
|
25699
|
+
/* @__PURE__ */ jsx31(ConversationMeta, { item, nowMs: currentTimeMs, labels })
|
|
25536
25700
|
]
|
|
25537
25701
|
}
|
|
25538
25702
|
),
|
|
25539
|
-
previewMode ? null : /* @__PURE__ */
|
|
25703
|
+
previewMode ? null : /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationActions, children: isPendingDeleteConversation ? /* @__PURE__ */ jsx31(
|
|
25540
25704
|
"button",
|
|
25541
25705
|
{
|
|
25542
25706
|
type: "button",
|
|
@@ -25548,10 +25712,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25548
25712
|
event.stopPropagation();
|
|
25549
25713
|
onConfirmDeleteConversation();
|
|
25550
25714
|
},
|
|
25551
|
-
children: /* @__PURE__ */
|
|
25715
|
+
children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
|
|
25552
25716
|
}
|
|
25553
25717
|
) : /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
25554
|
-
onOpenConversationWindow ? /* @__PURE__ */
|
|
25718
|
+
onOpenConversationWindow ? /* @__PURE__ */ jsx31(
|
|
25555
25719
|
BareIconButton,
|
|
25556
25720
|
{
|
|
25557
25721
|
className: AgentGUINode_styles_default.conversationOpenWindowButton,
|
|
@@ -25568,10 +25732,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25568
25732
|
event.stopPropagation();
|
|
25569
25733
|
handleOpenConversationWindow();
|
|
25570
25734
|
},
|
|
25571
|
-
children: /* @__PURE__ */
|
|
25735
|
+
children: /* @__PURE__ */ jsx31(ExternalLink, { "aria-hidden": "true" })
|
|
25572
25736
|
}
|
|
25573
25737
|
) : null,
|
|
25574
|
-
/* @__PURE__ */
|
|
25738
|
+
/* @__PURE__ */ jsx31(
|
|
25575
25739
|
BareIconButton,
|
|
25576
25740
|
{
|
|
25577
25741
|
className: AgentGUINode_styles_default.conversationPinButton,
|
|
@@ -25588,10 +25752,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25588
25752
|
event.stopPropagation();
|
|
25589
25753
|
handleTogglePinned();
|
|
25590
25754
|
},
|
|
25591
|
-
children: pinned ? /* @__PURE__ */
|
|
25755
|
+
children: pinned ? /* @__PURE__ */ jsx31(PinFilledIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx31(PinLinedIcon, { "aria-hidden": "true" })
|
|
25592
25756
|
}
|
|
25593
25757
|
),
|
|
25594
|
-
/* @__PURE__ */
|
|
25758
|
+
/* @__PURE__ */ jsx31(
|
|
25595
25759
|
BareIconButton,
|
|
25596
25760
|
{
|
|
25597
25761
|
className: AgentGUINode_styles_default.conversationDeleteButton,
|
|
@@ -25608,7 +25772,7 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25608
25772
|
event.stopPropagation();
|
|
25609
25773
|
handleRequestDelete();
|
|
25610
25774
|
},
|
|
25611
|
-
children: /* @__PURE__ */
|
|
25775
|
+
children: /* @__PURE__ */ jsx31(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
25612
25776
|
}
|
|
25613
25777
|
)
|
|
25614
25778
|
] }) })
|
|
@@ -25636,9 +25800,9 @@ function AgentGUIProjectRailHeader({
|
|
|
25636
25800
|
]
|
|
25637
25801
|
);
|
|
25638
25802
|
return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
|
|
25639
|
-
/* @__PURE__ */
|
|
25803
|
+
/* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx31("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
|
|
25640
25804
|
/* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailAddProject, children: [
|
|
25641
|
-
/* @__PURE__ */
|
|
25805
|
+
/* @__PURE__ */ jsx31(
|
|
25642
25806
|
WorkspaceUserProjectSelect2,
|
|
25643
25807
|
{
|
|
25644
25808
|
api: userProjectApi,
|
|
@@ -25668,7 +25832,7 @@ function AgentGUIProjectRailHeader({
|
|
|
25668
25832
|
"projectSelect.addProject"
|
|
25669
25833
|
])
|
|
25670
25834
|
},
|
|
25671
|
-
renderAddProjectIcon: () => /* @__PURE__ */
|
|
25835
|
+
renderAddProjectIcon: () => /* @__PURE__ */ jsx31(
|
|
25672
25836
|
NewWorkspaceLinedIcon2,
|
|
25673
25837
|
{
|
|
25674
25838
|
"aria-hidden": true,
|
|
@@ -25686,7 +25850,7 @@ function AgentGUIProjectRailHeader({
|
|
|
25686
25850
|
}
|
|
25687
25851
|
}
|
|
25688
25852
|
),
|
|
25689
|
-
/* @__PURE__ */
|
|
25853
|
+
/* @__PURE__ */ jsx31(
|
|
25690
25854
|
NewWorkspaceLinedIcon2,
|
|
25691
25855
|
{
|
|
25692
25856
|
"aria-hidden": true,
|
|
@@ -25712,16 +25876,16 @@ var AgentGUIConversationTimelinePane = memo(
|
|
|
25712
25876
|
}) {
|
|
25713
25877
|
"use memo";
|
|
25714
25878
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
25715
|
-
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */
|
|
25879
|
+
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx31(
|
|
25716
25880
|
"div",
|
|
25717
25881
|
{
|
|
25718
25882
|
className: "mx-auto flex h-8 items-center justify-center text-[12px] text-[var(--text-secondary)]",
|
|
25719
25883
|
"data-testid": "agent-gui-older-messages-loading",
|
|
25720
25884
|
role: "status",
|
|
25721
|
-
children: /* @__PURE__ */
|
|
25885
|
+
children: /* @__PURE__ */ jsx31("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
|
|
25722
25886
|
}
|
|
25723
25887
|
) : null,
|
|
25724
|
-
/* @__PURE__ */
|
|
25888
|
+
/* @__PURE__ */ jsx31(
|
|
25725
25889
|
AgentConversationFlow,
|
|
25726
25890
|
{
|
|
25727
25891
|
conversation,
|
|
@@ -25942,7 +26106,7 @@ import {
|
|
|
25942
26106
|
useState as useState13
|
|
25943
26107
|
} from "react";
|
|
25944
26108
|
import { createPortal as createPortal4 } from "react-dom";
|
|
25945
|
-
import { Fragment as Fragment9, jsx as
|
|
26109
|
+
import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
25946
26110
|
var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
|
|
25947
26111
|
var POPOVER_DEFAULT_WIDTH_PX = 260;
|
|
25948
26112
|
function dockAgentProbeLineKey(line) {
|
|
@@ -25956,7 +26120,7 @@ function renderDockAgentProbeLine(line) {
|
|
|
25956
26120
|
line.primary,
|
|
25957
26121
|
line.secondary ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
25958
26122
|
" ",
|
|
25959
|
-
/* @__PURE__ */
|
|
26123
|
+
/* @__PURE__ */ jsx32("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
|
|
25960
26124
|
] }) : null
|
|
25961
26125
|
] });
|
|
25962
26126
|
}
|
|
@@ -26033,7 +26197,7 @@ function AgentProbeInfoPopover({
|
|
|
26033
26197
|
if (lines.length === 0) {
|
|
26034
26198
|
return null;
|
|
26035
26199
|
}
|
|
26036
|
-
const popover = /* @__PURE__ */
|
|
26200
|
+
const popover = /* @__PURE__ */ jsx32(
|
|
26037
26201
|
"div",
|
|
26038
26202
|
{
|
|
26039
26203
|
ref: popoverRef,
|
|
@@ -26042,7 +26206,7 @@ function AgentProbeInfoPopover({
|
|
|
26042
26206
|
style: popoverStyle ?? void 0,
|
|
26043
26207
|
onMouseEnter: () => setIsOpen(true),
|
|
26044
26208
|
onMouseLeave: closeIfPointerLeavesPopover,
|
|
26045
|
-
children: /* @__PURE__ */
|
|
26209
|
+
children: /* @__PURE__ */ jsx32("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
|
|
26046
26210
|
const label = getDockAgentProbeLineLabel(line);
|
|
26047
26211
|
const valueText = formatDockAgentProbeLineText(line);
|
|
26048
26212
|
return /* @__PURE__ */ jsxs18(
|
|
@@ -26051,8 +26215,8 @@ function AgentProbeInfoPopover({
|
|
|
26051
26215
|
className: "desktop-dock-popup__agent-info-item",
|
|
26052
26216
|
"data-has-label": label ? "true" : "false",
|
|
26053
26217
|
children: [
|
|
26054
|
-
label ? /* @__PURE__ */
|
|
26055
|
-
/* @__PURE__ */
|
|
26218
|
+
label ? /* @__PURE__ */ jsx32("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
|
|
26219
|
+
/* @__PURE__ */ jsx32(
|
|
26056
26220
|
"span",
|
|
26057
26221
|
{
|
|
26058
26222
|
className: "desktop-dock-popup__agent-info-value",
|
|
@@ -26087,7 +26251,7 @@ function AgentProbeInfoPopover({
|
|
|
26087
26251
|
},
|
|
26088
26252
|
onBlur: () => setIsOpen(false),
|
|
26089
26253
|
children: [
|
|
26090
|
-
/* @__PURE__ */
|
|
26254
|
+
/* @__PURE__ */ jsx32(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
|
|
26091
26255
|
isOpen ? createPortal4(popover, document.body) : null
|
|
26092
26256
|
]
|
|
26093
26257
|
}
|
|
@@ -26230,7 +26394,7 @@ function getAgentHostManagedToolchainAgentByName(name) {
|
|
|
26230
26394
|
}
|
|
26231
26395
|
|
|
26232
26396
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
26233
|
-
import { jsx as
|
|
26397
|
+
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
26234
26398
|
var workspaceFileReferenceLocaleKeyByPickerKey = {
|
|
26235
26399
|
"actions.cancel": "common.cancel",
|
|
26236
26400
|
"referencePicker.confirm": "agentHost.agentGui.referencePicker.confirm",
|
|
@@ -26432,7 +26596,7 @@ function composerOverridesByProviderEqual(left, right) {
|
|
|
26432
26596
|
return true;
|
|
26433
26597
|
}
|
|
26434
26598
|
function areAgentGUINodePropsEqual(previous, next) {
|
|
26435
|
-
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && workspaceAgentProbeRenderStateEqualsForProvider(
|
|
26599
|
+
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && workspaceAgentProbeRenderStateEqualsForProvider(
|
|
26436
26600
|
previous.workspaceAgentProbes,
|
|
26437
26601
|
next.workspaceAgentProbes,
|
|
26438
26602
|
previous.state.provider
|
|
@@ -26446,7 +26610,9 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26446
26610
|
workspaceFileReferenceAdapter = null,
|
|
26447
26611
|
onRequestGitBranches = null,
|
|
26448
26612
|
selectProjectDirectory,
|
|
26613
|
+
resolveDroppedFileReferences = null,
|
|
26449
26614
|
referenceSourceAggregator = null,
|
|
26615
|
+
resolveWorkspaceReferenceEntryIconUrl,
|
|
26450
26616
|
resolveMentionReferenceTarget = null,
|
|
26451
26617
|
resolveWorkspaceReferenceInitialTarget = null,
|
|
26452
26618
|
agentSettings,
|
|
@@ -26886,6 +27052,11 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26886
27052
|
id: "bypassPermissions",
|
|
26887
27053
|
label: t("agentHost.agentGui.planModes.allowAll.label"),
|
|
26888
27054
|
description: t("agentHost.agentGui.planModes.allowAll.description")
|
|
27055
|
+
},
|
|
27056
|
+
{
|
|
27057
|
+
id: "auto",
|
|
27058
|
+
label: t("agentHost.agentGui.planModes.auto.label"),
|
|
27059
|
+
description: t("agentHost.agentGui.planModes.auto.description")
|
|
26889
27060
|
}
|
|
26890
27061
|
],
|
|
26891
27062
|
stayInPlan: t("agentHost.agentGui.stayInPlan"),
|
|
@@ -27208,13 +27379,13 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27208
27379
|
onAgentProbeDemandChange(null, probeSourceId);
|
|
27209
27380
|
};
|
|
27210
27381
|
}, [activeProbeProvider, nodeId, onAgentProbeDemandChange, previewMode]);
|
|
27211
|
-
return /* @__PURE__ */
|
|
27382
|
+
return /* @__PURE__ */ jsx33(
|
|
27212
27383
|
WorkspaceNodeWindow,
|
|
27213
27384
|
{
|
|
27214
27385
|
nodeId,
|
|
27215
27386
|
kind: "agentGui",
|
|
27216
27387
|
title: windowTitle,
|
|
27217
|
-
titleIcon: windowTitleIconUrl ? /* @__PURE__ */
|
|
27388
|
+
titleIcon: windowTitleIconUrl ? /* @__PURE__ */ jsx33(
|
|
27218
27389
|
"img",
|
|
27219
27390
|
{
|
|
27220
27391
|
src: windowTitleIconUrl,
|
|
@@ -27235,7 +27406,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27235
27406
|
bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
|
|
27236
27407
|
hideHeader: embedded,
|
|
27237
27408
|
titleAccessory: /* @__PURE__ */ jsxs19("span", { className: "inline-flex flex-none items-center gap-1", children: [
|
|
27238
|
-
/* @__PURE__ */
|
|
27409
|
+
/* @__PURE__ */ jsx33(
|
|
27239
27410
|
AgentProbeInfoPopover,
|
|
27240
27411
|
{
|
|
27241
27412
|
lines: agentProbeLines,
|
|
@@ -27243,7 +27414,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27243
27414
|
className: AgentGUINode_styles_default.windowAgentInfo
|
|
27244
27415
|
}
|
|
27245
27416
|
),
|
|
27246
|
-
/* @__PURE__ */
|
|
27417
|
+
/* @__PURE__ */ jsx33(
|
|
27247
27418
|
CanvasNodeGhostIconButton,
|
|
27248
27419
|
{
|
|
27249
27420
|
"aria-label": isConversationRailCollapsed ? t("agentHost.agentGui.expandConversationRail") : t("agentHost.agentGui.collapseConversationRail"),
|
|
@@ -27255,7 +27426,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27255
27426
|
event.stopPropagation();
|
|
27256
27427
|
handleConversationRailToggle();
|
|
27257
27428
|
},
|
|
27258
|
-
children: /* @__PURE__ */
|
|
27429
|
+
children: /* @__PURE__ */ jsx33(
|
|
27259
27430
|
CanvasNodePanelLinedIcon,
|
|
27260
27431
|
{
|
|
27261
27432
|
width: 18,
|
|
@@ -27276,7 +27447,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27276
27447
|
children: (renderFrame) => {
|
|
27277
27448
|
const renderedWidth = renderFrame.size.width;
|
|
27278
27449
|
const isRenderedConversationRailCollapsed = isConversationRailCollapsed || shouldAutoCollapseAgentGUIConversationRail(renderedWidth);
|
|
27279
|
-
return /* @__PURE__ */
|
|
27450
|
+
return /* @__PURE__ */ jsx33(
|
|
27280
27451
|
AgentGUINodeView,
|
|
27281
27452
|
{
|
|
27282
27453
|
viewModel,
|
|
@@ -27304,6 +27475,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27304
27475
|
detailMinWidthPx: AGENT_GUI_DETAIL_MIN_WIDTH_PX,
|
|
27305
27476
|
uiLanguage: locale,
|
|
27306
27477
|
onWorkspaceFileReferencesAdded: onWorkspaceFileReferencesAdded ? handleWorkspaceFileReferencesAdded : void 0,
|
|
27478
|
+
resolveDroppedFileReferences,
|
|
27307
27479
|
onConversationRailWidthChanged: handleConversationRailWidthChanged,
|
|
27308
27480
|
labels,
|
|
27309
27481
|
workspaceUserProjectI18n,
|
|
@@ -27313,6 +27485,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27313
27485
|
onRequestGitBranches,
|
|
27314
27486
|
selectProjectDirectory,
|
|
27315
27487
|
referenceSourceAggregator,
|
|
27488
|
+
resolveWorkspaceReferenceEntryIconUrl,
|
|
27316
27489
|
resolveMentionReferenceTarget,
|
|
27317
27490
|
resolveWorkspaceReferenceInitialTarget,
|
|
27318
27491
|
workspaceFileReferenceCopy,
|
|
@@ -27326,23 +27499,24 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27326
27499
|
}, areAgentGUINodePropsEqual);
|
|
27327
27500
|
|
|
27328
27501
|
// AgentGUI.tsx
|
|
27329
|
-
import { jsx as
|
|
27502
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
27330
27503
|
var AgentGUI = memo3(function AgentGUI2({
|
|
27331
27504
|
agentActivityRuntime,
|
|
27505
|
+
agentQueuedPromptRuntime,
|
|
27332
27506
|
agentHostApi,
|
|
27333
27507
|
i18n,
|
|
27334
27508
|
locale,
|
|
27335
27509
|
...props
|
|
27336
27510
|
}) {
|
|
27337
|
-
const content = /* @__PURE__ */
|
|
27511
|
+
const content = /* @__PURE__ */ jsx34(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx34(
|
|
27338
27512
|
AgentActivityHostProvider,
|
|
27339
27513
|
{
|
|
27340
27514
|
agentActivityRuntime,
|
|
27341
27515
|
agentHostApi,
|
|
27342
|
-
children: /* @__PURE__ */
|
|
27516
|
+
children: /* @__PURE__ */ jsx34(AgentQueuedPromptRuntimeProvider, { runtime: agentQueuedPromptRuntime, children: /* @__PURE__ */ jsx34(AgentGUINode, { ...props }) })
|
|
27343
27517
|
}
|
|
27344
27518
|
) });
|
|
27345
|
-
return props.previewMode ? content : /* @__PURE__ */
|
|
27519
|
+
return props.previewMode ? content : /* @__PURE__ */ jsx34(TooltipProvider3, { delayDuration: 120, skipDelayDuration: 0, children: content });
|
|
27346
27520
|
});
|
|
27347
27521
|
|
|
27348
27522
|
// index.ts
|
|
@@ -27356,6 +27530,7 @@ export {
|
|
|
27356
27530
|
AgentActivityRuntimeProvider,
|
|
27357
27531
|
AgentGUI,
|
|
27358
27532
|
AgentGuiI18nProvider,
|
|
27533
|
+
AgentQueuedPromptRuntimeProvider,
|
|
27359
27534
|
agentGUIDefaultTargetProviders,
|
|
27360
27535
|
agentGuiDockIconUrl,
|
|
27361
27536
|
agentGuiDockIconUrls,
|
|
@@ -27363,6 +27538,7 @@ export {
|
|
|
27363
27538
|
agentGuiI18nResources,
|
|
27364
27539
|
agentHostSnapshotFromAgentActivitySnapshot,
|
|
27365
27540
|
buildAgentActivitySnapshotProjection,
|
|
27541
|
+
createAgentQueuedPromptRuntime,
|
|
27366
27542
|
createLocalAgentGUIProviderTarget,
|
|
27367
27543
|
createLocalAgentGUIProviderTargets,
|
|
27368
27544
|
getAgentActivityRuntime,
|
|
@@ -27372,14 +27548,18 @@ export {
|
|
|
27372
27548
|
preloadAgentMentionBrowse,
|
|
27373
27549
|
projectCoreSessionStatus,
|
|
27374
27550
|
resetAgentActivityRuntimeForTests,
|
|
27551
|
+
resetAgentQueuedPromptRuntimeForTests,
|
|
27375
27552
|
resolveAgentGUIExpandedWindowFrame,
|
|
27376
27553
|
resolveAgentGUIProviderTarget,
|
|
27377
27554
|
selectNeedsAttentionCount2 as selectNeedsAttentionCount,
|
|
27378
27555
|
selectNeedsAttentionItems2 as selectNeedsAttentionItems,
|
|
27379
27556
|
setAgentActivityRuntimeForTests,
|
|
27557
|
+
setAgentQueuedPromptRuntimeForTests,
|
|
27380
27558
|
shouldAutoCollapseAgentGUIConversationRail,
|
|
27381
27559
|
useAgentActivityRuntime,
|
|
27382
27560
|
useAgentActivitySnapshot,
|
|
27561
|
+
useAgentQueuedPromptRuntime,
|
|
27562
|
+
useAgentQueuedPromptSessionSnapshot,
|
|
27383
27563
|
useOptionalAgentActivityRuntime
|
|
27384
27564
|
};
|
|
27385
27565
|
//# sourceMappingURL=index.js.map
|