@tutti-os/agent-gui 0.0.69 → 0.0.71
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/README.md +8 -5
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.js +8 -8
- package/dist/{agentGuiNodeTypes-BipgG2ib.d.ts → agentGuiNodeTypes-C0oBQn-F.d.ts} +1 -6
- package/dist/app/renderer/agentactivity.css +168 -0
- package/dist/{chunk-KAPBUKIT.js → chunk-DGNKXT3Q.js} +3 -115
- package/dist/chunk-DGNKXT3Q.js.map +1 -0
- package/dist/{chunk-ERBUQOIL.js → chunk-DXENDZEF.js} +2 -2
- package/dist/{chunk-EHLJL76A.js → chunk-FTSEVC6O.js} +2 -2
- package/dist/{chunk-6XRTDIDR.js → chunk-ISQCYEUJ.js} +5 -5
- package/dist/{chunk-547R2HOD.js → chunk-IZX2YQXY.js} +3 -3
- package/dist/{chunk-ZZBLWZJR.js → chunk-KS35VKHM.js} +1 -2
- package/dist/chunk-KS35VKHM.js.map +1 -0
- package/dist/{chunk-HAKNLXW7.js → chunk-MVPSFOJZ.js} +2 -2
- package/dist/{chunk-S32FLJRP.js → chunk-QDWV5VTD.js} +5 -5
- package/dist/{chunk-JA6Z3QA7.js → chunk-QJ42HQ24.js} +4 -4
- package/dist/{chunk-NH3XBJTZ.js → chunk-SC3PS7AT.js} +2 -2
- package/dist/{chunk-KTIKZNGS.js → chunk-SG6A35BU.js} +2 -2
- package/dist/{chunk-DAPKF2SN.js → chunk-WWY6MYMU.js} +3 -3
- package/dist/{chunk-FRAG4UFU.js → chunk-Y3C5EHSW.js} +58 -14
- package/dist/chunk-Y3C5EHSW.js.map +1 -0
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +2 -114
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +112 -109
- package/dist/index.js +153 -38
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-DZ79b8Zn.d.ts → types-CrwMqBm1.d.ts} +4 -1
- package/dist/workbench/contribution.d.ts +9 -1
- package/dist/workbench/contribution.js +1 -1
- package/dist/workbench/index.d.ts +5 -2
- package/dist/workbench/index.js +4 -4
- package/dist/workbench/launch.d.ts +1 -1
- package/dist/workbench/providerCatalog.d.ts +1 -1
- package/dist/workbench/sessionTitle.d.ts +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.d.ts +1 -1
- package/dist/workbench/types.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +14 -14
- package/dist/chunk-FRAG4UFU.js.map +0 -1
- package/dist/chunk-KAPBUKIT.js.map +0 -1
- package/dist/chunk-ZZBLWZJR.js.map +0 -1
- /package/dist/{chunk-ERBUQOIL.js.map → chunk-DXENDZEF.js.map} +0 -0
- /package/dist/{chunk-EHLJL76A.js.map → chunk-FTSEVC6O.js.map} +0 -0
- /package/dist/{chunk-6XRTDIDR.js.map → chunk-ISQCYEUJ.js.map} +0 -0
- /package/dist/{chunk-547R2HOD.js.map → chunk-IZX2YQXY.js.map} +0 -0
- /package/dist/{chunk-HAKNLXW7.js.map → chunk-MVPSFOJZ.js.map} +0 -0
- /package/dist/{chunk-S32FLJRP.js.map → chunk-QDWV5VTD.js.map} +0 -0
- /package/dist/{chunk-JA6Z3QA7.js.map → chunk-QJ42HQ24.js.map} +0 -0
- /package/dist/{chunk-NH3XBJTZ.js.map → chunk-SC3PS7AT.js.map} +0 -0
- /package/dist/{chunk-KTIKZNGS.js.map → chunk-SG6A35BU.js.map} +0 -0
- /package/dist/{chunk-DAPKF2SN.js.map → chunk-WWY6MYMU.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
AgentInteractivePromptSurface,
|
|
28
28
|
approvalOptionDisplayLabel
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QJ42HQ24.js";
|
|
30
30
|
import {
|
|
31
31
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
32
32
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
resolveAgentGUIExplicitConversationTitle,
|
|
46
46
|
resolveAgentGUIProviderDisplayLabel,
|
|
47
47
|
resolveAgentGUIProviderIdentity
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SG6A35BU.js";
|
|
49
49
|
import {
|
|
50
50
|
AgentConversationFlow,
|
|
51
51
|
Button,
|
|
@@ -66,14 +66,14 @@ import {
|
|
|
66
66
|
skillTriggerForPrefix,
|
|
67
67
|
toLocalShortDateTime,
|
|
68
68
|
useProjectedAgentConversation
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-ISQCYEUJ.js";
|
|
70
70
|
import {
|
|
71
71
|
AgentMessageMarkdown,
|
|
72
72
|
AgentTargetPresentationProvider,
|
|
73
73
|
ZoomableImage,
|
|
74
74
|
cn,
|
|
75
75
|
resolveWorkspaceLinkAction
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-WWY6MYMU.js";
|
|
77
77
|
import {
|
|
78
78
|
openAgentEnvPanel
|
|
79
79
|
} from "./chunk-PSLAWU25.js";
|
|
@@ -84,12 +84,12 @@ import {
|
|
|
84
84
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
85
85
|
agentMentionItemKey,
|
|
86
86
|
preloadAgentMentionBrowse
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-QDWV5VTD.js";
|
|
88
88
|
import {
|
|
89
89
|
buildWorkspaceAgentActivityListViewModel,
|
|
90
90
|
isWorkspaceAgentUntitledTask
|
|
91
|
-
} from "./chunk-
|
|
92
|
-
import "./chunk-
|
|
91
|
+
} from "./chunk-DXENDZEF.js";
|
|
92
|
+
import "./chunk-MVPSFOJZ.js";
|
|
93
93
|
import {
|
|
94
94
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
95
95
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
mentionItemToAttrs,
|
|
101
101
|
normalizeAgentSessionMentionTitle,
|
|
102
102
|
parseMentionItemFromHref
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-IZX2YQXY.js";
|
|
104
104
|
import "./chunk-Y35GDLP2.js";
|
|
105
105
|
import "./chunk-LUGELG5V.js";
|
|
106
106
|
import {
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
useAgentHostApi,
|
|
125
125
|
useOptionalAgentActivityRuntime,
|
|
126
126
|
useOptionalAgentHostApi
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-KS35VKHM.js";
|
|
128
128
|
import {
|
|
129
129
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
130
130
|
createWorkspaceAgentActivityUserMessageIdFromClientSubmitId,
|
|
@@ -139,14 +139,14 @@ import {
|
|
|
139
139
|
agentGuiI18nResources,
|
|
140
140
|
translate,
|
|
141
141
|
useTranslation
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-SC3PS7AT.js";
|
|
143
143
|
import "./chunk-PJP5BUU6.js";
|
|
144
144
|
import {
|
|
145
145
|
agentColorfulUrl,
|
|
146
146
|
cursorColorfulUrl,
|
|
147
147
|
normalizeManagedAgentProvider
|
|
148
148
|
} from "./chunk-4I2VCAMW.js";
|
|
149
|
-
import "./chunk-
|
|
149
|
+
import "./chunk-DGNKXT3Q.js";
|
|
150
150
|
import {
|
|
151
151
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
152
152
|
} from "./chunk-JM24HADP.js";
|
|
@@ -6417,18 +6417,20 @@ function useAgentGUIActivation({
|
|
|
6417
6417
|
[agentSessionId]: null
|
|
6418
6418
|
}));
|
|
6419
6419
|
try {
|
|
6420
|
+
const agentTargetId = input.agentTargetId?.trim() ?? "";
|
|
6421
|
+
if (input.mode === "new" && !agentTargetId) {
|
|
6422
|
+
throw new Error("agent_target_required");
|
|
6423
|
+
}
|
|
6420
6424
|
const request = input.mode === "new" ? {
|
|
6421
6425
|
mode: input.mode,
|
|
6422
6426
|
workspaceId,
|
|
6423
6427
|
agentSessionId,
|
|
6424
|
-
agentTargetId
|
|
6425
|
-
provider: input.provider,
|
|
6428
|
+
agentTargetId,
|
|
6426
6429
|
cwd: input.cwd,
|
|
6427
6430
|
initialContent: input.initialContent,
|
|
6428
6431
|
initialDisplayPrompt: input.initialDisplayPrompt,
|
|
6429
6432
|
metadata: input.metadata,
|
|
6430
6433
|
title: input.title,
|
|
6431
|
-
providerTargetRef: input.providerTargetRef,
|
|
6432
6434
|
settings: input.settings,
|
|
6433
6435
|
visible: input.visible,
|
|
6434
6436
|
openclawGatewayReady: input.openclawGatewayReady
|
|
@@ -6469,7 +6471,7 @@ function useAgentGUIActivation({
|
|
|
6469
6471
|
throw error;
|
|
6470
6472
|
}
|
|
6471
6473
|
},
|
|
6472
|
-
[agentActivityRuntime, getErrorMessage, workspaceId]
|
|
6474
|
+
[agentActivityRuntime, getErrorCode, getErrorMessage, workspaceId]
|
|
6473
6475
|
);
|
|
6474
6476
|
const unactivate = useCallback3(
|
|
6475
6477
|
async (agentSessionId) => {
|
|
@@ -7033,6 +7035,13 @@ function reportAgentGUIRuntimeError(input) {
|
|
|
7033
7035
|
} catch {
|
|
7034
7036
|
}
|
|
7035
7037
|
}
|
|
7038
|
+
function showAgentGUIControllerErrorToast(hostToast, message) {
|
|
7039
|
+
if (hostToast?.error) {
|
|
7040
|
+
hostToast.error(message);
|
|
7041
|
+
return;
|
|
7042
|
+
}
|
|
7043
|
+
toast.error(message);
|
|
7044
|
+
}
|
|
7036
7045
|
function reportAgentGUIConversationFilterTargetUnresolved(input) {
|
|
7037
7046
|
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
7038
7047
|
if (!reportDiagnostic) {
|
|
@@ -9101,7 +9110,6 @@ function useAgentGUINodeController({
|
|
|
9101
9110
|
[homeComposerTargetOverride, normalizedExplicitProviderTargets]
|
|
9102
9111
|
);
|
|
9103
9112
|
const effectiveSelectedProviderTarget = homeComposerTargetOverride ?? selectedProviderTarget;
|
|
9104
|
-
const effectiveSelectedProviderTargetIsExplicit = homeComposerTargetOverride ? homeComposerTargetOverrideIsExplicit : selectedProviderTargetIsExplicit;
|
|
9105
9113
|
const firstReadyHomeComposerProviderTarget = useMemo3(() => {
|
|
9106
9114
|
if (!providerReadinessGates) {
|
|
9107
9115
|
return null;
|
|
@@ -9521,9 +9529,11 @@ function useAgentGUINodeController({
|
|
|
9521
9529
|
const selectedProviderTargetRef = useRef4(effectiveSelectedProviderTarget);
|
|
9522
9530
|
selectedProviderTargetRef.current = effectiveSelectedProviderTarget;
|
|
9523
9531
|
const selectedProviderTargetIsExplicitRef = useRef4(
|
|
9524
|
-
|
|
9532
|
+
homeComposerTargetOverride ? homeComposerTargetOverrideIsExplicit : selectedProviderTargetIsExplicit
|
|
9525
9533
|
);
|
|
9526
|
-
selectedProviderTargetIsExplicitRef.current =
|
|
9534
|
+
selectedProviderTargetIsExplicitRef.current = homeComposerTargetOverride ? homeComposerTargetOverrideIsExplicit : selectedProviderTargetIsExplicit;
|
|
9535
|
+
const providerTargetsProvidedRef = useRef4(providerTargets !== void 0);
|
|
9536
|
+
providerTargetsProvidedRef.current = providerTargets !== void 0;
|
|
9527
9537
|
const selectedComposerTargetDataRef = useRef4(selectedComposerTargetData);
|
|
9528
9538
|
selectedComposerTargetDataRef.current = selectedComposerTargetData;
|
|
9529
9539
|
const draftSettingsBySessionIdRef = useRef4(draftSettingsBySessionId);
|
|
@@ -11883,7 +11893,7 @@ function useAgentGUINodeController({
|
|
|
11883
11893
|
return;
|
|
11884
11894
|
}
|
|
11885
11895
|
const agentTargetId = targetData.agentTargetId ?? "";
|
|
11886
|
-
if (!agentTargetId && selectedProviderTargetIsExplicitRef.current) {
|
|
11896
|
+
if (!agentTargetId || providerTargetsProvidedRef.current && !selectedProviderTargetIsExplicitRef.current) {
|
|
11887
11897
|
setDetailError(translate("agentHost.agentGui.agentTargetRequired"));
|
|
11888
11898
|
return;
|
|
11889
11899
|
}
|
|
@@ -12070,8 +12080,6 @@ function useAgentGUINodeController({
|
|
|
12070
12080
|
mode: "new",
|
|
12071
12081
|
agentSessionId,
|
|
12072
12082
|
agentTargetId: agentTargetId2 || null,
|
|
12073
|
-
provider,
|
|
12074
|
-
providerTargetRef: targetData.providerTargetRef,
|
|
12075
12083
|
cwd: selectedProjectPath2 ?? "",
|
|
12076
12084
|
initialContent: normalizedInitialContent,
|
|
12077
12085
|
initialDisplayPrompt,
|
|
@@ -13925,7 +13933,7 @@ function useAgentGUINodeController({
|
|
|
13925
13933
|
const handleRemoveError = (error) => {
|
|
13926
13934
|
const message = getAgentGUIErrorMessage(error);
|
|
13927
13935
|
setListError(message);
|
|
13928
|
-
toast
|
|
13936
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
13929
13937
|
};
|
|
13930
13938
|
try {
|
|
13931
13939
|
void Promise.resolve(remove({ path: normalizedPath })).then(() => {
|
|
@@ -13939,7 +13947,7 @@ function useAgentGUINodeController({
|
|
|
13939
13947
|
handleRemoveError(error);
|
|
13940
13948
|
}
|
|
13941
13949
|
},
|
|
13942
|
-
[agentHostApi.userProjects, setUserProjectsSnapshot]
|
|
13950
|
+
[agentHostApi.toast, agentHostApi.userProjects, setUserProjectsSnapshot]
|
|
13943
13951
|
);
|
|
13944
13952
|
const requestDeleteProjectConversations = useCallback4(
|
|
13945
13953
|
(path) => {
|
|
@@ -14053,8 +14061,7 @@ function useAgentGUINodeController({
|
|
|
14053
14061
|
runtime: agentActivityRuntime,
|
|
14054
14062
|
workspaceId
|
|
14055
14063
|
});
|
|
14056
|
-
toast
|
|
14057
|
-
setDetailError(message);
|
|
14064
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14058
14065
|
if (activeConversationIdRef.current === target.id) {
|
|
14059
14066
|
setIsLoadingMessages(false);
|
|
14060
14067
|
setAgentSessionViewMessagesLoading(sessionViewRef(target.id), false);
|
|
@@ -14073,6 +14080,7 @@ function useAgentGUINodeController({
|
|
|
14073
14080
|
workspaceId,
|
|
14074
14081
|
sessionViewRef,
|
|
14075
14082
|
agentActivityRuntime,
|
|
14083
|
+
agentHostApi.toast,
|
|
14076
14084
|
agentQueuedPromptRuntime,
|
|
14077
14085
|
removeConversations
|
|
14078
14086
|
]);
|
|
@@ -14212,8 +14220,7 @@ function useAgentGUINodeController({
|
|
|
14212
14220
|
}
|
|
14213
14221
|
});
|
|
14214
14222
|
setListError(message);
|
|
14215
|
-
toast
|
|
14216
|
-
setDetailError(message);
|
|
14223
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14217
14224
|
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
14218
14225
|
setIsLoadingMessages(false);
|
|
14219
14226
|
setAgentSessionViewMessagesLoading(
|
|
@@ -14238,6 +14245,7 @@ function useAgentGUINodeController({
|
|
|
14238
14245
|
sessionViewRef,
|
|
14239
14246
|
setTransientConversation,
|
|
14240
14247
|
removeConversations,
|
|
14248
|
+
agentHostApi.toast,
|
|
14241
14249
|
workspaceId
|
|
14242
14250
|
]
|
|
14243
14251
|
);
|
|
@@ -14290,8 +14298,7 @@ function useAgentGUINodeController({
|
|
|
14290
14298
|
}
|
|
14291
14299
|
});
|
|
14292
14300
|
setListError(message);
|
|
14293
|
-
toast
|
|
14294
|
-
setDetailError(message);
|
|
14301
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14295
14302
|
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
14296
14303
|
setIsLoadingMessages(false);
|
|
14297
14304
|
setAgentSessionViewMessagesLoading(
|
|
@@ -14310,6 +14317,7 @@ function useAgentGUINodeController({
|
|
|
14310
14317
|
finalizeConversationBatchDeletion,
|
|
14311
14318
|
isDeletingProjectConversations,
|
|
14312
14319
|
sessionViewRef,
|
|
14320
|
+
agentHostApi.toast,
|
|
14313
14321
|
workspaceId
|
|
14314
14322
|
]
|
|
14315
14323
|
);
|
|
@@ -14349,8 +14357,7 @@ function useAgentGUINodeController({
|
|
|
14349
14357
|
runtime: agentActivityRuntime,
|
|
14350
14358
|
workspaceId
|
|
14351
14359
|
});
|
|
14352
|
-
toast
|
|
14353
|
-
setDetailError(message);
|
|
14360
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14354
14361
|
const previous = previousConversations.find(
|
|
14355
14362
|
(conversation2) => conversation2.id === normalizedAgentSessionId
|
|
14356
14363
|
);
|
|
@@ -14362,7 +14369,7 @@ function useAgentGUINodeController({
|
|
|
14362
14369
|
);
|
|
14363
14370
|
});
|
|
14364
14371
|
},
|
|
14365
|
-
[agentActivityRuntime, patchConversation, workspaceId]
|
|
14372
|
+
[agentActivityRuntime, agentHostApi.toast, patchConversation, workspaceId]
|
|
14366
14373
|
);
|
|
14367
14374
|
const activeConversation = useMemo3(() => {
|
|
14368
14375
|
const resolved = resolveConversationSummaryById(
|
|
@@ -15309,6 +15316,8 @@ function useAgentGUINodeController({
|
|
|
15309
15316
|
}
|
|
15310
15317
|
const agentTargetId = nextTarget.agentTargetId?.trim() ?? "";
|
|
15311
15318
|
const nextFilter = agentTargetId ? { kind: "agentTarget", agentTargetId } : { kind: "all" };
|
|
15319
|
+
const previousFilter = conversationFilterRef.current;
|
|
15320
|
+
const isSameFilterTarget = nextFilter.kind === "agentTarget" ? previousFilter.kind === "agentTarget" && previousFilter.agentTargetId === nextFilter.agentTargetId : previousFilter.kind === "all";
|
|
15312
15321
|
setConversationFilter(nextFilter);
|
|
15313
15322
|
const activeId = activeConversationIdRef.current;
|
|
15314
15323
|
if (activeId) {
|
|
@@ -15317,9 +15326,23 @@ function useAgentGUINodeController({
|
|
|
15317
15326
|
activeId,
|
|
15318
15327
|
transientConversationRef.current
|
|
15319
15328
|
);
|
|
15320
|
-
if (activeSummary &&
|
|
15321
|
-
|
|
15329
|
+
if (activeSummary && matchesAgentGUIConversationSummaryFilter(activeSummary, nextFilter)) {
|
|
15330
|
+
return;
|
|
15322
15331
|
}
|
|
15332
|
+
} else if (isSameFilterTarget) {
|
|
15333
|
+
selectHomeComposerAgentTarget(input);
|
|
15334
|
+
return;
|
|
15335
|
+
}
|
|
15336
|
+
const recentConversation = agentTargetId ? mergeVisibleConversations(
|
|
15337
|
+
conversationsRef.current,
|
|
15338
|
+
transientConversationRef.current
|
|
15339
|
+
).find(
|
|
15340
|
+
(conversation2) => matchesAgentGUIConversationSummaryFilter(conversation2, nextFilter)
|
|
15341
|
+
) : null;
|
|
15342
|
+
if (recentConversation) {
|
|
15343
|
+
selectConversation(recentConversation.id, {
|
|
15344
|
+
reloadConversations: false
|
|
15345
|
+
});
|
|
15323
15346
|
return;
|
|
15324
15347
|
}
|
|
15325
15348
|
selectHomeComposerAgentTarget(input);
|
|
@@ -15328,6 +15351,7 @@ function useAgentGUINodeController({
|
|
|
15328
15351
|
agentActivityRuntime,
|
|
15329
15352
|
defaultProviderTargetId,
|
|
15330
15353
|
normalizedProviderTargets,
|
|
15354
|
+
selectConversation,
|
|
15331
15355
|
selectHomeComposerAgentTarget,
|
|
15332
15356
|
shouldUseStaticProviderTargets,
|
|
15333
15357
|
workspaceId
|
|
@@ -17479,6 +17503,9 @@ var styles3 = {
|
|
|
17479
17503
|
composerFooterRight: "agent-gui-node__composer-footer-right",
|
|
17480
17504
|
composerHero: "agent-gui-node__composer-hero",
|
|
17481
17505
|
composerFloatingPrompt: "agent-gui-node__composer-floating-prompt",
|
|
17506
|
+
composerFileDropOverlay: "agent-gui-node__composer-file-drop-overlay",
|
|
17507
|
+
composerFileDropOverlayActive: "agent-gui-node__composer-file-drop-overlay--active",
|
|
17508
|
+
composerFileDropOverlayCard: "agent-gui-node__composer-file-drop-overlay-card",
|
|
17482
17509
|
composerHandoffIcon: "agent-gui-node__composer-handoff-icon",
|
|
17483
17510
|
composerHandoffAnimatedIcon: "agent-gui-node__composer-handoff-icon-animated",
|
|
17484
17511
|
composerHandoffMenuContent: "agent-gui-node__composer-handoff-menu-content",
|
|
@@ -21393,6 +21420,13 @@ function hasInlineOverflow(element) {
|
|
|
21393
21420
|
}
|
|
21394
21421
|
return element.scrollWidth > element.clientWidth + 1;
|
|
21395
21422
|
}
|
|
21423
|
+
function isPointInsideElement(element, clientX, clientY) {
|
|
21424
|
+
if (!element) {
|
|
21425
|
+
return false;
|
|
21426
|
+
}
|
|
21427
|
+
const bounds = element.getBoundingClientRect();
|
|
21428
|
+
return clientX >= bounds.left && clientX <= bounds.right && clientY >= bounds.top && clientY <= bounds.bottom;
|
|
21429
|
+
}
|
|
21396
21430
|
function AgentComposerMaskIcon({
|
|
21397
21431
|
iconUrl,
|
|
21398
21432
|
marker
|
|
@@ -22926,6 +22960,8 @@ function AgentComposer({
|
|
|
22926
22960
|
},
|
|
22927
22961
|
[addDraftImages, scheduleComposerFocus]
|
|
22928
22962
|
);
|
|
22963
|
+
const [fileDropOverlayHost, setFileDropOverlayHost] = useState12(null);
|
|
22964
|
+
const [fileDropOverlayActive, setFileDropOverlayActive] = useState12(false);
|
|
22929
22965
|
useEffect13(() => {
|
|
22930
22966
|
const composer = composerRef.current;
|
|
22931
22967
|
const dropTarget = composer?.closest("#agent-gui-detail") ?? composer;
|
|
@@ -22933,7 +22969,13 @@ function AgentComposer({
|
|
|
22933
22969
|
return void 0;
|
|
22934
22970
|
}
|
|
22935
22971
|
let isDisposed = false;
|
|
22972
|
+
setFileDropOverlayHost(dropTarget);
|
|
22936
22973
|
const isDragEvent = (event) => "dataTransfer" in event;
|
|
22974
|
+
const clearDropOverlay = () => {
|
|
22975
|
+
if (!isDisposed) {
|
|
22976
|
+
setFileDropOverlayActive(false);
|
|
22977
|
+
}
|
|
22978
|
+
};
|
|
22937
22979
|
const containsEventTarget = (event) => {
|
|
22938
22980
|
const target = event.target;
|
|
22939
22981
|
return target instanceof Node && dropTarget.contains(target);
|
|
@@ -22973,11 +23015,15 @@ function AgentComposer({
|
|
|
22973
23015
|
}
|
|
22974
23016
|
event.preventDefault();
|
|
22975
23017
|
if (!drag.hasRegularFiles && drag.hasImageFiles && !promptImagesSupported) {
|
|
23018
|
+
clearDropOverlay();
|
|
22976
23019
|
return;
|
|
22977
23020
|
}
|
|
22978
23021
|
if (event.dataTransfer) {
|
|
22979
23022
|
event.dataTransfer.dropEffect = "copy";
|
|
22980
23023
|
}
|
|
23024
|
+
if (!isDisposed) {
|
|
23025
|
+
setFileDropOverlayActive(true);
|
|
23026
|
+
}
|
|
22981
23027
|
};
|
|
22982
23028
|
const handleDrop = (event) => {
|
|
22983
23029
|
if (!isDragEvent(event)) {
|
|
@@ -22989,6 +23035,7 @@ function AgentComposer({
|
|
|
22989
23035
|
}
|
|
22990
23036
|
event.preventDefault();
|
|
22991
23037
|
event.stopPropagation();
|
|
23038
|
+
clearDropOverlay();
|
|
22992
23039
|
if (drop.regularFiles.length > 0) {
|
|
22993
23040
|
editorHandleRef.current?.focusAtEnd();
|
|
22994
23041
|
void applyDroppedFileReferences(drop.regularFiles).then(() => {
|
|
@@ -23012,12 +23059,46 @@ function AgentComposer({
|
|
|
23012
23059
|
scheduleComposerFocus();
|
|
23013
23060
|
});
|
|
23014
23061
|
};
|
|
23062
|
+
const handleDocumentDragOver = (event) => {
|
|
23063
|
+
if (!isDragEvent(event)) {
|
|
23064
|
+
return;
|
|
23065
|
+
}
|
|
23066
|
+
if (isPointInsideElement(
|
|
23067
|
+
dropTarget,
|
|
23068
|
+
event.clientX,
|
|
23069
|
+
event.clientY
|
|
23070
|
+
)) {
|
|
23071
|
+
return;
|
|
23072
|
+
}
|
|
23073
|
+
clearDropOverlay();
|
|
23074
|
+
};
|
|
23075
|
+
const handleDocumentDragLeave = (event) => {
|
|
23076
|
+
if (!isDragEvent(event)) {
|
|
23077
|
+
return;
|
|
23078
|
+
}
|
|
23079
|
+
const leftWindow = event.relatedTarget === null || event.clientX <= 0 || event.clientY <= 0 || event.clientX >= window.innerWidth || event.clientY >= window.innerHeight;
|
|
23080
|
+
if (leftWindow) {
|
|
23081
|
+
clearDropOverlay();
|
|
23082
|
+
}
|
|
23083
|
+
};
|
|
23015
23084
|
dropTarget.addEventListener("dragover", handleDragOver);
|
|
23016
23085
|
dropTarget.addEventListener("drop", handleDrop);
|
|
23086
|
+
document.addEventListener("dragover", handleDocumentDragOver, true);
|
|
23087
|
+
document.addEventListener("dragleave", handleDocumentDragLeave, true);
|
|
23088
|
+
window.addEventListener("dragend", clearDropOverlay);
|
|
23089
|
+
window.addEventListener("drop", clearDropOverlay);
|
|
23090
|
+
window.addEventListener("blur", clearDropOverlay);
|
|
23017
23091
|
return () => {
|
|
23018
23092
|
isDisposed = true;
|
|
23093
|
+
setFileDropOverlayHost(null);
|
|
23094
|
+
setFileDropOverlayActive(false);
|
|
23019
23095
|
dropTarget.removeEventListener("dragover", handleDragOver);
|
|
23020
23096
|
dropTarget.removeEventListener("drop", handleDrop);
|
|
23097
|
+
document.removeEventListener("dragover", handleDocumentDragOver, true);
|
|
23098
|
+
document.removeEventListener("dragleave", handleDocumentDragLeave, true);
|
|
23099
|
+
window.removeEventListener("dragend", clearDropOverlay);
|
|
23100
|
+
window.removeEventListener("drop", clearDropOverlay);
|
|
23101
|
+
window.removeEventListener("blur", clearDropOverlay);
|
|
23021
23102
|
};
|
|
23022
23103
|
}, [
|
|
23023
23104
|
addDraftImages,
|
|
@@ -23358,6 +23439,22 @@ function AgentComposer({
|
|
|
23358
23439
|
},
|
|
23359
23440
|
activePromptTip.id
|
|
23360
23441
|
) : null;
|
|
23442
|
+
const fileDropOverlay = fileDropOverlayHost !== null ? createPortal3(
|
|
23443
|
+
/* @__PURE__ */ jsx30(
|
|
23444
|
+
"div",
|
|
23445
|
+
{
|
|
23446
|
+
"aria-hidden": "true",
|
|
23447
|
+
"data-testid": "agent-gui-composer-file-drop-overlay",
|
|
23448
|
+
"data-active": fileDropOverlayActive ? "true" : "false",
|
|
23449
|
+
className: cn(
|
|
23450
|
+
AgentGUINode_styles_default.composerFileDropOverlay,
|
|
23451
|
+
fileDropOverlayActive && AgentGUINode_styles_default.composerFileDropOverlayActive
|
|
23452
|
+
),
|
|
23453
|
+
children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.composerFileDropOverlayCard, children: labels.fileDropHint })
|
|
23454
|
+
}
|
|
23455
|
+
),
|
|
23456
|
+
fileDropOverlayHost
|
|
23457
|
+
) : null;
|
|
23361
23458
|
return /* @__PURE__ */ jsxs18(
|
|
23362
23459
|
"form",
|
|
23363
23460
|
{
|
|
@@ -23366,6 +23463,7 @@ function AgentComposer({
|
|
|
23366
23463
|
"data-layout": layoutMode,
|
|
23367
23464
|
onSubmit: submit,
|
|
23368
23465
|
children: [
|
|
23466
|
+
fileDropOverlay,
|
|
23369
23467
|
visibleActivePrompt ? /* @__PURE__ */ jsx30(
|
|
23370
23468
|
"div",
|
|
23371
23469
|
{
|
|
@@ -25107,6 +25205,7 @@ function AgentGUINodeView({
|
|
|
25107
25205
|
viewModel,
|
|
25108
25206
|
renderSidebarFooter,
|
|
25109
25207
|
renderProviderRailEmpty,
|
|
25208
|
+
providerRailAllPresentation,
|
|
25110
25209
|
onLinkAction,
|
|
25111
25210
|
onHandoffConversation,
|
|
25112
25211
|
capabilityMenuState,
|
|
@@ -25628,6 +25727,7 @@ function AgentGUINodeView({
|
|
|
25628
25727
|
providerTargetsLoading: viewModel.providerTargetsLoading,
|
|
25629
25728
|
providerRailMode: viewModel.providerRailMode,
|
|
25630
25729
|
renderProviderRailEmpty,
|
|
25730
|
+
providerRailAllPresentation,
|
|
25631
25731
|
comingSoonProviders: viewModel.comingSoonProviders,
|
|
25632
25732
|
onSelectConversationFilterTarget: actions.selectConversationFilterTarget,
|
|
25633
25733
|
onUpdateConversationFilter: actions.updateConversationFilter,
|
|
@@ -26229,6 +26329,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26229
26329
|
fileMentionEmpty: labels.fileMentionEmpty,
|
|
26230
26330
|
fileMentionError: labels.fileMentionError,
|
|
26231
26331
|
fileMentionTabHint: labels.fileMentionTabHint,
|
|
26332
|
+
fileDropHint: labels.fileDropHint,
|
|
26232
26333
|
mentionPalette: labels.mentionPalette,
|
|
26233
26334
|
removeMention: labels.removeMention,
|
|
26234
26335
|
addReference: labels.addReference,
|
|
@@ -26256,6 +26357,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26256
26357
|
labels.fileMentionLoading,
|
|
26257
26358
|
labels.fileMentionPalette,
|
|
26258
26359
|
labels.fileMentionTabHint,
|
|
26360
|
+
labels.fileDropHint,
|
|
26259
26361
|
labels.handoffConversation,
|
|
26260
26362
|
labels.handoffConversationTooltip,
|
|
26261
26363
|
labels.handoffConversationMenu,
|
|
@@ -26592,6 +26694,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26592
26694
|
viewModel.activeConversationId,
|
|
26593
26695
|
viewModel.availableCommands,
|
|
26594
26696
|
viewModel.availableSkills,
|
|
26697
|
+
viewModel.activeConversationId,
|
|
26595
26698
|
viewModel.compactSupported,
|
|
26596
26699
|
viewModel.composerSettings,
|
|
26597
26700
|
viewModel.currentUserId,
|
|
@@ -27372,14 +27475,17 @@ function AgentGUIAllProviderGridIcon({
|
|
|
27372
27475
|
}
|
|
27373
27476
|
);
|
|
27374
27477
|
}
|
|
27375
|
-
function AgentGUIUnifiedProviderIcon(
|
|
27478
|
+
function AgentGUIUnifiedProviderIcon({
|
|
27479
|
+
presentation
|
|
27480
|
+
}) {
|
|
27481
|
+
const iconUrl = presentation?.iconUrl?.trim() || agentColorfulUrl;
|
|
27376
27482
|
return /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: AgentGUINode_styles_default.providerRailAvatar, children: /* @__PURE__ */ jsx33(
|
|
27377
27483
|
"img",
|
|
27378
27484
|
{
|
|
27379
27485
|
alt: "",
|
|
27380
27486
|
className: AgentGUINode_styles_default.providerRailAvatarImage,
|
|
27381
27487
|
draggable: false,
|
|
27382
|
-
src:
|
|
27488
|
+
src: iconUrl
|
|
27383
27489
|
}
|
|
27384
27490
|
) });
|
|
27385
27491
|
}
|
|
@@ -28055,6 +28161,7 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
28055
28161
|
providerTargetsLoading,
|
|
28056
28162
|
providerRailMode,
|
|
28057
28163
|
renderProviderRailEmpty,
|
|
28164
|
+
providerRailAllPresentation,
|
|
28058
28165
|
comingSoonProviders,
|
|
28059
28166
|
onRequestComposerFocus,
|
|
28060
28167
|
onSelectConversationFilterTarget,
|
|
@@ -28375,7 +28482,12 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
28375
28482
|
disabled: previewMode,
|
|
28376
28483
|
onClick: selectAllProviders,
|
|
28377
28484
|
children: [
|
|
28378
|
-
/* @__PURE__ */ jsx33(
|
|
28485
|
+
/* @__PURE__ */ jsx33(
|
|
28486
|
+
AgentGUIUnifiedProviderIcon,
|
|
28487
|
+
{
|
|
28488
|
+
presentation: providerRailAllPresentation
|
|
28489
|
+
}
|
|
28490
|
+
),
|
|
28379
28491
|
/* @__PURE__ */ jsx33("span", { className: AgentGUINode_styles_default.providerRailTileLabel, children: labels.conversationFilterAll })
|
|
28380
28492
|
]
|
|
28381
28493
|
}
|
|
@@ -30896,7 +31008,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
|
|
|
30896
31008
|
return true;
|
|
30897
31009
|
}
|
|
30898
31010
|
function areAgentGUINodePropsEqual(previous, next) {
|
|
30899
|
-
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.onHandoffConversation === next.onHandoffConversation && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.accountMenuState === next.accountMenuState && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.renderSidebarFooter === next.renderSidebarFooter && previous.providerRailMode === next.providerRailMode && previous.renderProviderRailEmpty === next.renderProviderRailEmpty && previous.comingSoonProviders === next.comingSoonProviders && previous.providerReadinessGates === next.providerReadinessGates && 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 && previous.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.providerAuthAccountLabels === next.providerAuthAccountLabels && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
|
|
31011
|
+
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.onHandoffConversation === next.onHandoffConversation && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.accountMenuState === next.accountMenuState && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.providerRailAllPresentation?.iconUrl === next.providerRailAllPresentation?.iconUrl && previous.renderSidebarFooter === next.renderSidebarFooter && previous.providerRailMode === next.providerRailMode && previous.renderProviderRailEmpty === next.renderProviderRailEmpty && previous.comingSoonProviders === next.comingSoonProviders && previous.providerReadinessGates === next.providerReadinessGates && 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 && previous.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.providerAuthAccountLabels === next.providerAuthAccountLabels && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
|
|
30900
31012
|
}
|
|
30901
31013
|
var AgentGUINode = memo2(function AgentGUINode2({
|
|
30902
31014
|
nodeId,
|
|
@@ -30926,6 +31038,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
30926
31038
|
accountMenuState = null,
|
|
30927
31039
|
providerTargets,
|
|
30928
31040
|
providerTargetsLoading = false,
|
|
31041
|
+
providerRailAllPresentation = null,
|
|
30929
31042
|
providerRailMode = "catalog",
|
|
30930
31043
|
renderProviderRailEmpty,
|
|
30931
31044
|
renderSidebarFooter,
|
|
@@ -31722,6 +31835,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
31722
31835
|
fileMentionEmpty: t("agentHost.agentGui.fileMentionEmpty"),
|
|
31723
31836
|
fileMentionError: t("agentHost.agentGui.fileMentionError"),
|
|
31724
31837
|
fileMentionTabHint: t("agentHost.agentGui.fileMentionTabHint"),
|
|
31838
|
+
fileDropHint: t("agentHost.agentGui.fileDropHint"),
|
|
31725
31839
|
mentionPalette: t("agentHost.agentGui.mentionPalette"),
|
|
31726
31840
|
removeMention: t("common.remove"),
|
|
31727
31841
|
addReference: t("agentHost.agentGui.addReference"),
|
|
@@ -31954,6 +32068,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
31954
32068
|
viewModel,
|
|
31955
32069
|
renderSidebarFooter,
|
|
31956
32070
|
renderProviderRailEmpty,
|
|
32071
|
+
providerRailAllPresentation,
|
|
31957
32072
|
actions: viewActions,
|
|
31958
32073
|
isActive,
|
|
31959
32074
|
composerFocusRequestSequence,
|