@tutti-os/agent-gui 0.0.69 → 0.0.70
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 +4 -5
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.js +8 -8
- package/dist/{agentGuiNodeTypes-BipgG2ib.d.ts → agentGuiNodeTypes-CmLUy5Jt.d.ts} +0 -5
- 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 +111 -109
- package/dist/index.js +117 -32
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +1 -1
- package/dist/workbench/contribution.d.ts +8 -0
- package/dist/workbench/contribution.js +1 -1
- package/dist/workbench/index.d.ts +4 -1
- package/dist/workbench/index.js +4 -4
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- 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(
|
|
@@ -17479,6 +17486,9 @@ var styles3 = {
|
|
|
17479
17486
|
composerFooterRight: "agent-gui-node__composer-footer-right",
|
|
17480
17487
|
composerHero: "agent-gui-node__composer-hero",
|
|
17481
17488
|
composerFloatingPrompt: "agent-gui-node__composer-floating-prompt",
|
|
17489
|
+
composerFileDropOverlay: "agent-gui-node__composer-file-drop-overlay",
|
|
17490
|
+
composerFileDropOverlayActive: "agent-gui-node__composer-file-drop-overlay--active",
|
|
17491
|
+
composerFileDropOverlayCard: "agent-gui-node__composer-file-drop-overlay-card",
|
|
17482
17492
|
composerHandoffIcon: "agent-gui-node__composer-handoff-icon",
|
|
17483
17493
|
composerHandoffAnimatedIcon: "agent-gui-node__composer-handoff-icon-animated",
|
|
17484
17494
|
composerHandoffMenuContent: "agent-gui-node__composer-handoff-menu-content",
|
|
@@ -21393,6 +21403,13 @@ function hasInlineOverflow(element) {
|
|
|
21393
21403
|
}
|
|
21394
21404
|
return element.scrollWidth > element.clientWidth + 1;
|
|
21395
21405
|
}
|
|
21406
|
+
function isPointInsideElement(element, clientX, clientY) {
|
|
21407
|
+
if (!element) {
|
|
21408
|
+
return false;
|
|
21409
|
+
}
|
|
21410
|
+
const bounds = element.getBoundingClientRect();
|
|
21411
|
+
return clientX >= bounds.left && clientX <= bounds.right && clientY >= bounds.top && clientY <= bounds.bottom;
|
|
21412
|
+
}
|
|
21396
21413
|
function AgentComposerMaskIcon({
|
|
21397
21414
|
iconUrl,
|
|
21398
21415
|
marker
|
|
@@ -22926,6 +22943,8 @@ function AgentComposer({
|
|
|
22926
22943
|
},
|
|
22927
22944
|
[addDraftImages, scheduleComposerFocus]
|
|
22928
22945
|
);
|
|
22946
|
+
const [fileDropOverlayHost, setFileDropOverlayHost] = useState12(null);
|
|
22947
|
+
const [fileDropOverlayActive, setFileDropOverlayActive] = useState12(false);
|
|
22929
22948
|
useEffect13(() => {
|
|
22930
22949
|
const composer = composerRef.current;
|
|
22931
22950
|
const dropTarget = composer?.closest("#agent-gui-detail") ?? composer;
|
|
@@ -22933,7 +22952,13 @@ function AgentComposer({
|
|
|
22933
22952
|
return void 0;
|
|
22934
22953
|
}
|
|
22935
22954
|
let isDisposed = false;
|
|
22955
|
+
setFileDropOverlayHost(dropTarget);
|
|
22936
22956
|
const isDragEvent = (event) => "dataTransfer" in event;
|
|
22957
|
+
const clearDropOverlay = () => {
|
|
22958
|
+
if (!isDisposed) {
|
|
22959
|
+
setFileDropOverlayActive(false);
|
|
22960
|
+
}
|
|
22961
|
+
};
|
|
22937
22962
|
const containsEventTarget = (event) => {
|
|
22938
22963
|
const target = event.target;
|
|
22939
22964
|
return target instanceof Node && dropTarget.contains(target);
|
|
@@ -22973,11 +22998,15 @@ function AgentComposer({
|
|
|
22973
22998
|
}
|
|
22974
22999
|
event.preventDefault();
|
|
22975
23000
|
if (!drag.hasRegularFiles && drag.hasImageFiles && !promptImagesSupported) {
|
|
23001
|
+
clearDropOverlay();
|
|
22976
23002
|
return;
|
|
22977
23003
|
}
|
|
22978
23004
|
if (event.dataTransfer) {
|
|
22979
23005
|
event.dataTransfer.dropEffect = "copy";
|
|
22980
23006
|
}
|
|
23007
|
+
if (!isDisposed) {
|
|
23008
|
+
setFileDropOverlayActive(true);
|
|
23009
|
+
}
|
|
22981
23010
|
};
|
|
22982
23011
|
const handleDrop = (event) => {
|
|
22983
23012
|
if (!isDragEvent(event)) {
|
|
@@ -22989,6 +23018,7 @@ function AgentComposer({
|
|
|
22989
23018
|
}
|
|
22990
23019
|
event.preventDefault();
|
|
22991
23020
|
event.stopPropagation();
|
|
23021
|
+
clearDropOverlay();
|
|
22992
23022
|
if (drop.regularFiles.length > 0) {
|
|
22993
23023
|
editorHandleRef.current?.focusAtEnd();
|
|
22994
23024
|
void applyDroppedFileReferences(drop.regularFiles).then(() => {
|
|
@@ -23012,12 +23042,46 @@ function AgentComposer({
|
|
|
23012
23042
|
scheduleComposerFocus();
|
|
23013
23043
|
});
|
|
23014
23044
|
};
|
|
23045
|
+
const handleDocumentDragOver = (event) => {
|
|
23046
|
+
if (!isDragEvent(event)) {
|
|
23047
|
+
return;
|
|
23048
|
+
}
|
|
23049
|
+
if (isPointInsideElement(
|
|
23050
|
+
dropTarget,
|
|
23051
|
+
event.clientX,
|
|
23052
|
+
event.clientY
|
|
23053
|
+
)) {
|
|
23054
|
+
return;
|
|
23055
|
+
}
|
|
23056
|
+
clearDropOverlay();
|
|
23057
|
+
};
|
|
23058
|
+
const handleDocumentDragLeave = (event) => {
|
|
23059
|
+
if (!isDragEvent(event)) {
|
|
23060
|
+
return;
|
|
23061
|
+
}
|
|
23062
|
+
const leftWindow = event.relatedTarget === null || event.clientX <= 0 || event.clientY <= 0 || event.clientX >= window.innerWidth || event.clientY >= window.innerHeight;
|
|
23063
|
+
if (leftWindow) {
|
|
23064
|
+
clearDropOverlay();
|
|
23065
|
+
}
|
|
23066
|
+
};
|
|
23015
23067
|
dropTarget.addEventListener("dragover", handleDragOver);
|
|
23016
23068
|
dropTarget.addEventListener("drop", handleDrop);
|
|
23069
|
+
document.addEventListener("dragover", handleDocumentDragOver, true);
|
|
23070
|
+
document.addEventListener("dragleave", handleDocumentDragLeave, true);
|
|
23071
|
+
window.addEventListener("dragend", clearDropOverlay);
|
|
23072
|
+
window.addEventListener("drop", clearDropOverlay);
|
|
23073
|
+
window.addEventListener("blur", clearDropOverlay);
|
|
23017
23074
|
return () => {
|
|
23018
23075
|
isDisposed = true;
|
|
23076
|
+
setFileDropOverlayHost(null);
|
|
23077
|
+
setFileDropOverlayActive(false);
|
|
23019
23078
|
dropTarget.removeEventListener("dragover", handleDragOver);
|
|
23020
23079
|
dropTarget.removeEventListener("drop", handleDrop);
|
|
23080
|
+
document.removeEventListener("dragover", handleDocumentDragOver, true);
|
|
23081
|
+
document.removeEventListener("dragleave", handleDocumentDragLeave, true);
|
|
23082
|
+
window.removeEventListener("dragend", clearDropOverlay);
|
|
23083
|
+
window.removeEventListener("drop", clearDropOverlay);
|
|
23084
|
+
window.removeEventListener("blur", clearDropOverlay);
|
|
23021
23085
|
};
|
|
23022
23086
|
}, [
|
|
23023
23087
|
addDraftImages,
|
|
@@ -23358,6 +23422,22 @@ function AgentComposer({
|
|
|
23358
23422
|
},
|
|
23359
23423
|
activePromptTip.id
|
|
23360
23424
|
) : null;
|
|
23425
|
+
const fileDropOverlay = fileDropOverlayHost !== null ? createPortal3(
|
|
23426
|
+
/* @__PURE__ */ jsx30(
|
|
23427
|
+
"div",
|
|
23428
|
+
{
|
|
23429
|
+
"aria-hidden": "true",
|
|
23430
|
+
"data-testid": "agent-gui-composer-file-drop-overlay",
|
|
23431
|
+
"data-active": fileDropOverlayActive ? "true" : "false",
|
|
23432
|
+
className: cn(
|
|
23433
|
+
AgentGUINode_styles_default.composerFileDropOverlay,
|
|
23434
|
+
fileDropOverlayActive && AgentGUINode_styles_default.composerFileDropOverlayActive
|
|
23435
|
+
),
|
|
23436
|
+
children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.composerFileDropOverlayCard, children: labels.fileDropHint })
|
|
23437
|
+
}
|
|
23438
|
+
),
|
|
23439
|
+
fileDropOverlayHost
|
|
23440
|
+
) : null;
|
|
23361
23441
|
return /* @__PURE__ */ jsxs18(
|
|
23362
23442
|
"form",
|
|
23363
23443
|
{
|
|
@@ -23366,6 +23446,7 @@ function AgentComposer({
|
|
|
23366
23446
|
"data-layout": layoutMode,
|
|
23367
23447
|
onSubmit: submit,
|
|
23368
23448
|
children: [
|
|
23449
|
+
fileDropOverlay,
|
|
23369
23450
|
visibleActivePrompt ? /* @__PURE__ */ jsx30(
|
|
23370
23451
|
"div",
|
|
23371
23452
|
{
|
|
@@ -26229,6 +26310,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26229
26310
|
fileMentionEmpty: labels.fileMentionEmpty,
|
|
26230
26311
|
fileMentionError: labels.fileMentionError,
|
|
26231
26312
|
fileMentionTabHint: labels.fileMentionTabHint,
|
|
26313
|
+
fileDropHint: labels.fileDropHint,
|
|
26232
26314
|
mentionPalette: labels.mentionPalette,
|
|
26233
26315
|
removeMention: labels.removeMention,
|
|
26234
26316
|
addReference: labels.addReference,
|
|
@@ -26256,6 +26338,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26256
26338
|
labels.fileMentionLoading,
|
|
26257
26339
|
labels.fileMentionPalette,
|
|
26258
26340
|
labels.fileMentionTabHint,
|
|
26341
|
+
labels.fileDropHint,
|
|
26259
26342
|
labels.handoffConversation,
|
|
26260
26343
|
labels.handoffConversationTooltip,
|
|
26261
26344
|
labels.handoffConversationMenu,
|
|
@@ -26592,6 +26675,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
26592
26675
|
viewModel.activeConversationId,
|
|
26593
26676
|
viewModel.availableCommands,
|
|
26594
26677
|
viewModel.availableSkills,
|
|
26678
|
+
viewModel.activeConversationId,
|
|
26595
26679
|
viewModel.compactSupported,
|
|
26596
26680
|
viewModel.composerSettings,
|
|
26597
26681
|
viewModel.currentUserId,
|
|
@@ -31722,6 +31806,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
31722
31806
|
fileMentionEmpty: t("agentHost.agentGui.fileMentionEmpty"),
|
|
31723
31807
|
fileMentionError: t("agentHost.agentGui.fileMentionError"),
|
|
31724
31808
|
fileMentionTabHint: t("agentHost.agentGui.fileMentionTabHint"),
|
|
31809
|
+
fileDropHint: t("agentHost.agentGui.fileDropHint"),
|
|
31725
31810
|
mentionPalette: t("agentHost.agentGui.mentionPalette"),
|
|
31726
31811
|
removeMention: t("common.remove"),
|
|
31727
31812
|
addReference: t("agentHost.agentGui.addReference"),
|