@tutti-os/agent-gui 0.0.133 → 0.0.135
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 +19 -5
- package/dist/{AgentRichTextReadonly-PEKCMRPE.js → AgentRichTextReadonly-HCKTNAYO.js} +7 -6
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +9 -9
- package/dist/agent-gui.d.ts +34 -6
- package/dist/agent-gui.js +17 -17
- package/dist/agent-message-center/index.js +7 -7
- package/dist/{agentFileMentionContracts-CWAeuL7S.d.ts → agentFileMentionContracts-B0yQizXB.d.ts} +5 -0
- package/dist/{agentGuiNodeTypes-B57MfwVo.d.ts → agentGuiNodeTypes-DV7KvZRe.d.ts} +6 -5
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/app/renderer/agentactivity.css +6 -0
- package/dist/{chunk-GBBNYGL7.js → chunk-25VMCMAQ.js} +4 -4
- package/dist/{chunk-VS5BRBY6.js → chunk-5WOCGIXJ.js} +4 -1
- package/dist/chunk-5WOCGIXJ.js.map +1 -0
- package/dist/chunk-DLCZJKCA.js +1 -0
- package/dist/chunk-DLCZJKCA.js.map +1 -0
- package/dist/{chunk-QQRTUHCH.js → chunk-EU7DCT4F.js} +2 -2
- package/dist/{chunk-SZOTLVH6.js → chunk-GIYGO2PB.js} +2 -2
- package/dist/{chunk-HCRROERX.js → chunk-IN3HXYOO.js} +4 -4
- package/dist/{chunk-N62NVPHT.js → chunk-IYZ4GOSN.js} +4 -4
- package/dist/{chunk-A6NSHCRP.js → chunk-JI5KND3K.js} +54 -51
- package/dist/chunk-JI5KND3K.js.map +1 -0
- package/dist/{chunk-J4TTEMRW.js → chunk-KWGMK4IZ.js} +4 -4
- package/dist/{chunk-NE6H7S5Z.js → chunk-OFJNIQWR.js} +2 -2
- package/dist/{chunk-NE6H7S5Z.js.map → chunk-OFJNIQWR.js.map} +1 -1
- package/dist/{chunk-UARZZJJB.js → chunk-OI6BYC7P.js} +4 -4
- package/dist/{chunk-OBWM2RFE.js → chunk-QPEO4OQS.js} +308 -8
- package/dist/chunk-QPEO4OQS.js.map +1 -0
- package/dist/{chunk-XNE2ROCP.js → chunk-UA75CGAG.js} +3 -3
- package/dist/{chunk-PVTAFUDS.js → chunk-VGS7S7YT.js} +2 -2
- package/dist/{chunk-OQR3HXPF.js → chunk-VUNVGEQG.js} +7 -1
- package/dist/chunk-VUNVGEQG.js.map +1 -0
- package/dist/{chunk-IZ626FDO.js → chunk-Y5HD6XHP.js} +485 -361
- package/dist/chunk-Y5HD6XHP.js.map +1 -0
- package/dist/{chunk-KPMQGPYU.js → chunk-ZVYUTXQJ.js} +1 -1
- package/dist/chunk-ZVYUTXQJ.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +1 -1
- package/dist/context-mention-palette/index.js +8 -7
- package/dist/{contribution-BbW-kkpi.d.ts → contribution-CDdwTppn.d.ts} +2 -0
- package/dist/custom-mention.js +1 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +53 -9
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +1 -1
- package/dist/mention-search.js +6 -5
- package/dist/{types-BeAVr4of.d.ts → types-ee3zJ6Cc.d.ts} +3 -0
- package/dist/workbench/browser-element-context/index.d.ts +37 -0
- package/dist/workbench/browser-element-context/index.js +750 -0
- package/dist/workbench/browser-element-context/index.js.map +1 -0
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/contribution.js +4 -4
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/index.js +4 -4
- package/dist/workbench/sessionTitle.js +2 -2
- package/dist/workbench/tool-sidebar/index.d.ts +189 -0
- package/dist/workbench/tool-sidebar/index.js +1492 -0
- package/dist/workbench/tool-sidebar/index.js.map +1 -0
- package/package.json +27 -12
- package/dist/chunk-A6NSHCRP.js.map +0 -1
- package/dist/chunk-IZ626FDO.js.map +0 -1
- package/dist/chunk-KPMQGPYU.js.map +0 -1
- package/dist/chunk-OBWM2RFE.js.map +0 -1
- package/dist/chunk-OQR3HXPF.js.map +0 -1
- package/dist/chunk-VS5BRBY6.js.map +0 -1
- /package/dist/{AgentRichTextReadonly-PEKCMRPE.js.map → AgentRichTextReadonly-HCKTNAYO.js.map} +0 -0
- /package/dist/{chunk-GBBNYGL7.js.map → chunk-25VMCMAQ.js.map} +0 -0
- /package/dist/{chunk-QQRTUHCH.js.map → chunk-EU7DCT4F.js.map} +0 -0
- /package/dist/{chunk-SZOTLVH6.js.map → chunk-GIYGO2PB.js.map} +0 -0
- /package/dist/{chunk-HCRROERX.js.map → chunk-IN3HXYOO.js.map} +0 -0
- /package/dist/{chunk-N62NVPHT.js.map → chunk-IYZ4GOSN.js.map} +0 -0
- /package/dist/{chunk-J4TTEMRW.js.map → chunk-KWGMK4IZ.js.map} +0 -0
- /package/dist/{chunk-UARZZJJB.js.map → chunk-OI6BYC7P.js.map} +0 -0
- /package/dist/{chunk-XNE2ROCP.js.map → chunk-UA75CGAG.js.map} +0 -0
- /package/dist/{chunk-PVTAFUDS.js.map → chunk-VGS7S7YT.js.map} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentGuiSessionProviderFlatIconUrl,
|
|
13
13
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
14
14
|
shouldAutoCollapseAgentGUIConversationRail
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IN3HXYOO.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_PROVIDERS,
|
|
18
18
|
AGENT_PROVIDER_LABEL,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveAgentGUIFirstUserMessageDisplayPrompt,
|
|
29
29
|
resolveAgentGUIProviderDisplayLabel,
|
|
30
30
|
resolveAgentGUIProviderIdentity
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VGS7S7YT.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveAgentGuiWorkbenchProviderLabel
|
|
34
34
|
} from "./chunk-R2ZADXRB.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
toLocalShortDateTime,
|
|
64
64
|
updateAgentComposerDraft,
|
|
65
65
|
useProjectedAgentConversation
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-JI5KND3K.js";
|
|
67
67
|
import {
|
|
68
68
|
agentRichTextContentToPromptText,
|
|
69
69
|
createAgentRichTextInputExtensions,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
plainTextToAgentRichTextInlineContent,
|
|
74
74
|
skillDescriptionForDisplay,
|
|
75
75
|
skillTriggerForPrefix
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-UA75CGAG.js";
|
|
77
77
|
import {
|
|
78
78
|
AgentEnvPanelActionProvider
|
|
79
79
|
} from "./chunk-FM42UN2J.js";
|
|
@@ -85,20 +85,23 @@ import {
|
|
|
85
85
|
AgentFileMentionPalette,
|
|
86
86
|
agentMentionItemKey,
|
|
87
87
|
isAgentMentionItemDisabled
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-OI6BYC7P.js";
|
|
89
89
|
import {
|
|
90
90
|
normalizeAgentGUIAgents,
|
|
91
91
|
projectAgentGUIAgentsToInternalTargets
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-5WOCGIXJ.js";
|
|
93
93
|
import {
|
|
94
94
|
AGENT_MENTION_FILTER_TAB_ORDER,
|
|
95
95
|
AgentMentionSearchController,
|
|
96
96
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
97
97
|
agentGuiScheduler,
|
|
98
98
|
buildWorkspaceAgentActivityListViewModel
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-KWGMK4IZ.js";
|
|
100
100
|
import {
|
|
101
101
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
102
|
+
agentComposerFileMentionReferences,
|
|
103
|
+
agentExternalPromptFileErrorI18nKey,
|
|
104
|
+
createAgentExternalPromptFilePreparation,
|
|
102
105
|
createAgentSessionMarkdownLink,
|
|
103
106
|
createAgentSessionMentionHref,
|
|
104
107
|
exitAgentFileMentionSuggestion,
|
|
@@ -106,8 +109,10 @@ import {
|
|
|
106
109
|
materializeAgentCustomMentionPromptText,
|
|
107
110
|
mentionItemToAttrs,
|
|
108
111
|
normalizeAgentSessionMentionTitle,
|
|
109
|
-
parseMentionItemFromHref
|
|
110
|
-
|
|
112
|
+
parseMentionItemFromHref,
|
|
113
|
+
remainingAgentComposerPromptAssetSlots,
|
|
114
|
+
updateAgentComposerFileMentions
|
|
115
|
+
} from "./chunk-QPEO4OQS.js";
|
|
111
116
|
import {
|
|
112
117
|
AgentInteractivePromptSurface,
|
|
113
118
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
@@ -117,7 +122,7 @@ import {
|
|
|
117
122
|
dispatchAgentPlanPromptAction,
|
|
118
123
|
latestPlanTurnId,
|
|
119
124
|
planImplementationPromptFromPlanTurn
|
|
120
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-25VMCMAQ.js";
|
|
121
126
|
import {
|
|
122
127
|
useEngineSelector
|
|
123
128
|
} from "./chunk-2RQM7PJN.js";
|
|
@@ -126,13 +131,13 @@ import {
|
|
|
126
131
|
ZoomableImage,
|
|
127
132
|
normalizeAgentApprovalPurpose,
|
|
128
133
|
resolveWorkspaceLinkAction
|
|
129
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-IYZ4GOSN.js";
|
|
130
135
|
import {
|
|
131
136
|
AgentTargetPresentationProvider,
|
|
132
137
|
cn,
|
|
133
138
|
resolveAgentTargetPresentation,
|
|
134
139
|
useAgentTargetPresentations
|
|
135
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-ZVYUTXQJ.js";
|
|
136
141
|
import {
|
|
137
142
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
138
143
|
} from "./chunk-YMXYBG7U.js";
|
|
@@ -144,7 +149,7 @@ import {
|
|
|
144
149
|
useAgentHostApi,
|
|
145
150
|
useOptionalAgentActivityRuntime,
|
|
146
151
|
useOptionalAgentHostApi
|
|
147
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-OFJNIQWR.js";
|
|
148
153
|
import {
|
|
149
154
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
150
155
|
MANAGED_AGENT_ICON_URLS,
|
|
@@ -154,7 +159,7 @@ import {
|
|
|
154
159
|
AgentGuiI18nProvider,
|
|
155
160
|
translate,
|
|
156
161
|
useTranslation
|
|
157
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-GIYGO2PB.js";
|
|
158
163
|
import {
|
|
159
164
|
isBetaAgentProvider,
|
|
160
165
|
normalizeManagedAgentProvider
|
|
@@ -3709,6 +3714,7 @@ function createSharedAgentGUIAgentTarget(input) {
|
|
|
3709
3714
|
...badge ? { badge } : {},
|
|
3710
3715
|
...input.ownerLabel?.trim() ? { ownerLabel: input.ownerLabel.trim() } : {},
|
|
3711
3716
|
...input.iconUrl?.trim() ? { iconUrl: input.iconUrl.trim() } : {},
|
|
3717
|
+
...input.maskIconUrl?.trim() ? { maskIconUrl: input.maskIconUrl.trim() } : {},
|
|
3712
3718
|
...input.sidebarIconUrl?.trim() ? { sidebarIconUrl: input.sidebarIconUrl.trim() } : {},
|
|
3713
3719
|
...input.unavailableReason?.trim() ? { unavailableReason: input.unavailableReason.trim() } : {},
|
|
3714
3720
|
...input.disabled === true ? { disabled: true } : {}
|
|
@@ -3811,6 +3817,7 @@ function normalizeAgentGUIAgentTarget(target) {
|
|
|
3811
3817
|
badge,
|
|
3812
3818
|
description,
|
|
3813
3819
|
iconUrl,
|
|
3820
|
+
maskIconUrl,
|
|
3814
3821
|
sidebarIconUrl,
|
|
3815
3822
|
heroImageUrl,
|
|
3816
3823
|
ownerLabel,
|
|
@@ -3839,6 +3846,7 @@ function normalizeAgentGUIAgentTarget(target) {
|
|
|
3839
3846
|
...normalizedBadge ? { badge: normalizedBadge } : {},
|
|
3840
3847
|
...description?.trim() ? { description: description.trim() } : {},
|
|
3841
3848
|
...iconUrl?.trim() ? { iconUrl: iconUrl.trim() } : {},
|
|
3849
|
+
...maskIconUrl?.trim() ? { maskIconUrl: maskIconUrl.trim() } : {},
|
|
3842
3850
|
...sidebarIconUrl?.trim() ? { sidebarIconUrl: sidebarIconUrl.trim() } : {},
|
|
3843
3851
|
...heroImageUrl?.trim() ? { heroImageUrl: heroImageUrl.trim() } : {},
|
|
3844
3852
|
...ownerLabel?.trim() ? { ownerLabel: ownerLabel.trim() } : {},
|
|
@@ -13325,6 +13333,33 @@ function openWorkspaceSettingsPanel(input) {
|
|
|
13325
13333
|
workspaceSettingsPanelStore.requestSequence += 1;
|
|
13326
13334
|
}
|
|
13327
13335
|
|
|
13336
|
+
// agent-gui/agentGuiNode/model/agentGuiTargetPresentation.ts
|
|
13337
|
+
function agentTargetPresentationKey(agentTargets) {
|
|
13338
|
+
return JSON.stringify(
|
|
13339
|
+
agentTargets.map((target) => [
|
|
13340
|
+
target.agentTargetId ?? null,
|
|
13341
|
+
target.iconUrl ?? null,
|
|
13342
|
+
target.maskIconUrl ?? null,
|
|
13343
|
+
target.label,
|
|
13344
|
+
target.provider
|
|
13345
|
+
])
|
|
13346
|
+
);
|
|
13347
|
+
}
|
|
13348
|
+
function projectAgentTargetPresentations(input) {
|
|
13349
|
+
return input.agentTargets.flatMap(
|
|
13350
|
+
(target) => target.agentTargetId ? [
|
|
13351
|
+
{
|
|
13352
|
+
agentTargetId: target.agentTargetId,
|
|
13353
|
+
iconUrl: target.iconUrl ?? null,
|
|
13354
|
+
maskIconUrl: target.maskIconUrl ?? null,
|
|
13355
|
+
name: target.label,
|
|
13356
|
+
provider: target.provider,
|
|
13357
|
+
workspaceId: input.workspaceId
|
|
13358
|
+
}
|
|
13359
|
+
] : []
|
|
13360
|
+
);
|
|
13361
|
+
}
|
|
13362
|
+
|
|
13328
13363
|
// agent-gui/agentGuiNode/AgentGUINode.styles.ts
|
|
13329
13364
|
var styles = {
|
|
13330
13365
|
agentAvatar: "agent-gui-node__agent-avatar",
|
|
@@ -16280,6 +16315,24 @@ import {
|
|
|
16280
16315
|
useRef as useRef22
|
|
16281
16316
|
} from "react";
|
|
16282
16317
|
|
|
16318
|
+
// agent-gui/agentGuiNode/model/agentComposerDraftFileReconciliation.ts
|
|
16319
|
+
function updateDraftPromptAndReconcileFiles(draft, prompt) {
|
|
16320
|
+
const previousReferencedIds = new Set(
|
|
16321
|
+
agentComposerFileMentionReferences(agentComposerDraftPrompt(draft)).map(
|
|
16322
|
+
(reference) => reference.id
|
|
16323
|
+
)
|
|
16324
|
+
);
|
|
16325
|
+
const nextReferencedIds = new Set(
|
|
16326
|
+
agentComposerFileMentionReferences(prompt).map((reference) => reference.id)
|
|
16327
|
+
);
|
|
16328
|
+
return updateAgentComposerDraft(draft, {
|
|
16329
|
+
prompt,
|
|
16330
|
+
files: agentComposerDraftFiles(draft).filter(
|
|
16331
|
+
(file) => !previousReferencedIds.has(file.id) || nextReferencedIds.has(file.id)
|
|
16332
|
+
)
|
|
16333
|
+
});
|
|
16334
|
+
}
|
|
16335
|
+
|
|
16283
16336
|
// agent-gui/agentGuiNode/composer/composerDraftUtils.ts
|
|
16284
16337
|
var GOAL_MODE_SLASH_COMMAND = "/goal";
|
|
16285
16338
|
var AGENT_COMPOSER_PASTED_TEXT_FILE_PREFIX = "pasted-text";
|
|
@@ -16346,14 +16399,13 @@ function useStableEventCallback2(callback) {
|
|
|
16346
16399
|
function useComposerDraftAttachments({
|
|
16347
16400
|
workspaceId,
|
|
16348
16401
|
workspacePath,
|
|
16349
|
-
draftContent,
|
|
16350
16402
|
draftScopeKey,
|
|
16351
16403
|
draftByScopeKeyRef,
|
|
16352
16404
|
goalDraftObjective,
|
|
16353
16405
|
isGoalModeActive,
|
|
16354
16406
|
promptImagesSupported,
|
|
16355
|
-
promptFileUploadSupported,
|
|
16356
16407
|
promptFilesSupported,
|
|
16408
|
+
promptAssetLimit,
|
|
16357
16409
|
pastedTextStagingSupported,
|
|
16358
16410
|
editorHandleRef,
|
|
16359
16411
|
draftPromptRef,
|
|
@@ -16367,19 +16419,29 @@ function useComposerDraftAttachments({
|
|
|
16367
16419
|
onPromptImagesUnsupported,
|
|
16368
16420
|
onContentEntered,
|
|
16369
16421
|
onRequestWorkspaceReferences,
|
|
16370
|
-
|
|
16422
|
+
prepareExternalPromptFiles,
|
|
16371
16423
|
onLinkAction
|
|
16372
16424
|
}) {
|
|
16425
|
+
const agentHostApi = useOptionalAgentHostApi();
|
|
16373
16426
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
16427
|
+
const activeDraftScopeKeyRef = useRef22(draftScopeKey);
|
|
16428
|
+
activeDraftScopeKeyRef.current = draftScopeKey;
|
|
16374
16429
|
const reportContentEntered = useStableEventCallback2(
|
|
16375
16430
|
(contentType) => {
|
|
16376
16431
|
onContentEntered?.(contentType);
|
|
16377
16432
|
}
|
|
16378
16433
|
);
|
|
16434
|
+
const showErrorToast = useStableEventCallback2((message) => {
|
|
16435
|
+
agentHostApi?.toast?.error(message);
|
|
16436
|
+
});
|
|
16379
16437
|
const publishScopedDraft = useStableEventCallback2(
|
|
16380
16438
|
(sourceScopeKey, nextDraft) => {
|
|
16381
16439
|
draftByScopeKeyRef.current[sourceScopeKey] = nextDraft;
|
|
16382
16440
|
if (sourceScopeKey === draftScopeKey) {
|
|
16441
|
+
draftPromptRef.current = agentComposerDraftPrompt(nextDraft);
|
|
16442
|
+
draftImagesRef.current = agentComposerDraftImages(nextDraft);
|
|
16443
|
+
draftFilesRef.current = agentComposerDraftFiles(nextDraft);
|
|
16444
|
+
draftLargeTextsRef.current = agentComposerDraftLargeTexts(nextDraft);
|
|
16383
16445
|
onDraftContentChange(nextDraft);
|
|
16384
16446
|
} else {
|
|
16385
16447
|
onDraftContentChange(nextDraft, sourceScopeKey);
|
|
@@ -16403,9 +16465,9 @@ function useComposerDraftAttachments({
|
|
|
16403
16465
|
draftPromptRef.current = nextGoalPrompt;
|
|
16404
16466
|
setPaletteDraftPrompt(nextDraft);
|
|
16405
16467
|
setIsPaletteOpen(true);
|
|
16406
|
-
|
|
16468
|
+
updateScopedDraft(
|
|
16407
16469
|
draftScopeKey,
|
|
16408
|
-
|
|
16470
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
|
|
16409
16471
|
);
|
|
16410
16472
|
return;
|
|
16411
16473
|
}
|
|
@@ -16415,18 +16477,18 @@ function useComposerDraftAttachments({
|
|
|
16415
16477
|
draftPromptRef.current = nextGoalPrompt;
|
|
16416
16478
|
setPaletteDraftPrompt(nextGoalObjective);
|
|
16417
16479
|
setIsPaletteOpen(true);
|
|
16418
|
-
|
|
16480
|
+
updateScopedDraft(
|
|
16419
16481
|
draftScopeKey,
|
|
16420
|
-
|
|
16482
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
|
|
16421
16483
|
);
|
|
16422
16484
|
return;
|
|
16423
16485
|
}
|
|
16424
16486
|
draftPromptRef.current = nextDraft;
|
|
16425
16487
|
setPaletteDraftPrompt(nextDraft);
|
|
16426
16488
|
setIsPaletteOpen(true);
|
|
16427
|
-
|
|
16489
|
+
updateScopedDraft(
|
|
16428
16490
|
draftScopeKey,
|
|
16429
|
-
|
|
16491
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextDraft)
|
|
16430
16492
|
);
|
|
16431
16493
|
}
|
|
16432
16494
|
);
|
|
@@ -16437,17 +16499,11 @@ function useComposerDraftAttachments({
|
|
|
16437
16499
|
const nextPrompt = goalDraftObjective ?? "";
|
|
16438
16500
|
draftPromptRef.current = nextPrompt;
|
|
16439
16501
|
setPaletteDraftPrompt(nextPrompt);
|
|
16440
|
-
|
|
16502
|
+
updateScopedDraft(
|
|
16441
16503
|
draftScopeKey,
|
|
16442
|
-
|
|
16504
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextPrompt)
|
|
16443
16505
|
);
|
|
16444
|
-
}, [
|
|
16445
|
-
draftContent,
|
|
16446
|
-
draftScopeKey,
|
|
16447
|
-
goalDraftObjective,
|
|
16448
|
-
isGoalModeActive,
|
|
16449
|
-
publishScopedDraft
|
|
16450
|
-
]);
|
|
16506
|
+
}, [draftScopeKey, goalDraftObjective, isGoalModeActive, updateScopedDraft]);
|
|
16451
16507
|
const addDraftImages = useCallback31(
|
|
16452
16508
|
(images) => {
|
|
16453
16509
|
if (images.length === 0) {
|
|
@@ -16458,9 +16514,17 @@ function useComposerDraftAttachments({
|
|
|
16458
16514
|
return;
|
|
16459
16515
|
}
|
|
16460
16516
|
const currentDraftImages = draftImagesRef.current;
|
|
16461
|
-
const remainingSlots = Math.
|
|
16462
|
-
|
|
16463
|
-
|
|
16517
|
+
const remainingSlots = Math.min(
|
|
16518
|
+
Math.max(
|
|
16519
|
+
0,
|
|
16520
|
+
MAX_AGENT_COMPOSER_DRAFT_IMAGES - currentDraftImages.length
|
|
16521
|
+
),
|
|
16522
|
+
remainingAgentComposerPromptAssetSlots({
|
|
16523
|
+
images: currentDraftImages.length,
|
|
16524
|
+
files: draftFilesRef.current.length,
|
|
16525
|
+
largeTexts: draftLargeTextsRef.current.length,
|
|
16526
|
+
limit: promptAssetLimit
|
|
16527
|
+
})
|
|
16464
16528
|
);
|
|
16465
16529
|
if (remainingSlots === 0) {
|
|
16466
16530
|
return;
|
|
@@ -16587,6 +16651,7 @@ function useComposerDraftAttachments({
|
|
|
16587
16651
|
onPromptImagesUnsupported,
|
|
16588
16652
|
publishScopedDraft,
|
|
16589
16653
|
promptImagesSupported,
|
|
16654
|
+
promptAssetLimit,
|
|
16590
16655
|
reportContentEntered,
|
|
16591
16656
|
updateScopedDraft,
|
|
16592
16657
|
workspaceId
|
|
@@ -16610,11 +16675,38 @@ function useComposerDraftAttachments({
|
|
|
16610
16675
|
},
|
|
16611
16676
|
[draftScopeKey, publishScopedDraft]
|
|
16612
16677
|
);
|
|
16613
|
-
const
|
|
16614
|
-
(
|
|
16615
|
-
|
|
16616
|
-
|
|
16678
|
+
const addDraftFiles = useCallback31(
|
|
16679
|
+
(files) => {
|
|
16680
|
+
if (files.length === 0 || !promptFilesSupported || !prepareExternalPromptFiles || !editorHandleRef.current) {
|
|
16681
|
+
return;
|
|
16682
|
+
}
|
|
16683
|
+
const remainingSlots = remainingAgentComposerPromptAssetSlots({
|
|
16684
|
+
images: draftImagesRef.current.length,
|
|
16685
|
+
files: draftFilesRef.current.length,
|
|
16686
|
+
largeTexts: draftLargeTextsRef.current.length,
|
|
16687
|
+
limit: promptAssetLimit
|
|
16688
|
+
});
|
|
16689
|
+
if (remainingSlots === 0) {
|
|
16690
|
+
return;
|
|
16691
|
+
}
|
|
16692
|
+
const preparation = createAgentExternalPromptFilePreparation(
|
|
16693
|
+
files.slice(0, remainingSlots)
|
|
16617
16694
|
);
|
|
16695
|
+
reportAgentComposerDiagnostic(agentActivityRuntime, {
|
|
16696
|
+
details: {
|
|
16697
|
+
acceptedFileCount: preparation.pendingFiles.length,
|
|
16698
|
+
existingFileCount: draftFilesRef.current.length,
|
|
16699
|
+
requestedFileCount: files.length
|
|
16700
|
+
},
|
|
16701
|
+
event: "agent.gui.composer.file_preparation.requested",
|
|
16702
|
+
level: "info",
|
|
16703
|
+
source: "agent-gui",
|
|
16704
|
+
workspaceId
|
|
16705
|
+
});
|
|
16706
|
+
const nextDraftFiles = [
|
|
16707
|
+
...draftFilesRef.current,
|
|
16708
|
+
...preparation.pendingFiles
|
|
16709
|
+
];
|
|
16618
16710
|
draftFilesRef.current = nextDraftFiles;
|
|
16619
16711
|
publishScopedDraft(
|
|
16620
16712
|
draftScopeKey,
|
|
@@ -16625,8 +16717,91 @@ function useComposerDraftAttachments({
|
|
|
16625
16717
|
largeTexts: draftLargeTextsRef.current
|
|
16626
16718
|
})
|
|
16627
16719
|
);
|
|
16720
|
+
editorHandleRef.current.insertComposerFiles(
|
|
16721
|
+
preparation.pendingFiles.map((file) => ({
|
|
16722
|
+
id: file.id,
|
|
16723
|
+
name: file.name,
|
|
16724
|
+
status: "uploading"
|
|
16725
|
+
}))
|
|
16726
|
+
);
|
|
16727
|
+
void preparation.complete(prepareExternalPromptFiles).then((settled) => {
|
|
16728
|
+
const settledById = new Map(settled.map((file) => [file.id, file]));
|
|
16729
|
+
const sourceScopeKey = draftScopeKey;
|
|
16730
|
+
const currentDraft = draftByScopeKeyRef.current[sourceScopeKey];
|
|
16731
|
+
const referencedIds = new Set(
|
|
16732
|
+
currentDraft ? agentComposerFileMentionReferences(
|
|
16733
|
+
agentComposerDraftPrompt(currentDraft)
|
|
16734
|
+
).map((reference) => reference.id) : []
|
|
16735
|
+
);
|
|
16736
|
+
const visibleSettled = settled.filter(
|
|
16737
|
+
(file) => referencedIds.has(file.id)
|
|
16738
|
+
);
|
|
16739
|
+
const editorUpdated = activeDraftScopeKeyRef.current === sourceScopeKey && editorHandleRef.current?.updateComposerFiles(
|
|
16740
|
+
visibleSettled.map((file) => ({
|
|
16741
|
+
errorCode: file.uploadErrorCode,
|
|
16742
|
+
id: file.id,
|
|
16743
|
+
name: file.name,
|
|
16744
|
+
status: file.uploadError ? "error" : "ready"
|
|
16745
|
+
}))
|
|
16746
|
+
);
|
|
16747
|
+
const mentionUpdatesById = new Map(
|
|
16748
|
+
visibleSettled.map((file) => [
|
|
16749
|
+
file.id,
|
|
16750
|
+
{
|
|
16751
|
+
errorCode: file.uploadErrorCode,
|
|
16752
|
+
status: file.uploadError ? "error" : "ready"
|
|
16753
|
+
}
|
|
16754
|
+
])
|
|
16755
|
+
);
|
|
16756
|
+
const updatedDraft = updateScopedDraft(
|
|
16757
|
+
sourceScopeKey,
|
|
16758
|
+
(latestDraft) => updateAgentComposerDraft(latestDraft, {
|
|
16759
|
+
prompt: editorUpdated ? agentComposerDraftPrompt(latestDraft) : updateAgentComposerFileMentions(
|
|
16760
|
+
agentComposerDraftPrompt(latestDraft),
|
|
16761
|
+
mentionUpdatesById
|
|
16762
|
+
),
|
|
16763
|
+
files: agentComposerDraftFiles(latestDraft).map(
|
|
16764
|
+
(file) => settledById.get(file.id) ?? file
|
|
16765
|
+
)
|
|
16766
|
+
})
|
|
16767
|
+
);
|
|
16768
|
+
const errorCount = settled.filter((file) => file.uploadError).length;
|
|
16769
|
+
if (errorCount > 0) {
|
|
16770
|
+
const failedFiles = settled.filter((file) => file.uploadError);
|
|
16771
|
+
const firstErrorCode = failedFiles[0]?.uploadErrorCode;
|
|
16772
|
+
const sharedErrorCode = failedFiles.every(
|
|
16773
|
+
(file) => file.uploadErrorCode === firstErrorCode
|
|
16774
|
+
) ? firstErrorCode : void 0;
|
|
16775
|
+
const errorMessage = translate(
|
|
16776
|
+
agentExternalPromptFileErrorI18nKey(sharedErrorCode)
|
|
16777
|
+
);
|
|
16778
|
+
showErrorToast(errorMessage);
|
|
16779
|
+
}
|
|
16780
|
+
reportAgentComposerDiagnostic(agentActivityRuntime, {
|
|
16781
|
+
details: {
|
|
16782
|
+
draftUpdateApplied: Boolean(updatedDraft),
|
|
16783
|
+
errorCount,
|
|
16784
|
+
settledFileCount: settled.length,
|
|
16785
|
+
visibleFileCount: updatedDraft ? agentComposerDraftFiles(updatedDraft).length : null
|
|
16786
|
+
},
|
|
16787
|
+
event: "agent.gui.composer.file_preparation.settled",
|
|
16788
|
+
level: errorCount > 0 || !updatedDraft ? "warn" : "info",
|
|
16789
|
+
source: "agent-gui",
|
|
16790
|
+
workspaceId
|
|
16791
|
+
});
|
|
16792
|
+
});
|
|
16628
16793
|
},
|
|
16629
|
-
[
|
|
16794
|
+
[
|
|
16795
|
+
agentActivityRuntime,
|
|
16796
|
+
draftScopeKey,
|
|
16797
|
+
prepareExternalPromptFiles,
|
|
16798
|
+
promptAssetLimit,
|
|
16799
|
+
promptFilesSupported,
|
|
16800
|
+
publishScopedDraft,
|
|
16801
|
+
showErrorToast,
|
|
16802
|
+
updateScopedDraft,
|
|
16803
|
+
workspaceId
|
|
16804
|
+
]
|
|
16630
16805
|
);
|
|
16631
16806
|
const removeDraftLargeText = useCallback31(
|
|
16632
16807
|
(id) => {
|
|
@@ -16682,6 +16857,14 @@ ${item.text}` : item.text;
|
|
|
16682
16857
|
if (!normalizedText.trim()) {
|
|
16683
16858
|
return;
|
|
16684
16859
|
}
|
|
16860
|
+
if (remainingAgentComposerPromptAssetSlots({
|
|
16861
|
+
images: draftImagesRef.current.length,
|
|
16862
|
+
files: draftFilesRef.current.length,
|
|
16863
|
+
largeTexts: draftLargeTextsRef.current.length,
|
|
16864
|
+
limit: promptAssetLimit
|
|
16865
|
+
}) === 0) {
|
|
16866
|
+
return;
|
|
16867
|
+
}
|
|
16685
16868
|
reportContentEntered("large_text");
|
|
16686
16869
|
const stagePastedText = pastedTextStagingSupported ? agentActivityRuntime?.stagePastedText : void 0;
|
|
16687
16870
|
const id = crypto.randomUUID();
|
|
@@ -16752,6 +16935,7 @@ ${item.text}` : item.text;
|
|
|
16752
16935
|
agentActivityRuntime,
|
|
16753
16936
|
draftScopeKey,
|
|
16754
16937
|
pastedTextStagingSupported,
|
|
16938
|
+
promptAssetLimit,
|
|
16755
16939
|
publishScopedDraft,
|
|
16756
16940
|
reportContentEntered,
|
|
16757
16941
|
updateScopedDraft,
|
|
@@ -16761,51 +16945,13 @@ ${item.text}` : item.text;
|
|
|
16761
16945
|
const applyReferencePickResult = useCallback31(
|
|
16762
16946
|
async (result) => {
|
|
16763
16947
|
if (result.files.length > 0) {
|
|
16764
|
-
|
|
16765
|
-
const uploadedFiles = await Promise.all(
|
|
16766
|
-
result.files.map(async (file) => {
|
|
16767
|
-
const hostPath = file.hostPath?.trim() ?? "";
|
|
16768
|
-
if (!hostPath) {
|
|
16769
|
-
return file;
|
|
16770
|
-
}
|
|
16771
|
-
if (!uploadPromptContent) {
|
|
16772
|
-
throw new Error(
|
|
16773
|
-
"Prompt file uploads are not supported by this agent runtime."
|
|
16774
|
-
);
|
|
16775
|
-
}
|
|
16776
|
-
const uploaded = await uploadPromptContent({
|
|
16777
|
-
workspaceId,
|
|
16778
|
-
content: [
|
|
16779
|
-
{
|
|
16780
|
-
type: "file",
|
|
16781
|
-
hostPath,
|
|
16782
|
-
name: file.displayName,
|
|
16783
|
-
kind: "file"
|
|
16784
|
-
}
|
|
16785
|
-
]
|
|
16786
|
-
});
|
|
16787
|
-
const uploadedFile = uploaded.content.find(
|
|
16788
|
-
(block) => block.type === "file"
|
|
16789
|
-
);
|
|
16790
|
-
const uploadedPath = uploadedFile?.path?.trim() ?? "";
|
|
16791
|
-
if (!uploadedPath) {
|
|
16792
|
-
throw new Error("Prompt file upload completed without path.");
|
|
16793
|
-
}
|
|
16794
|
-
return {
|
|
16795
|
-
...file,
|
|
16796
|
-
path: uploadedPath,
|
|
16797
|
-
...uploadedFile?.name ? { displayName: uploadedFile.name } : file.displayName ? { displayName: file.displayName } : {},
|
|
16798
|
-
...uploadedFile?.sizeBytes ? { sizeBytes: uploadedFile.sizeBytes } : {}
|
|
16799
|
-
};
|
|
16800
|
-
})
|
|
16801
|
-
);
|
|
16802
|
-
editorHandleRef.current?.insertWorkspaceReferences(uploadedFiles);
|
|
16948
|
+
editorHandleRef.current?.insertWorkspaceReferences(result.files);
|
|
16803
16949
|
}
|
|
16804
16950
|
if (result.mentionItems.length > 0) {
|
|
16805
16951
|
editorHandleRef.current?.insertMentionItems(result.mentionItems);
|
|
16806
16952
|
}
|
|
16807
16953
|
},
|
|
16808
|
-
[
|
|
16954
|
+
[]
|
|
16809
16955
|
);
|
|
16810
16956
|
const handleWorkspaceReferencePicker = useCallback31(async () => {
|
|
16811
16957
|
if (!onRequestWorkspaceReferences) {
|
|
@@ -16813,23 +16959,6 @@ ${item.text}` : item.text;
|
|
|
16813
16959
|
}
|
|
16814
16960
|
await applyReferencePickResult(await onRequestWorkspaceReferences());
|
|
16815
16961
|
}, [applyReferencePickResult, onRequestWorkspaceReferences]);
|
|
16816
|
-
const applyDroppedFileReferences = useCallback31(
|
|
16817
|
-
async (files) => {
|
|
16818
|
-
if (!promptFilesSupported || !resolveDroppedFileReferences || files.length === 0) {
|
|
16819
|
-
return;
|
|
16820
|
-
}
|
|
16821
|
-
const references = await resolveDroppedFileReferences(files);
|
|
16822
|
-
if (references.length === 0) {
|
|
16823
|
-
return;
|
|
16824
|
-
}
|
|
16825
|
-
await applyReferencePickResult({ files: references, mentionItems: [] });
|
|
16826
|
-
},
|
|
16827
|
-
[
|
|
16828
|
-
applyReferencePickResult,
|
|
16829
|
-
promptFilesSupported,
|
|
16830
|
-
resolveDroppedFileReferences
|
|
16831
|
-
]
|
|
16832
|
-
);
|
|
16833
16962
|
const handleOpenReferencesForEntity = useCallback31(
|
|
16834
16963
|
(entity) => {
|
|
16835
16964
|
if (!onRequestWorkspaceReferences) {
|
|
@@ -16870,7 +16999,7 @@ ${item.text}` : item.text;
|
|
|
16870
16999
|
);
|
|
16871
17000
|
return {
|
|
16872
17001
|
addDraftImages,
|
|
16873
|
-
|
|
17002
|
+
addDraftFiles,
|
|
16874
17003
|
clearGoalModeBadge,
|
|
16875
17004
|
expandDraftLargeTextToPrompt,
|
|
16876
17005
|
handleDraftChange,
|
|
@@ -16878,7 +17007,6 @@ ${item.text}` : item.text;
|
|
|
16878
17007
|
handleOpenReferencesForEntity,
|
|
16879
17008
|
handlePastedLargeText,
|
|
16880
17009
|
handleWorkspaceReferencePicker,
|
|
16881
|
-
removeDraftFile,
|
|
16882
17010
|
removeDraftImage,
|
|
16883
17011
|
removeDraftLargeText
|
|
16884
17012
|
};
|
|
@@ -16927,7 +17055,6 @@ function useComposerLayout({
|
|
|
16927
17055
|
dockComposerTextHeight,
|
|
16928
17056
|
setDockComposerTextHeight,
|
|
16929
17057
|
draftImages,
|
|
16930
|
-
draftFiles,
|
|
16931
17058
|
draftLargeTexts
|
|
16932
17059
|
}) {
|
|
16933
17060
|
const labels = { promptTipsPrefix };
|
|
@@ -17100,7 +17227,6 @@ function useComposerLayout({
|
|
|
17100
17227
|
window.removeEventListener("resize", measure);
|
|
17101
17228
|
};
|
|
17102
17229
|
}, [
|
|
17103
|
-
draftFiles.length,
|
|
17104
17230
|
draftImages.length,
|
|
17105
17231
|
draftLargeTexts.length,
|
|
17106
17232
|
isHeroLayout,
|
|
@@ -17858,7 +17984,9 @@ function useStableEventCallback3(callback) {
|
|
|
17858
17984
|
return useCallback34((...args) => callbackRef.current(...args), []);
|
|
17859
17985
|
}
|
|
17860
17986
|
function useComposerSlashActions(input) {
|
|
17987
|
+
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
17861
17988
|
const {
|
|
17989
|
+
workspaceId,
|
|
17862
17990
|
provider,
|
|
17863
17991
|
disabled,
|
|
17864
17992
|
submitDisabled,
|
|
@@ -18169,6 +18297,32 @@ function useComposerSlashActions(input) {
|
|
|
18169
18297
|
draft: nextDraftContent,
|
|
18170
18298
|
skills: availableSkills
|
|
18171
18299
|
});
|
|
18300
|
+
const fileReferences = agentComposerFileMentionReferences(nextPrompt);
|
|
18301
|
+
const draftFileIds = new Set(currentDraftFiles.map((file) => file.id));
|
|
18302
|
+
reportAgentComposerDiagnostic(agentActivityRuntime, {
|
|
18303
|
+
details: {
|
|
18304
|
+
contentBlockCount: submission.content.length,
|
|
18305
|
+
contentFileBlockCount: submission.content.filter(
|
|
18306
|
+
(block) => block.type === "file" && block.kind === "file"
|
|
18307
|
+
).length,
|
|
18308
|
+
contentTypes: submission.content.map((block) => block.type),
|
|
18309
|
+
draftFileCount: currentDraftFiles.length,
|
|
18310
|
+
failedDraftFileCount: currentDraftFiles.filter(
|
|
18311
|
+
(file) => Boolean(file.uploadError)
|
|
18312
|
+
).length,
|
|
18313
|
+
fileMentionCount: fileReferences.length,
|
|
18314
|
+
missingDraftFileCount: fileReferences.filter(
|
|
18315
|
+
(reference) => !draftFileIds.has(reference.id)
|
|
18316
|
+
).length,
|
|
18317
|
+
uploadingDraftFileCount: currentDraftFiles.filter(
|
|
18318
|
+
(file) => file.uploading
|
|
18319
|
+
).length
|
|
18320
|
+
},
|
|
18321
|
+
event: "agent.gui.composer.file_preparation.submission_projection",
|
|
18322
|
+
level: "info",
|
|
18323
|
+
source: "agent-gui",
|
|
18324
|
+
workspaceId
|
|
18325
|
+
});
|
|
18172
18326
|
if (options?.guidance === true) {
|
|
18173
18327
|
if (!onSubmitGuidance) {
|
|
18174
18328
|
return;
|
|
@@ -18740,6 +18894,16 @@ function nonImageFilesFromDataTransfer(dataTransfer) {
|
|
|
18740
18894
|
}
|
|
18741
18895
|
return files;
|
|
18742
18896
|
}
|
|
18897
|
+
function classifyAgentRichTextExternalFiles(dataTransfer) {
|
|
18898
|
+
const imageFiles = imageFilesFromDataTransfer(dataTransfer);
|
|
18899
|
+
const imageFileSet = new Set(imageFiles);
|
|
18900
|
+
return {
|
|
18901
|
+
imageFiles,
|
|
18902
|
+
regularFiles: nonImageFilesFromDataTransfer(dataTransfer).filter(
|
|
18903
|
+
(file) => !imageFileSet.has(file)
|
|
18904
|
+
)
|
|
18905
|
+
};
|
|
18906
|
+
}
|
|
18743
18907
|
function systemFileDragInfoFromDataTransfer(dataTransfer) {
|
|
18744
18908
|
if (!dataTransfer) {
|
|
18745
18909
|
return { hasImageFiles: false, hasRegularFiles: false };
|
|
@@ -18885,7 +19049,7 @@ function useComposerFileDrop({
|
|
|
18885
19049
|
promptFilesSupported,
|
|
18886
19050
|
promptImagesSupported,
|
|
18887
19051
|
addDraftImages,
|
|
18888
|
-
|
|
19052
|
+
addDraftFiles,
|
|
18889
19053
|
scheduleComposerFocus,
|
|
18890
19054
|
onPromptImagesUnsupported
|
|
18891
19055
|
}) {
|
|
@@ -18967,11 +19131,8 @@ function useComposerFileDrop({
|
|
|
18967
19131
|
clearDropOverlay();
|
|
18968
19132
|
if (drop.regularFiles.length > 0) {
|
|
18969
19133
|
editorHandleRef.current?.focusAtEnd();
|
|
18970
|
-
|
|
18971
|
-
|
|
18972
|
-
scheduleComposerFocus();
|
|
18973
|
-
}
|
|
18974
|
-
});
|
|
19134
|
+
addDraftFiles(drop.regularFiles);
|
|
19135
|
+
scheduleComposerFocus();
|
|
18975
19136
|
}
|
|
18976
19137
|
if (drop.imageFiles.length === 0) {
|
|
18977
19138
|
return;
|
|
@@ -19031,7 +19192,7 @@ function useComposerFileDrop({
|
|
|
19031
19192
|
};
|
|
19032
19193
|
}, [
|
|
19033
19194
|
addDraftImages,
|
|
19034
|
-
|
|
19195
|
+
addDraftFiles,
|
|
19035
19196
|
inputDisabled,
|
|
19036
19197
|
onPromptImagesUnsupported,
|
|
19037
19198
|
promptFilesSupported,
|
|
@@ -19055,7 +19216,7 @@ function useComposerFocusAndDrop(input) {
|
|
|
19055
19216
|
promptFilesSupported,
|
|
19056
19217
|
promptImagesSupported,
|
|
19057
19218
|
addDraftImages,
|
|
19058
|
-
|
|
19219
|
+
addDraftFiles,
|
|
19059
19220
|
onPromptImagesUnsupported
|
|
19060
19221
|
} = input;
|
|
19061
19222
|
const handleMentionPaletteButton = useCallback36(() => {
|
|
@@ -19088,7 +19249,7 @@ function useComposerFocusAndDrop(input) {
|
|
|
19088
19249
|
promptFilesSupported,
|
|
19089
19250
|
promptImagesSupported,
|
|
19090
19251
|
addDraftImages,
|
|
19091
|
-
|
|
19252
|
+
addDraftFiles,
|
|
19092
19253
|
scheduleComposerFocus,
|
|
19093
19254
|
onPromptImagesUnsupported
|
|
19094
19255
|
});
|
|
@@ -19360,7 +19521,6 @@ function useComposerPresentation(input) {
|
|
|
19360
19521
|
const visibleActivePrompt = activePrompt && dismissedPromptRequestId !== activePromptRequestId ? activePrompt : null;
|
|
19361
19522
|
const disabledReasonText = disabledReason?.trim() ?? "";
|
|
19362
19523
|
const effectivePlaceholder = disabledReasonText || placeholder;
|
|
19363
|
-
const visibleDraftFiles = draftFiles;
|
|
19364
19524
|
const visibleDraftLargeTexts = draftLargeTexts;
|
|
19365
19525
|
useEffect21(() => {
|
|
19366
19526
|
if (previousSelectedProjectPathRef.current === selectedProjectPath) {
|
|
@@ -19499,7 +19659,6 @@ function useComposerPresentation(input) {
|
|
|
19499
19659
|
promptTipNode,
|
|
19500
19660
|
submitInteractivePromptAndDismiss,
|
|
19501
19661
|
visibleActivePrompt,
|
|
19502
|
-
visibleDraftFiles,
|
|
19503
19662
|
visibleDraftLargeTexts
|
|
19504
19663
|
};
|
|
19505
19664
|
}
|
|
@@ -19729,11 +19888,15 @@ var AgentQueuedPromptImage = class extends Component2 {
|
|
|
19729
19888
|
}
|
|
19730
19889
|
};
|
|
19731
19890
|
function queuedPromptDisplayText(queuedPrompt) {
|
|
19891
|
+
const displayPrompt = queuedPrompt.displayPrompt?.trim();
|
|
19892
|
+
if (displayPrompt) {
|
|
19893
|
+
return displayPrompt;
|
|
19894
|
+
}
|
|
19732
19895
|
const prompt = agentPromptContentDisplayText(queuedPrompt.content);
|
|
19733
19896
|
if (prompt) {
|
|
19734
19897
|
return prompt;
|
|
19735
19898
|
}
|
|
19736
|
-
return
|
|
19899
|
+
return "";
|
|
19737
19900
|
}
|
|
19738
19901
|
function queuedPromptTitle(queuedPrompt) {
|
|
19739
19902
|
const prompt = queuedPromptDisplayText(queuedPrompt);
|
|
@@ -21317,63 +21480,6 @@ import {
|
|
|
21317
21480
|
} from "react";
|
|
21318
21481
|
import { useEditor } from "@tiptap/react";
|
|
21319
21482
|
|
|
21320
|
-
// agent-gui/agentGuiNode/agentRichText/agentWorkspaceFileReferences.ts
|
|
21321
|
-
function basename(path) {
|
|
21322
|
-
const normalized = path.trim().replace(/\/+$/, "");
|
|
21323
|
-
if (!normalized) {
|
|
21324
|
-
return "";
|
|
21325
|
-
}
|
|
21326
|
-
const segments = normalized.split("/").filter(Boolean);
|
|
21327
|
-
return segments.at(-1) ?? normalized;
|
|
21328
|
-
}
|
|
21329
|
-
function dirnameFromPath(path) {
|
|
21330
|
-
const normalized = path.trim().replace(/\/+$/, "");
|
|
21331
|
-
const segments = normalized.split("/").filter(Boolean);
|
|
21332
|
-
if (segments.length <= 1) {
|
|
21333
|
-
return "/";
|
|
21334
|
-
}
|
|
21335
|
-
return `/${segments.slice(0, -1).join("/")}`;
|
|
21336
|
-
}
|
|
21337
|
-
function referenceMentionPath(item) {
|
|
21338
|
-
const path = item.path.trim();
|
|
21339
|
-
if (item.kind === "folder" && path !== "/" && !path.endsWith("/")) {
|
|
21340
|
-
return `${path}/`;
|
|
21341
|
-
}
|
|
21342
|
-
return path;
|
|
21343
|
-
}
|
|
21344
|
-
function createAgentMentionContent(items, options = {}) {
|
|
21345
|
-
return items.flatMap((item, index) => [
|
|
21346
|
-
...index === 0 && options.prefixCaretAnchor ? [
|
|
21347
|
-
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21348
|
-
] : index > 0 ? [{ type: "text", text: " " }] : [],
|
|
21349
|
-
{ type: "agentFileMention", attrs: mentionItemToAttrs(item) },
|
|
21350
|
-
{ type: "text", text: " " }
|
|
21351
|
-
]);
|
|
21352
|
-
}
|
|
21353
|
-
function createAgentFileMentionContent(items, options = {}) {
|
|
21354
|
-
return items.flatMap((item, index) => {
|
|
21355
|
-
const path = referenceMentionPath(item);
|
|
21356
|
-
const name = item.displayName?.trim() || basename(path);
|
|
21357
|
-
return [
|
|
21358
|
-
...index === 0 && options.prefixCaretAnchor ? [
|
|
21359
|
-
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21360
|
-
] : [],
|
|
21361
|
-
{
|
|
21362
|
-
type: "agentFileMention",
|
|
21363
|
-
attrs: {
|
|
21364
|
-
kind: "file",
|
|
21365
|
-
href: path,
|
|
21366
|
-
path,
|
|
21367
|
-
name,
|
|
21368
|
-
entryKind: item.kind === "folder" ? "directory" : "file",
|
|
21369
|
-
directoryPath: dirnameFromPath(path)
|
|
21370
|
-
}
|
|
21371
|
-
},
|
|
21372
|
-
{ type: "text", text: " " }
|
|
21373
|
-
];
|
|
21374
|
-
});
|
|
21375
|
-
}
|
|
21376
|
-
|
|
21377
21483
|
// agent-gui/agentGuiNode/agentRichText/agentRichTextEditorSupport.ts
|
|
21378
21484
|
import { Extension } from "@tiptap/core";
|
|
21379
21485
|
import {
|
|
@@ -21718,6 +21824,63 @@ async function readPlainTextFromClipboard() {
|
|
|
21718
21824
|
// agent-gui/agentGuiNode/agentRichText/useAgentRichTextEditorHandle.ts
|
|
21719
21825
|
import { useImperativeHandle as useImperativeHandle2 } from "react";
|
|
21720
21826
|
|
|
21827
|
+
// agent-gui/agentGuiNode/agentRichText/agentWorkspaceFileReferences.ts
|
|
21828
|
+
function basename(path) {
|
|
21829
|
+
const normalized = path.trim().replace(/\/+$/, "");
|
|
21830
|
+
if (!normalized) {
|
|
21831
|
+
return "";
|
|
21832
|
+
}
|
|
21833
|
+
const segments = normalized.split("/").filter(Boolean);
|
|
21834
|
+
return segments.at(-1) ?? normalized;
|
|
21835
|
+
}
|
|
21836
|
+
function dirnameFromPath(path) {
|
|
21837
|
+
const normalized = path.trim().replace(/\/+$/, "");
|
|
21838
|
+
const segments = normalized.split("/").filter(Boolean);
|
|
21839
|
+
if (segments.length <= 1) {
|
|
21840
|
+
return "/";
|
|
21841
|
+
}
|
|
21842
|
+
return `/${segments.slice(0, -1).join("/")}`;
|
|
21843
|
+
}
|
|
21844
|
+
function referenceMentionPath(item) {
|
|
21845
|
+
const path = item.path.trim();
|
|
21846
|
+
if (item.kind === "folder" && path !== "/" && !path.endsWith("/")) {
|
|
21847
|
+
return `${path}/`;
|
|
21848
|
+
}
|
|
21849
|
+
return path;
|
|
21850
|
+
}
|
|
21851
|
+
function createAgentMentionContent(items, options = {}) {
|
|
21852
|
+
return items.flatMap((item, index) => [
|
|
21853
|
+
...index === 0 && options.prefixCaretAnchor ? [
|
|
21854
|
+
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21855
|
+
] : index > 0 ? [{ type: "text", text: " " }] : [],
|
|
21856
|
+
{ type: "agentFileMention", attrs: mentionItemToAttrs(item) },
|
|
21857
|
+
{ type: "text", text: " " }
|
|
21858
|
+
]);
|
|
21859
|
+
}
|
|
21860
|
+
function createAgentFileMentionContent(items, options = {}) {
|
|
21861
|
+
return items.flatMap((item, index) => {
|
|
21862
|
+
const path = referenceMentionPath(item);
|
|
21863
|
+
const name = item.displayName?.trim() || basename(path);
|
|
21864
|
+
return [
|
|
21865
|
+
...index === 0 && options.prefixCaretAnchor ? [
|
|
21866
|
+
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21867
|
+
] : [],
|
|
21868
|
+
{
|
|
21869
|
+
type: "agentFileMention",
|
|
21870
|
+
attrs: {
|
|
21871
|
+
kind: "file",
|
|
21872
|
+
href: path,
|
|
21873
|
+
path,
|
|
21874
|
+
name,
|
|
21875
|
+
entryKind: item.kind === "folder" ? "directory" : "file",
|
|
21876
|
+
directoryPath: dirnameFromPath(path)
|
|
21877
|
+
}
|
|
21878
|
+
},
|
|
21879
|
+
{ type: "text", text: " " }
|
|
21880
|
+
];
|
|
21881
|
+
});
|
|
21882
|
+
}
|
|
21883
|
+
|
|
21721
21884
|
// agent-gui/agentGuiNode/agentRichText/agentRichTextEngagement.ts
|
|
21722
21885
|
import { isHistoryTransaction } from "@tiptap/pm/history";
|
|
21723
21886
|
var AGENT_RICH_TEXT_SKIP_USER_CONTENT_EVENT_META = "agentRichTextSkipUserContentEvent";
|
|
@@ -21815,6 +21978,59 @@ function useAgentRichTextEditorHandle(input) {
|
|
|
21815
21978
|
})
|
|
21816
21979
|
).run();
|
|
21817
21980
|
},
|
|
21981
|
+
insertComposerFiles(items) {
|
|
21982
|
+
const currentEditor = input.editorRef.current;
|
|
21983
|
+
if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
|
|
21984
|
+
return;
|
|
21985
|
+
}
|
|
21986
|
+
if (!currentEditor.isFocused) input.onBeforeProgrammaticFocus?.();
|
|
21987
|
+
currentEditor.chain().focus().insertContent(
|
|
21988
|
+
createAgentMentionContent(
|
|
21989
|
+
items.map((item) => ({
|
|
21990
|
+
kind: "file",
|
|
21991
|
+
href: "",
|
|
21992
|
+
path: "",
|
|
21993
|
+
name: item.name,
|
|
21994
|
+
entryKind: "file",
|
|
21995
|
+
directoryPath: "",
|
|
21996
|
+
attachmentId: item.id,
|
|
21997
|
+
attachmentStatus: item.status,
|
|
21998
|
+
attachmentErrorCode: item.errorCode
|
|
21999
|
+
})),
|
|
22000
|
+
{
|
|
22001
|
+
prefixCaretAnchor: isPromptVisualLineStart(
|
|
22002
|
+
currentEditor,
|
|
22003
|
+
currentEditor.state.selection.from
|
|
22004
|
+
)
|
|
22005
|
+
}
|
|
22006
|
+
)
|
|
22007
|
+
).run();
|
|
22008
|
+
},
|
|
22009
|
+
updateComposerFiles(items) {
|
|
22010
|
+
const currentEditor = input.editorRef.current;
|
|
22011
|
+
if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
|
|
22012
|
+
return false;
|
|
22013
|
+
}
|
|
22014
|
+
const updateById = new Map(items.map((item) => [item.id, item]));
|
|
22015
|
+
let transaction = currentEditor.state.tr;
|
|
22016
|
+
let changed = false;
|
|
22017
|
+
currentEditor.state.doc.descendants((node, position) => {
|
|
22018
|
+
if (node.type.name !== "agentFileMention") return true;
|
|
22019
|
+
const attachmentId = typeof node.attrs.attachmentId === "string" ? node.attrs.attachmentId : "";
|
|
22020
|
+
const update = updateById.get(attachmentId);
|
|
22021
|
+
if (!update) return false;
|
|
22022
|
+
transaction = transaction.setNodeMarkup(position, void 0, {
|
|
22023
|
+
...node.attrs,
|
|
22024
|
+
name: update.name,
|
|
22025
|
+
attachmentStatus: update.status,
|
|
22026
|
+
attachmentErrorCode: update.errorCode ?? ""
|
|
22027
|
+
});
|
|
22028
|
+
changed = true;
|
|
22029
|
+
return false;
|
|
22030
|
+
});
|
|
22031
|
+
if (changed) currentEditor.view.dispatch(transaction);
|
|
22032
|
+
return changed;
|
|
22033
|
+
},
|
|
21818
22034
|
replaceTextBeforeSelection(length, text) {
|
|
21819
22035
|
const currentEditor = input.editorRef.current;
|
|
21820
22036
|
if (!currentEditor || currentEditor.isDestroyed || length <= 0) {
|
|
@@ -22025,7 +22241,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22025
22241
|
onPromptImagesUnsupported,
|
|
22026
22242
|
onPasteImages,
|
|
22027
22243
|
onPasteLargeText,
|
|
22028
|
-
|
|
22244
|
+
onPasteFiles,
|
|
22029
22245
|
onDropFiles
|
|
22030
22246
|
}, ref) {
|
|
22031
22247
|
"use memo";
|
|
@@ -22049,9 +22265,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22049
22265
|
const onPromptImagesUnsupportedRef = useRef28(onPromptImagesUnsupported);
|
|
22050
22266
|
const onPasteImagesRef = useRef28(onPasteImages);
|
|
22051
22267
|
const onPasteLargeTextRef = useRef28(onPasteLargeText);
|
|
22268
|
+
const onPasteFilesRef = useRef28(onPasteFiles);
|
|
22052
22269
|
const onDropFilesRef = useRef28(onDropFiles);
|
|
22053
22270
|
const promptImagesSupportedRef = useRef28(promptImagesSupported);
|
|
22054
|
-
const getReferenceForFileRef = useRef28(getReferenceForFile);
|
|
22055
22271
|
const placeholderRef = useRef28(placeholder);
|
|
22056
22272
|
const removeMentionLabelRef = useRef28(removeMentionLabel);
|
|
22057
22273
|
const availableSkillsRef = useRef28(availableSkills);
|
|
@@ -22171,9 +22387,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22171
22387
|
onPromptImagesUnsupportedRef.current = onPromptImagesUnsupported;
|
|
22172
22388
|
onPasteImagesRef.current = onPasteImages;
|
|
22173
22389
|
onPasteLargeTextRef.current = onPasteLargeText;
|
|
22390
|
+
onPasteFilesRef.current = onPasteFiles;
|
|
22174
22391
|
onDropFilesRef.current = onDropFiles;
|
|
22175
22392
|
promptImagesSupportedRef.current = promptImagesSupported;
|
|
22176
|
-
getReferenceForFileRef.current = getReferenceForFile;
|
|
22177
22393
|
placeholderRef.current = placeholder;
|
|
22178
22394
|
removeMentionLabelRef.current = removeMentionLabel;
|
|
22179
22395
|
availableSkillsRef.current = availableSkills;
|
|
@@ -22270,57 +22486,26 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22270
22486
|
return true;
|
|
22271
22487
|
},
|
|
22272
22488
|
paste: (_view, event) => {
|
|
22273
|
-
const imageFiles =
|
|
22274
|
-
if (imageFiles.length > 0) {
|
|
22489
|
+
const { imageFiles, regularFiles } = classifyAgentRichTextExternalFiles(event.clipboardData);
|
|
22490
|
+
if (imageFiles.length > 0 || regularFiles.length > 0 && onPasteFilesRef.current) {
|
|
22275
22491
|
event.preventDefault();
|
|
22276
|
-
if (
|
|
22277
|
-
|
|
22278
|
-
return true;
|
|
22492
|
+
if (regularFiles.length > 0) {
|
|
22493
|
+
onPasteFilesRef.current?.(regularFiles);
|
|
22279
22494
|
}
|
|
22280
|
-
|
|
22281
|
-
if (
|
|
22282
|
-
|
|
22283
|
-
}
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
22289
|
-
|
|
22290
|
-
event.clipboardData
|
|
22291
|
-
);
|
|
22292
|
-
if (nonImageFiles.length > 0) {
|
|
22293
|
-
const references = nonImageFiles.map((file) => {
|
|
22294
|
-
try {
|
|
22295
|
-
return getReferenceForFileFn(file);
|
|
22296
|
-
} catch {
|
|
22297
|
-
return null;
|
|
22298
|
-
}
|
|
22299
|
-
}).filter(
|
|
22300
|
-
(reference) => Boolean(reference?.path)
|
|
22301
|
-
);
|
|
22302
|
-
if (references.length > 0) {
|
|
22303
|
-
event.preventDefault();
|
|
22304
|
-
const currentEditor2 = editorRef.current;
|
|
22305
|
-
if (!currentEditor2) {
|
|
22306
|
-
return true;
|
|
22307
|
-
}
|
|
22308
|
-
if (!currentEditor2.isFocused) {
|
|
22309
|
-
currentEditor2.commands.setTextSelection(
|
|
22310
|
-
currentEditor2.state.doc.content.size
|
|
22311
|
-
);
|
|
22312
|
-
}
|
|
22313
|
-
currentEditor2.commands.insertContent(
|
|
22314
|
-
createAgentFileMentionContent(references, {
|
|
22315
|
-
prefixCaretAnchor: isPromptVisualLineStart(
|
|
22316
|
-
currentEditor2,
|
|
22317
|
-
currentEditor2.state.selection.from
|
|
22318
|
-
)
|
|
22319
|
-
})
|
|
22495
|
+
if (imageFiles.length > 0) {
|
|
22496
|
+
if (!promptImagesSupportedRef.current) {
|
|
22497
|
+
onPromptImagesUnsupportedRef.current?.();
|
|
22498
|
+
} else {
|
|
22499
|
+
void readAgentRichTextPromptImages(imageFiles).then(
|
|
22500
|
+
(images) => {
|
|
22501
|
+
if (images.length > 0) {
|
|
22502
|
+
onPasteImagesRef.current?.(images);
|
|
22503
|
+
}
|
|
22504
|
+
}
|
|
22320
22505
|
);
|
|
22321
|
-
return true;
|
|
22322
22506
|
}
|
|
22323
22507
|
}
|
|
22508
|
+
return true;
|
|
22324
22509
|
}
|
|
22325
22510
|
const html = event.clipboardData?.getData("text/html") ?? "";
|
|
22326
22511
|
const text = event.clipboardData?.getData("text/plain") ?? "";
|
|
@@ -23516,11 +23701,9 @@ import { Spinner as Spinner4 } from "@tutti-os/ui-system";
|
|
|
23516
23701
|
import { Fragment as Fragment9, jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23517
23702
|
function ComposerDraftAttachments({
|
|
23518
23703
|
draftImages,
|
|
23519
|
-
draftFiles: visibleDraftFiles,
|
|
23520
23704
|
draftLargeTexts: visibleDraftLargeTexts,
|
|
23521
23705
|
removeLabel,
|
|
23522
23706
|
onRemoveImage: removeDraftImage,
|
|
23523
|
-
onRemoveFile: removeDraftFile,
|
|
23524
23707
|
onRemoveLargeText: removeDraftLargeText,
|
|
23525
23708
|
onExpandLargeText: expandDraftLargeTextToPrompt
|
|
23526
23709
|
}) {
|
|
@@ -23542,120 +23725,75 @@ function ComposerDraftAttachments({
|
|
|
23542
23725
|
))
|
|
23543
23726
|
}
|
|
23544
23727
|
) : null,
|
|
23545
|
-
|
|
23728
|
+
visibleDraftLargeTexts.length > 0 ? /* @__PURE__ */ jsx34(
|
|
23546
23729
|
"div",
|
|
23547
23730
|
{
|
|
23548
23731
|
className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
|
|
23549
23732
|
"data-testid": "agent-gui-composer-file-drafts",
|
|
23550
|
-
children:
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23562
|
-
return /* @__PURE__ */ jsxs24(
|
|
23563
|
-
"div",
|
|
23564
|
-
{
|
|
23565
|
-
className: cn(
|
|
23566
|
-
"group relative inline-flex max-w-full items-center gap-2 rounded-[10px] border border-[var(--line-1)] bg-[var(--background-fronted)] py-1.5 pl-1.5 pr-8 text-xs text-[var(--text-primary)]",
|
|
23567
|
-
item.uploadError && "border-[color:color-mix(in_srgb,var(--danger)_55%,var(--line-1))]"
|
|
23568
|
-
),
|
|
23569
|
-
"data-testid": "agent-gui-composer-large-text-draft",
|
|
23570
|
-
"data-uploading": item.uploading ? "true" : void 0,
|
|
23571
|
-
"data-upload-error": item.uploadError ? "true" : void 0,
|
|
23572
|
-
children: [
|
|
23573
|
-
/* @__PURE__ */ jsxs24(
|
|
23574
|
-
"button",
|
|
23575
|
-
{
|
|
23576
|
-
type: "button",
|
|
23577
|
-
className: "flex min-w-0 items-center gap-2 rounded-[8px] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)] disabled:cursor-default",
|
|
23578
|
-
disabled: !canRestore,
|
|
23579
|
-
"aria-label": restoreLabel,
|
|
23580
|
-
title: item.uploadError ?? (canRestore ? restoreLabel : preview),
|
|
23581
|
-
onClick: () => expandDraftLargeTextToPrompt(item.id),
|
|
23582
|
-
children: [
|
|
23583
|
-
/* @__PURE__ */ jsx34("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-[8px] bg-[var(--transparency-hover)] text-[var(--text-secondary)]", children: item.uploading ? /* @__PURE__ */ jsx34(
|
|
23584
|
-
Spinner4,
|
|
23585
|
-
{
|
|
23586
|
-
size: 16,
|
|
23587
|
-
strokeWidth: 2.4,
|
|
23588
|
-
trackColor: "var(--transparency-hover)",
|
|
23589
|
-
testId: "agent-gui-composer-large-text-upload-spinner"
|
|
23590
|
-
}
|
|
23591
|
-
) : /* @__PURE__ */ jsx34(FileText, { size: 16, strokeWidth: 2, "aria-hidden": true }) }),
|
|
23592
|
-
/* @__PURE__ */ jsxs24("span", { className: "flex min-w-0 flex-col", children: [
|
|
23593
|
-
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate font-medium text-[var(--text-primary)]", children: preview }),
|
|
23594
|
-
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate text-[11px] text-[var(--text-tertiary)]", children: attachmentStatus })
|
|
23595
|
-
] })
|
|
23596
|
-
]
|
|
23597
|
-
}
|
|
23598
|
-
),
|
|
23599
|
-
/* @__PURE__ */ jsx34(
|
|
23600
|
-
"button",
|
|
23601
|
-
{
|
|
23602
|
-
type: "button",
|
|
23603
|
-
className: "absolute right-1.5 top-1.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--text-secondary)] transition hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)]",
|
|
23604
|
-
"aria-label": labels.removeMention,
|
|
23605
|
-
title: labels.removeMention,
|
|
23606
|
-
onClick: () => removeDraftLargeText(item.id),
|
|
23607
|
-
children: /* @__PURE__ */ jsx34(X3, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
23608
|
-
}
|
|
23609
|
-
)
|
|
23610
|
-
]
|
|
23611
|
-
},
|
|
23612
|
-
item.id
|
|
23613
|
-
);
|
|
23614
|
-
}),
|
|
23615
|
-
visibleDraftFiles.map((file) => /* @__PURE__ */ jsxs24(
|
|
23733
|
+
children: visibleDraftLargeTexts.map((item, index) => {
|
|
23734
|
+
const displayName = `${AGENT_COMPOSER_PASTED_TEXT_FILE_PREFIX}-${index + 1}.txt`;
|
|
23735
|
+
const preview = pastedTextPreview(item.text) || displayName;
|
|
23736
|
+
const attachmentTitle = translate(
|
|
23737
|
+
"agentHost.agentGui.pastedTextAttachmentTitle"
|
|
23738
|
+
);
|
|
23739
|
+
const attachmentStatus = item.uploadError ? translate("agentHost.agentGui.pastedTextAttachmentFailed") : attachmentTitle;
|
|
23740
|
+
const restoreLabel = translate(
|
|
23741
|
+
"agentHost.agentGui.pastedTextRestoreToComposer"
|
|
23742
|
+
);
|
|
23743
|
+
const canRestore = !item.uploading && item.text.trim() !== "";
|
|
23744
|
+
return /* @__PURE__ */ jsxs24(
|
|
23616
23745
|
"div",
|
|
23617
23746
|
{
|
|
23618
23747
|
className: cn(
|
|
23619
|
-
"group inline-flex max-w-full items-center gap-2 rounded-[
|
|
23620
|
-
|
|
23748
|
+
"group relative inline-flex max-w-full items-center gap-2 rounded-[10px] border border-[var(--line-1)] bg-[var(--background-fronted)] py-1.5 pl-1.5 pr-8 text-xs text-[var(--text-primary)]",
|
|
23749
|
+
item.uploadError && "border-[color:color-mix(in_srgb,var(--danger)_55%,var(--line-1))]"
|
|
23621
23750
|
),
|
|
23622
|
-
"data-
|
|
23623
|
-
"data-
|
|
23624
|
-
|
|
23751
|
+
"data-testid": "agent-gui-composer-large-text-draft",
|
|
23752
|
+
"data-uploading": item.uploading ? "true" : void 0,
|
|
23753
|
+
"data-upload-error": item.uploadError ? "true" : void 0,
|
|
23625
23754
|
children: [
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
{
|
|
23629
|
-
className: "shrink-0 text-[var(--text-primary)]",
|
|
23630
|
-
size: 14,
|
|
23631
|
-
strokeWidth: 2.4,
|
|
23632
|
-
trackColor: "var(--transparency-hover)",
|
|
23633
|
-
testId: "agent-gui-composer-file-upload-spinner"
|
|
23634
|
-
}
|
|
23635
|
-
) : /* @__PURE__ */ jsx34(
|
|
23636
|
-
"span",
|
|
23755
|
+
/* @__PURE__ */ jsxs24(
|
|
23756
|
+
"button",
|
|
23637
23757
|
{
|
|
23638
|
-
|
|
23639
|
-
"
|
|
23758
|
+
type: "button",
|
|
23759
|
+
className: "flex min-w-0 items-center gap-2 rounded-[8px] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)] disabled:cursor-default",
|
|
23760
|
+
disabled: !canRestore,
|
|
23761
|
+
"aria-label": restoreLabel,
|
|
23762
|
+
title: item.uploadError ?? (canRestore ? restoreLabel : preview),
|
|
23763
|
+
onClick: () => expandDraftLargeTextToPrompt(item.id),
|
|
23764
|
+
children: [
|
|
23765
|
+
/* @__PURE__ */ jsx34("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-[8px] bg-[var(--transparency-hover)] text-[var(--text-secondary)]", children: item.uploading ? /* @__PURE__ */ jsx34(
|
|
23766
|
+
Spinner4,
|
|
23767
|
+
{
|
|
23768
|
+
size: 16,
|
|
23769
|
+
strokeWidth: 2.4,
|
|
23770
|
+
trackColor: "var(--transparency-hover)",
|
|
23771
|
+
testId: "agent-gui-composer-large-text-upload-spinner"
|
|
23772
|
+
}
|
|
23773
|
+
) : /* @__PURE__ */ jsx34(FileText, { size: 16, strokeWidth: 2, "aria-hidden": true }) }),
|
|
23774
|
+
/* @__PURE__ */ jsxs24("span", { className: "flex min-w-0 flex-col", children: [
|
|
23775
|
+
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate font-medium text-[var(--text-primary)]", children: preview }),
|
|
23776
|
+
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate text-[11px] text-[var(--text-tertiary)]", children: attachmentStatus })
|
|
23777
|
+
] })
|
|
23778
|
+
]
|
|
23640
23779
|
}
|
|
23641
23780
|
),
|
|
23642
|
-
/* @__PURE__ */ jsx34("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
|
|
23643
23781
|
/* @__PURE__ */ jsx34(
|
|
23644
23782
|
"button",
|
|
23645
23783
|
{
|
|
23646
23784
|
type: "button",
|
|
23647
|
-
className: "inline-flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--text-secondary)] transition hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)]",
|
|
23785
|
+
className: "absolute right-1.5 top-1.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--text-secondary)] transition hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)]",
|
|
23648
23786
|
"aria-label": labels.removeMention,
|
|
23649
23787
|
title: labels.removeMention,
|
|
23650
|
-
onClick: () =>
|
|
23788
|
+
onClick: () => removeDraftLargeText(item.id),
|
|
23651
23789
|
children: /* @__PURE__ */ jsx34(X3, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
23652
23790
|
}
|
|
23653
23791
|
)
|
|
23654
23792
|
]
|
|
23655
23793
|
},
|
|
23656
|
-
|
|
23657
|
-
)
|
|
23658
|
-
|
|
23794
|
+
item.id
|
|
23795
|
+
);
|
|
23796
|
+
})
|
|
23659
23797
|
}
|
|
23660
23798
|
) : null
|
|
23661
23799
|
] });
|
|
@@ -24250,7 +24388,7 @@ function AgentComposerView(input) {
|
|
|
24250
24388
|
selectFileMention
|
|
24251
24389
|
} = input.mentionActions;
|
|
24252
24390
|
const {
|
|
24253
|
-
|
|
24391
|
+
addDraftFiles,
|
|
24254
24392
|
clearGoalModeBadge,
|
|
24255
24393
|
expandDraftLargeTextToPrompt,
|
|
24256
24394
|
handleDraftChange,
|
|
@@ -24258,7 +24396,6 @@ function AgentComposerView(input) {
|
|
|
24258
24396
|
handleOpenReferencesForEntity,
|
|
24259
24397
|
handlePastedLargeText,
|
|
24260
24398
|
handleWorkspaceReferencePicker,
|
|
24261
|
-
removeDraftFile,
|
|
24262
24399
|
removeDraftImage,
|
|
24263
24400
|
removeDraftLargeText
|
|
24264
24401
|
} = input.attachments;
|
|
@@ -24298,7 +24435,6 @@ function AgentComposerView(input) {
|
|
|
24298
24435
|
promptTipNode,
|
|
24299
24436
|
submitInteractivePromptAndDismiss,
|
|
24300
24437
|
visibleActivePrompt,
|
|
24301
|
-
visibleDraftFiles,
|
|
24302
24438
|
visibleDraftLargeTexts
|
|
24303
24439
|
} = input.presentation;
|
|
24304
24440
|
return /* @__PURE__ */ jsxs26(
|
|
@@ -24443,11 +24579,9 @@ function AgentComposerView(input) {
|
|
|
24443
24579
|
ComposerDraftAttachments,
|
|
24444
24580
|
{
|
|
24445
24581
|
draftImages,
|
|
24446
|
-
draftFiles: visibleDraftFiles,
|
|
24447
24582
|
draftLargeTexts: visibleDraftLargeTexts,
|
|
24448
24583
|
removeLabel: labels.removeMention,
|
|
24449
24584
|
onRemoveImage: removeDraftImage,
|
|
24450
|
-
onRemoveFile: removeDraftFile,
|
|
24451
24585
|
onRemoveLargeText: removeDraftLargeText,
|
|
24452
24586
|
onExpandLargeText: expandDraftLargeTextToPrompt
|
|
24453
24587
|
}
|
|
@@ -24495,8 +24629,8 @@ function AgentComposerView(input) {
|
|
|
24495
24629
|
onPromptImagesUnsupported,
|
|
24496
24630
|
onPasteImages: handlePastedImages,
|
|
24497
24631
|
onPasteLargeText: handlePastedLargeText,
|
|
24498
|
-
|
|
24499
|
-
onDropFiles: input.promptFilesSupported ?
|
|
24632
|
+
onPasteFiles: input.promptFilesSupported ? addDraftFiles : void 0,
|
|
24633
|
+
onDropFiles: input.promptFilesSupported ? addDraftFiles : void 0
|
|
24500
24634
|
}
|
|
24501
24635
|
),
|
|
24502
24636
|
!isHeroLayout ? composerActionButton : null
|
|
@@ -24807,7 +24941,8 @@ function AgentComposer(props) {
|
|
|
24807
24941
|
onSlashStatusOpen,
|
|
24808
24942
|
onLinkAction,
|
|
24809
24943
|
onRequestWorkspaceReferences = null,
|
|
24810
|
-
|
|
24944
|
+
prepareExternalPromptFiles = null,
|
|
24945
|
+
promptAssetLimit = null,
|
|
24811
24946
|
onRequestGitBranches = null,
|
|
24812
24947
|
contextMentionProviders = EMPTY_CONTEXT_MENTION_PROVIDERS,
|
|
24813
24948
|
referenceProvenanceFilter = null
|
|
@@ -24821,13 +24956,8 @@ function AgentComposer(props) {
|
|
|
24821
24956
|
largeTexts: draftLargeTexts
|
|
24822
24957
|
} = agentComposerDraftAttachmentProjection(draftContent);
|
|
24823
24958
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
24824
|
-
const agentHostApi = useOptionalAgentHostApi();
|
|
24825
|
-
const getReferenceForFile = agentHostApi?.workspace.getReferenceForFile;
|
|
24826
|
-
const promptFileUploadSupported = Boolean(
|
|
24827
|
-
canUploadAttachment && agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true)
|
|
24828
|
-
);
|
|
24829
24959
|
const promptFilesSupported = Boolean(
|
|
24830
|
-
|
|
24960
|
+
canUploadAttachment && prepareExternalPromptFiles
|
|
24831
24961
|
);
|
|
24832
24962
|
const pastedTextStagingSupported = Boolean(
|
|
24833
24963
|
canUploadAttachment && agentActivityRuntime?.stagePastedText
|
|
@@ -25027,6 +25157,7 @@ function AgentComposer(props) {
|
|
|
25027
25157
|
setIsSlashStatusPanelOpen(false);
|
|
25028
25158
|
}, [slashStatusAgentSessionId]);
|
|
25029
25159
|
const slashActions = useComposerSlashActions({
|
|
25160
|
+
workspaceId,
|
|
25030
25161
|
provider,
|
|
25031
25162
|
disabled,
|
|
25032
25163
|
submitDisabled,
|
|
@@ -25118,8 +25249,8 @@ function AgentComposer(props) {
|
|
|
25118
25249
|
goalDraftObjective,
|
|
25119
25250
|
isGoalModeActive,
|
|
25120
25251
|
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
25121
|
-
promptFileUploadSupported,
|
|
25122
25252
|
promptFilesSupported,
|
|
25253
|
+
promptAssetLimit,
|
|
25123
25254
|
pastedTextStagingSupported,
|
|
25124
25255
|
editorHandleRef,
|
|
25125
25256
|
draftPromptRef,
|
|
@@ -25133,10 +25264,10 @@ function AgentComposer(props) {
|
|
|
25133
25264
|
onPromptImagesUnsupported,
|
|
25134
25265
|
onContentEntered: reportContentEntered,
|
|
25135
25266
|
onRequestWorkspaceReferences,
|
|
25136
|
-
|
|
25267
|
+
prepareExternalPromptFiles,
|
|
25137
25268
|
onLinkAction
|
|
25138
25269
|
});
|
|
25139
|
-
const {
|
|
25270
|
+
const { addDraftFiles, addDraftImages } = attachments;
|
|
25140
25271
|
const providerState = useComposerProviderTargets({
|
|
25141
25272
|
layoutMode,
|
|
25142
25273
|
previewMode,
|
|
@@ -25175,7 +25306,7 @@ function AgentComposer(props) {
|
|
|
25175
25306
|
promptFilesSupported,
|
|
25176
25307
|
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
25177
25308
|
addDraftImages,
|
|
25178
|
-
|
|
25309
|
+
addDraftFiles,
|
|
25179
25310
|
onPromptImagesUnsupported
|
|
25180
25311
|
});
|
|
25181
25312
|
const { fileDropOverlayActive, fileDropOverlayHost } = focusAndDrop;
|
|
@@ -25203,7 +25334,6 @@ function AgentComposer(props) {
|
|
|
25203
25334
|
dockComposerTextHeight,
|
|
25204
25335
|
setDockComposerTextHeight,
|
|
25205
25336
|
draftImages,
|
|
25206
|
-
draftFiles,
|
|
25207
25337
|
draftLargeTexts
|
|
25208
25338
|
});
|
|
25209
25339
|
const { activePromptTip, promptTipStyle, rotatingPromptTips } = layout;
|
|
@@ -25259,7 +25389,6 @@ function AgentComposer(props) {
|
|
|
25259
25389
|
promptTipRef,
|
|
25260
25390
|
editorHandleRef,
|
|
25261
25391
|
mentionControllerRef,
|
|
25262
|
-
getReferenceForFile,
|
|
25263
25392
|
promptFilesSupported,
|
|
25264
25393
|
onDismissProjectMenuAutoFocus: restoreComposerCaretAfterProjectMenu,
|
|
25265
25394
|
paletteDraftPrompt,
|
|
@@ -29012,7 +29141,7 @@ function agentGUIConversationIconUrl(provider, agentTargetId, workspaceId, agent
|
|
|
29012
29141
|
agentTargets,
|
|
29013
29142
|
workspaceId
|
|
29014
29143
|
});
|
|
29015
|
-
return resolveAgentGuiSessionProviderFlatIconUrl(provider) || targetPresentation?.iconUrl?.trim() || null;
|
|
29144
|
+
return resolveAgentGuiSessionProviderFlatIconUrl(provider) || targetPresentation?.maskIconUrl?.trim() || targetPresentation?.iconUrl?.trim() || null;
|
|
29016
29145
|
}
|
|
29017
29146
|
function agentGUIConversationRailTitle(item, labels, uiLanguage) {
|
|
29018
29147
|
const title = conversationPlainTitle(item, labels, uiLanguage);
|
|
@@ -33555,7 +33684,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33555
33684
|
onCapabilitySettingsRequest,
|
|
33556
33685
|
onAgentProviderLogin,
|
|
33557
33686
|
onRequestWorkspaceReferences,
|
|
33558
|
-
|
|
33687
|
+
prepareExternalPromptFiles = null,
|
|
33688
|
+
promptAssetLimit = null,
|
|
33559
33689
|
selectProjectDirectory,
|
|
33560
33690
|
onRequestGitBranches,
|
|
33561
33691
|
onRequestComposerFocus,
|
|
@@ -33815,7 +33945,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33815
33945
|
onLinkAction: stableLinkAction,
|
|
33816
33946
|
onHandoffConversation: stableHandoffConversation,
|
|
33817
33947
|
onRequestWorkspaceReferences: stableRequestWorkspaceReferences,
|
|
33818
|
-
|
|
33948
|
+
prepareExternalPromptFiles,
|
|
33949
|
+
promptAssetLimit,
|
|
33819
33950
|
selectProjectDirectory: stableSelectProjectDirectory,
|
|
33820
33951
|
onRequestGitBranches: stableRequestGitBranches,
|
|
33821
33952
|
contextMentionProviders
|
|
@@ -33853,7 +33984,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33853
33984
|
onCapabilitySettingsRequest,
|
|
33854
33985
|
contextMentionProviders,
|
|
33855
33986
|
removeQueuedPrompt,
|
|
33856
|
-
|
|
33987
|
+
prepareExternalPromptFiles,
|
|
33988
|
+
promptAssetLimit,
|
|
33857
33989
|
sendQueuedPromptNext,
|
|
33858
33990
|
showPromptImagesUnsupported,
|
|
33859
33991
|
showStopButton,
|
|
@@ -34780,7 +34912,8 @@ function AgentGUINodeView({
|
|
|
34780
34912
|
detailMinWidthPx,
|
|
34781
34913
|
uiLanguage,
|
|
34782
34914
|
onWorkspaceFileReferencesAdded,
|
|
34783
|
-
|
|
34915
|
+
prepareExternalPromptFiles = null,
|
|
34916
|
+
promptAssetLimit = null,
|
|
34784
34917
|
onConversationRailWidthChanged,
|
|
34785
34918
|
labels,
|
|
34786
34919
|
workspaceUserProjectI18n,
|
|
@@ -35164,27 +35297,15 @@ function AgentGUINodeView({
|
|
|
35164
35297
|
workspaceUserProjectI18n
|
|
35165
35298
|
]
|
|
35166
35299
|
);
|
|
35167
|
-
const
|
|
35168
|
-
viewModel.rail.agentTargets
|
|
35169
|
-
target.agentTargetId ?? null,
|
|
35170
|
-
target.iconUrl ?? null,
|
|
35171
|
-
target.label,
|
|
35172
|
-
target.provider
|
|
35173
|
-
])
|
|
35300
|
+
const targetPresentationKey = agentTargetPresentationKey(
|
|
35301
|
+
viewModel.rail.agentTargets
|
|
35174
35302
|
);
|
|
35175
35303
|
const agentTargetPresentations = useMemo39(
|
|
35176
|
-
() =>
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
name: target.label,
|
|
35182
|
-
provider: target.provider,
|
|
35183
|
-
workspaceId: viewModel.shell.workspaceId
|
|
35184
|
-
}
|
|
35185
|
-
] : []
|
|
35186
|
-
),
|
|
35187
|
-
[agentTargetPresentationKey, viewModel.shell.workspaceId]
|
|
35304
|
+
() => projectAgentTargetPresentations({
|
|
35305
|
+
agentTargets: viewModel.rail.agentTargets,
|
|
35306
|
+
workspaceId: viewModel.shell.workspaceId
|
|
35307
|
+
}),
|
|
35308
|
+
[targetPresentationKey, viewModel.shell.workspaceId]
|
|
35188
35309
|
);
|
|
35189
35310
|
const content = /* @__PURE__ */ jsx68(AgentTargetPresentationProvider, { agentTargets: agentTargetPresentations, children: /* @__PURE__ */ jsxs48(
|
|
35190
35311
|
AgentTargetSetupRoot,
|
|
@@ -35350,7 +35471,8 @@ function AgentGUINodeView({
|
|
|
35350
35471
|
onCapabilitySettingsRequest,
|
|
35351
35472
|
onAgentProviderLogin,
|
|
35352
35473
|
onRequestWorkspaceReferences: requestWorkspaceReferences,
|
|
35353
|
-
|
|
35474
|
+
prepareExternalPromptFiles,
|
|
35475
|
+
promptAssetLimit,
|
|
35354
35476
|
selectProjectDirectory,
|
|
35355
35477
|
onRequestGitBranches,
|
|
35356
35478
|
onRequestComposerFocus: requestComposerFocus,
|
|
@@ -35823,7 +35945,7 @@ function areAgentGUINodePropsEqual(previous, next) {
|
|
|
35823
35945
|
const pc = previous.hostCapabilities, nc = next.hostCapabilities;
|
|
35824
35946
|
const pa = previous.hostActions, na = next.hostActions;
|
|
35825
35947
|
const ps = previous.renderSlots, ns = next.renderSlots;
|
|
35826
|
-
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.
|
|
35948
|
+
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentProbes === nr.agentProbes && pr.onProbeDemandChange === nr.onProbeDemandChange && pr.onProbeRefreshRequest === nr.onProbeRefreshRequest && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.contextMentionProviders === nc.contextMentionProviders && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
35827
35949
|
}
|
|
35828
35950
|
|
|
35829
35951
|
// agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
|
|
@@ -36730,7 +36852,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36730
36852
|
fileReferenceAdapter: workspaceFileReferenceAdapter = null,
|
|
36731
36853
|
onRequestGitBranches = null,
|
|
36732
36854
|
selectProjectDirectory,
|
|
36733
|
-
|
|
36855
|
+
prepareExternalPromptFiles = null,
|
|
36856
|
+
promptAssetLimit = null,
|
|
36734
36857
|
referenceSourceAggregator = null,
|
|
36735
36858
|
resolveReferenceEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
36736
36859
|
resolveMentionReferenceTarget = null,
|
|
@@ -37231,7 +37354,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37231
37354
|
detailMinWidthPx: AGENT_GUI_DETAIL_MIN_WIDTH_PX,
|
|
37232
37355
|
uiLanguage: locale,
|
|
37233
37356
|
onWorkspaceFileReferencesAdded: onWorkspaceFileReferencesAdded ? handleWorkspaceFileReferencesAdded : void 0,
|
|
37234
|
-
|
|
37357
|
+
prepareExternalPromptFiles,
|
|
37358
|
+
promptAssetLimit,
|
|
37235
37359
|
onConversationRailWidthChanged: handleConversationRailWidthChanged,
|
|
37236
37360
|
labels,
|
|
37237
37361
|
workspaceUserProjectI18n,
|
|
@@ -37350,4 +37474,4 @@ export {
|
|
|
37350
37474
|
resolveAgentGUIAgentTarget,
|
|
37351
37475
|
AgentGUI
|
|
37352
37476
|
};
|
|
37353
|
-
//# sourceMappingURL=chunk-
|
|
37477
|
+
//# sourceMappingURL=chunk-Y5HD6XHP.js.map
|