@tutti-os/agent-gui 0.0.132 → 0.0.134
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 +21 -4
- package/dist/{AgentRichTextReadonly-PEKCMRPE.js → AgentRichTextReadonly-HCKTNAYO.js} +7 -6
- package/dist/agent-conversation/index.d.ts +4 -6
- package/dist/agent-conversation/index.js +10 -10
- package/dist/agent-env/index.d.ts +10 -27
- package/dist/agent-env/index.js +14 -290
- package/dist/agent-env/index.js.map +1 -1
- package/dist/agent-gui.d.ts +1118 -20
- package/dist/agent-gui.js +18 -18
- package/dist/agent-message-center/index.d.ts +42 -7
- package/dist/agent-message-center/index.js +7 -7
- package/dist/{agentConversationVM-BD0-gg6C.d.ts → agentConversationVM-DWEy7jzx.d.ts} +41 -2
- package/dist/{agentFileMentionContracts-CWAeuL7S.d.ts → agentFileMentionContracts-B0yQizXB.d.ts} +5 -0
- package/dist/{agentGuiNodeTypes-5TL1hyCN.d.ts → agentGuiNodeTypes-DV7KvZRe.d.ts} +10 -26
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/app/renderer/agentactivity.css +7 -0
- package/dist/app/renderer/assets/icons/@-lined.svg +1 -8
- package/dist/{chunk-PQJXWXTS.js → chunk-25VMCMAQ.js} +4 -4
- package/dist/{chunk-T2NICA5D.js → chunk-5WOCGIXJ.js} +7 -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-FM42UN2J.js +462 -0
- package/dist/chunk-FM42UN2J.js.map +1 -0
- package/dist/{chunk-SZOTLVH6.js → chunk-GIYGO2PB.js} +2 -2
- package/dist/{chunk-GCQYN7BR.js → chunk-IN3HXYOO.js} +4 -4
- package/dist/{chunk-YWHGCKMT.js → chunk-IYZ4GOSN.js} +10 -10
- package/dist/chunk-IYZ4GOSN.js.map +1 -0
- package/dist/{chunk-JZS4SWFJ.js → chunk-JI5KND3K.js} +60 -56
- 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-G75CPIVV.js → chunk-Y5HD6XHP.js} +1040 -797
- 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-yc4CGJmy.d.ts → contribution-CDdwTppn.d.ts} +54 -1
- package/dist/custom-mention.d.ts +4 -2
- package/dist/custom-mention.js +1 -0
- package/dist/i18n/index.d.ts +17 -6
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +8026 -33
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +1 -1
- package/dist/mention-search.js +6 -5
- package/dist/runtime-Dwf44VKc.d.ts +7 -0
- package/dist/{types-BicfRVrV.d.ts → types-ee3zJ6Cc.d.ts} +6 -5
- 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 -2
- package/dist/workbench/contribution.js +4 -4
- package/dist/workbench/index.d.ts +1 -2
- 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/dist/workspace-agent-generated-files.d.ts +12 -1
- package/package.json +28 -13
- package/dist/AgentGUI-DxypmD7b.d.ts +0 -1080
- package/dist/agentPlanPromptDispatch-C7cCMjve.d.ts +0 -37
- package/dist/chunk-G75CPIVV.js.map +0 -1
- package/dist/chunk-JZS4SWFJ.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-T2NICA5D.js.map +0 -1
- package/dist/chunk-VMQNG2KI.js +0 -178
- package/dist/chunk-VMQNG2KI.js.map +0 -1
- package/dist/chunk-YWHGCKMT.js.map +0 -1
- package/dist/pastedTextKinds-D-XuInaS.d.ts +0 -4
- package/dist/runtime-BBNdWgDU.d.ts +0 -10
- package/dist/workspaceAgentActivityListTypes-DZfS_HgG.d.ts +0 -48
- /package/dist/{AgentRichTextReadonly-PEKCMRPE.js.map → AgentRichTextReadonly-HCKTNAYO.js.map} +0 -0
- /package/dist/{chunk-PQJXWXTS.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-GCQYN7BR.js.map → chunk-IN3HXYOO.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,10 +73,10 @@ import {
|
|
|
73
73
|
plainTextToAgentRichTextInlineContent,
|
|
74
74
|
skillDescriptionForDisplay,
|
|
75
75
|
skillTriggerForPrefix
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-UA75CGAG.js";
|
|
77
77
|
import {
|
|
78
|
-
|
|
79
|
-
} from "./chunk-
|
|
78
|
+
AgentEnvPanelActionProvider
|
|
79
|
+
} from "./chunk-FM42UN2J.js";
|
|
80
80
|
import {
|
|
81
81
|
AgentSetupDialog,
|
|
82
82
|
AgentSetupStepIcon
|
|
@@ -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
|
|
@@ -170,11 +175,11 @@ import {
|
|
|
170
175
|
} from "./chunk-QMMWKQOT.js";
|
|
171
176
|
|
|
172
177
|
// AgentGUI.tsx
|
|
173
|
-
import { memo as memo15 } from "react";
|
|
178
|
+
import { memo as memo15, useMemo as useMemo42 } from "react";
|
|
174
179
|
import { TooltipProvider as TooltipProvider6 } from "@tutti-os/ui-system";
|
|
175
180
|
|
|
176
181
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
177
|
-
import { memo as memo14, useCallback as useCallback58, useEffect as useEffect38, useMemo as useMemo41 } from "react";
|
|
182
|
+
import { memo as memo14, useCallback as useCallback58, useEffect as useEffect38, useMemo as useMemo41, useRef as useRef49 } from "react";
|
|
178
183
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
179
184
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
180
185
|
import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
|
|
@@ -3709,6 +3714,8 @@ 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() } : {},
|
|
3718
|
+
...input.sidebarIconUrl?.trim() ? { sidebarIconUrl: input.sidebarIconUrl.trim() } : {},
|
|
3712
3719
|
...input.unavailableReason?.trim() ? { unavailableReason: input.unavailableReason.trim() } : {},
|
|
3713
3720
|
...input.disabled === true ? { disabled: true } : {}
|
|
3714
3721
|
};
|
|
@@ -3810,6 +3817,8 @@ function normalizeAgentGUIAgentTarget(target) {
|
|
|
3810
3817
|
badge,
|
|
3811
3818
|
description,
|
|
3812
3819
|
iconUrl,
|
|
3820
|
+
maskIconUrl,
|
|
3821
|
+
sidebarIconUrl,
|
|
3813
3822
|
heroImageUrl,
|
|
3814
3823
|
ownerLabel,
|
|
3815
3824
|
unavailableReason,
|
|
@@ -3837,6 +3846,8 @@ function normalizeAgentGUIAgentTarget(target) {
|
|
|
3837
3846
|
...normalizedBadge ? { badge: normalizedBadge } : {},
|
|
3838
3847
|
...description?.trim() ? { description: description.trim() } : {},
|
|
3839
3848
|
...iconUrl?.trim() ? { iconUrl: iconUrl.trim() } : {},
|
|
3849
|
+
...maskIconUrl?.trim() ? { maskIconUrl: maskIconUrl.trim() } : {},
|
|
3850
|
+
...sidebarIconUrl?.trim() ? { sidebarIconUrl: sidebarIconUrl.trim() } : {},
|
|
3840
3851
|
...heroImageUrl?.trim() ? { heroImageUrl: heroImageUrl.trim() } : {},
|
|
3841
3852
|
...ownerLabel?.trim() ? { ownerLabel: ownerLabel.trim() } : {},
|
|
3842
3853
|
...unavailableReason?.trim() ? { unavailableReason: unavailableReason.trim() } : {}
|
|
@@ -13322,6 +13333,33 @@ function openWorkspaceSettingsPanel(input) {
|
|
|
13322
13333
|
workspaceSettingsPanelStore.requestSequence += 1;
|
|
13323
13334
|
}
|
|
13324
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
|
+
|
|
13325
13363
|
// agent-gui/agentGuiNode/AgentGUINode.styles.ts
|
|
13326
13364
|
var styles = {
|
|
13327
13365
|
agentAvatar: "agent-gui-node__agent-avatar",
|
|
@@ -14636,7 +14674,7 @@ var SPRING_SETTLE_VELOCITY = 0.02;
|
|
|
14636
14674
|
var MAX_FRAME_DELTA_SECONDS = 0.032;
|
|
14637
14675
|
var BADGE_CORNER_RADIUS = 0.5;
|
|
14638
14676
|
var BADGE_DIAMETER = 0.36;
|
|
14639
|
-
var BADGE_OFFSET = 0.
|
|
14677
|
+
var BADGE_OFFSET = 0.48;
|
|
14640
14678
|
var MAX_PIXEL_RATIO = 2;
|
|
14641
14679
|
var RECORD_SPIN_SECONDS = 10;
|
|
14642
14680
|
var RECORD_MODEL_SCALE = 1.3;
|
|
@@ -16277,6 +16315,24 @@ import {
|
|
|
16277
16315
|
useRef as useRef22
|
|
16278
16316
|
} from "react";
|
|
16279
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
|
+
|
|
16280
16336
|
// agent-gui/agentGuiNode/composer/composerDraftUtils.ts
|
|
16281
16337
|
var GOAL_MODE_SLASH_COMMAND = "/goal";
|
|
16282
16338
|
var AGENT_COMPOSER_PASTED_TEXT_FILE_PREFIX = "pasted-text";
|
|
@@ -16343,14 +16399,13 @@ function useStableEventCallback2(callback) {
|
|
|
16343
16399
|
function useComposerDraftAttachments({
|
|
16344
16400
|
workspaceId,
|
|
16345
16401
|
workspacePath,
|
|
16346
|
-
draftContent,
|
|
16347
16402
|
draftScopeKey,
|
|
16348
16403
|
draftByScopeKeyRef,
|
|
16349
16404
|
goalDraftObjective,
|
|
16350
16405
|
isGoalModeActive,
|
|
16351
16406
|
promptImagesSupported,
|
|
16352
|
-
promptFileUploadSupported,
|
|
16353
16407
|
promptFilesSupported,
|
|
16408
|
+
promptAssetLimit,
|
|
16354
16409
|
pastedTextStagingSupported,
|
|
16355
16410
|
editorHandleRef,
|
|
16356
16411
|
draftPromptRef,
|
|
@@ -16364,19 +16419,29 @@ function useComposerDraftAttachments({
|
|
|
16364
16419
|
onPromptImagesUnsupported,
|
|
16365
16420
|
onContentEntered,
|
|
16366
16421
|
onRequestWorkspaceReferences,
|
|
16367
|
-
|
|
16422
|
+
prepareExternalPromptFiles,
|
|
16368
16423
|
onLinkAction
|
|
16369
16424
|
}) {
|
|
16425
|
+
const agentHostApi = useOptionalAgentHostApi();
|
|
16370
16426
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
16427
|
+
const activeDraftScopeKeyRef = useRef22(draftScopeKey);
|
|
16428
|
+
activeDraftScopeKeyRef.current = draftScopeKey;
|
|
16371
16429
|
const reportContentEntered = useStableEventCallback2(
|
|
16372
16430
|
(contentType) => {
|
|
16373
16431
|
onContentEntered?.(contentType);
|
|
16374
16432
|
}
|
|
16375
16433
|
);
|
|
16434
|
+
const showErrorToast = useStableEventCallback2((message) => {
|
|
16435
|
+
agentHostApi?.toast?.error(message);
|
|
16436
|
+
});
|
|
16376
16437
|
const publishScopedDraft = useStableEventCallback2(
|
|
16377
16438
|
(sourceScopeKey, nextDraft) => {
|
|
16378
16439
|
draftByScopeKeyRef.current[sourceScopeKey] = nextDraft;
|
|
16379
16440
|
if (sourceScopeKey === draftScopeKey) {
|
|
16441
|
+
draftPromptRef.current = agentComposerDraftPrompt(nextDraft);
|
|
16442
|
+
draftImagesRef.current = agentComposerDraftImages(nextDraft);
|
|
16443
|
+
draftFilesRef.current = agentComposerDraftFiles(nextDraft);
|
|
16444
|
+
draftLargeTextsRef.current = agentComposerDraftLargeTexts(nextDraft);
|
|
16380
16445
|
onDraftContentChange(nextDraft);
|
|
16381
16446
|
} else {
|
|
16382
16447
|
onDraftContentChange(nextDraft, sourceScopeKey);
|
|
@@ -16400,9 +16465,9 @@ function useComposerDraftAttachments({
|
|
|
16400
16465
|
draftPromptRef.current = nextGoalPrompt;
|
|
16401
16466
|
setPaletteDraftPrompt(nextDraft);
|
|
16402
16467
|
setIsPaletteOpen(true);
|
|
16403
|
-
|
|
16468
|
+
updateScopedDraft(
|
|
16404
16469
|
draftScopeKey,
|
|
16405
|
-
|
|
16470
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
|
|
16406
16471
|
);
|
|
16407
16472
|
return;
|
|
16408
16473
|
}
|
|
@@ -16412,18 +16477,18 @@ function useComposerDraftAttachments({
|
|
|
16412
16477
|
draftPromptRef.current = nextGoalPrompt;
|
|
16413
16478
|
setPaletteDraftPrompt(nextGoalObjective);
|
|
16414
16479
|
setIsPaletteOpen(true);
|
|
16415
|
-
|
|
16480
|
+
updateScopedDraft(
|
|
16416
16481
|
draftScopeKey,
|
|
16417
|
-
|
|
16482
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
|
|
16418
16483
|
);
|
|
16419
16484
|
return;
|
|
16420
16485
|
}
|
|
16421
16486
|
draftPromptRef.current = nextDraft;
|
|
16422
16487
|
setPaletteDraftPrompt(nextDraft);
|
|
16423
16488
|
setIsPaletteOpen(true);
|
|
16424
|
-
|
|
16489
|
+
updateScopedDraft(
|
|
16425
16490
|
draftScopeKey,
|
|
16426
|
-
|
|
16491
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextDraft)
|
|
16427
16492
|
);
|
|
16428
16493
|
}
|
|
16429
16494
|
);
|
|
@@ -16434,17 +16499,11 @@ function useComposerDraftAttachments({
|
|
|
16434
16499
|
const nextPrompt = goalDraftObjective ?? "";
|
|
16435
16500
|
draftPromptRef.current = nextPrompt;
|
|
16436
16501
|
setPaletteDraftPrompt(nextPrompt);
|
|
16437
|
-
|
|
16502
|
+
updateScopedDraft(
|
|
16438
16503
|
draftScopeKey,
|
|
16439
|
-
|
|
16504
|
+
(currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextPrompt)
|
|
16440
16505
|
);
|
|
16441
|
-
}, [
|
|
16442
|
-
draftContent,
|
|
16443
|
-
draftScopeKey,
|
|
16444
|
-
goalDraftObjective,
|
|
16445
|
-
isGoalModeActive,
|
|
16446
|
-
publishScopedDraft
|
|
16447
|
-
]);
|
|
16506
|
+
}, [draftScopeKey, goalDraftObjective, isGoalModeActive, updateScopedDraft]);
|
|
16448
16507
|
const addDraftImages = useCallback31(
|
|
16449
16508
|
(images) => {
|
|
16450
16509
|
if (images.length === 0) {
|
|
@@ -16455,9 +16514,17 @@ function useComposerDraftAttachments({
|
|
|
16455
16514
|
return;
|
|
16456
16515
|
}
|
|
16457
16516
|
const currentDraftImages = draftImagesRef.current;
|
|
16458
|
-
const remainingSlots = Math.
|
|
16459
|
-
|
|
16460
|
-
|
|
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
|
+
})
|
|
16461
16528
|
);
|
|
16462
16529
|
if (remainingSlots === 0) {
|
|
16463
16530
|
return;
|
|
@@ -16584,6 +16651,7 @@ function useComposerDraftAttachments({
|
|
|
16584
16651
|
onPromptImagesUnsupported,
|
|
16585
16652
|
publishScopedDraft,
|
|
16586
16653
|
promptImagesSupported,
|
|
16654
|
+
promptAssetLimit,
|
|
16587
16655
|
reportContentEntered,
|
|
16588
16656
|
updateScopedDraft,
|
|
16589
16657
|
workspaceId
|
|
@@ -16607,11 +16675,38 @@ function useComposerDraftAttachments({
|
|
|
16607
16675
|
},
|
|
16608
16676
|
[draftScopeKey, publishScopedDraft]
|
|
16609
16677
|
);
|
|
16610
|
-
const
|
|
16611
|
-
(
|
|
16612
|
-
|
|
16613
|
-
|
|
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)
|
|
16614
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
|
+
];
|
|
16615
16710
|
draftFilesRef.current = nextDraftFiles;
|
|
16616
16711
|
publishScopedDraft(
|
|
16617
16712
|
draftScopeKey,
|
|
@@ -16622,8 +16717,91 @@ function useComposerDraftAttachments({
|
|
|
16622
16717
|
largeTexts: draftLargeTextsRef.current
|
|
16623
16718
|
})
|
|
16624
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
|
+
});
|
|
16625
16793
|
},
|
|
16626
|
-
[
|
|
16794
|
+
[
|
|
16795
|
+
agentActivityRuntime,
|
|
16796
|
+
draftScopeKey,
|
|
16797
|
+
prepareExternalPromptFiles,
|
|
16798
|
+
promptAssetLimit,
|
|
16799
|
+
promptFilesSupported,
|
|
16800
|
+
publishScopedDraft,
|
|
16801
|
+
showErrorToast,
|
|
16802
|
+
updateScopedDraft,
|
|
16803
|
+
workspaceId
|
|
16804
|
+
]
|
|
16627
16805
|
);
|
|
16628
16806
|
const removeDraftLargeText = useCallback31(
|
|
16629
16807
|
(id) => {
|
|
@@ -16679,6 +16857,14 @@ ${item.text}` : item.text;
|
|
|
16679
16857
|
if (!normalizedText.trim()) {
|
|
16680
16858
|
return;
|
|
16681
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
|
+
}
|
|
16682
16868
|
reportContentEntered("large_text");
|
|
16683
16869
|
const stagePastedText = pastedTextStagingSupported ? agentActivityRuntime?.stagePastedText : void 0;
|
|
16684
16870
|
const id = crypto.randomUUID();
|
|
@@ -16749,6 +16935,7 @@ ${item.text}` : item.text;
|
|
|
16749
16935
|
agentActivityRuntime,
|
|
16750
16936
|
draftScopeKey,
|
|
16751
16937
|
pastedTextStagingSupported,
|
|
16938
|
+
promptAssetLimit,
|
|
16752
16939
|
publishScopedDraft,
|
|
16753
16940
|
reportContentEntered,
|
|
16754
16941
|
updateScopedDraft,
|
|
@@ -16758,51 +16945,13 @@ ${item.text}` : item.text;
|
|
|
16758
16945
|
const applyReferencePickResult = useCallback31(
|
|
16759
16946
|
async (result) => {
|
|
16760
16947
|
if (result.files.length > 0) {
|
|
16761
|
-
|
|
16762
|
-
const uploadedFiles = await Promise.all(
|
|
16763
|
-
result.files.map(async (file) => {
|
|
16764
|
-
const hostPath = file.hostPath?.trim() ?? "";
|
|
16765
|
-
if (!hostPath) {
|
|
16766
|
-
return file;
|
|
16767
|
-
}
|
|
16768
|
-
if (!uploadPromptContent) {
|
|
16769
|
-
throw new Error(
|
|
16770
|
-
"Prompt file uploads are not supported by this agent runtime."
|
|
16771
|
-
);
|
|
16772
|
-
}
|
|
16773
|
-
const uploaded = await uploadPromptContent({
|
|
16774
|
-
workspaceId,
|
|
16775
|
-
content: [
|
|
16776
|
-
{
|
|
16777
|
-
type: "file",
|
|
16778
|
-
hostPath,
|
|
16779
|
-
name: file.displayName,
|
|
16780
|
-
kind: "file"
|
|
16781
|
-
}
|
|
16782
|
-
]
|
|
16783
|
-
});
|
|
16784
|
-
const uploadedFile = uploaded.content.find(
|
|
16785
|
-
(block) => block.type === "file"
|
|
16786
|
-
);
|
|
16787
|
-
const uploadedPath = uploadedFile?.path?.trim() ?? "";
|
|
16788
|
-
if (!uploadedPath) {
|
|
16789
|
-
throw new Error("Prompt file upload completed without path.");
|
|
16790
|
-
}
|
|
16791
|
-
return {
|
|
16792
|
-
...file,
|
|
16793
|
-
path: uploadedPath,
|
|
16794
|
-
...uploadedFile?.name ? { displayName: uploadedFile.name } : file.displayName ? { displayName: file.displayName } : {},
|
|
16795
|
-
...uploadedFile?.sizeBytes ? { sizeBytes: uploadedFile.sizeBytes } : {}
|
|
16796
|
-
};
|
|
16797
|
-
})
|
|
16798
|
-
);
|
|
16799
|
-
editorHandleRef.current?.insertWorkspaceReferences(uploadedFiles);
|
|
16948
|
+
editorHandleRef.current?.insertWorkspaceReferences(result.files);
|
|
16800
16949
|
}
|
|
16801
16950
|
if (result.mentionItems.length > 0) {
|
|
16802
16951
|
editorHandleRef.current?.insertMentionItems(result.mentionItems);
|
|
16803
16952
|
}
|
|
16804
16953
|
},
|
|
16805
|
-
[
|
|
16954
|
+
[]
|
|
16806
16955
|
);
|
|
16807
16956
|
const handleWorkspaceReferencePicker = useCallback31(async () => {
|
|
16808
16957
|
if (!onRequestWorkspaceReferences) {
|
|
@@ -16810,23 +16959,6 @@ ${item.text}` : item.text;
|
|
|
16810
16959
|
}
|
|
16811
16960
|
await applyReferencePickResult(await onRequestWorkspaceReferences());
|
|
16812
16961
|
}, [applyReferencePickResult, onRequestWorkspaceReferences]);
|
|
16813
|
-
const applyDroppedFileReferences = useCallback31(
|
|
16814
|
-
async (files) => {
|
|
16815
|
-
if (!promptFilesSupported || !resolveDroppedFileReferences || files.length === 0) {
|
|
16816
|
-
return;
|
|
16817
|
-
}
|
|
16818
|
-
const references = await resolveDroppedFileReferences(files);
|
|
16819
|
-
if (references.length === 0) {
|
|
16820
|
-
return;
|
|
16821
|
-
}
|
|
16822
|
-
await applyReferencePickResult({ files: references, mentionItems: [] });
|
|
16823
|
-
},
|
|
16824
|
-
[
|
|
16825
|
-
applyReferencePickResult,
|
|
16826
|
-
promptFilesSupported,
|
|
16827
|
-
resolveDroppedFileReferences
|
|
16828
|
-
]
|
|
16829
|
-
);
|
|
16830
16962
|
const handleOpenReferencesForEntity = useCallback31(
|
|
16831
16963
|
(entity) => {
|
|
16832
16964
|
if (!onRequestWorkspaceReferences) {
|
|
@@ -16867,7 +16999,7 @@ ${item.text}` : item.text;
|
|
|
16867
16999
|
);
|
|
16868
17000
|
return {
|
|
16869
17001
|
addDraftImages,
|
|
16870
|
-
|
|
17002
|
+
addDraftFiles,
|
|
16871
17003
|
clearGoalModeBadge,
|
|
16872
17004
|
expandDraftLargeTextToPrompt,
|
|
16873
17005
|
handleDraftChange,
|
|
@@ -16875,7 +17007,6 @@ ${item.text}` : item.text;
|
|
|
16875
17007
|
handleOpenReferencesForEntity,
|
|
16876
17008
|
handlePastedLargeText,
|
|
16877
17009
|
handleWorkspaceReferencePicker,
|
|
16878
|
-
removeDraftFile,
|
|
16879
17010
|
removeDraftImage,
|
|
16880
17011
|
removeDraftLargeText
|
|
16881
17012
|
};
|
|
@@ -16924,7 +17055,6 @@ function useComposerLayout({
|
|
|
16924
17055
|
dockComposerTextHeight,
|
|
16925
17056
|
setDockComposerTextHeight,
|
|
16926
17057
|
draftImages,
|
|
16927
|
-
draftFiles,
|
|
16928
17058
|
draftLargeTexts
|
|
16929
17059
|
}) {
|
|
16930
17060
|
const labels = { promptTipsPrefix };
|
|
@@ -17097,7 +17227,6 @@ function useComposerLayout({
|
|
|
17097
17227
|
window.removeEventListener("resize", measure);
|
|
17098
17228
|
};
|
|
17099
17229
|
}, [
|
|
17100
|
-
draftFiles.length,
|
|
17101
17230
|
draftImages.length,
|
|
17102
17231
|
draftLargeTexts.length,
|
|
17103
17232
|
isHeroLayout,
|
|
@@ -17855,7 +17984,9 @@ function useStableEventCallback3(callback) {
|
|
|
17855
17984
|
return useCallback34((...args) => callbackRef.current(...args), []);
|
|
17856
17985
|
}
|
|
17857
17986
|
function useComposerSlashActions(input) {
|
|
17987
|
+
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
17858
17988
|
const {
|
|
17989
|
+
workspaceId,
|
|
17859
17990
|
provider,
|
|
17860
17991
|
disabled,
|
|
17861
17992
|
submitDisabled,
|
|
@@ -18166,6 +18297,32 @@ function useComposerSlashActions(input) {
|
|
|
18166
18297
|
draft: nextDraftContent,
|
|
18167
18298
|
skills: availableSkills
|
|
18168
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
|
+
});
|
|
18169
18326
|
if (options?.guidance === true) {
|
|
18170
18327
|
if (!onSubmitGuidance) {
|
|
18171
18328
|
return;
|
|
@@ -18737,6 +18894,16 @@ function nonImageFilesFromDataTransfer(dataTransfer) {
|
|
|
18737
18894
|
}
|
|
18738
18895
|
return files;
|
|
18739
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
|
+
}
|
|
18740
18907
|
function systemFileDragInfoFromDataTransfer(dataTransfer) {
|
|
18741
18908
|
if (!dataTransfer) {
|
|
18742
18909
|
return { hasImageFiles: false, hasRegularFiles: false };
|
|
@@ -18882,7 +19049,7 @@ function useComposerFileDrop({
|
|
|
18882
19049
|
promptFilesSupported,
|
|
18883
19050
|
promptImagesSupported,
|
|
18884
19051
|
addDraftImages,
|
|
18885
|
-
|
|
19052
|
+
addDraftFiles,
|
|
18886
19053
|
scheduleComposerFocus,
|
|
18887
19054
|
onPromptImagesUnsupported
|
|
18888
19055
|
}) {
|
|
@@ -18964,11 +19131,8 @@ function useComposerFileDrop({
|
|
|
18964
19131
|
clearDropOverlay();
|
|
18965
19132
|
if (drop.regularFiles.length > 0) {
|
|
18966
19133
|
editorHandleRef.current?.focusAtEnd();
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
scheduleComposerFocus();
|
|
18970
|
-
}
|
|
18971
|
-
});
|
|
19134
|
+
addDraftFiles(drop.regularFiles);
|
|
19135
|
+
scheduleComposerFocus();
|
|
18972
19136
|
}
|
|
18973
19137
|
if (drop.imageFiles.length === 0) {
|
|
18974
19138
|
return;
|
|
@@ -19028,7 +19192,7 @@ function useComposerFileDrop({
|
|
|
19028
19192
|
};
|
|
19029
19193
|
}, [
|
|
19030
19194
|
addDraftImages,
|
|
19031
|
-
|
|
19195
|
+
addDraftFiles,
|
|
19032
19196
|
inputDisabled,
|
|
19033
19197
|
onPromptImagesUnsupported,
|
|
19034
19198
|
promptFilesSupported,
|
|
@@ -19052,7 +19216,7 @@ function useComposerFocusAndDrop(input) {
|
|
|
19052
19216
|
promptFilesSupported,
|
|
19053
19217
|
promptImagesSupported,
|
|
19054
19218
|
addDraftImages,
|
|
19055
|
-
|
|
19219
|
+
addDraftFiles,
|
|
19056
19220
|
onPromptImagesUnsupported
|
|
19057
19221
|
} = input;
|
|
19058
19222
|
const handleMentionPaletteButton = useCallback36(() => {
|
|
@@ -19085,7 +19249,7 @@ function useComposerFocusAndDrop(input) {
|
|
|
19085
19249
|
promptFilesSupported,
|
|
19086
19250
|
promptImagesSupported,
|
|
19087
19251
|
addDraftImages,
|
|
19088
|
-
|
|
19252
|
+
addDraftFiles,
|
|
19089
19253
|
scheduleComposerFocus,
|
|
19090
19254
|
onPromptImagesUnsupported
|
|
19091
19255
|
});
|
|
@@ -19357,7 +19521,6 @@ function useComposerPresentation(input) {
|
|
|
19357
19521
|
const visibleActivePrompt = activePrompt && dismissedPromptRequestId !== activePromptRequestId ? activePrompt : null;
|
|
19358
19522
|
const disabledReasonText = disabledReason?.trim() ?? "";
|
|
19359
19523
|
const effectivePlaceholder = disabledReasonText || placeholder;
|
|
19360
|
-
const visibleDraftFiles = draftFiles;
|
|
19361
19524
|
const visibleDraftLargeTexts = draftLargeTexts;
|
|
19362
19525
|
useEffect21(() => {
|
|
19363
19526
|
if (previousSelectedProjectPathRef.current === selectedProjectPath) {
|
|
@@ -19496,7 +19659,6 @@ function useComposerPresentation(input) {
|
|
|
19496
19659
|
promptTipNode,
|
|
19497
19660
|
submitInteractivePromptAndDismiss,
|
|
19498
19661
|
visibleActivePrompt,
|
|
19499
|
-
visibleDraftFiles,
|
|
19500
19662
|
visibleDraftLargeTexts
|
|
19501
19663
|
};
|
|
19502
19664
|
}
|
|
@@ -19726,11 +19888,15 @@ var AgentQueuedPromptImage = class extends Component2 {
|
|
|
19726
19888
|
}
|
|
19727
19889
|
};
|
|
19728
19890
|
function queuedPromptDisplayText(queuedPrompt) {
|
|
19891
|
+
const displayPrompt = queuedPrompt.displayPrompt?.trim();
|
|
19892
|
+
if (displayPrompt) {
|
|
19893
|
+
return displayPrompt;
|
|
19894
|
+
}
|
|
19729
19895
|
const prompt = agentPromptContentDisplayText(queuedPrompt.content);
|
|
19730
19896
|
if (prompt) {
|
|
19731
19897
|
return prompt;
|
|
19732
19898
|
}
|
|
19733
|
-
return
|
|
19899
|
+
return "";
|
|
19734
19900
|
}
|
|
19735
19901
|
function queuedPromptTitle(queuedPrompt) {
|
|
19736
19902
|
const prompt = queuedPromptDisplayText(queuedPrompt);
|
|
@@ -21314,63 +21480,6 @@ import {
|
|
|
21314
21480
|
} from "react";
|
|
21315
21481
|
import { useEditor } from "@tiptap/react";
|
|
21316
21482
|
|
|
21317
|
-
// agent-gui/agentGuiNode/agentRichText/agentWorkspaceFileReferences.ts
|
|
21318
|
-
function basename(path) {
|
|
21319
|
-
const normalized = path.trim().replace(/\/+$/, "");
|
|
21320
|
-
if (!normalized) {
|
|
21321
|
-
return "";
|
|
21322
|
-
}
|
|
21323
|
-
const segments = normalized.split("/").filter(Boolean);
|
|
21324
|
-
return segments.at(-1) ?? normalized;
|
|
21325
|
-
}
|
|
21326
|
-
function dirnameFromPath(path) {
|
|
21327
|
-
const normalized = path.trim().replace(/\/+$/, "");
|
|
21328
|
-
const segments = normalized.split("/").filter(Boolean);
|
|
21329
|
-
if (segments.length <= 1) {
|
|
21330
|
-
return "/";
|
|
21331
|
-
}
|
|
21332
|
-
return `/${segments.slice(0, -1).join("/")}`;
|
|
21333
|
-
}
|
|
21334
|
-
function referenceMentionPath(item) {
|
|
21335
|
-
const path = item.path.trim();
|
|
21336
|
-
if (item.kind === "folder" && path !== "/" && !path.endsWith("/")) {
|
|
21337
|
-
return `${path}/`;
|
|
21338
|
-
}
|
|
21339
|
-
return path;
|
|
21340
|
-
}
|
|
21341
|
-
function createAgentMentionContent(items, options = {}) {
|
|
21342
|
-
return items.flatMap((item, index) => [
|
|
21343
|
-
...index === 0 && options.prefixCaretAnchor ? [
|
|
21344
|
-
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21345
|
-
] : index > 0 ? [{ type: "text", text: " " }] : [],
|
|
21346
|
-
{ type: "agentFileMention", attrs: mentionItemToAttrs(item) },
|
|
21347
|
-
{ type: "text", text: " " }
|
|
21348
|
-
]);
|
|
21349
|
-
}
|
|
21350
|
-
function createAgentFileMentionContent(items, options = {}) {
|
|
21351
|
-
return items.flatMap((item, index) => {
|
|
21352
|
-
const path = referenceMentionPath(item);
|
|
21353
|
-
const name = item.displayName?.trim() || basename(path);
|
|
21354
|
-
return [
|
|
21355
|
-
...index === 0 && options.prefixCaretAnchor ? [
|
|
21356
|
-
{ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR }
|
|
21357
|
-
] : [],
|
|
21358
|
-
{
|
|
21359
|
-
type: "agentFileMention",
|
|
21360
|
-
attrs: {
|
|
21361
|
-
kind: "file",
|
|
21362
|
-
href: path,
|
|
21363
|
-
path,
|
|
21364
|
-
name,
|
|
21365
|
-
entryKind: item.kind === "folder" ? "directory" : "file",
|
|
21366
|
-
directoryPath: dirnameFromPath(path)
|
|
21367
|
-
}
|
|
21368
|
-
},
|
|
21369
|
-
{ type: "text", text: " " }
|
|
21370
|
-
];
|
|
21371
|
-
});
|
|
21372
|
-
}
|
|
21373
|
-
|
|
21374
21483
|
// agent-gui/agentGuiNode/agentRichText/agentRichTextEditorSupport.ts
|
|
21375
21484
|
import { Extension } from "@tiptap/core";
|
|
21376
21485
|
import {
|
|
@@ -21715,6 +21824,63 @@ async function readPlainTextFromClipboard() {
|
|
|
21715
21824
|
// agent-gui/agentGuiNode/agentRichText/useAgentRichTextEditorHandle.ts
|
|
21716
21825
|
import { useImperativeHandle as useImperativeHandle2 } from "react";
|
|
21717
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
|
+
|
|
21718
21884
|
// agent-gui/agentGuiNode/agentRichText/agentRichTextEngagement.ts
|
|
21719
21885
|
import { isHistoryTransaction } from "@tiptap/pm/history";
|
|
21720
21886
|
var AGENT_RICH_TEXT_SKIP_USER_CONTENT_EVENT_META = "agentRichTextSkipUserContentEvent";
|
|
@@ -21812,6 +21978,59 @@ function useAgentRichTextEditorHandle(input) {
|
|
|
21812
21978
|
})
|
|
21813
21979
|
).run();
|
|
21814
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
|
+
},
|
|
21815
22034
|
replaceTextBeforeSelection(length, text) {
|
|
21816
22035
|
const currentEditor = input.editorRef.current;
|
|
21817
22036
|
if (!currentEditor || currentEditor.isDestroyed || length <= 0) {
|
|
@@ -22022,7 +22241,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22022
22241
|
onPromptImagesUnsupported,
|
|
22023
22242
|
onPasteImages,
|
|
22024
22243
|
onPasteLargeText,
|
|
22025
|
-
|
|
22244
|
+
onPasteFiles,
|
|
22026
22245
|
onDropFiles
|
|
22027
22246
|
}, ref) {
|
|
22028
22247
|
"use memo";
|
|
@@ -22046,9 +22265,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22046
22265
|
const onPromptImagesUnsupportedRef = useRef28(onPromptImagesUnsupported);
|
|
22047
22266
|
const onPasteImagesRef = useRef28(onPasteImages);
|
|
22048
22267
|
const onPasteLargeTextRef = useRef28(onPasteLargeText);
|
|
22268
|
+
const onPasteFilesRef = useRef28(onPasteFiles);
|
|
22049
22269
|
const onDropFilesRef = useRef28(onDropFiles);
|
|
22050
22270
|
const promptImagesSupportedRef = useRef28(promptImagesSupported);
|
|
22051
|
-
const getReferenceForFileRef = useRef28(getReferenceForFile);
|
|
22052
22271
|
const placeholderRef = useRef28(placeholder);
|
|
22053
22272
|
const removeMentionLabelRef = useRef28(removeMentionLabel);
|
|
22054
22273
|
const availableSkillsRef = useRef28(availableSkills);
|
|
@@ -22168,9 +22387,9 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22168
22387
|
onPromptImagesUnsupportedRef.current = onPromptImagesUnsupported;
|
|
22169
22388
|
onPasteImagesRef.current = onPasteImages;
|
|
22170
22389
|
onPasteLargeTextRef.current = onPasteLargeText;
|
|
22390
|
+
onPasteFilesRef.current = onPasteFiles;
|
|
22171
22391
|
onDropFilesRef.current = onDropFiles;
|
|
22172
22392
|
promptImagesSupportedRef.current = promptImagesSupported;
|
|
22173
|
-
getReferenceForFileRef.current = getReferenceForFile;
|
|
22174
22393
|
placeholderRef.current = placeholder;
|
|
22175
22394
|
removeMentionLabelRef.current = removeMentionLabel;
|
|
22176
22395
|
availableSkillsRef.current = availableSkills;
|
|
@@ -22267,57 +22486,26 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22267
22486
|
return true;
|
|
22268
22487
|
},
|
|
22269
22488
|
paste: (_view, event) => {
|
|
22270
|
-
const imageFiles =
|
|
22271
|
-
if (imageFiles.length > 0) {
|
|
22489
|
+
const { imageFiles, regularFiles } = classifyAgentRichTextExternalFiles(event.clipboardData);
|
|
22490
|
+
if (imageFiles.length > 0 || regularFiles.length > 0 && onPasteFilesRef.current) {
|
|
22272
22491
|
event.preventDefault();
|
|
22273
|
-
if (
|
|
22274
|
-
|
|
22275
|
-
return true;
|
|
22492
|
+
if (regularFiles.length > 0) {
|
|
22493
|
+
onPasteFilesRef.current?.(regularFiles);
|
|
22276
22494
|
}
|
|
22277
|
-
|
|
22278
|
-
if (
|
|
22279
|
-
|
|
22280
|
-
}
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
event.clipboardData
|
|
22288
|
-
);
|
|
22289
|
-
if (nonImageFiles.length > 0) {
|
|
22290
|
-
const references = nonImageFiles.map((file) => {
|
|
22291
|
-
try {
|
|
22292
|
-
return getReferenceForFileFn(file);
|
|
22293
|
-
} catch {
|
|
22294
|
-
return null;
|
|
22295
|
-
}
|
|
22296
|
-
}).filter(
|
|
22297
|
-
(reference) => Boolean(reference?.path)
|
|
22298
|
-
);
|
|
22299
|
-
if (references.length > 0) {
|
|
22300
|
-
event.preventDefault();
|
|
22301
|
-
const currentEditor2 = editorRef.current;
|
|
22302
|
-
if (!currentEditor2) {
|
|
22303
|
-
return true;
|
|
22304
|
-
}
|
|
22305
|
-
if (!currentEditor2.isFocused) {
|
|
22306
|
-
currentEditor2.commands.setTextSelection(
|
|
22307
|
-
currentEditor2.state.doc.content.size
|
|
22308
|
-
);
|
|
22309
|
-
}
|
|
22310
|
-
currentEditor2.commands.insertContent(
|
|
22311
|
-
createAgentFileMentionContent(references, {
|
|
22312
|
-
prefixCaretAnchor: isPromptVisualLineStart(
|
|
22313
|
-
currentEditor2,
|
|
22314
|
-
currentEditor2.state.selection.from
|
|
22315
|
-
)
|
|
22316
|
-
})
|
|
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
|
+
}
|
|
22317
22505
|
);
|
|
22318
|
-
return true;
|
|
22319
22506
|
}
|
|
22320
22507
|
}
|
|
22508
|
+
return true;
|
|
22321
22509
|
}
|
|
22322
22510
|
const html = event.clipboardData?.getData("text/html") ?? "";
|
|
22323
22511
|
const text = event.clipboardData?.getData("text/plain") ?? "";
|
|
@@ -23513,11 +23701,9 @@ import { Spinner as Spinner4 } from "@tutti-os/ui-system";
|
|
|
23513
23701
|
import { Fragment as Fragment9, jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23514
23702
|
function ComposerDraftAttachments({
|
|
23515
23703
|
draftImages,
|
|
23516
|
-
draftFiles: visibleDraftFiles,
|
|
23517
23704
|
draftLargeTexts: visibleDraftLargeTexts,
|
|
23518
23705
|
removeLabel,
|
|
23519
23706
|
onRemoveImage: removeDraftImage,
|
|
23520
|
-
onRemoveFile: removeDraftFile,
|
|
23521
23707
|
onRemoveLargeText: removeDraftLargeText,
|
|
23522
23708
|
onExpandLargeText: expandDraftLargeTextToPrompt
|
|
23523
23709
|
}) {
|
|
@@ -23539,120 +23725,75 @@ function ComposerDraftAttachments({
|
|
|
23539
23725
|
))
|
|
23540
23726
|
}
|
|
23541
23727
|
) : null,
|
|
23542
|
-
|
|
23728
|
+
visibleDraftLargeTexts.length > 0 ? /* @__PURE__ */ jsx34(
|
|
23543
23729
|
"div",
|
|
23544
23730
|
{
|
|
23545
23731
|
className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
|
|
23546
23732
|
"data-testid": "agent-gui-composer-file-drafts",
|
|
23547
|
-
children:
|
|
23548
|
-
|
|
23549
|
-
|
|
23550
|
-
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
return /* @__PURE__ */ jsxs24(
|
|
23560
|
-
"div",
|
|
23561
|
-
{
|
|
23562
|
-
className: cn(
|
|
23563
|
-
"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)]",
|
|
23564
|
-
item.uploadError && "border-[color:color-mix(in_srgb,var(--danger)_55%,var(--line-1))]"
|
|
23565
|
-
),
|
|
23566
|
-
"data-testid": "agent-gui-composer-large-text-draft",
|
|
23567
|
-
"data-uploading": item.uploading ? "true" : void 0,
|
|
23568
|
-
"data-upload-error": item.uploadError ? "true" : void 0,
|
|
23569
|
-
children: [
|
|
23570
|
-
/* @__PURE__ */ jsxs24(
|
|
23571
|
-
"button",
|
|
23572
|
-
{
|
|
23573
|
-
type: "button",
|
|
23574
|
-
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",
|
|
23575
|
-
disabled: !canRestore,
|
|
23576
|
-
"aria-label": restoreLabel,
|
|
23577
|
-
title: item.uploadError ?? (canRestore ? restoreLabel : preview),
|
|
23578
|
-
onClick: () => expandDraftLargeTextToPrompt(item.id),
|
|
23579
|
-
children: [
|
|
23580
|
-
/* @__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(
|
|
23581
|
-
Spinner4,
|
|
23582
|
-
{
|
|
23583
|
-
size: 16,
|
|
23584
|
-
strokeWidth: 2.4,
|
|
23585
|
-
trackColor: "var(--transparency-hover)",
|
|
23586
|
-
testId: "agent-gui-composer-large-text-upload-spinner"
|
|
23587
|
-
}
|
|
23588
|
-
) : /* @__PURE__ */ jsx34(FileText, { size: 16, strokeWidth: 2, "aria-hidden": true }) }),
|
|
23589
|
-
/* @__PURE__ */ jsxs24("span", { className: "flex min-w-0 flex-col", children: [
|
|
23590
|
-
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate font-medium text-[var(--text-primary)]", children: preview }),
|
|
23591
|
-
/* @__PURE__ */ jsx34("span", { className: "max-w-[200px] truncate text-[11px] text-[var(--text-tertiary)]", children: attachmentStatus })
|
|
23592
|
-
] })
|
|
23593
|
-
]
|
|
23594
|
-
}
|
|
23595
|
-
),
|
|
23596
|
-
/* @__PURE__ */ jsx34(
|
|
23597
|
-
"button",
|
|
23598
|
-
{
|
|
23599
|
-
type: "button",
|
|
23600
|
-
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)]",
|
|
23601
|
-
"aria-label": labels.removeMention,
|
|
23602
|
-
title: labels.removeMention,
|
|
23603
|
-
onClick: () => removeDraftLargeText(item.id),
|
|
23604
|
-
children: /* @__PURE__ */ jsx34(X3, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
23605
|
-
}
|
|
23606
|
-
)
|
|
23607
|
-
]
|
|
23608
|
-
},
|
|
23609
|
-
item.id
|
|
23610
|
-
);
|
|
23611
|
-
}),
|
|
23612
|
-
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(
|
|
23613
23745
|
"div",
|
|
23614
23746
|
{
|
|
23615
23747
|
className: cn(
|
|
23616
|
-
"group inline-flex max-w-full items-center gap-2 rounded-[
|
|
23617
|
-
|
|
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))]"
|
|
23618
23750
|
),
|
|
23619
|
-
"data-
|
|
23620
|
-
"data-
|
|
23621
|
-
|
|
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,
|
|
23622
23754
|
children: [
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
{
|
|
23626
|
-
className: "shrink-0 text-[var(--text-primary)]",
|
|
23627
|
-
size: 14,
|
|
23628
|
-
strokeWidth: 2.4,
|
|
23629
|
-
trackColor: "var(--transparency-hover)",
|
|
23630
|
-
testId: "agent-gui-composer-file-upload-spinner"
|
|
23631
|
-
}
|
|
23632
|
-
) : /* @__PURE__ */ jsx34(
|
|
23633
|
-
"span",
|
|
23755
|
+
/* @__PURE__ */ jsxs24(
|
|
23756
|
+
"button",
|
|
23634
23757
|
{
|
|
23635
|
-
|
|
23636
|
-
"
|
|
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
|
+
]
|
|
23637
23779
|
}
|
|
23638
23780
|
),
|
|
23639
|
-
/* @__PURE__ */ jsx34("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
|
|
23640
23781
|
/* @__PURE__ */ jsx34(
|
|
23641
23782
|
"button",
|
|
23642
23783
|
{
|
|
23643
23784
|
type: "button",
|
|
23644
|
-
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)]",
|
|
23645
23786
|
"aria-label": labels.removeMention,
|
|
23646
23787
|
title: labels.removeMention,
|
|
23647
|
-
onClick: () =>
|
|
23788
|
+
onClick: () => removeDraftLargeText(item.id),
|
|
23648
23789
|
children: /* @__PURE__ */ jsx34(X3, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
23649
23790
|
}
|
|
23650
23791
|
)
|
|
23651
23792
|
]
|
|
23652
23793
|
},
|
|
23653
|
-
|
|
23654
|
-
)
|
|
23655
|
-
|
|
23794
|
+
item.id
|
|
23795
|
+
);
|
|
23796
|
+
})
|
|
23656
23797
|
}
|
|
23657
23798
|
) : null
|
|
23658
23799
|
] });
|
|
@@ -23671,11 +23812,11 @@ import {
|
|
|
23671
23812
|
TooltipTrigger as TooltipTrigger3
|
|
23672
23813
|
} from "@tutti-os/ui-system";
|
|
23673
23814
|
|
|
23674
|
-
// app/renderer/assets/icons/add-lined
|
|
23675
|
-
var
|
|
23815
|
+
// app/renderer/assets/icons/add-lined.svg
|
|
23816
|
+
var add_lined_default = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M12%202C12.5523%202%2013%202.44772%2013%203V11H21C21.5523%2011%2022%2011.4477%2022%2012C22%2012.5523%2021.5523%2013%2021%2013H13V21C13%2021.5523%2012.5523%2022%2012%2022C11.4477%2022%2011%2021.5523%2011%2021V13H3C2.44772%2013%202%2012.5523%202%2012C2%2011.4477%202.44772%2011%203%2011H11V3C11%202.44772%2011.4477%202%2012%202Z%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A";
|
|
23676
23817
|
|
|
23677
|
-
// app/renderer/assets/icons/@-
|
|
23678
|
-
var
|
|
23818
|
+
// app/renderer/assets/icons/@-lined.svg
|
|
23819
|
+
var lined_default = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.33754%202.03697C9.58184%200.986806%2012.1154%200.724603%2014.527%201.29381C16.9386%201.8631%2019.0879%203.23075%2020.6257%205.17369C22.1632%207.11667%2022.9996%209.52209%2022.9997%2011.9999V12.9999C22.9997%2014.0607%2022.5779%2015.0778%2021.8278%2015.828C21.0777%2016.5781%2020.0605%2016.9999%2018.9997%2016.9999C17.9389%2016.9998%2016.9216%2016.578%2016.1715%2015.828C16.0122%2015.6687%2015.8687%2015.4966%2015.7399%2015.3153C14.8239%2016.3478%2013.4885%2016.9999%2011.9997%2016.9999C9.23839%2016.9997%206.99965%2014.7612%206.99965%2011.9999C6.99973%209.23862%209.23844%207.00005%2011.9997%206.99986C13.125%206.99986%2014.1641%207.37146%2014.9997%207.99888C15.0003%207.44723%2015.4479%207.00005%2015.9997%206.99986C16.5519%206.99986%2016.9996%207.44764%2016.9997%207.99986V12.9999C16.9997%2013.5302%2017.2107%2014.0389%2017.5856%2014.4139C17.9606%2014.7889%2018.4694%2014.9998%2018.9997%2014.9999C19.5301%2014.9999%2020.0387%2014.7889%2020.4137%2014.4139C20.7888%2014.0389%2020.9997%2013.5303%2020.9997%2012.9999V11.9999C20.9996%209.97263%2020.3153%208.00459%2019.0573%206.4149C17.7991%204.82524%2016.0401%203.70686%2014.067%203.24107C12.094%202.77546%2010.0213%202.98932%208.1852%203.84849C6.34918%204.70773%204.85649%206.1614%203.94984%207.97447C3.04319%209.78779%202.77575%2011.8551%203.19008%2013.8397C3.6045%2015.8241%204.67674%2017.6111%206.23305%2018.91C7.78948%2020.2089%209.73975%2020.9442%2011.7663%2020.9969C13.7928%2021.0495%2015.7783%2020.4163%2017.4001%2019.2001C17.8418%2018.8689%2018.4681%2018.9587%2018.7995%2019.4003C19.1307%2019.8421%2019.0411%2020.4683%2018.5993%2020.7997C16.617%2022.2863%2014.1905%2023.0603%2011.7135%2022.996C9.23674%2022.9314%206.85405%2022.0327%204.9518%2020.4452C3.04947%2018.8574%201.73851%2016.6735%201.23206%2014.2479C0.72574%2011.8225%201.05282%209.29706%202.16078%207.08092C3.26889%204.86469%205.09332%203.08721%207.33754%202.03697ZM11.9997%208.99986C10.343%209.00005%208.99973%2010.3432%208.99966%2011.9999C8.99966%2013.6566%2010.343%2014.9997%2011.9997%2014.9999C13.6565%2014.9999%2014.9997%2013.6567%2014.9997%2011.9999C14.9996%2010.3431%2013.6565%208.99986%2011.9997%208.99986Z%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A";
|
|
23679
23820
|
|
|
23680
23821
|
// agent-gui/agentGuiNode/composer/handoffTargetPresentation.ts
|
|
23681
23822
|
function resolveHandoffTargetOwnershipLabel(target, labels) {
|
|
@@ -23748,7 +23889,7 @@ function ComposerFooter({
|
|
|
23748
23889
|
children: /* @__PURE__ */ jsx35(
|
|
23749
23890
|
AgentComposerMaskIcon,
|
|
23750
23891
|
{
|
|
23751
|
-
iconUrl:
|
|
23892
|
+
iconUrl: add_lined_default,
|
|
23752
23893
|
marker: "reference-add"
|
|
23753
23894
|
}
|
|
23754
23895
|
)
|
|
@@ -23785,7 +23926,7 @@ function ComposerFooter({
|
|
|
23785
23926
|
children: /* @__PURE__ */ jsx35(
|
|
23786
23927
|
AgentComposerMaskIcon,
|
|
23787
23928
|
{
|
|
23788
|
-
iconUrl:
|
|
23929
|
+
iconUrl: add_lined_default,
|
|
23789
23930
|
marker: "reference-add"
|
|
23790
23931
|
}
|
|
23791
23932
|
)
|
|
@@ -23813,11 +23954,11 @@ function ComposerFooter({
|
|
|
23813
23954
|
"aria-hidden": true,
|
|
23814
23955
|
className: "inline-block size-3.5 bg-[var(--text-secondary)] transition-colors group-hover:bg-[var(--text-primary)] group-focus-visible:bg-[var(--text-primary)]",
|
|
23815
23956
|
style: {
|
|
23816
|
-
WebkitMaskImage: `url("${
|
|
23957
|
+
WebkitMaskImage: `url("${lined_default}")`,
|
|
23817
23958
|
WebkitMaskPosition: "center",
|
|
23818
23959
|
WebkitMaskRepeat: "no-repeat",
|
|
23819
23960
|
WebkitMaskSize: "contain",
|
|
23820
|
-
maskImage: `url("${
|
|
23961
|
+
maskImage: `url("${lined_default}")`,
|
|
23821
23962
|
maskPosition: "center",
|
|
23822
23963
|
maskRepeat: "no-repeat",
|
|
23823
23964
|
maskSize: "contain"
|
|
@@ -24247,7 +24388,7 @@ function AgentComposerView(input) {
|
|
|
24247
24388
|
selectFileMention
|
|
24248
24389
|
} = input.mentionActions;
|
|
24249
24390
|
const {
|
|
24250
|
-
|
|
24391
|
+
addDraftFiles,
|
|
24251
24392
|
clearGoalModeBadge,
|
|
24252
24393
|
expandDraftLargeTextToPrompt,
|
|
24253
24394
|
handleDraftChange,
|
|
@@ -24255,7 +24396,6 @@ function AgentComposerView(input) {
|
|
|
24255
24396
|
handleOpenReferencesForEntity,
|
|
24256
24397
|
handlePastedLargeText,
|
|
24257
24398
|
handleWorkspaceReferencePicker,
|
|
24258
|
-
removeDraftFile,
|
|
24259
24399
|
removeDraftImage,
|
|
24260
24400
|
removeDraftLargeText
|
|
24261
24401
|
} = input.attachments;
|
|
@@ -24295,7 +24435,6 @@ function AgentComposerView(input) {
|
|
|
24295
24435
|
promptTipNode,
|
|
24296
24436
|
submitInteractivePromptAndDismiss,
|
|
24297
24437
|
visibleActivePrompt,
|
|
24298
|
-
visibleDraftFiles,
|
|
24299
24438
|
visibleDraftLargeTexts
|
|
24300
24439
|
} = input.presentation;
|
|
24301
24440
|
return /* @__PURE__ */ jsxs26(
|
|
@@ -24440,11 +24579,9 @@ function AgentComposerView(input) {
|
|
|
24440
24579
|
ComposerDraftAttachments,
|
|
24441
24580
|
{
|
|
24442
24581
|
draftImages,
|
|
24443
|
-
draftFiles: visibleDraftFiles,
|
|
24444
24582
|
draftLargeTexts: visibleDraftLargeTexts,
|
|
24445
24583
|
removeLabel: labels.removeMention,
|
|
24446
24584
|
onRemoveImage: removeDraftImage,
|
|
24447
|
-
onRemoveFile: removeDraftFile,
|
|
24448
24585
|
onRemoveLargeText: removeDraftLargeText,
|
|
24449
24586
|
onExpandLargeText: expandDraftLargeTextToPrompt
|
|
24450
24587
|
}
|
|
@@ -24492,8 +24629,8 @@ function AgentComposerView(input) {
|
|
|
24492
24629
|
onPromptImagesUnsupported,
|
|
24493
24630
|
onPasteImages: handlePastedImages,
|
|
24494
24631
|
onPasteLargeText: handlePastedLargeText,
|
|
24495
|
-
|
|
24496
|
-
onDropFiles: input.promptFilesSupported ?
|
|
24632
|
+
onPasteFiles: input.promptFilesSupported ? addDraftFiles : void 0,
|
|
24633
|
+
onDropFiles: input.promptFilesSupported ? addDraftFiles : void 0
|
|
24497
24634
|
}
|
|
24498
24635
|
),
|
|
24499
24636
|
!isHeroLayout ? composerActionButton : null
|
|
@@ -24804,7 +24941,8 @@ function AgentComposer(props) {
|
|
|
24804
24941
|
onSlashStatusOpen,
|
|
24805
24942
|
onLinkAction,
|
|
24806
24943
|
onRequestWorkspaceReferences = null,
|
|
24807
|
-
|
|
24944
|
+
prepareExternalPromptFiles = null,
|
|
24945
|
+
promptAssetLimit = null,
|
|
24808
24946
|
onRequestGitBranches = null,
|
|
24809
24947
|
contextMentionProviders = EMPTY_CONTEXT_MENTION_PROVIDERS,
|
|
24810
24948
|
referenceProvenanceFilter = null
|
|
@@ -24818,13 +24956,8 @@ function AgentComposer(props) {
|
|
|
24818
24956
|
largeTexts: draftLargeTexts
|
|
24819
24957
|
} = agentComposerDraftAttachmentProjection(draftContent);
|
|
24820
24958
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
24821
|
-
const agentHostApi = useOptionalAgentHostApi();
|
|
24822
|
-
const getReferenceForFile = agentHostApi?.workspace.getReferenceForFile;
|
|
24823
|
-
const promptFileUploadSupported = Boolean(
|
|
24824
|
-
canUploadAttachment && agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true)
|
|
24825
|
-
);
|
|
24826
24959
|
const promptFilesSupported = Boolean(
|
|
24827
|
-
|
|
24960
|
+
canUploadAttachment && prepareExternalPromptFiles
|
|
24828
24961
|
);
|
|
24829
24962
|
const pastedTextStagingSupported = Boolean(
|
|
24830
24963
|
canUploadAttachment && agentActivityRuntime?.stagePastedText
|
|
@@ -25024,6 +25157,7 @@ function AgentComposer(props) {
|
|
|
25024
25157
|
setIsSlashStatusPanelOpen(false);
|
|
25025
25158
|
}, [slashStatusAgentSessionId]);
|
|
25026
25159
|
const slashActions = useComposerSlashActions({
|
|
25160
|
+
workspaceId,
|
|
25027
25161
|
provider,
|
|
25028
25162
|
disabled,
|
|
25029
25163
|
submitDisabled,
|
|
@@ -25115,8 +25249,8 @@ function AgentComposer(props) {
|
|
|
25115
25249
|
goalDraftObjective,
|
|
25116
25250
|
isGoalModeActive,
|
|
25117
25251
|
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
25118
|
-
promptFileUploadSupported,
|
|
25119
25252
|
promptFilesSupported,
|
|
25253
|
+
promptAssetLimit,
|
|
25120
25254
|
pastedTextStagingSupported,
|
|
25121
25255
|
editorHandleRef,
|
|
25122
25256
|
draftPromptRef,
|
|
@@ -25130,10 +25264,10 @@ function AgentComposer(props) {
|
|
|
25130
25264
|
onPromptImagesUnsupported,
|
|
25131
25265
|
onContentEntered: reportContentEntered,
|
|
25132
25266
|
onRequestWorkspaceReferences,
|
|
25133
|
-
|
|
25267
|
+
prepareExternalPromptFiles,
|
|
25134
25268
|
onLinkAction
|
|
25135
25269
|
});
|
|
25136
|
-
const {
|
|
25270
|
+
const { addDraftFiles, addDraftImages } = attachments;
|
|
25137
25271
|
const providerState = useComposerProviderTargets({
|
|
25138
25272
|
layoutMode,
|
|
25139
25273
|
previewMode,
|
|
@@ -25172,7 +25306,7 @@ function AgentComposer(props) {
|
|
|
25172
25306
|
promptFilesSupported,
|
|
25173
25307
|
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
25174
25308
|
addDraftImages,
|
|
25175
|
-
|
|
25309
|
+
addDraftFiles,
|
|
25176
25310
|
onPromptImagesUnsupported
|
|
25177
25311
|
});
|
|
25178
25312
|
const { fileDropOverlayActive, fileDropOverlayHost } = focusAndDrop;
|
|
@@ -25200,7 +25334,6 @@ function AgentComposer(props) {
|
|
|
25200
25334
|
dockComposerTextHeight,
|
|
25201
25335
|
setDockComposerTextHeight,
|
|
25202
25336
|
draftImages,
|
|
25203
|
-
draftFiles,
|
|
25204
25337
|
draftLargeTexts
|
|
25205
25338
|
});
|
|
25206
25339
|
const { activePromptTip, promptTipStyle, rotatingPromptTips } = layout;
|
|
@@ -25256,7 +25389,6 @@ function AgentComposer(props) {
|
|
|
25256
25389
|
promptTipRef,
|
|
25257
25390
|
editorHandleRef,
|
|
25258
25391
|
mentionControllerRef,
|
|
25259
|
-
getReferenceForFile,
|
|
25260
25392
|
promptFilesSupported,
|
|
25261
25393
|
onDismissProjectMenuAutoFocus: restoreComposerCaretAfterProjectMenu,
|
|
25262
25394
|
paletteDraftPrompt,
|
|
@@ -26194,12 +26326,12 @@ function resolveAgentGUIHeroIconUrl2(provider) {
|
|
|
26194
26326
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
26195
26327
|
return MANAGED_AGENT_ICON_URLS[normalizedProvider] ?? MANAGED_AGENT_ICON_FALLBACK_URL;
|
|
26196
26328
|
}
|
|
26197
|
-
function agentGUIProviderRailIconPresentation(provider, iconUrl) {
|
|
26329
|
+
function agentGUIProviderRailIconPresentation(provider, iconUrl, sidebarIconUrl) {
|
|
26198
26330
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
26199
26331
|
const providerRailIconUrl = MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS[normalizedProvider] ?? null;
|
|
26200
26332
|
return {
|
|
26201
26333
|
provider: normalizedProvider,
|
|
26202
|
-
iconUrl: (normalizedProvider === "cursor" ? providerRailIconUrl : null) || iconUrl?.trim() || providerRailIconUrl || resolveAgentGUIHeroIconUrl2(normalizedProvider)
|
|
26334
|
+
iconUrl: (normalizedProvider === "cursor" ? providerRailIconUrl : null) || sidebarIconUrl?.trim() || iconUrl?.trim() || providerRailIconUrl || resolveAgentGUIHeroIconUrl2(normalizedProvider)
|
|
26203
26335
|
};
|
|
26204
26336
|
}
|
|
26205
26337
|
function shouldEmphasizeEmptyHeroProvider(label) {
|
|
@@ -26637,7 +26769,8 @@ function EmptyHeroTitle({
|
|
|
26637
26769
|
className: "size-4 shrink-0 rounded-[4px]",
|
|
26638
26770
|
src: agentGUIProviderRailIconPresentation(
|
|
26639
26771
|
target.provider,
|
|
26640
|
-
target.iconUrl
|
|
26772
|
+
target.iconUrl,
|
|
26773
|
+
target.sidebarIconUrl
|
|
26641
26774
|
).iconUrl
|
|
26642
26775
|
}
|
|
26643
26776
|
),
|
|
@@ -27033,7 +27166,8 @@ function AgentGUIProviderManagerDialog({
|
|
|
27033
27166
|
ariaHidden: true,
|
|
27034
27167
|
icon: agentGUIProviderRailIconPresentation(
|
|
27035
27168
|
target.provider,
|
|
27036
|
-
target.iconUrl
|
|
27169
|
+
target.iconUrl,
|
|
27170
|
+
target.sidebarIconUrl
|
|
27037
27171
|
),
|
|
27038
27172
|
imageClassName: "size-9 shrink-0 rounded-[9px] object-cover"
|
|
27039
27173
|
}
|
|
@@ -27149,7 +27283,8 @@ function AgentGUIProviderManagerDialog({
|
|
|
27149
27283
|
ariaHidden: true,
|
|
27150
27284
|
icon: agentGUIProviderRailIconPresentation(
|
|
27151
27285
|
target.provider,
|
|
27152
|
-
target.iconUrl
|
|
27286
|
+
target.iconUrl,
|
|
27287
|
+
target.sidebarIconUrl
|
|
27153
27288
|
),
|
|
27154
27289
|
imageClassName: "size-9 shrink-0 rounded-[9px] object-cover opacity-70 grayscale-[0.25]"
|
|
27155
27290
|
}
|
|
@@ -27747,7 +27882,8 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
27747
27882
|
imageClassName: AgentGUINode_styles_default.providerRailAvatarImage,
|
|
27748
27883
|
icon: agentGUIProviderRailIconPresentation(
|
|
27749
27884
|
target.provider,
|
|
27750
|
-
target.iconUrl
|
|
27885
|
+
target.iconUrl,
|
|
27886
|
+
target.sidebarIconUrl
|
|
27751
27887
|
)
|
|
27752
27888
|
}
|
|
27753
27889
|
),
|
|
@@ -28803,6 +28939,9 @@ function PinLinedIcon(props) {
|
|
|
28803
28939
|
);
|
|
28804
28940
|
}
|
|
28805
28941
|
|
|
28942
|
+
// agent-gui/agentGuiNode/view/AgentGUIConversationRailClock.tsx
|
|
28943
|
+
import { useExternalStoreSnapshot as useExternalStoreSnapshot2 } from "@tutti-os/ui-react-hooks";
|
|
28944
|
+
|
|
28806
28945
|
// agent-gui/agentGuiNode/agentGuiNodeViewConversation.tsx
|
|
28807
28946
|
import { Spinner as Spinner5 } from "@tutti-os/ui-system";
|
|
28808
28947
|
import { AskLinedIcon } from "@tutti-os/ui-system/icons";
|
|
@@ -28950,15 +29089,59 @@ function AttentionGlyph() {
|
|
|
28950
29089
|
);
|
|
28951
29090
|
}
|
|
28952
29091
|
|
|
29092
|
+
// agent-gui/agentGuiNode/view/AgentGUIConversationRailClock.tsx
|
|
29093
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
29094
|
+
var AgentGUIConversationRailClockStore = class {
|
|
29095
|
+
currentTimeMs = Date.now();
|
|
29096
|
+
listeners = /* @__PURE__ */ new Set();
|
|
29097
|
+
timer = null;
|
|
29098
|
+
getSnapshot = () => this.currentTimeMs;
|
|
29099
|
+
subscribe = (listener) => {
|
|
29100
|
+
this.listeners.add(listener);
|
|
29101
|
+
if (this.listeners.size === 1) {
|
|
29102
|
+
this.start();
|
|
29103
|
+
}
|
|
29104
|
+
return () => {
|
|
29105
|
+
this.listeners.delete(listener);
|
|
29106
|
+
if (this.listeners.size === 0) {
|
|
29107
|
+
this.stop();
|
|
29108
|
+
}
|
|
29109
|
+
};
|
|
29110
|
+
};
|
|
29111
|
+
start() {
|
|
29112
|
+
this.currentTimeMs = Date.now();
|
|
29113
|
+
this.timer = window.setInterval(() => {
|
|
29114
|
+
this.currentTimeMs = Date.now();
|
|
29115
|
+
for (const listener of this.listeners) {
|
|
29116
|
+
listener();
|
|
29117
|
+
}
|
|
29118
|
+
}, 6e4);
|
|
29119
|
+
}
|
|
29120
|
+
stop() {
|
|
29121
|
+
if (this.timer !== null) {
|
|
29122
|
+
window.clearInterval(this.timer);
|
|
29123
|
+
this.timer = null;
|
|
29124
|
+
}
|
|
29125
|
+
}
|
|
29126
|
+
};
|
|
29127
|
+
var agentGUIConversationRailClock = new AgentGUIConversationRailClockStore();
|
|
29128
|
+
function AgentGUIConversationRailRelativeTime({
|
|
29129
|
+
item,
|
|
29130
|
+
labels
|
|
29131
|
+
}) {
|
|
29132
|
+
const currentTimeMs = useExternalStoreSnapshot2(agentGUIConversationRailClock);
|
|
29133
|
+
return /* @__PURE__ */ jsx51(ConversationMeta, { item, nowMs: currentTimeMs, labels });
|
|
29134
|
+
}
|
|
29135
|
+
|
|
28953
29136
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailItem.tsx
|
|
28954
|
-
import { Fragment as Fragment14, jsx as
|
|
29137
|
+
import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
28955
29138
|
function agentGUIConversationIconUrl(provider, agentTargetId, workspaceId, agentTargets) {
|
|
28956
29139
|
const targetPresentation = resolveAgentTargetPresentation({
|
|
28957
29140
|
agentTargetId: agentTargetId ?? "",
|
|
28958
29141
|
agentTargets,
|
|
28959
29142
|
workspaceId
|
|
28960
29143
|
});
|
|
28961
|
-
return resolveAgentGuiSessionProviderFlatIconUrl(provider) || targetPresentation?.iconUrl?.trim() || null;
|
|
29144
|
+
return resolveAgentGuiSessionProviderFlatIconUrl(provider) || targetPresentation?.maskIconUrl?.trim() || targetPresentation?.iconUrl?.trim() || null;
|
|
28962
29145
|
}
|
|
28963
29146
|
function agentGUIConversationRailTitle(item, labels, uiLanguage) {
|
|
28964
29147
|
const title = conversationPlainTitle(item, labels, uiLanguage);
|
|
@@ -28971,7 +29154,6 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
28971
29154
|
isPendingDeleteConversation,
|
|
28972
29155
|
isDeletingConversation,
|
|
28973
29156
|
isRailInteractionLocked,
|
|
28974
|
-
currentTimeMs,
|
|
28975
29157
|
labels,
|
|
28976
29158
|
previewMode,
|
|
28977
29159
|
uiLanguage,
|
|
@@ -29143,7 +29325,7 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29143
29325
|
},
|
|
29144
29326
|
children: [
|
|
29145
29327
|
/* @__PURE__ */ jsxs36("span", { className: AgentGUINode_styles_default.conversationTitleRow, children: [
|
|
29146
|
-
conversationIconUrl ? /* @__PURE__ */
|
|
29328
|
+
conversationIconUrl ? /* @__PURE__ */ jsx52(
|
|
29147
29329
|
"span",
|
|
29148
29330
|
{
|
|
29149
29331
|
"aria-hidden": "true",
|
|
@@ -29153,22 +29335,22 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29153
29335
|
}
|
|
29154
29336
|
}
|
|
29155
29337
|
) : null,
|
|
29156
|
-
item.titleLeadingMentionKind === "task" ? /* @__PURE__ */
|
|
29338
|
+
item.titleLeadingMentionKind === "task" ? /* @__PURE__ */ jsx52(
|
|
29157
29339
|
"span",
|
|
29158
29340
|
{
|
|
29159
29341
|
"aria-hidden": "true",
|
|
29160
29342
|
className: AgentGUINode_styles_default.conversationTitleMentionIcon,
|
|
29161
29343
|
"data-agent-gui-conversation-title-mention-icon": item.titleLeadingMentionKind,
|
|
29162
|
-
children: /* @__PURE__ */
|
|
29344
|
+
children: /* @__PURE__ */ jsx52(IssueIcon, {})
|
|
29163
29345
|
}
|
|
29164
29346
|
) : null,
|
|
29165
|
-
/* @__PURE__ */
|
|
29347
|
+
/* @__PURE__ */ jsx52("span", { className: AgentGUINode_styles_default.conversationTitle, children: agentGUIConversationRailTitle(item, labels, uiLanguage) })
|
|
29166
29348
|
] }),
|
|
29167
|
-
/* @__PURE__ */
|
|
29349
|
+
/* @__PURE__ */ jsx52(AgentGUIConversationRailRelativeTime, { item, labels })
|
|
29168
29350
|
]
|
|
29169
29351
|
}
|
|
29170
29352
|
),
|
|
29171
|
-
previewMode ? null : /* @__PURE__ */
|
|
29353
|
+
previewMode ? null : /* @__PURE__ */ jsx52("div", { className: AgentGUINode_styles_default.conversationActions, children: isPendingDeleteConversation ? /* @__PURE__ */ jsx52(
|
|
29172
29354
|
"button",
|
|
29173
29355
|
{
|
|
29174
29356
|
type: "button",
|
|
@@ -29182,10 +29364,10 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29182
29364
|
onConfirmDeleteConversation();
|
|
29183
29365
|
}
|
|
29184
29366
|
},
|
|
29185
|
-
children: /* @__PURE__ */
|
|
29367
|
+
children: /* @__PURE__ */ jsx52("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
|
|
29186
29368
|
}
|
|
29187
29369
|
) : /* @__PURE__ */ jsxs36(Fragment14, { children: [
|
|
29188
|
-
onOpenConversationWindow ? /* @__PURE__ */
|
|
29370
|
+
onOpenConversationWindow ? /* @__PURE__ */ jsx52(
|
|
29189
29371
|
BareIconButton,
|
|
29190
29372
|
{
|
|
29191
29373
|
className: AgentGUINode_styles_default.conversationOpenWindowButton,
|
|
@@ -29202,10 +29384,10 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29202
29384
|
event.stopPropagation();
|
|
29203
29385
|
handleOpenConversationWindow();
|
|
29204
29386
|
},
|
|
29205
|
-
children: /* @__PURE__ */
|
|
29387
|
+
children: /* @__PURE__ */ jsx52(ExternalLink2, { "aria-hidden": "true" })
|
|
29206
29388
|
}
|
|
29207
29389
|
) : null,
|
|
29208
|
-
/* @__PURE__ */
|
|
29390
|
+
/* @__PURE__ */ jsx52(
|
|
29209
29391
|
BareIconButton,
|
|
29210
29392
|
{
|
|
29211
29393
|
className: AgentGUINode_styles_default.conversationPinButton,
|
|
@@ -29222,10 +29404,10 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29222
29404
|
event.stopPropagation();
|
|
29223
29405
|
handleTogglePinned();
|
|
29224
29406
|
},
|
|
29225
|
-
children: pinned ? /* @__PURE__ */
|
|
29407
|
+
children: pinned ? /* @__PURE__ */ jsx52(PinFilledIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx52(PinLinedIcon, { "aria-hidden": "true" })
|
|
29226
29408
|
}
|
|
29227
29409
|
),
|
|
29228
|
-
/* @__PURE__ */
|
|
29410
|
+
/* @__PURE__ */ jsx52(
|
|
29229
29411
|
BareIconButton,
|
|
29230
29412
|
{
|
|
29231
29413
|
className: AgentGUINode_styles_default.conversationDeleteButton,
|
|
@@ -29242,7 +29424,7 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29242
29424
|
event.stopPropagation();
|
|
29243
29425
|
handleRequestDelete();
|
|
29244
29426
|
},
|
|
29245
|
-
children: /* @__PURE__ */
|
|
29427
|
+
children: /* @__PURE__ */ jsx52(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
29246
29428
|
}
|
|
29247
29429
|
)
|
|
29248
29430
|
] }) })
|
|
@@ -29253,13 +29435,13 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29253
29435
|
return row;
|
|
29254
29436
|
}
|
|
29255
29437
|
return /* @__PURE__ */ jsxs36(ContextMenu, { children: [
|
|
29256
|
-
/* @__PURE__ */
|
|
29438
|
+
/* @__PURE__ */ jsx52(ContextMenuTrigger, { asChild: true, children: row }),
|
|
29257
29439
|
/* @__PURE__ */ jsxs36(
|
|
29258
29440
|
ContextMenuContent,
|
|
29259
29441
|
{
|
|
29260
29442
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
29261
29443
|
children: [
|
|
29262
|
-
/* @__PURE__ */
|
|
29444
|
+
/* @__PURE__ */ jsx52(
|
|
29263
29445
|
ContextMenuItem,
|
|
29264
29446
|
{
|
|
29265
29447
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29270,10 +29452,10 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29270
29452
|
}
|
|
29271
29453
|
},
|
|
29272
29454
|
onSelect: handleContextMenuRename,
|
|
29273
|
-
children: /* @__PURE__ */
|
|
29455
|
+
children: /* @__PURE__ */ jsx52("span", { children: labels.renameSession })
|
|
29274
29456
|
}
|
|
29275
29457
|
),
|
|
29276
|
-
onOpenConversationWindow ? /* @__PURE__ */
|
|
29458
|
+
onOpenConversationWindow ? /* @__PURE__ */ jsx52(
|
|
29277
29459
|
ContextMenuItem,
|
|
29278
29460
|
{
|
|
29279
29461
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29284,10 +29466,10 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29284
29466
|
}
|
|
29285
29467
|
},
|
|
29286
29468
|
onSelect: handleContextMenuOpenConversationWindow,
|
|
29287
|
-
children: /* @__PURE__ */
|
|
29469
|
+
children: /* @__PURE__ */ jsx52("span", { children: labels.openConversationWindow })
|
|
29288
29470
|
}
|
|
29289
29471
|
) : null,
|
|
29290
|
-
/* @__PURE__ */
|
|
29472
|
+
/* @__PURE__ */ jsx52(
|
|
29291
29473
|
ContextMenuItem,
|
|
29292
29474
|
{
|
|
29293
29475
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29298,16 +29480,16 @@ var AgentGUIConversationRailItem = memo5(
|
|
|
29298
29480
|
}
|
|
29299
29481
|
},
|
|
29300
29482
|
onSelect: handleContextMenuCopySessionLink,
|
|
29301
|
-
children: /* @__PURE__ */
|
|
29483
|
+
children: /* @__PURE__ */ jsx52("span", { children: labels.copySessionLink })
|
|
29302
29484
|
}
|
|
29303
29485
|
),
|
|
29304
|
-
/* @__PURE__ */
|
|
29486
|
+
/* @__PURE__ */ jsx52(
|
|
29305
29487
|
ContextMenuItem,
|
|
29306
29488
|
{
|
|
29307
29489
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
29308
29490
|
disabled: !canMarkUnread,
|
|
29309
29491
|
onSelect: handleMarkUnread,
|
|
29310
|
-
children: /* @__PURE__ */
|
|
29492
|
+
children: /* @__PURE__ */ jsx52("span", { children: labels.markSessionUnread })
|
|
29311
29493
|
}
|
|
29312
29494
|
)
|
|
29313
29495
|
]
|
|
@@ -29336,9 +29518,9 @@ function AgentGUIProjectRailHeader({
|
|
|
29336
29518
|
]
|
|
29337
29519
|
);
|
|
29338
29520
|
return /* @__PURE__ */ jsxs36("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
|
|
29339
|
-
/* @__PURE__ */
|
|
29521
|
+
/* @__PURE__ */ jsx52("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx52("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
|
|
29340
29522
|
/* @__PURE__ */ jsxs36("div", { className: AgentGUINode_styles_default.projectRailAddProject, children: [
|
|
29341
|
-
/* @__PURE__ */
|
|
29523
|
+
/* @__PURE__ */ jsx52(
|
|
29342
29524
|
WorkspaceUserProjectSelect2,
|
|
29343
29525
|
{
|
|
29344
29526
|
api: userProjectApi,
|
|
@@ -29369,7 +29551,7 @@ function AgentGUIProjectRailHeader({
|
|
|
29369
29551
|
"projectSelect.addProject"
|
|
29370
29552
|
])
|
|
29371
29553
|
},
|
|
29372
|
-
renderAddProjectIcon: () => /* @__PURE__ */
|
|
29554
|
+
renderAddProjectIcon: () => /* @__PURE__ */ jsx52(
|
|
29373
29555
|
NewWorkspaceLinedIcon2,
|
|
29374
29556
|
{
|
|
29375
29557
|
"aria-hidden": true,
|
|
@@ -29387,7 +29569,7 @@ function AgentGUIProjectRailHeader({
|
|
|
29387
29569
|
}
|
|
29388
29570
|
}
|
|
29389
29571
|
),
|
|
29390
|
-
/* @__PURE__ */
|
|
29572
|
+
/* @__PURE__ */ jsx52(
|
|
29391
29573
|
NewWorkspaceLinedIcon2,
|
|
29392
29574
|
{
|
|
29393
29575
|
"aria-hidden": true,
|
|
@@ -29399,7 +29581,7 @@ function AgentGUIProjectRailHeader({
|
|
|
29399
29581
|
}
|
|
29400
29582
|
|
|
29401
29583
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailSection.tsx
|
|
29402
|
-
import { jsx as
|
|
29584
|
+
import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
29403
29585
|
var AgentGUIConversationRailSection = memo6(
|
|
29404
29586
|
function AgentGUIConversationRailSection2({
|
|
29405
29587
|
section,
|
|
@@ -29425,7 +29607,6 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29425
29607
|
sectionTotalCount,
|
|
29426
29608
|
visibleItemLimit,
|
|
29427
29609
|
createConversationDisabled,
|
|
29428
|
-
currentTimeMs,
|
|
29429
29610
|
labels,
|
|
29430
29611
|
uiLanguage,
|
|
29431
29612
|
workspaceId,
|
|
@@ -29572,7 +29753,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29572
29753
|
}
|
|
29573
29754
|
},
|
|
29574
29755
|
children: [
|
|
29575
|
-
/* @__PURE__ */
|
|
29756
|
+
/* @__PURE__ */ jsx53(
|
|
29576
29757
|
ChevronRight2,
|
|
29577
29758
|
{
|
|
29578
29759
|
"aria-hidden": "true",
|
|
@@ -29580,14 +29761,14 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29580
29761
|
}
|
|
29581
29762
|
),
|
|
29582
29763
|
/* @__PURE__ */ jsxs37("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: [
|
|
29583
|
-
isSectionCollapsed ? /* @__PURE__ */
|
|
29764
|
+
isSectionCollapsed ? /* @__PURE__ */ jsx53(
|
|
29584
29765
|
FolderIcon2,
|
|
29585
29766
|
{
|
|
29586
29767
|
"aria-hidden": "true",
|
|
29587
29768
|
className: AgentGUINode_styles_default.conversationSectionLabelIcon,
|
|
29588
29769
|
"data-project-drag-icon": "true"
|
|
29589
29770
|
}
|
|
29590
|
-
) : /* @__PURE__ */
|
|
29771
|
+
) : /* @__PURE__ */ jsx53(
|
|
29591
29772
|
FolderOpenLinedIcon,
|
|
29592
29773
|
{
|
|
29593
29774
|
"aria-hidden": "true",
|
|
@@ -29595,18 +29776,18 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29595
29776
|
"data-project-drag-icon": "true"
|
|
29596
29777
|
}
|
|
29597
29778
|
),
|
|
29598
|
-
/* @__PURE__ */
|
|
29779
|
+
/* @__PURE__ */ jsx53("span", { children: section.label })
|
|
29599
29780
|
] })
|
|
29600
29781
|
]
|
|
29601
29782
|
}
|
|
29602
|
-
) : /* @__PURE__ */
|
|
29783
|
+
) : /* @__PURE__ */ jsx53("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx53("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx53("span", { children: section.label }) }) }),
|
|
29603
29784
|
canCreateConversationFromSection ? /* @__PURE__ */ jsxs37(
|
|
29604
29785
|
"div",
|
|
29605
29786
|
{
|
|
29606
29787
|
className: AgentGUINode_styles_default.conversationSectionActions,
|
|
29607
29788
|
"data-project-drag-block": "true",
|
|
29608
29789
|
children: [
|
|
29609
|
-
previewMode ? /* @__PURE__ */
|
|
29790
|
+
previewMode ? /* @__PURE__ */ jsx53("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx53(
|
|
29610
29791
|
BareIconButton2,
|
|
29611
29792
|
{
|
|
29612
29793
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -29614,14 +29795,14 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29614
29795
|
size: "sm",
|
|
29615
29796
|
disabled: createConversationDisabled,
|
|
29616
29797
|
onClick: handleCreateConversation,
|
|
29617
|
-
children: /* @__PURE__ */
|
|
29798
|
+
children: /* @__PURE__ */ jsx53(CreateChatIcon, { "aria-hidden": "true" })
|
|
29618
29799
|
}
|
|
29619
29800
|
) }) : /* @__PURE__ */ jsxs37(Tooltip6, { children: [
|
|
29620
|
-
/* @__PURE__ */
|
|
29801
|
+
/* @__PURE__ */ jsx53(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29621
29802
|
"span",
|
|
29622
29803
|
{
|
|
29623
29804
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
29624
|
-
children: /* @__PURE__ */
|
|
29805
|
+
children: /* @__PURE__ */ jsx53(
|
|
29625
29806
|
BareIconButton2,
|
|
29626
29807
|
{
|
|
29627
29808
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -29629,12 +29810,12 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29629
29810
|
size: "sm",
|
|
29630
29811
|
disabled: createConversationDisabled,
|
|
29631
29812
|
onClick: handleCreateConversation,
|
|
29632
|
-
children: /* @__PURE__ */
|
|
29813
|
+
children: /* @__PURE__ */ jsx53(CreateChatIcon, { "aria-hidden": "true" })
|
|
29633
29814
|
}
|
|
29634
29815
|
)
|
|
29635
29816
|
}
|
|
29636
29817
|
) }),
|
|
29637
|
-
/* @__PURE__ */
|
|
29818
|
+
/* @__PURE__ */ jsx53(
|
|
29638
29819
|
TooltipContent6,
|
|
29639
29820
|
{
|
|
29640
29821
|
side: "top",
|
|
@@ -29645,39 +29826,39 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29645
29826
|
)
|
|
29646
29827
|
] }),
|
|
29647
29828
|
projectPath ? /* @__PURE__ */ jsxs37(DropdownMenu4, { onOpenChange: handleProjectMenuOpenChange, children: [
|
|
29648
|
-
previewMode ? /* @__PURE__ */
|
|
29829
|
+
previewMode ? /* @__PURE__ */ jsx53(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29649
29830
|
"span",
|
|
29650
29831
|
{
|
|
29651
29832
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
29652
|
-
children: /* @__PURE__ */
|
|
29833
|
+
children: /* @__PURE__ */ jsx53(
|
|
29653
29834
|
BareIconButton2,
|
|
29654
29835
|
{
|
|
29655
29836
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
29656
29837
|
"aria-label": labels.projectSectionMoreActions,
|
|
29657
29838
|
size: "sm",
|
|
29658
29839
|
disabled: isProjectActionLocked(),
|
|
29659
|
-
children: /* @__PURE__ */
|
|
29840
|
+
children: /* @__PURE__ */ jsx53(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
29660
29841
|
}
|
|
29661
29842
|
)
|
|
29662
29843
|
}
|
|
29663
29844
|
) }) : /* @__PURE__ */ jsxs37(Tooltip6, { children: [
|
|
29664
|
-
/* @__PURE__ */
|
|
29845
|
+
/* @__PURE__ */ jsx53(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29665
29846
|
"span",
|
|
29666
29847
|
{
|
|
29667
29848
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
29668
|
-
children: /* @__PURE__ */
|
|
29849
|
+
children: /* @__PURE__ */ jsx53(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29669
29850
|
BareIconButton2,
|
|
29670
29851
|
{
|
|
29671
29852
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
29672
29853
|
"aria-label": labels.projectSectionMoreActions,
|
|
29673
29854
|
size: "sm",
|
|
29674
29855
|
disabled: isProjectActionLocked(),
|
|
29675
|
-
children: /* @__PURE__ */
|
|
29856
|
+
children: /* @__PURE__ */ jsx53(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
29676
29857
|
}
|
|
29677
29858
|
) })
|
|
29678
29859
|
}
|
|
29679
29860
|
) }),
|
|
29680
|
-
/* @__PURE__ */
|
|
29861
|
+
/* @__PURE__ */ jsx53(
|
|
29681
29862
|
TooltipContent6,
|
|
29682
29863
|
{
|
|
29683
29864
|
side: "right",
|
|
@@ -29694,7 +29875,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29694
29875
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
29695
29876
|
sideOffset: 6,
|
|
29696
29877
|
children: [
|
|
29697
|
-
/* @__PURE__ */
|
|
29878
|
+
/* @__PURE__ */ jsx53(
|
|
29698
29879
|
DropdownMenuItem3,
|
|
29699
29880
|
{
|
|
29700
29881
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29710,10 +29891,10 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29710
29891
|
workspaceRoot: projectPath
|
|
29711
29892
|
});
|
|
29712
29893
|
},
|
|
29713
|
-
children: /* @__PURE__ */
|
|
29894
|
+
children: /* @__PURE__ */ jsx53("span", { children: labels.projectSectionViewFiles })
|
|
29714
29895
|
}
|
|
29715
29896
|
),
|
|
29716
|
-
/* @__PURE__ */
|
|
29897
|
+
/* @__PURE__ */ jsx53(
|
|
29717
29898
|
DropdownMenuItem3,
|
|
29718
29899
|
{
|
|
29719
29900
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29722,10 +29903,10 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29722
29903
|
if (!projectId || isProjectActionLocked()) return;
|
|
29723
29904
|
void onToggleProjectPinned(projectId, !projectPinned);
|
|
29724
29905
|
},
|
|
29725
|
-
children: /* @__PURE__ */
|
|
29906
|
+
children: /* @__PURE__ */ jsx53("span", { children: projectPinned ? labels.unpinProject : labels.pinProject })
|
|
29726
29907
|
}
|
|
29727
29908
|
),
|
|
29728
|
-
/* @__PURE__ */
|
|
29909
|
+
/* @__PURE__ */ jsx53(
|
|
29729
29910
|
DropdownMenuItem3,
|
|
29730
29911
|
{
|
|
29731
29912
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29735,10 +29916,10 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29735
29916
|
onRequestSectionBatchDeletion(section);
|
|
29736
29917
|
}
|
|
29737
29918
|
},
|
|
29738
|
-
children: /* @__PURE__ */
|
|
29919
|
+
children: /* @__PURE__ */ jsx53("span", { children: labels.batchDeleteProjectSessions })
|
|
29739
29920
|
}
|
|
29740
29921
|
),
|
|
29741
|
-
/* @__PURE__ */
|
|
29922
|
+
/* @__PURE__ */ jsx53(
|
|
29742
29923
|
DropdownMenuItem3,
|
|
29743
29924
|
{
|
|
29744
29925
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29752,7 +29933,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29752
29933
|
path: projectPath
|
|
29753
29934
|
});
|
|
29754
29935
|
},
|
|
29755
|
-
children: /* @__PURE__ */
|
|
29936
|
+
children: /* @__PURE__ */ jsx53("span", { children: labels.removeProject })
|
|
29756
29937
|
}
|
|
29757
29938
|
)
|
|
29758
29939
|
]
|
|
@@ -29760,37 +29941,37 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29760
29941
|
)
|
|
29761
29942
|
] }) : null,
|
|
29762
29943
|
!projectPath && section.kind === "conversations" ? /* @__PURE__ */ jsxs37(DropdownMenu4, { children: [
|
|
29763
|
-
previewMode ? /* @__PURE__ */
|
|
29944
|
+
previewMode ? /* @__PURE__ */ jsx53(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29764
29945
|
"span",
|
|
29765
29946
|
{
|
|
29766
29947
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
29767
|
-
children: /* @__PURE__ */
|
|
29948
|
+
children: /* @__PURE__ */ jsx53(
|
|
29768
29949
|
BareIconButton2,
|
|
29769
29950
|
{
|
|
29770
29951
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
29771
29952
|
"aria-label": labels.conversationsSectionMoreActions,
|
|
29772
29953
|
size: "sm",
|
|
29773
|
-
children: /* @__PURE__ */
|
|
29954
|
+
children: /* @__PURE__ */ jsx53(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
29774
29955
|
}
|
|
29775
29956
|
)
|
|
29776
29957
|
}
|
|
29777
29958
|
) }) : /* @__PURE__ */ jsxs37(Tooltip6, { children: [
|
|
29778
|
-
/* @__PURE__ */
|
|
29959
|
+
/* @__PURE__ */ jsx53(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29779
29960
|
"span",
|
|
29780
29961
|
{
|
|
29781
29962
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
29782
|
-
children: /* @__PURE__ */
|
|
29963
|
+
children: /* @__PURE__ */ jsx53(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx53(
|
|
29783
29964
|
BareIconButton2,
|
|
29784
29965
|
{
|
|
29785
29966
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
29786
29967
|
"aria-label": labels.conversationsSectionMoreActions,
|
|
29787
29968
|
size: "sm",
|
|
29788
|
-
children: /* @__PURE__ */
|
|
29969
|
+
children: /* @__PURE__ */ jsx53(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
29789
29970
|
}
|
|
29790
29971
|
) })
|
|
29791
29972
|
}
|
|
29792
29973
|
) }),
|
|
29793
|
-
/* @__PURE__ */
|
|
29974
|
+
/* @__PURE__ */ jsx53(
|
|
29794
29975
|
TooltipContent6,
|
|
29795
29976
|
{
|
|
29796
29977
|
side: "right",
|
|
@@ -29800,13 +29981,13 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29800
29981
|
}
|
|
29801
29982
|
)
|
|
29802
29983
|
] }),
|
|
29803
|
-
/* @__PURE__ */
|
|
29984
|
+
/* @__PURE__ */ jsx53(
|
|
29804
29985
|
DropdownMenuContent4,
|
|
29805
29986
|
{
|
|
29806
29987
|
align: "end",
|
|
29807
29988
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
29808
29989
|
sideOffset: 6,
|
|
29809
|
-
children: /* @__PURE__ */
|
|
29990
|
+
children: /* @__PURE__ */ jsx53(
|
|
29810
29991
|
DropdownMenuItem3,
|
|
29811
29992
|
{
|
|
29812
29993
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -29816,7 +29997,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29816
29997
|
onRequestSectionBatchDeletion(section);
|
|
29817
29998
|
}
|
|
29818
29999
|
},
|
|
29819
|
-
children: /* @__PURE__ */
|
|
30000
|
+
children: /* @__PURE__ */ jsx53("span", { children: labels.batchDeleteConversations })
|
|
29820
30001
|
}
|
|
29821
30002
|
)
|
|
29822
30003
|
}
|
|
@@ -29828,18 +30009,17 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29828
30009
|
]
|
|
29829
30010
|
}
|
|
29830
30011
|
),
|
|
29831
|
-
/* @__PURE__ */
|
|
30012
|
+
/* @__PURE__ */ jsx53(
|
|
29832
30013
|
"div",
|
|
29833
30014
|
{
|
|
29834
30015
|
className: AgentGUINode_styles_default.conversationSectionItems,
|
|
29835
30016
|
"aria-hidden": isSectionCollapsed ? "true" : void 0,
|
|
29836
30017
|
children: /* @__PURE__ */ jsxs37("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
|
|
29837
|
-
!isSectionCollapsed && visibleItems.length === 0 ? /* @__PURE__ */
|
|
29838
|
-
visibleItems.map((item) => /* @__PURE__ */
|
|
30018
|
+
!isSectionCollapsed && visibleItems.length === 0 ? /* @__PURE__ */ jsx53("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
|
|
30019
|
+
visibleItems.map((item) => /* @__PURE__ */ jsx53(
|
|
29839
30020
|
AgentGUIConversationRailItem,
|
|
29840
30021
|
{
|
|
29841
30022
|
active: item.id === activeConversationId,
|
|
29842
|
-
currentTimeMs,
|
|
29843
30023
|
isDeletingConversation,
|
|
29844
30024
|
isPendingDeleteConversation: pendingDeleteConversationId === item.id,
|
|
29845
30025
|
isRailInteractionLocked,
|
|
@@ -29861,7 +30041,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29861
30041
|
item.id
|
|
29862
30042
|
)),
|
|
29863
30043
|
canShowMore || canShowLess ? /* @__PURE__ */ jsxs37("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
|
|
29864
|
-
canShowMore ? /* @__PURE__ */
|
|
30044
|
+
canShowMore ? /* @__PURE__ */ jsx53(
|
|
29865
30045
|
"button",
|
|
29866
30046
|
{
|
|
29867
30047
|
type: "button",
|
|
@@ -29871,7 +30051,7 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29871
30051
|
children: labels.showMoreConversations
|
|
29872
30052
|
}
|
|
29873
30053
|
) : null,
|
|
29874
|
-
canShowLess ? /* @__PURE__ */
|
|
30054
|
+
canShowLess ? /* @__PURE__ */ jsx53(
|
|
29875
30055
|
"button",
|
|
29876
30056
|
{
|
|
29877
30057
|
type: "button",
|
|
@@ -29892,11 +30072,11 @@ var AgentGUIConversationRailSection = memo6(
|
|
|
29892
30072
|
|
|
29893
30073
|
// agent-gui/agentGuiNode/view/AgentGUIProjectActionConfirmationDialog.tsx
|
|
29894
30074
|
import { ConfirmationDialog as ConfirmationDialog2 } from "@tutti-os/ui-system";
|
|
29895
|
-
import { jsx as
|
|
30075
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
29896
30076
|
var DIALOG_CLASS_NAME = "nodrag tsh-desktop-no-drag [-webkit-app-region:no-drag]";
|
|
29897
30077
|
function AgentGUIProjectActionConfirmationDialog(props) {
|
|
29898
30078
|
const { action, labels } = props;
|
|
29899
|
-
return /* @__PURE__ */
|
|
30079
|
+
return /* @__PURE__ */ jsx54(
|
|
29900
30080
|
ConfirmationDialog2,
|
|
29901
30081
|
{
|
|
29902
30082
|
cancelLabel: labels.cancel,
|
|
@@ -30096,7 +30276,7 @@ function useAgentGUIProjectMenuState(isRailInteractionLocked, isUserProjectMutat
|
|
|
30096
30276
|
}
|
|
30097
30277
|
|
|
30098
30278
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
|
|
30099
|
-
import { jsx as
|
|
30279
|
+
import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
30100
30280
|
function useDelayedBoolean(value, delayMs) {
|
|
30101
30281
|
const [delayedValue, setDelayedValue] = useState28(false);
|
|
30102
30282
|
useEffect29(() => {
|
|
@@ -30152,7 +30332,6 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30152
30332
|
onConversationQueryChange
|
|
30153
30333
|
}) {
|
|
30154
30334
|
"use memo";
|
|
30155
|
-
const [currentTimeMs, setCurrentTimeMs] = useState28(() => Date.now());
|
|
30156
30335
|
const [pendingProjectAction, setPendingProjectAction] = useState28(null);
|
|
30157
30336
|
const [isRequestingBatchDeletion, setIsRequestingBatchDeletion] = useState28(false);
|
|
30158
30337
|
const { railSearch } = railQuery;
|
|
@@ -30389,14 +30568,7 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30389
30568
|
});
|
|
30390
30569
|
const projectDragLocked = projectDragBaseLocked || isProjectMovePending;
|
|
30391
30570
|
useEffect29(() => {
|
|
30392
|
-
|
|
30393
|
-
const timer = window.setInterval(() => {
|
|
30394
|
-
setCurrentTimeMs(Date.now());
|
|
30395
|
-
}, 6e4);
|
|
30396
|
-
return () => {
|
|
30397
|
-
window.clearInterval(timer);
|
|
30398
|
-
cleanupProjectDrag();
|
|
30399
|
-
};
|
|
30571
|
+
return installProjectDragGlobalListeners();
|
|
30400
30572
|
}, [installProjectDragGlobalListeners]);
|
|
30401
30573
|
return /* @__PURE__ */ jsxs38(
|
|
30402
30574
|
"aside",
|
|
@@ -30406,7 +30578,7 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30406
30578
|
"aria-hidden": isCollapsed ? "true" : void 0,
|
|
30407
30579
|
children: [
|
|
30408
30580
|
/* @__PURE__ */ jsxs38("div", { className: AgentGUINode_styles_default.railToolbar, children: [
|
|
30409
|
-
/* @__PURE__ */
|
|
30581
|
+
/* @__PURE__ */ jsx55(
|
|
30410
30582
|
TaskSearchField,
|
|
30411
30583
|
{
|
|
30412
30584
|
value: conversationQuery,
|
|
@@ -30425,27 +30597,27 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30425
30597
|
disabled: createConversationDisabled,
|
|
30426
30598
|
onClick: () => onCreateConversation(),
|
|
30427
30599
|
children: [
|
|
30428
|
-
/* @__PURE__ */
|
|
30429
|
-
/* @__PURE__ */
|
|
30600
|
+
/* @__PURE__ */ jsx55(CreateChatIcon2, { "aria-hidden": "true" }),
|
|
30601
|
+
/* @__PURE__ */ jsx55("span", { children: labels.newConversation })
|
|
30430
30602
|
]
|
|
30431
30603
|
}
|
|
30432
30604
|
)
|
|
30433
30605
|
] }),
|
|
30434
|
-
/* @__PURE__ */
|
|
30606
|
+
/* @__PURE__ */ jsx55(
|
|
30435
30607
|
ScrollArea,
|
|
30436
30608
|
{
|
|
30437
30609
|
scrollbarMode: "native",
|
|
30438
30610
|
className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
30439
30611
|
viewportRef: railViewState.conversationListRef,
|
|
30440
30612
|
viewportClassName: AgentGUINode_styles_default.conversationList,
|
|
30441
|
-
children: shouldShowConversationSkeleton ? /* @__PURE__ */
|
|
30613
|
+
children: shouldShowConversationSkeleton ? /* @__PURE__ */ jsx55(
|
|
30442
30614
|
AgentConversationListSkeleton,
|
|
30443
30615
|
{
|
|
30444
30616
|
label: labels.loadingConversations
|
|
30445
30617
|
}
|
|
30446
30618
|
) : shouldShowConversationSearchError ? /* @__PURE__ */ jsxs38("div", { className: AgentGUINode_styles_default.emptyState, children: [
|
|
30447
|
-
/* @__PURE__ */
|
|
30448
|
-
/* @__PURE__ */
|
|
30619
|
+
/* @__PURE__ */ jsx55("span", { children: labels.searchFailed }),
|
|
30620
|
+
/* @__PURE__ */ jsx55(
|
|
30449
30621
|
SystemButton,
|
|
30450
30622
|
{
|
|
30451
30623
|
type: "button",
|
|
@@ -30455,7 +30627,7 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30455
30627
|
children: labels.retrySearch
|
|
30456
30628
|
}
|
|
30457
30629
|
)
|
|
30458
|
-
] }) : shouldShowConversationEmptyState ? /* @__PURE__ */
|
|
30630
|
+
] }) : shouldShowConversationEmptyState ? /* @__PURE__ */ jsx55("div", { className: AgentGUINode_styles_default.emptyState, children: /* @__PURE__ */ jsx55("span", { children: conversationQuery.trim() ? labels.searchNoConversations : conversations.length === 0 ? labels.noConversations : labels.conversationUnavailable }) }) : /* @__PURE__ */ jsxs38("fieldset", { className: "contents", disabled: railInteractionsLocked, children: [
|
|
30459
30631
|
groupedConversations.map((section, sectionIndex) => {
|
|
30460
30632
|
const projectPath = section.kind === "project" ? section.project?.path ?? "" : "";
|
|
30461
30633
|
const projectLabel = section.kind === "project" ? section.label : "";
|
|
@@ -30489,8 +30661,8 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30489
30661
|
).length + (activeOverlayCountsTowardTotal && !activeOverlayIsCanonical ? 1 : 0);
|
|
30490
30662
|
const sectionHasMore = searchSectionHasMore || !conversationQuery.trim() && sectionPageState?.hasMore === true;
|
|
30491
30663
|
return /* @__PURE__ */ jsxs38(Fragment15, { children: [
|
|
30492
|
-
showPinnedProjectHeader ? /* @__PURE__ */
|
|
30493
|
-
showProjectRailHeader ? /* @__PURE__ */
|
|
30664
|
+
showPinnedProjectHeader ? /* @__PURE__ */ jsx55("div", { className: AgentGUINode_styles_default.pinnedProjectRailHeader, children: labels.sectionPinned }) : null,
|
|
30665
|
+
showProjectRailHeader ? /* @__PURE__ */ jsx55(
|
|
30494
30666
|
AgentGUIProjectRailHeader,
|
|
30495
30667
|
{
|
|
30496
30668
|
disabled: railInteractionsLocked || isUserProjectMutationPending,
|
|
@@ -30499,14 +30671,13 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30499
30671
|
workspaceUserProjectI18n
|
|
30500
30672
|
}
|
|
30501
30673
|
) : null,
|
|
30502
|
-
/* @__PURE__ */
|
|
30674
|
+
/* @__PURE__ */ jsx55(
|
|
30503
30675
|
AgentGUIConversationRailSection,
|
|
30504
30676
|
{
|
|
30505
30677
|
activeConversation: activeOverlayConversation,
|
|
30506
30678
|
activeConversationCountsTowardTotal: activeOverlayCountsTowardTotal,
|
|
30507
30679
|
activeConversationId,
|
|
30508
30680
|
createConversationDisabled,
|
|
30509
|
-
currentTimeMs,
|
|
30510
30681
|
isDeletingConversation,
|
|
30511
30682
|
isDeletingProjectConversations,
|
|
30512
30683
|
isRequestingBatchDeletion,
|
|
@@ -30559,7 +30730,7 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30559
30730
|
)
|
|
30560
30731
|
] }, section.id);
|
|
30561
30732
|
}),
|
|
30562
|
-
appendProjectRailHeader ? /* @__PURE__ */
|
|
30733
|
+
appendProjectRailHeader ? /* @__PURE__ */ jsx55(
|
|
30563
30734
|
AgentGUIProjectRailHeader,
|
|
30564
30735
|
{
|
|
30565
30736
|
disabled: railInteractionsLocked || isUserProjectMutationPending,
|
|
@@ -30571,8 +30742,8 @@ var AgentGUIConversationRailPane = memo7(
|
|
|
30571
30742
|
] })
|
|
30572
30743
|
}
|
|
30573
30744
|
),
|
|
30574
|
-
footer ? /* @__PURE__ */
|
|
30575
|
-
/* @__PURE__ */
|
|
30745
|
+
footer ? /* @__PURE__ */ jsx55("div", { className: "shrink-0 pb-2", children: footer }) : null,
|
|
30746
|
+
/* @__PURE__ */ jsx55(
|
|
30576
30747
|
AgentGUIProjectActionConfirmationDialog,
|
|
30577
30748
|
{
|
|
30578
30749
|
action: pendingProjectAction,
|
|
@@ -30937,16 +31108,39 @@ function buildConversationRailQuerySnapshot(input) {
|
|
|
30937
31108
|
function createConversationRailQuerySnapshotSelector() {
|
|
30938
31109
|
const selectRailTitlePrompts = createAgentGUIConversationRailTitlePromptSelector();
|
|
30939
31110
|
return (input, previous, force = false) => {
|
|
30940
|
-
const
|
|
30941
|
-
|
|
31111
|
+
const workspaceSessions = selectWorkspaceAgentConsumerSessions4(
|
|
31112
|
+
input.engineState
|
|
31113
|
+
);
|
|
31114
|
+
const projectionSessionIds = /* @__PURE__ */ new Set();
|
|
31115
|
+
if (!input.runtimeSectionsEnabled) {
|
|
31116
|
+
for (const session of workspaceSessions) {
|
|
31117
|
+
projectionSessionIds.add(session.session.agentSessionId);
|
|
31118
|
+
}
|
|
31119
|
+
}
|
|
31120
|
+
for (const section of input.queryState.sections ?? []) {
|
|
31121
|
+
for (const sessionId of section.sessionIds) {
|
|
31122
|
+
projectionSessionIds.add(sessionId);
|
|
31123
|
+
}
|
|
31124
|
+
}
|
|
31125
|
+
for (const sessionId of input.queryState.reconcilingSessionIds) {
|
|
31126
|
+
projectionSessionIds.add(sessionId);
|
|
31127
|
+
}
|
|
31128
|
+
if (input.searchEnabled && input.searchState.requestKey === input.searchRequestKey && input.searchState.resolvedQuery === input.searchQuery) {
|
|
31129
|
+
for (const sessionId of input.searchState.sessionIds) {
|
|
31130
|
+
projectionSessionIds.add(sessionId);
|
|
31131
|
+
}
|
|
31132
|
+
}
|
|
31133
|
+
const projectedRailConversations = projectCanonicalAgentGUIConversationSummaries(
|
|
31134
|
+
workspaceSessions.filter(
|
|
31135
|
+
(session) => projectionSessionIds.has(session.session.agentSessionId)
|
|
31136
|
+
),
|
|
30942
31137
|
selectRailTitlePrompts(input.engineState)
|
|
30943
31138
|
);
|
|
30944
|
-
|
|
30945
|
-
|
|
30946
|
-
|
|
30947
|
-
|
|
30948
|
-
|
|
30949
|
-
)) {
|
|
31139
|
+
const runtimeRailConversations = stabilizeConversationSectionItems(
|
|
31140
|
+
previous?.runtimeRailConversations ?? [],
|
|
31141
|
+
projectedRailConversations
|
|
31142
|
+
);
|
|
31143
|
+
if (!force && previous?.runtimeRailConversations === runtimeRailConversations) {
|
|
30950
31144
|
return previous;
|
|
30951
31145
|
}
|
|
30952
31146
|
return buildConversationRailQuerySnapshot({
|
|
@@ -31757,7 +31951,7 @@ function identitySnapshot(snapshot) {
|
|
|
31757
31951
|
}
|
|
31758
31952
|
|
|
31759
31953
|
// agent-gui/agentGuiNode/controller/AgentGUIConversationRailController.tsx
|
|
31760
|
-
import { jsx as
|
|
31954
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
31761
31955
|
var AgentGUIConversationRailController = memo8(
|
|
31762
31956
|
function AgentGUIConversationRailController2(props) {
|
|
31763
31957
|
const [conversationQuery, setConversationQuery] = useState29("");
|
|
@@ -31770,7 +31964,7 @@ var AgentGUIConversationRailController = memo8(
|
|
|
31770
31964
|
userProjects: props.userProjects,
|
|
31771
31965
|
workspaceId: props.workspaceId
|
|
31772
31966
|
});
|
|
31773
|
-
return /* @__PURE__ */
|
|
31967
|
+
return /* @__PURE__ */ jsx56(
|
|
31774
31968
|
AgentGUIConversationRailPane,
|
|
31775
31969
|
{
|
|
31776
31970
|
...props,
|
|
@@ -31966,7 +32160,7 @@ import { cn as cn8 } from "@tutti-os/ui-system";
|
|
|
31966
32160
|
// agent-gui/agentGuiNode/AgentGoalBanner.tsx
|
|
31967
32161
|
import { useEffect as useEffect31, useState as useState30 } from "react";
|
|
31968
32162
|
import { CirclePause, CirclePlay, Pencil as Pencil2, Target as Target3, Trash2 } from "lucide-react";
|
|
31969
|
-
import { jsx as
|
|
32163
|
+
import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
31970
32164
|
var RESUMABLE_GOAL_STATUSES = /* @__PURE__ */ new Set([
|
|
31971
32165
|
"paused",
|
|
31972
32166
|
"blocked",
|
|
@@ -32076,7 +32270,7 @@ function AgentGoalBanner({
|
|
|
32076
32270
|
onEditObjective?.(next);
|
|
32077
32271
|
}
|
|
32078
32272
|
};
|
|
32079
|
-
return /* @__PURE__ */
|
|
32273
|
+
return /* @__PURE__ */ jsx57("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx57(
|
|
32080
32274
|
"section",
|
|
32081
32275
|
{
|
|
32082
32276
|
className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardMuted),
|
|
@@ -32084,8 +32278,8 @@ function AgentGoalBanner({
|
|
|
32084
32278
|
"data-testid": "agent-gui-goal-banner",
|
|
32085
32279
|
children: /* @__PURE__ */ jsxs39("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
32086
32280
|
/* @__PURE__ */ jsxs39("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
32087
|
-
/* @__PURE__ */
|
|
32088
|
-
editDraft !== null ? /* @__PURE__ */
|
|
32281
|
+
/* @__PURE__ */ jsx57("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx57(Target3, { "aria-hidden": true, className: "size-3.5" }) }),
|
|
32282
|
+
editDraft !== null ? /* @__PURE__ */ jsx57(
|
|
32089
32283
|
"input",
|
|
32090
32284
|
{
|
|
32091
32285
|
className: AgentGUIChrome_styles_default.chromeGoalEditInput,
|
|
@@ -32111,8 +32305,8 @@ function AgentGoalBanner({
|
|
|
32111
32305
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
32112
32306
|
title: fullMessage,
|
|
32113
32307
|
children: [
|
|
32114
|
-
/* @__PURE__ */
|
|
32115
|
-
/* @__PURE__ */
|
|
32308
|
+
/* @__PURE__ */ jsx57("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: title }),
|
|
32309
|
+
/* @__PURE__ */ jsx57(
|
|
32116
32310
|
"span",
|
|
32117
32311
|
{
|
|
32118
32312
|
className: AgentGUIChrome_styles_default.chromeNoticeDescription,
|
|
@@ -32125,7 +32319,7 @@ function AgentGoalBanner({
|
|
|
32125
32319
|
)
|
|
32126
32320
|
] }),
|
|
32127
32321
|
hasActions ? /* @__PURE__ */ jsxs39("div", { className: AgentGUIChrome_styles_default.chromeGoalActions, children: [
|
|
32128
|
-
onEditObjective !== void 0 && editDraft === null ? /* @__PURE__ */
|
|
32322
|
+
onEditObjective !== void 0 && editDraft === null ? /* @__PURE__ */ jsx57(
|
|
32129
32323
|
"button",
|
|
32130
32324
|
{
|
|
32131
32325
|
type: "button",
|
|
@@ -32133,10 +32327,10 @@ function AgentGoalBanner({
|
|
|
32133
32327
|
title: labels.editAction,
|
|
32134
32328
|
"aria-label": labels.editAction,
|
|
32135
32329
|
"data-testid": "agent-gui-goal-banner-edit",
|
|
32136
|
-
children: /* @__PURE__ */
|
|
32330
|
+
children: /* @__PURE__ */ jsx57(Pencil2, { "aria-hidden": true, className: "size-3.5" })
|
|
32137
32331
|
}
|
|
32138
32332
|
) : null,
|
|
32139
|
-
showPause ? /* @__PURE__ */
|
|
32333
|
+
showPause ? /* @__PURE__ */ jsx57(
|
|
32140
32334
|
"button",
|
|
32141
32335
|
{
|
|
32142
32336
|
type: "button",
|
|
@@ -32144,10 +32338,10 @@ function AgentGoalBanner({
|
|
|
32144
32338
|
title: labels.pauseAction,
|
|
32145
32339
|
"aria-label": labels.pauseAction,
|
|
32146
32340
|
"data-testid": "agent-gui-goal-banner-pause",
|
|
32147
|
-
children: /* @__PURE__ */
|
|
32341
|
+
children: /* @__PURE__ */ jsx57(CirclePause, { "aria-hidden": true, className: "size-3.5" })
|
|
32148
32342
|
}
|
|
32149
32343
|
) : null,
|
|
32150
|
-
showResume ? /* @__PURE__ */
|
|
32344
|
+
showResume ? /* @__PURE__ */ jsx57(
|
|
32151
32345
|
"button",
|
|
32152
32346
|
{
|
|
32153
32347
|
type: "button",
|
|
@@ -32155,10 +32349,10 @@ function AgentGoalBanner({
|
|
|
32155
32349
|
title: labels.resumeAction,
|
|
32156
32350
|
"aria-label": labels.resumeAction,
|
|
32157
32351
|
"data-testid": "agent-gui-goal-banner-resume",
|
|
32158
|
-
children: /* @__PURE__ */
|
|
32352
|
+
children: /* @__PURE__ */ jsx57(CirclePlay, { "aria-hidden": true, className: "size-3.5" })
|
|
32159
32353
|
}
|
|
32160
32354
|
) : null,
|
|
32161
|
-
onClearGoal !== void 0 ? /* @__PURE__ */
|
|
32355
|
+
onClearGoal !== void 0 ? /* @__PURE__ */ jsx57(
|
|
32162
32356
|
"button",
|
|
32163
32357
|
{
|
|
32164
32358
|
type: "button",
|
|
@@ -32166,10 +32360,10 @@ function AgentGoalBanner({
|
|
|
32166
32360
|
title: labels.clearAction,
|
|
32167
32361
|
"aria-label": labels.clearAction,
|
|
32168
32362
|
"data-testid": "agent-gui-goal-banner-clear",
|
|
32169
|
-
children: /* @__PURE__ */
|
|
32363
|
+
children: /* @__PURE__ */ jsx57(Trash2, { "aria-hidden": true, className: "size-3.5" })
|
|
32170
32364
|
}
|
|
32171
32365
|
) : null
|
|
32172
|
-
] }) : /* @__PURE__ */
|
|
32366
|
+
] }) : /* @__PURE__ */ jsx57(
|
|
32173
32367
|
"span",
|
|
32174
32368
|
{
|
|
32175
32369
|
className: AgentGUIChrome_styles_default.chromeGoalHint,
|
|
@@ -32183,7 +32377,7 @@ function AgentGoalBanner({
|
|
|
32183
32377
|
}
|
|
32184
32378
|
|
|
32185
32379
|
// agent-gui/agentGuiNode/view/AgentGUIBottomDockPane.tsx
|
|
32186
|
-
import { jsx as
|
|
32380
|
+
import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
32187
32381
|
var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
32188
32382
|
bottomDockRef,
|
|
32189
32383
|
showScrollToBottom,
|
|
@@ -32224,7 +32418,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32224
32418
|
className: AgentGUINode_styles_default.bottomDock,
|
|
32225
32419
|
"data-testid": "agent-gui-bottom-dock",
|
|
32226
32420
|
children: [
|
|
32227
|
-
showScrollToBottom ? /* @__PURE__ */
|
|
32421
|
+
showScrollToBottom ? /* @__PURE__ */ jsx58(
|
|
32228
32422
|
"button",
|
|
32229
32423
|
{
|
|
32230
32424
|
type: "button",
|
|
@@ -32237,15 +32431,15 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32237
32431
|
title: scrollToBottomLabel,
|
|
32238
32432
|
onPointerDown: (event) => event.stopPropagation(),
|
|
32239
32433
|
onClick: onScrollToBottom,
|
|
32240
|
-
children: /* @__PURE__ */
|
|
32434
|
+
children: /* @__PURE__ */ jsx58(ChevronsDown, { "aria-hidden": "true", size: 15, strokeWidth: 2.2 })
|
|
32241
32435
|
}
|
|
32242
32436
|
) : null,
|
|
32243
|
-
bottomDockLiftedPrompt ? /* @__PURE__ */
|
|
32437
|
+
bottomDockLiftedPrompt ? /* @__PURE__ */ jsx58(
|
|
32244
32438
|
"div",
|
|
32245
32439
|
{
|
|
32246
32440
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
32247
32441
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
32248
|
-
children: /* @__PURE__ */
|
|
32442
|
+
children: /* @__PURE__ */ jsx58(
|
|
32249
32443
|
AgentInteractivePromptSurface,
|
|
32250
32444
|
{
|
|
32251
32445
|
prompt: bottomDockLiftedPrompt,
|
|
@@ -32260,7 +32454,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32260
32454
|
)
|
|
32261
32455
|
}
|
|
32262
32456
|
) : null,
|
|
32263
|
-
inlineNoticeChrome ? /* @__PURE__ */
|
|
32457
|
+
inlineNoticeChrome ? /* @__PURE__ */ jsx58(
|
|
32264
32458
|
AgentSessionChrome,
|
|
32265
32459
|
{
|
|
32266
32460
|
chrome: inlineNoticeChrome,
|
|
@@ -32272,7 +32466,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32272
32466
|
labels: chromeLabels
|
|
32273
32467
|
}
|
|
32274
32468
|
) : null,
|
|
32275
|
-
/* @__PURE__ */
|
|
32469
|
+
/* @__PURE__ */ jsx58(
|
|
32276
32470
|
AgentSessionChrome,
|
|
32277
32471
|
{
|
|
32278
32472
|
chrome: sessionChrome,
|
|
@@ -32284,7 +32478,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32284
32478
|
labels: chromeLabels
|
|
32285
32479
|
}
|
|
32286
32480
|
),
|
|
32287
|
-
showGoalBanner ? /* @__PURE__ */
|
|
32481
|
+
showGoalBanner ? /* @__PURE__ */ jsx58(
|
|
32288
32482
|
AgentGoalBanner,
|
|
32289
32483
|
{
|
|
32290
32484
|
objective: goalObjective,
|
|
@@ -32299,12 +32493,12 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32299
32493
|
onClearGoal: () => onGoalControl("clear")
|
|
32300
32494
|
}
|
|
32301
32495
|
) : null,
|
|
32302
|
-
bottomDockReplacementPrompt ? /* @__PURE__ */
|
|
32496
|
+
bottomDockReplacementPrompt ? /* @__PURE__ */ jsx58(
|
|
32303
32497
|
"div",
|
|
32304
32498
|
{
|
|
32305
32499
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
32306
32500
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
32307
|
-
children: /* @__PURE__ */
|
|
32501
|
+
children: /* @__PURE__ */ jsx58(
|
|
32308
32502
|
AgentInteractivePromptSurface,
|
|
32309
32503
|
{
|
|
32310
32504
|
prompt: bottomDockReplacementPrompt,
|
|
@@ -32318,7 +32512,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32318
32512
|
}
|
|
32319
32513
|
)
|
|
32320
32514
|
}
|
|
32321
|
-
) : /* @__PURE__ */
|
|
32515
|
+
) : /* @__PURE__ */ jsx58(AgentComposer, { ...composerProps })
|
|
32322
32516
|
]
|
|
32323
32517
|
}
|
|
32324
32518
|
);
|
|
@@ -32328,7 +32522,7 @@ var AgentGUIBottomDockPane = memo9(function AgentGUIBottomDockPane2({
|
|
|
32328
32522
|
import { memo as memo10 } from "react";
|
|
32329
32523
|
import { Info as Info2 } from "lucide-react";
|
|
32330
32524
|
import { Tooltip as Tooltip7, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@tutti-os/ui-system";
|
|
32331
|
-
import { jsx as
|
|
32525
|
+
import { jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
32332
32526
|
var AgentGUIDetailHeader = memo10(function AgentGUIDetailHeader2({
|
|
32333
32527
|
activeConversation,
|
|
32334
32528
|
hidden,
|
|
@@ -32341,9 +32535,9 @@ var AgentGUIDetailHeader = memo10(function AgentGUIDetailHeader2({
|
|
|
32341
32535
|
return null;
|
|
32342
32536
|
}
|
|
32343
32537
|
const runPath = activeConversation.cwd.trim();
|
|
32344
|
-
return /* @__PURE__ */
|
|
32345
|
-
/* @__PURE__ */
|
|
32346
|
-
runPath ? /* @__PURE__ */
|
|
32538
|
+
return /* @__PURE__ */ jsx59("div", { className: AgentGUINode_styles_default.detailHeader, children: /* @__PURE__ */ jsxs41("span", { className: AgentGUINode_styles_default.detailHeaderTitleGroup, children: [
|
|
32539
|
+
/* @__PURE__ */ jsx59("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
|
|
32540
|
+
runPath ? /* @__PURE__ */ jsx59(AgentRunPathInfo, { path: runPath, previewMode }) : null
|
|
32347
32541
|
] }) });
|
|
32348
32542
|
});
|
|
32349
32543
|
function AgentRunPathInfo({
|
|
@@ -32351,21 +32545,21 @@ function AgentRunPathInfo({
|
|
|
32351
32545
|
previewMode
|
|
32352
32546
|
}) {
|
|
32353
32547
|
"use memo";
|
|
32354
|
-
const trigger = /* @__PURE__ */
|
|
32548
|
+
const trigger = /* @__PURE__ */ jsx59(
|
|
32355
32549
|
"button",
|
|
32356
32550
|
{
|
|
32357
32551
|
type: "button",
|
|
32358
32552
|
className: AgentGUINode_styles_default.detailHeaderPathInfo,
|
|
32359
32553
|
"aria-label": path,
|
|
32360
|
-
children: /* @__PURE__ */
|
|
32554
|
+
children: /* @__PURE__ */ jsx59(Info2, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
|
|
32361
32555
|
}
|
|
32362
32556
|
);
|
|
32363
32557
|
if (previewMode) {
|
|
32364
32558
|
return trigger;
|
|
32365
32559
|
}
|
|
32366
32560
|
return /* @__PURE__ */ jsxs41(Tooltip7, { children: [
|
|
32367
|
-
/* @__PURE__ */
|
|
32368
|
-
/* @__PURE__ */
|
|
32561
|
+
/* @__PURE__ */ jsx59(TooltipTrigger7, { asChild: true, children: trigger }),
|
|
32562
|
+
/* @__PURE__ */ jsx59(
|
|
32369
32563
|
TooltipContent7,
|
|
32370
32564
|
{
|
|
32371
32565
|
side: "top",
|
|
@@ -32385,14 +32579,14 @@ import {
|
|
|
32385
32579
|
ToastTitle,
|
|
32386
32580
|
ToastViewport
|
|
32387
32581
|
} from "@tutti-os/ui-system";
|
|
32388
|
-
import { jsx as
|
|
32582
|
+
import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
32389
32583
|
function AgentGUIContentToast({
|
|
32390
32584
|
insetTopPx,
|
|
32391
32585
|
message
|
|
32392
32586
|
}) {
|
|
32393
32587
|
const [open, setOpen] = useState31(true);
|
|
32394
32588
|
return /* @__PURE__ */ jsxs42(ToastProvider, { children: [
|
|
32395
|
-
/* @__PURE__ */
|
|
32589
|
+
/* @__PURE__ */ jsx60(
|
|
32396
32590
|
ToastRoot,
|
|
32397
32591
|
{
|
|
32398
32592
|
open,
|
|
@@ -32400,10 +32594,10 @@ function AgentGUIContentToast({
|
|
|
32400
32594
|
"data-testid": "agent-gui-content-toast",
|
|
32401
32595
|
variant: "default",
|
|
32402
32596
|
onOpenChange: setOpen,
|
|
32403
|
-
children: /* @__PURE__ */
|
|
32597
|
+
children: /* @__PURE__ */ jsx60(ToastTitle, { children: message })
|
|
32404
32598
|
}
|
|
32405
32599
|
),
|
|
32406
|
-
/* @__PURE__ */
|
|
32600
|
+
/* @__PURE__ */ jsx60(
|
|
32407
32601
|
ToastViewport,
|
|
32408
32602
|
{
|
|
32409
32603
|
className: "nodrag tsh-desktop-no-drag absolute left-0 w-full translate-x-0 px-4 [-webkit-app-region:no-drag]",
|
|
@@ -32416,7 +32610,7 @@ function AgentGUIContentToast({
|
|
|
32416
32610
|
|
|
32417
32611
|
// agent-gui/agentGuiNode/view/AgentGUIConversationTimelinePane.tsx
|
|
32418
32612
|
import { memo as memo11 } from "react";
|
|
32419
|
-
import { Fragment as Fragment16, jsx as
|
|
32613
|
+
import { Fragment as Fragment16, jsx as jsx61, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
32420
32614
|
var EMPTY_WORKSPACE_APP_ICONS3 = [];
|
|
32421
32615
|
var AgentGUIConversationTimelinePane = memo11(
|
|
32422
32616
|
function AgentGUIConversationTimelinePane2({
|
|
@@ -32434,16 +32628,16 @@ var AgentGUIConversationTimelinePane = memo11(
|
|
|
32434
32628
|
}) {
|
|
32435
32629
|
"use memo";
|
|
32436
32630
|
return /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
32437
|
-
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */
|
|
32631
|
+
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx61(
|
|
32438
32632
|
"div",
|
|
32439
32633
|
{
|
|
32440
32634
|
className: "mx-auto flex h-8 items-center justify-center text-[12px] text-[var(--text-secondary)]",
|
|
32441
32635
|
"data-testid": "agent-gui-older-messages-loading",
|
|
32442
32636
|
role: "status",
|
|
32443
|
-
children: /* @__PURE__ */
|
|
32637
|
+
children: /* @__PURE__ */ jsx61("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
|
|
32444
32638
|
}
|
|
32445
32639
|
) : null,
|
|
32446
|
-
/* @__PURE__ */
|
|
32640
|
+
/* @__PURE__ */ jsx61(
|
|
32447
32641
|
AgentConversationFlow,
|
|
32448
32642
|
{
|
|
32449
32643
|
conversation,
|
|
@@ -32824,10 +33018,10 @@ function useAgentGUIDetailScroll(input) {
|
|
|
32824
33018
|
import { useMemo as useMemo35 } from "react";
|
|
32825
33019
|
|
|
32826
33020
|
// app/renderer/components/icons/UnavailableChatIcon.tsx
|
|
32827
|
-
import { jsx as
|
|
33021
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
32828
33022
|
function UnavailableChatIcon(props) {
|
|
32829
33023
|
"use memo";
|
|
32830
|
-
return /* @__PURE__ */
|
|
33024
|
+
return /* @__PURE__ */ jsx62(
|
|
32831
33025
|
"svg",
|
|
32832
33026
|
{
|
|
32833
33027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32835,7 +33029,7 @@ function UnavailableChatIcon(props) {
|
|
|
32835
33029
|
fill: "currentColor",
|
|
32836
33030
|
"aria-hidden": true,
|
|
32837
33031
|
...props,
|
|
32838
|
-
children: /* @__PURE__ */
|
|
33032
|
+
children: /* @__PURE__ */ jsx62("path", { d: "M20.833 2.125C21.6507 2.125 22.4355 2.45019 23.0137 3.02832C23.5916 3.60645 23.9159 4.39053 23.916 5.20801V17.708C23.916 18.5257 23.5918 19.3104 23.0137 19.8887C22.4355 20.4668 21.6507 20.792 20.833 20.792H7.1123C6.82516 20.7922 6.5497 20.9063 6.34668 21.1094L4.05273 23.4033C3.80954 23.6464 3.49934 23.8118 3.16211 23.8789C2.82492 23.9459 2.47487 23.9118 2.15723 23.7803C1.83953 23.6486 1.56707 23.4256 1.37598 23.1396C1.18489 22.8536 1.08305 22.5168 1.08301 22.1729V5.20801C1.08309 4.39045 1.40827 3.60647 1.98633 3.02832C2.56441 2.45024 3.3485 2.12517 4.16602 2.125H20.833ZM16.1533 7.80566C15.7628 7.41518 15.1298 7.41527 14.7393 7.80566L12.5 10.0439L10.2607 7.80469C9.87031 7.41464 9.23712 7.41465 8.84668 7.80469C8.45627 8.19509 8.45651 8.8282 8.84668 9.21875L11.0859 11.458L8.84668 13.6982C8.45651 14.0888 8.45627 14.7219 8.84668 15.1123C9.2371 15.5026 9.87024 15.5024 10.2607 15.1123L12.5 12.873L14.7393 15.1113C15.1298 15.5017 15.7628 15.5018 16.1533 15.1113C16.5434 14.7208 16.5436 14.0877 16.1533 13.6973L13.9141 11.458L16.1533 9.21973C16.5437 8.82924 16.5437 8.19616 16.1533 7.80566Z" })
|
|
32839
33033
|
}
|
|
32840
33034
|
);
|
|
32841
33035
|
}
|
|
@@ -32881,7 +33075,7 @@ function useAgentGUITimelineTransition(input) {
|
|
|
32881
33075
|
}
|
|
32882
33076
|
|
|
32883
33077
|
// agent-gui/agentGuiNode/view/useAgentGUIDetailModel.tsx
|
|
32884
|
-
import { Fragment as Fragment17, jsx as
|
|
33078
|
+
import { Fragment as Fragment17, jsx as jsx63, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
32885
33079
|
function useAgentGUIDetailModel(input) {
|
|
32886
33080
|
const {
|
|
32887
33081
|
bottomDockDismissedPromptRequestId,
|
|
@@ -33035,11 +33229,11 @@ function useAgentGUIDetailModel(input) {
|
|
|
33035
33229
|
className: AgentGUINode_styles_default.unavailableChatEmpty,
|
|
33036
33230
|
"data-testid": "agent-gui-unavailable-chat-empty",
|
|
33037
33231
|
children: [
|
|
33038
|
-
/* @__PURE__ */
|
|
33039
|
-
/* @__PURE__ */
|
|
33232
|
+
/* @__PURE__ */ jsx63(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
|
|
33233
|
+
/* @__PURE__ */ jsx63("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
|
|
33040
33234
|
]
|
|
33041
33235
|
}
|
|
33042
|
-
) : /* @__PURE__ */
|
|
33236
|
+
) : /* @__PURE__ */ jsx63(Fragment17, {}),
|
|
33043
33237
|
[labels.conversationUnavailable, showUnavailableChatEmpty]
|
|
33044
33238
|
);
|
|
33045
33239
|
const chromeLabels = useMemo35(
|
|
@@ -33416,7 +33610,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
33416
33610
|
}
|
|
33417
33611
|
|
|
33418
33612
|
// agent-gui/agentGuiNode/view/AgentGUIDetailPane.tsx
|
|
33419
|
-
import { Fragment as Fragment18, jsx as
|
|
33613
|
+
import { Fragment as Fragment18, jsx as jsx64, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
33420
33614
|
var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
|
|
33421
33615
|
width: "100%",
|
|
33422
33616
|
minWidth: "100%",
|
|
@@ -33490,7 +33684,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33490
33684
|
onCapabilitySettingsRequest,
|
|
33491
33685
|
onAgentProviderLogin,
|
|
33492
33686
|
onRequestWorkspaceReferences,
|
|
33493
|
-
|
|
33687
|
+
prepareExternalPromptFiles = null,
|
|
33688
|
+
promptAssetLimit = null,
|
|
33494
33689
|
selectProjectDirectory,
|
|
33495
33690
|
onRequestGitBranches,
|
|
33496
33691
|
onRequestComposerFocus,
|
|
@@ -33750,7 +33945,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33750
33945
|
onLinkAction: stableLinkAction,
|
|
33751
33946
|
onHandoffConversation: stableHandoffConversation,
|
|
33752
33947
|
onRequestWorkspaceReferences: stableRequestWorkspaceReferences,
|
|
33753
|
-
|
|
33948
|
+
prepareExternalPromptFiles,
|
|
33949
|
+
promptAssetLimit,
|
|
33754
33950
|
selectProjectDirectory: stableSelectProjectDirectory,
|
|
33755
33951
|
onRequestGitBranches: stableRequestGitBranches,
|
|
33756
33952
|
contextMentionProviders
|
|
@@ -33788,7 +33984,8 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33788
33984
|
onCapabilitySettingsRequest,
|
|
33789
33985
|
contextMentionProviders,
|
|
33790
33986
|
removeQueuedPrompt,
|
|
33791
|
-
|
|
33987
|
+
prepareExternalPromptFiles,
|
|
33988
|
+
promptAssetLimit,
|
|
33792
33989
|
sendQueuedPromptNext,
|
|
33793
33990
|
showPromptImagesUnsupported,
|
|
33794
33991
|
showStopButton,
|
|
@@ -33880,7 +34077,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33880
34077
|
"aria-busy": timelineInteractionLocked || void 0,
|
|
33881
34078
|
inert: timelineInteractionLocked,
|
|
33882
34079
|
children: [
|
|
33883
|
-
viewModel.operations.goalClearNoticeSequence > 0 ? /* @__PURE__ */
|
|
34080
|
+
viewModel.operations.goalClearNoticeSequence > 0 ? /* @__PURE__ */ jsx64(
|
|
33884
34081
|
AgentGUIContentToast,
|
|
33885
34082
|
{
|
|
33886
34083
|
insetTopPx: hideDetailHeader ? 16 : 80,
|
|
@@ -33888,7 +34085,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33888
34085
|
},
|
|
33889
34086
|
viewModel.operations.goalClearNoticeSequence
|
|
33890
34087
|
) : null,
|
|
33891
|
-
/* @__PURE__ */
|
|
34088
|
+
/* @__PURE__ */ jsx64(
|
|
33892
34089
|
AgentGUIDetailHeader,
|
|
33893
34090
|
{
|
|
33894
34091
|
activeConversation: viewModel.rail.activeConversation,
|
|
@@ -33898,7 +34095,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33898
34095
|
previewMode
|
|
33899
34096
|
}
|
|
33900
34097
|
),
|
|
33901
|
-
/* @__PURE__ */
|
|
34098
|
+
/* @__PURE__ */ jsx64(
|
|
33902
34099
|
ScrollArea2,
|
|
33903
34100
|
{
|
|
33904
34101
|
scrollbarMode: "native",
|
|
@@ -33907,7 +34104,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33907
34104
|
viewportTestId: "agent-gui-timeline",
|
|
33908
34105
|
viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${!isTimelineScrolledToTop ? AgentGUINode_styles_default.timelineScrolledFromTop : ""} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
|
|
33909
34106
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
33910
|
-
children: !hasActiveConversation ? shouldRenderProviderUnavailableState && disabledProviderTarget ? /* @__PURE__ */
|
|
34107
|
+
children: !hasActiveConversation ? shouldRenderProviderUnavailableState && disabledProviderTarget ? /* @__PURE__ */ jsx64(Fragment18, { children: renderProviderUnavailableState?.({
|
|
33911
34108
|
provider: disabledProviderTarget.provider,
|
|
33912
34109
|
providerLabel: labels.emptyProviderForProvider?.(
|
|
33913
34110
|
disabledProviderTarget.provider
|
|
@@ -33919,7 +34116,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33919
34116
|
disabledProviderTarget.provider
|
|
33920
34117
|
),
|
|
33921
34118
|
unavailableReason: disabledProviderTarget.unavailableReason ?? null
|
|
33922
|
-
}) }) : /* @__PURE__ */
|
|
34119
|
+
}) }) : /* @__PURE__ */ jsx64(
|
|
33923
34120
|
AgentGUIEmptyHomePane,
|
|
33924
34121
|
{
|
|
33925
34122
|
provider: emptyHeroProvider,
|
|
@@ -33942,7 +34139,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33942
34139
|
onSelectSuggestion: handleSelectHomeSuggestion,
|
|
33943
34140
|
onSelectSuggestionAction: handleHomeSuggestionAction
|
|
33944
34141
|
}
|
|
33945
|
-
) : /* @__PURE__ */
|
|
34142
|
+
) : /* @__PURE__ */ jsx64(
|
|
33946
34143
|
AgentGUIConversationTimelinePane,
|
|
33947
34144
|
{
|
|
33948
34145
|
conversation,
|
|
@@ -33960,7 +34157,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33960
34157
|
)
|
|
33961
34158
|
}
|
|
33962
34159
|
),
|
|
33963
|
-
hasActiveConversation ? /* @__PURE__ */
|
|
34160
|
+
hasActiveConversation ? /* @__PURE__ */ jsx64(
|
|
33964
34161
|
AgentGUIBottomDockPane,
|
|
33965
34162
|
{
|
|
33966
34163
|
bottomDockRef,
|
|
@@ -33994,7 +34191,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
33994
34191
|
// agent-gui/agentGuiNode/view/AgentGUIRenameConversationDialog.tsx
|
|
33995
34192
|
import { memo as memo13, useCallback as useCallback53, useEffect as useEffect34, useRef as useRef43, useState as useState35 } from "react";
|
|
33996
34193
|
import { ConfirmationDialog as ConfirmationDialog3, Input as Input2 } from "@tutti-os/ui-system";
|
|
33997
|
-
import { jsx as
|
|
34194
|
+
import { jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
33998
34195
|
var AgentGUIRenameConversationDialog = memo13(
|
|
33999
34196
|
function AgentGUIRenameConversationDialog2({
|
|
34000
34197
|
conversation,
|
|
@@ -34050,7 +34247,7 @@ var AgentGUIRenameConversationDialog = memo13(
|
|
|
34050
34247
|
setIsSaving(false);
|
|
34051
34248
|
});
|
|
34052
34249
|
}, [conversation, onOpenChange, onRename, trimmedTitle]);
|
|
34053
|
-
return /* @__PURE__ */
|
|
34250
|
+
return /* @__PURE__ */ jsx65(
|
|
34054
34251
|
ConfirmationDialog3,
|
|
34055
34252
|
{
|
|
34056
34253
|
cancelLabel: labels.cancel,
|
|
@@ -34060,7 +34257,7 @@ var AgentGUIRenameConversationDialog = memo13(
|
|
|
34060
34257
|
confirmLabel: labels.renameSessionSave,
|
|
34061
34258
|
description: labels.renameSessionDescription,
|
|
34062
34259
|
footer: /* @__PURE__ */ jsxs46("div", { className: "flex justify-end gap-2", children: [
|
|
34063
|
-
/* @__PURE__ */
|
|
34260
|
+
/* @__PURE__ */ jsx65(
|
|
34064
34261
|
Button,
|
|
34065
34262
|
{
|
|
34066
34263
|
disabled: isSaving,
|
|
@@ -34098,7 +34295,7 @@ var AgentGUIRenameConversationDialog = memo13(
|
|
|
34098
34295
|
children: labels.cancel
|
|
34099
34296
|
}
|
|
34100
34297
|
),
|
|
34101
|
-
/* @__PURE__ */
|
|
34298
|
+
/* @__PURE__ */ jsx65(
|
|
34102
34299
|
Button,
|
|
34103
34300
|
{
|
|
34104
34301
|
className: "shadow-none",
|
|
@@ -34153,7 +34350,7 @@ var AgentGUIRenameConversationDialog = memo13(
|
|
|
34153
34350
|
title: labels.renameSessionTitle,
|
|
34154
34351
|
onConfirm: confirmRename,
|
|
34155
34352
|
onOpenChange,
|
|
34156
|
-
children: /* @__PURE__ */
|
|
34353
|
+
children: /* @__PURE__ */ jsx65(
|
|
34157
34354
|
Input2,
|
|
34158
34355
|
{
|
|
34159
34356
|
ref: inputRef,
|
|
@@ -34181,7 +34378,7 @@ import {
|
|
|
34181
34378
|
ReferenceSourcePicker,
|
|
34182
34379
|
WorkspaceFileReferencePicker
|
|
34183
34380
|
} from "@tutti-os/workspace-file-reference/ui";
|
|
34184
|
-
import { jsx as
|
|
34381
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
34185
34382
|
function AgentGUIReferencePickerSurface({
|
|
34186
34383
|
aggregator,
|
|
34187
34384
|
copy,
|
|
@@ -34198,7 +34395,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
34198
34395
|
onConfirm,
|
|
34199
34396
|
onConfirmBundles
|
|
34200
34397
|
}) {
|
|
34201
|
-
return aggregator ? /* @__PURE__ */
|
|
34398
|
+
return aggregator ? /* @__PURE__ */ jsx66(
|
|
34202
34399
|
ReferenceSourcePicker,
|
|
34203
34400
|
{
|
|
34204
34401
|
aggregator,
|
|
@@ -34208,7 +34405,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
34208
34405
|
fileManagerCopy: fileManagerCopy ?? void 0,
|
|
34209
34406
|
open,
|
|
34210
34407
|
provenanceFilter: provenanceFilter?.snapshot.value,
|
|
34211
|
-
provenanceFilterControl: provenanceFilter ? /* @__PURE__ */
|
|
34408
|
+
provenanceFilterControl: provenanceFilter ? /* @__PURE__ */ jsx66(
|
|
34212
34409
|
AgentReferenceProvenanceFilterControl,
|
|
34213
34410
|
{
|
|
34214
34411
|
filter: provenanceFilter,
|
|
@@ -34221,7 +34418,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
34221
34418
|
onConfirm,
|
|
34222
34419
|
onConfirmBundles
|
|
34223
34420
|
}
|
|
34224
|
-
) : /* @__PURE__ */
|
|
34421
|
+
) : /* @__PURE__ */ jsx66(
|
|
34225
34422
|
WorkspaceFileReferencePicker,
|
|
34226
34423
|
{
|
|
34227
34424
|
copy,
|
|
@@ -34238,7 +34435,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
34238
34435
|
|
|
34239
34436
|
// agent-gui/agentGuiNode/view/AgentTargetSetupRoot.tsx
|
|
34240
34437
|
import { useCallback as useCallback54, useMemo as useMemo37 } from "react";
|
|
34241
|
-
import { jsx as
|
|
34438
|
+
import { jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
34242
34439
|
function useAgentTargetSetupRoot(input) {
|
|
34243
34440
|
const { preferences } = useAgentGUIProviderRailPreferences();
|
|
34244
34441
|
const homeTargetProjection = useMemo37(
|
|
@@ -34260,8 +34457,16 @@ function useAgentTargetSetupRoot(input) {
|
|
|
34260
34457
|
controller.setDialogOpen(true);
|
|
34261
34458
|
return;
|
|
34262
34459
|
}
|
|
34263
|
-
|
|
34264
|
-
|
|
34460
|
+
input.openEnvironmentSetup?.({
|
|
34461
|
+
provider: input.environmentProvider,
|
|
34462
|
+
focus: null
|
|
34463
|
+
});
|
|
34464
|
+
}, [
|
|
34465
|
+
controller,
|
|
34466
|
+
input.environmentProvider,
|
|
34467
|
+
input.openEnvironmentSetup,
|
|
34468
|
+
targetRuntimeSetupVisible
|
|
34469
|
+
]);
|
|
34265
34470
|
return {
|
|
34266
34471
|
controller,
|
|
34267
34472
|
environmentSetupVisible,
|
|
@@ -34271,11 +34476,12 @@ function useAgentTargetSetupRoot(input) {
|
|
|
34271
34476
|
}
|
|
34272
34477
|
function AgentTargetSetupRoot({
|
|
34273
34478
|
children,
|
|
34274
|
-
controller
|
|
34479
|
+
controller,
|
|
34480
|
+
openEnvironmentSetup
|
|
34275
34481
|
}) {
|
|
34276
|
-
return /* @__PURE__ */ jsxs47(AgentTargetSetupControllerProvider, { controller, children: [
|
|
34482
|
+
return /* @__PURE__ */ jsx67(AgentEnvPanelActionProvider, { openPanel: openEnvironmentSetup, children: /* @__PURE__ */ jsxs47(AgentTargetSetupControllerProvider, { controller, children: [
|
|
34277
34483
|
children,
|
|
34278
|
-
/* @__PURE__ */
|
|
34484
|
+
/* @__PURE__ */ jsx67(
|
|
34279
34485
|
AgentTargetSetupGate,
|
|
34280
34486
|
{
|
|
34281
34487
|
carouselMountedExternally: false,
|
|
@@ -34283,7 +34489,7 @@ function AgentTargetSetupRoot({
|
|
|
34283
34489
|
gateVisible: false
|
|
34284
34490
|
}
|
|
34285
34491
|
)
|
|
34286
|
-
] });
|
|
34492
|
+
] }) });
|
|
34287
34493
|
}
|
|
34288
34494
|
|
|
34289
34495
|
// agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
|
|
@@ -34665,7 +34871,7 @@ function useAgentGUINodeEngagement(input) {
|
|
|
34665
34871
|
}
|
|
34666
34872
|
|
|
34667
34873
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
34668
|
-
import { jsx as
|
|
34874
|
+
import { jsx as jsx68, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
34669
34875
|
function AgentGUINodeView({
|
|
34670
34876
|
viewModel,
|
|
34671
34877
|
referenceProvenanceFilter = null,
|
|
@@ -34697,6 +34903,7 @@ function AgentGUINodeView({
|
|
|
34697
34903
|
accountMenuState = null,
|
|
34698
34904
|
previewMode = false,
|
|
34699
34905
|
onAgentProviderLogin,
|
|
34906
|
+
onAgentEnvPanelOpen,
|
|
34700
34907
|
actions,
|
|
34701
34908
|
conversationRailCollapsed,
|
|
34702
34909
|
conversationRailWidthPx,
|
|
@@ -34705,7 +34912,8 @@ function AgentGUINodeView({
|
|
|
34705
34912
|
detailMinWidthPx,
|
|
34706
34913
|
uiLanguage,
|
|
34707
34914
|
onWorkspaceFileReferencesAdded,
|
|
34708
|
-
|
|
34915
|
+
prepareExternalPromptFiles = null,
|
|
34916
|
+
promptAssetLimit = null,
|
|
34709
34917
|
onConversationRailWidthChanged,
|
|
34710
34918
|
labels,
|
|
34711
34919
|
workspaceUserProjectI18n,
|
|
@@ -34997,6 +35205,7 @@ function AgentGUINodeView({
|
|
|
34997
35205
|
activeConversationId: viewModel.rail.activeConversationId,
|
|
34998
35206
|
agentTargets: viewModel.rail.agentTargets,
|
|
34999
35207
|
environmentProvider: effectiveRailConfigProvider,
|
|
35208
|
+
openEnvironmentSetup: onAgentEnvPanelOpen,
|
|
35000
35209
|
selectedAgentTarget: viewModel.rail.selectedAgentTarget
|
|
35001
35210
|
});
|
|
35002
35211
|
const openAgentSettings = useCallback56(() => {
|
|
@@ -35088,237 +35297,233 @@ function AgentGUINodeView({
|
|
|
35088
35297
|
workspaceUserProjectI18n
|
|
35089
35298
|
]
|
|
35090
35299
|
);
|
|
35091
|
-
const
|
|
35092
|
-
viewModel.rail.agentTargets
|
|
35093
|
-
target.agentTargetId ?? null,
|
|
35094
|
-
target.iconUrl ?? null,
|
|
35095
|
-
target.label,
|
|
35096
|
-
target.provider
|
|
35097
|
-
])
|
|
35300
|
+
const targetPresentationKey = agentTargetPresentationKey(
|
|
35301
|
+
viewModel.rail.agentTargets
|
|
35098
35302
|
);
|
|
35099
35303
|
const agentTargetPresentations = useMemo39(
|
|
35100
|
-
() =>
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
name: target.label,
|
|
35106
|
-
provider: target.provider,
|
|
35107
|
-
workspaceId: viewModel.shell.workspaceId
|
|
35108
|
-
}
|
|
35109
|
-
] : []
|
|
35110
|
-
),
|
|
35111
|
-
[agentTargetPresentationKey, viewModel.shell.workspaceId]
|
|
35304
|
+
() => projectAgentTargetPresentations({
|
|
35305
|
+
agentTargets: viewModel.rail.agentTargets,
|
|
35306
|
+
workspaceId: viewModel.shell.workspaceId
|
|
35307
|
+
}),
|
|
35308
|
+
[targetPresentationKey, viewModel.shell.workspaceId]
|
|
35112
35309
|
);
|
|
35113
|
-
const content = /* @__PURE__ */
|
|
35114
|
-
|
|
35115
|
-
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
|
|
35124
|
-
|
|
35125
|
-
"
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
|
|
35129
|
-
|
|
35130
|
-
|
|
35131
|
-
|
|
35132
|
-
|
|
35133
|
-
|
|
35134
|
-
|
|
35135
|
-
|
|
35136
|
-
|
|
35137
|
-
|
|
35138
|
-
|
|
35139
|
-
labels,
|
|
35140
|
-
previewMode,
|
|
35141
|
-
selectedAgentTarget: viewModel.rail.selectedAgentTarget,
|
|
35142
|
-
agentTargets: viewModel.rail.agentTargets,
|
|
35143
|
-
agentTargetsLoading: viewModel.rail.agentTargetsLoading,
|
|
35144
|
-
providerRailMode: viewModel.rail.providerRailMode,
|
|
35145
|
-
renderProviderRailEmpty,
|
|
35146
|
-
providerRailAllPresentation,
|
|
35147
|
-
comingSoonProviders: viewModel.rail.comingSoonProviders,
|
|
35148
|
-
managerOpen: providerManagerOpen,
|
|
35149
|
-
onManagerOpenChange: setProviderManagerOpen,
|
|
35150
|
-
onSelectHomeComposerAgentTarget: actions.selectHomeComposerAgentTarget,
|
|
35151
|
-
onSelectConversationFilterTarget: actions.selectConversationFilterTarget,
|
|
35152
|
-
onUpdateConversationFilter: actions.updateConversationFilter,
|
|
35153
|
-
onRequestComposerFocus: requestComposerFocus
|
|
35154
|
-
}
|
|
35155
|
-
),
|
|
35156
|
-
renderSidebarFooter ? /* @__PURE__ */ jsx67(
|
|
35157
|
-
"div",
|
|
35158
|
-
{
|
|
35159
|
-
className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailSidebarFooter} nodrag tsh-desktop-no-drag`,
|
|
35160
|
-
"data-testid": "agent-gui-sidebar-footer-slot",
|
|
35161
|
-
children: renderSidebarFooter({
|
|
35162
|
-
currentUserId: viewModel.shell.currentUserId,
|
|
35163
|
-
activeConversation: viewModel.rail.activeConversation
|
|
35164
|
-
})
|
|
35165
|
-
}
|
|
35166
|
-
) : null,
|
|
35167
|
-
shouldShowProviderRailConfigButton ? /* @__PURE__ */ jsx67(
|
|
35168
|
-
"div",
|
|
35169
|
-
{
|
|
35170
|
-
className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailConfigFooter} nodrag tsh-desktop-no-drag`,
|
|
35171
|
-
"data-testid": "agent-gui-config-footer",
|
|
35172
|
-
children: /* @__PURE__ */ jsx67(
|
|
35173
|
-
AgentGUIConfigMenu,
|
|
35310
|
+
const content = /* @__PURE__ */ jsx68(AgentTargetPresentationProvider, { agentTargets: agentTargetPresentations, children: /* @__PURE__ */ jsxs48(
|
|
35311
|
+
AgentTargetSetupRoot,
|
|
35312
|
+
{
|
|
35313
|
+
controller: targetSetupController,
|
|
35314
|
+
openEnvironmentSetup: onAgentEnvPanelOpen,
|
|
35315
|
+
children: [
|
|
35316
|
+
/* @__PURE__ */ jsxs48(
|
|
35317
|
+
"div",
|
|
35318
|
+
{
|
|
35319
|
+
ref: layoutElementRef,
|
|
35320
|
+
className: AgentGUINode_styles_default.layout,
|
|
35321
|
+
"data-agent-gui-preview": previewMode ? "true" : void 0,
|
|
35322
|
+
"data-rail-resizing": isRailResizing ? "true" : void 0,
|
|
35323
|
+
inert: previewMode ? true : void 0,
|
|
35324
|
+
style: layoutStyle,
|
|
35325
|
+
children: [
|
|
35326
|
+
/* @__PURE__ */ jsxs48(
|
|
35327
|
+
"aside",
|
|
35328
|
+
{
|
|
35329
|
+
className: `${AgentGUINode_styles_default.providerRailPanel} nodrag tsh-desktop-no-drag`,
|
|
35330
|
+
"aria-label": labels.providerSwitchLabel,
|
|
35331
|
+
"aria-hidden": conversationRailCollapsed ? "true" : void 0,
|
|
35332
|
+
inert: conversationRailCollapsed ? true : void 0,
|
|
35333
|
+
children: [
|
|
35334
|
+
/* @__PURE__ */ jsx68(
|
|
35335
|
+
AgentGUIProviderRail,
|
|
35174
35336
|
{
|
|
35175
|
-
|
|
35337
|
+
activeConversation: viewModel.rail.activeConversation,
|
|
35338
|
+
activeConversationId: viewModel.rail.activeConversationId,
|
|
35339
|
+
conversationFilter: viewModel.rail.conversationFilter,
|
|
35340
|
+
conversations: viewModel.rail.conversations,
|
|
35176
35341
|
labels,
|
|
35177
35342
|
previewMode,
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
|
|
35190
|
-
|
|
35343
|
+
selectedAgentTarget: viewModel.rail.selectedAgentTarget,
|
|
35344
|
+
agentTargets: viewModel.rail.agentTargets,
|
|
35345
|
+
agentTargetsLoading: viewModel.rail.agentTargetsLoading,
|
|
35346
|
+
providerRailMode: viewModel.rail.providerRailMode,
|
|
35347
|
+
renderProviderRailEmpty,
|
|
35348
|
+
providerRailAllPresentation,
|
|
35349
|
+
comingSoonProviders: viewModel.rail.comingSoonProviders,
|
|
35350
|
+
managerOpen: providerManagerOpen,
|
|
35351
|
+
onManagerOpenChange: setProviderManagerOpen,
|
|
35352
|
+
onSelectHomeComposerAgentTarget: actions.selectHomeComposerAgentTarget,
|
|
35353
|
+
onSelectConversationFilterTarget: actions.selectConversationFilterTarget,
|
|
35354
|
+
onUpdateConversationFilter: actions.updateConversationFilter,
|
|
35355
|
+
onRequestComposerFocus: requestComposerFocus
|
|
35191
35356
|
}
|
|
35192
|
-
)
|
|
35193
|
-
|
|
35194
|
-
|
|
35195
|
-
|
|
35196
|
-
|
|
35197
|
-
|
|
35198
|
-
|
|
35199
|
-
|
|
35200
|
-
|
|
35201
|
-
|
|
35202
|
-
|
|
35203
|
-
|
|
35204
|
-
|
|
35205
|
-
|
|
35206
|
-
|
|
35357
|
+
),
|
|
35358
|
+
renderSidebarFooter ? /* @__PURE__ */ jsx68(
|
|
35359
|
+
"div",
|
|
35360
|
+
{
|
|
35361
|
+
className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailSidebarFooter} nodrag tsh-desktop-no-drag`,
|
|
35362
|
+
"data-testid": "agent-gui-sidebar-footer-slot",
|
|
35363
|
+
children: renderSidebarFooter({
|
|
35364
|
+
currentUserId: viewModel.shell.currentUserId,
|
|
35365
|
+
activeConversation: viewModel.rail.activeConversation
|
|
35366
|
+
})
|
|
35367
|
+
}
|
|
35368
|
+
) : null,
|
|
35369
|
+
shouldShowProviderRailConfigButton ? /* @__PURE__ */ jsx68(
|
|
35370
|
+
"div",
|
|
35371
|
+
{
|
|
35372
|
+
className: `${AgentGUINode_styles_default.providerRailFooter} ${AgentGUINode_styles_default.providerRailConfigFooter} nodrag tsh-desktop-no-drag`,
|
|
35373
|
+
"data-testid": "agent-gui-config-footer",
|
|
35374
|
+
children: /* @__PURE__ */ jsx68(
|
|
35375
|
+
AgentGUIConfigMenu,
|
|
35376
|
+
{
|
|
35377
|
+
environmentSetupVisible,
|
|
35378
|
+
labels,
|
|
35379
|
+
previewMode,
|
|
35380
|
+
providerScopedActionsVisible: viewModel.rail.conversationFilter.kind !== "all",
|
|
35381
|
+
slashStatusLimits: effectiveRailSlashStatusLimits,
|
|
35382
|
+
slashStatusLimitsLoading,
|
|
35383
|
+
slashStatusUsageCapturedAtUnixMs,
|
|
35384
|
+
slashStatusUsageDidFail,
|
|
35385
|
+
slashStatusUsageAttempted,
|
|
35386
|
+
provider: effectiveRailConfigProvider,
|
|
35387
|
+
providerAuthAccountLabel: effectiveProviderAuthAccountLabel,
|
|
35388
|
+
onAgentConfigMenuOpen,
|
|
35389
|
+
onAgentUsageRefresh,
|
|
35390
|
+
onOpenAgentManager: () => setProviderManagerOpen(true),
|
|
35391
|
+
onOpenAgentEnvSetup: openAgentEnvSetup,
|
|
35392
|
+
onOpenAgentSettings: openAgentSettings
|
|
35393
|
+
}
|
|
35394
|
+
)
|
|
35395
|
+
}
|
|
35396
|
+
) : null
|
|
35397
|
+
]
|
|
35398
|
+
}
|
|
35399
|
+
),
|
|
35400
|
+
/* @__PURE__ */ jsx68(
|
|
35401
|
+
"aside",
|
|
35207
35402
|
{
|
|
35208
|
-
|
|
35209
|
-
|
|
35210
|
-
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
|
|
35403
|
+
id: "agent-gui-conversation-rail",
|
|
35404
|
+
className: `${AgentGUINode_styles_default.railPanel}${conversationRailCollapsed ? ` ${AgentGUINode_styles_default.railPanelCollapsed}` : ""}`,
|
|
35405
|
+
"aria-hidden": conversationRailCollapsed ? "true" : void 0,
|
|
35406
|
+
inert: conversationRailCollapsed ? true : void 0,
|
|
35407
|
+
children: /* @__PURE__ */ jsx68(
|
|
35408
|
+
AgentGUIConversationRailController,
|
|
35214
35409
|
{
|
|
35215
|
-
|
|
35216
|
-
|
|
35217
|
-
|
|
35410
|
+
...conversationRailStoreState,
|
|
35411
|
+
conversations: viewModel.rail.conversations,
|
|
35412
|
+
userProjects: viewModel.rail.userProjects,
|
|
35413
|
+
workspaceId: viewModel.shell.workspaceId,
|
|
35414
|
+
footer: accountMenuState?.user ? /* @__PURE__ */ jsx68(
|
|
35415
|
+
AgentGUIAccountRailMenu,
|
|
35416
|
+
{
|
|
35417
|
+
accountMenuState,
|
|
35418
|
+
labels,
|
|
35419
|
+
previewMode
|
|
35420
|
+
}
|
|
35421
|
+
) : null
|
|
35218
35422
|
}
|
|
35219
|
-
)
|
|
35423
|
+
)
|
|
35220
35424
|
}
|
|
35221
|
-
)
|
|
35222
|
-
|
|
35223
|
-
|
|
35224
|
-
|
|
35225
|
-
|
|
35226
|
-
|
|
35227
|
-
|
|
35228
|
-
|
|
35229
|
-
|
|
35230
|
-
|
|
35231
|
-
|
|
35232
|
-
|
|
35233
|
-
|
|
35234
|
-
|
|
35235
|
-
|
|
35236
|
-
|
|
35237
|
-
|
|
35238
|
-
|
|
35239
|
-
|
|
35240
|
-
|
|
35241
|
-
|
|
35242
|
-
|
|
35243
|
-
|
|
35244
|
-
|
|
35245
|
-
|
|
35246
|
-
|
|
35247
|
-
|
|
35248
|
-
|
|
35249
|
-
|
|
35250
|
-
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
|
|
35260
|
-
|
|
35261
|
-
|
|
35262
|
-
|
|
35263
|
-
|
|
35264
|
-
|
|
35265
|
-
|
|
35266
|
-
|
|
35267
|
-
|
|
35268
|
-
|
|
35269
|
-
|
|
35270
|
-
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
|
|
35274
|
-
|
|
35275
|
-
|
|
35276
|
-
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
|
|
35280
|
-
|
|
35281
|
-
|
|
35282
|
-
|
|
35283
|
-
]
|
|
35284
|
-
}
|
|
35285
|
-
),
|
|
35286
|
-
/* @__PURE__ */ jsx67(
|
|
35287
|
-
AgentGUIReferencePickerSurface,
|
|
35288
|
-
{
|
|
35289
|
-
aggregator: referenceSourceAggregator,
|
|
35290
|
-
copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
|
|
35291
|
-
fileAdapter: workspaceFileReferenceAdapter,
|
|
35292
|
-
fileManagerCopy: workspaceFileManagerCopy,
|
|
35293
|
-
initialPath: viewModel.composer.composerSettings.selectedProjectPath,
|
|
35294
|
-
initialTarget: workspaceReferencePickerTarget,
|
|
35295
|
-
isNodeSelectable: isWorkspaceReferencePickerNodeSelectable,
|
|
35296
|
-
open: workspaceReferencePickerOpen,
|
|
35297
|
-
provenanceFilter: referenceProvenanceFilter,
|
|
35298
|
-
resolveEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
35299
|
-
workspaceId: viewModel.shell.workspaceId,
|
|
35300
|
-
onClose: closeWorkspaceReferencePicker,
|
|
35301
|
-
onConfirm: confirmWorkspaceReferencePicker,
|
|
35302
|
-
onConfirmBundles: confirmWorkspaceReferenceBundles
|
|
35303
|
-
}
|
|
35304
|
-
),
|
|
35305
|
-
/* @__PURE__ */ jsx67(
|
|
35306
|
-
AgentGUIRenameConversationDialog,
|
|
35307
|
-
{
|
|
35308
|
-
conversation: renameConversationTarget,
|
|
35309
|
-
open: renameConversationDialogOpen && renameConversationTarget !== null,
|
|
35310
|
-
labels,
|
|
35311
|
-
onOpenChange: (open) => {
|
|
35312
|
-
setRenameConversationDialogOpen(open);
|
|
35313
|
-
if (!open) {
|
|
35314
|
-
setRenameConversationTarget(null);
|
|
35425
|
+
),
|
|
35426
|
+
/* @__PURE__ */ jsx68(
|
|
35427
|
+
"div",
|
|
35428
|
+
{
|
|
35429
|
+
id: "agent-gui-conversation-rail-resize",
|
|
35430
|
+
className: conversationRailCollapsed ? `${AgentGUINode_styles_default.railResizeHandle} ${AgentGUINode_styles_default.railResizeHandleCollapsed} nodrag pointer-events-none opacity-0` : `${AgentGUINode_styles_default.railResizeHandle} nodrag`,
|
|
35431
|
+
role: "separator",
|
|
35432
|
+
"aria-label": labels.conversationRailResizeAria,
|
|
35433
|
+
"aria-hidden": conversationRailCollapsed ? "true" : void 0,
|
|
35434
|
+
"aria-orientation": "vertical",
|
|
35435
|
+
"aria-valuemin": conversationRailMinWidthPx,
|
|
35436
|
+
"aria-valuemax": conversationRailMaxWidthPx,
|
|
35437
|
+
"aria-valuenow": conversationRailCollapsed ? void 0 : visualConversationRailWidthPx,
|
|
35438
|
+
"data-resizing": isRailResizing ? "true" : void 0,
|
|
35439
|
+
"data-testid": "agent-gui-conversation-rail-resize-handle",
|
|
35440
|
+
tabIndex: conversationRailCollapsed ? -1 : 0,
|
|
35441
|
+
onBlur: () => endConversationRailResize(),
|
|
35442
|
+
onKeyDown: handleConversationRailResizeKeyDown,
|
|
35443
|
+
onPointerCancel: endConversationRailResize,
|
|
35444
|
+
onPointerDown: handleConversationRailResizePointerDown,
|
|
35445
|
+
onLostPointerCapture: endConversationRailResize,
|
|
35446
|
+
onPointerMove: handleConversationRailResizePointerMove,
|
|
35447
|
+
onPointerUp: endConversationRailResize
|
|
35448
|
+
}
|
|
35449
|
+
),
|
|
35450
|
+
/* @__PURE__ */ jsx68("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx68(
|
|
35451
|
+
AgentGUIDetailPane,
|
|
35452
|
+
{
|
|
35453
|
+
viewModel,
|
|
35454
|
+
homeTargetProjection,
|
|
35455
|
+
referenceProvenanceFilter,
|
|
35456
|
+
composerEngagement,
|
|
35457
|
+
actions,
|
|
35458
|
+
labels,
|
|
35459
|
+
uiLanguage,
|
|
35460
|
+
hideDetailHeader: conversationRailCollapsed,
|
|
35461
|
+
isActive,
|
|
35462
|
+
workspaceReferencePickerOpen,
|
|
35463
|
+
composerFocusRequestSequence: detailComposerFocusRequestSequence,
|
|
35464
|
+
slashStatusLimits,
|
|
35465
|
+
slashStatusLimitsLoading,
|
|
35466
|
+
slashStatusLimitsUnavailable,
|
|
35467
|
+
onSlashStatusOpen,
|
|
35468
|
+
onLinkAction,
|
|
35469
|
+
onHandoffConversation,
|
|
35470
|
+
capabilityMenuState,
|
|
35471
|
+
onCapabilitySettingsRequest,
|
|
35472
|
+
onAgentProviderLogin,
|
|
35473
|
+
onRequestWorkspaceReferences: requestWorkspaceReferences,
|
|
35474
|
+
prepareExternalPromptFiles,
|
|
35475
|
+
promptAssetLimit,
|
|
35476
|
+
selectProjectDirectory,
|
|
35477
|
+
onRequestGitBranches,
|
|
35478
|
+
onRequestComposerFocus: requestComposerFocus,
|
|
35479
|
+
contextMentionProviders,
|
|
35480
|
+
workspaceAppIcons: effectiveWorkspaceAppIcons,
|
|
35481
|
+
workspaceUserProjectI18n,
|
|
35482
|
+
renderProviderUnavailableState,
|
|
35483
|
+
previewMode
|
|
35484
|
+
}
|
|
35485
|
+
) })
|
|
35486
|
+
]
|
|
35315
35487
|
}
|
|
35316
|
-
|
|
35317
|
-
|
|
35318
|
-
|
|
35319
|
-
|
|
35320
|
-
|
|
35321
|
-
|
|
35488
|
+
),
|
|
35489
|
+
/* @__PURE__ */ jsx68(
|
|
35490
|
+
AgentGUIReferencePickerSurface,
|
|
35491
|
+
{
|
|
35492
|
+
aggregator: referenceSourceAggregator,
|
|
35493
|
+
copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
|
|
35494
|
+
fileAdapter: workspaceFileReferenceAdapter,
|
|
35495
|
+
fileManagerCopy: workspaceFileManagerCopy,
|
|
35496
|
+
initialPath: viewModel.composer.composerSettings.selectedProjectPath,
|
|
35497
|
+
initialTarget: workspaceReferencePickerTarget,
|
|
35498
|
+
isNodeSelectable: isWorkspaceReferencePickerNodeSelectable,
|
|
35499
|
+
open: workspaceReferencePickerOpen,
|
|
35500
|
+
provenanceFilter: referenceProvenanceFilter,
|
|
35501
|
+
resolveEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
35502
|
+
workspaceId: viewModel.shell.workspaceId,
|
|
35503
|
+
onClose: closeWorkspaceReferencePicker,
|
|
35504
|
+
onConfirm: confirmWorkspaceReferencePicker,
|
|
35505
|
+
onConfirmBundles: confirmWorkspaceReferenceBundles
|
|
35506
|
+
}
|
|
35507
|
+
),
|
|
35508
|
+
/* @__PURE__ */ jsx68(
|
|
35509
|
+
AgentGUIRenameConversationDialog,
|
|
35510
|
+
{
|
|
35511
|
+
conversation: renameConversationTarget,
|
|
35512
|
+
open: renameConversationDialogOpen && renameConversationTarget !== null,
|
|
35513
|
+
labels,
|
|
35514
|
+
onOpenChange: (open) => {
|
|
35515
|
+
setRenameConversationDialogOpen(open);
|
|
35516
|
+
if (!open) {
|
|
35517
|
+
setRenameConversationTarget(null);
|
|
35518
|
+
}
|
|
35519
|
+
},
|
|
35520
|
+
onRename: actions.renameConversation
|
|
35521
|
+
}
|
|
35522
|
+
)
|
|
35523
|
+
]
|
|
35524
|
+
}
|
|
35525
|
+
) });
|
|
35526
|
+
return previewMode ? content : /* @__PURE__ */ jsx68(TooltipProvider5, { children: content });
|
|
35322
35527
|
}
|
|
35323
35528
|
|
|
35324
35529
|
// agent-gui/workspaceDesktop/view/desktopDockAgentProbeTooltipModel.ts
|
|
@@ -35499,7 +35704,7 @@ import {
|
|
|
35499
35704
|
useState as useState38
|
|
35500
35705
|
} from "react";
|
|
35501
35706
|
import { createPortal as createPortal5 } from "react-dom";
|
|
35502
|
-
import { Fragment as Fragment19, jsx as
|
|
35707
|
+
import { Fragment as Fragment19, jsx as jsx69, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
35503
35708
|
var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
|
|
35504
35709
|
var POPOVER_DEFAULT_WIDTH_PX = 260;
|
|
35505
35710
|
function dockAgentProbeLineKey(line) {
|
|
@@ -35513,7 +35718,7 @@ function renderDockAgentProbeLine(line) {
|
|
|
35513
35718
|
line.primary,
|
|
35514
35719
|
line.secondary ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
|
|
35515
35720
|
" ",
|
|
35516
|
-
/* @__PURE__ */
|
|
35721
|
+
/* @__PURE__ */ jsx69("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
|
|
35517
35722
|
] }) : null
|
|
35518
35723
|
] });
|
|
35519
35724
|
}
|
|
@@ -35597,7 +35802,7 @@ function AgentProbeInfoPopover({
|
|
|
35597
35802
|
if (lines.length === 0) {
|
|
35598
35803
|
return null;
|
|
35599
35804
|
}
|
|
35600
|
-
const popover = /* @__PURE__ */
|
|
35805
|
+
const popover = /* @__PURE__ */ jsx69(
|
|
35601
35806
|
"div",
|
|
35602
35807
|
{
|
|
35603
35808
|
ref: popoverRef,
|
|
@@ -35606,7 +35811,7 @@ function AgentProbeInfoPopover({
|
|
|
35606
35811
|
style: popoverStyle ?? void 0,
|
|
35607
35812
|
onMouseEnter: openPopover,
|
|
35608
35813
|
onMouseLeave: closeIfPointerLeavesPopover,
|
|
35609
|
-
children: /* @__PURE__ */
|
|
35814
|
+
children: /* @__PURE__ */ jsx69("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
|
|
35610
35815
|
const label = getDockAgentProbeLineLabel(line);
|
|
35611
35816
|
const valueText = formatDockAgentProbeLineText(line);
|
|
35612
35817
|
return /* @__PURE__ */ jsxs49(
|
|
@@ -35615,8 +35820,8 @@ function AgentProbeInfoPopover({
|
|
|
35615
35820
|
className: "desktop-dock-popup__agent-info-item",
|
|
35616
35821
|
"data-has-label": label ? "true" : "false",
|
|
35617
35822
|
children: [
|
|
35618
|
-
label ? /* @__PURE__ */
|
|
35619
|
-
/* @__PURE__ */
|
|
35823
|
+
label ? /* @__PURE__ */ jsx69("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
|
|
35824
|
+
/* @__PURE__ */ jsx69(
|
|
35620
35825
|
"span",
|
|
35621
35826
|
{
|
|
35622
35827
|
className: "desktop-dock-popup__agent-info-value",
|
|
@@ -35651,7 +35856,7 @@ function AgentProbeInfoPopover({
|
|
|
35651
35856
|
},
|
|
35652
35857
|
onBlur: () => setIsOpen(false),
|
|
35653
35858
|
children: [
|
|
35654
|
-
/* @__PURE__ */
|
|
35859
|
+
/* @__PURE__ */ jsx69(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
|
|
35655
35860
|
isOpen ? createPortal5(popover, document.body) : null
|
|
35656
35861
|
]
|
|
35657
35862
|
}
|
|
@@ -35740,7 +35945,7 @@ function areAgentGUINodePropsEqual(previous, next) {
|
|
|
35740
35945
|
const pc = previous.hostCapabilities, nc = next.hostCapabilities;
|
|
35741
35946
|
const pa = previous.hostActions, na = next.hostActions;
|
|
35742
35947
|
const ps = previous.renderSlots, ns = next.renderSlots;
|
|
35743
|
-
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;
|
|
35744
35949
|
}
|
|
35745
35950
|
|
|
35746
35951
|
// agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
|
|
@@ -35749,7 +35954,7 @@ import {
|
|
|
35749
35954
|
useEffectiveRichTextMentionService,
|
|
35750
35955
|
useRichTextMentionService
|
|
35751
35956
|
} from "@tutti-os/ui-rich-text/editor";
|
|
35752
|
-
import { jsx as
|
|
35957
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
35753
35958
|
function AgentGUIMentionServiceBoundary({
|
|
35754
35959
|
children,
|
|
35755
35960
|
legacyProviders,
|
|
@@ -35763,7 +35968,7 @@ function AgentGUIMentionServiceBoundary({
|
|
|
35763
35968
|
if (!service && !inheritedService && !legacyProviders?.length) {
|
|
35764
35969
|
return children;
|
|
35765
35970
|
}
|
|
35766
|
-
return effectiveService !== inheritedService ? /* @__PURE__ */
|
|
35971
|
+
return effectiveService !== inheritedService ? /* @__PURE__ */ jsx70(RichTextMentionServiceProvider, { service: effectiveService, children }) : children;
|
|
35767
35972
|
}
|
|
35768
35973
|
|
|
35769
35974
|
// agent-gui/agentGuiNode/AgentGUINode.labels.ts
|
|
@@ -36623,7 +36828,7 @@ function resolveAgentGUIRailStatusProvider(input) {
|
|
|
36623
36828
|
}
|
|
36624
36829
|
|
|
36625
36830
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
36626
|
-
import { jsx as
|
|
36831
|
+
import { jsx as jsx71, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
36627
36832
|
var EMPTY_SLASH_STATUS_QUOTAS = [];
|
|
36628
36833
|
var DISABLED_REFERENCE_PROVENANCE_CATALOG = {
|
|
36629
36834
|
enabledDimensions: [],
|
|
@@ -36647,7 +36852,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36647
36852
|
fileReferenceAdapter: workspaceFileReferenceAdapter = null,
|
|
36648
36853
|
onRequestGitBranches = null,
|
|
36649
36854
|
selectProjectDirectory,
|
|
36650
|
-
|
|
36855
|
+
prepareExternalPromptFiles = null,
|
|
36856
|
+
promptAssetLimit = null,
|
|
36651
36857
|
referenceSourceAggregator = null,
|
|
36652
36858
|
resolveReferenceEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
36653
36859
|
resolveMentionReferenceTarget = null,
|
|
@@ -36668,6 +36874,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36668
36874
|
conversationRailAutoCollapseWidthPx = null
|
|
36669
36875
|
} = frame;
|
|
36670
36876
|
const railAutoCollapseWidthPx = conversationRailAutoCollapseWidthPx ?? void 0;
|
|
36877
|
+
const widthRef = useRef49(width);
|
|
36878
|
+
widthRef.current = width;
|
|
36671
36879
|
const {
|
|
36672
36880
|
composerAppend: composerAppendRequest = null,
|
|
36673
36881
|
composerFocusSequence: composerFocusRequestSequence = null,
|
|
@@ -36712,6 +36920,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36712
36920
|
onHandoffConversation,
|
|
36713
36921
|
onCapabilitySettingsRequest,
|
|
36714
36922
|
onAgentProviderLogin,
|
|
36923
|
+
onAgentEnvPanelOpen,
|
|
36715
36924
|
onOpenConversationWindow,
|
|
36716
36925
|
onClose,
|
|
36717
36926
|
onResize,
|
|
@@ -36779,7 +36988,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36779
36988
|
const nextWidthPx = resolveNextAgentGUIConversationRailWidthPx({
|
|
36780
36989
|
currentWidthPx: current.conversationRailWidthPx,
|
|
36781
36990
|
requestedWidthPx: widthPx,
|
|
36782
|
-
containerWidthPx:
|
|
36991
|
+
containerWidthPx: widthRef.current
|
|
36783
36992
|
});
|
|
36784
36993
|
if (current.conversationRailWidthPx === nextWidthPx) {
|
|
36785
36994
|
return current;
|
|
@@ -36790,7 +36999,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
36790
36999
|
};
|
|
36791
37000
|
});
|
|
36792
37001
|
},
|
|
36793
|
-
[onUpdateNode, previewMode
|
|
37002
|
+
[onUpdateNode, previewMode]
|
|
36794
37003
|
);
|
|
36795
37004
|
const isConversationRailManuallyCollapsed = state.conversationRailCollapsed === true;
|
|
36796
37005
|
const isConversationRailAutoCollapsed = shouldAutoCollapseAgentGUIConversationRail(width, railAutoCollapseWidthPx);
|
|
@@ -37032,12 +37241,12 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37032
37241
|
previewMode,
|
|
37033
37242
|
railStatusProvider
|
|
37034
37243
|
]);
|
|
37035
|
-
return /* @__PURE__ */
|
|
37244
|
+
return /* @__PURE__ */ jsx71(
|
|
37036
37245
|
AgentGUIMentionServiceBoundary,
|
|
37037
37246
|
{
|
|
37038
37247
|
legacyProviders: contextMentionProviders,
|
|
37039
37248
|
service: mentionService,
|
|
37040
|
-
children: /* @__PURE__ */
|
|
37249
|
+
children: /* @__PURE__ */ jsx71(
|
|
37041
37250
|
WorkspaceNodeWindow,
|
|
37042
37251
|
{
|
|
37043
37252
|
nodeId,
|
|
@@ -37054,7 +37263,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37054
37263
|
bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
|
|
37055
37264
|
hideHeader: embedded,
|
|
37056
37265
|
titleAccessory: /* @__PURE__ */ jsxs50("span", { className: "inline-flex flex-none items-center gap-1", children: [
|
|
37057
|
-
/* @__PURE__ */
|
|
37266
|
+
/* @__PURE__ */ jsx71(
|
|
37058
37267
|
AgentProbeInfoPopover,
|
|
37059
37268
|
{
|
|
37060
37269
|
lines: agentProbeLines,
|
|
@@ -37063,7 +37272,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37063
37272
|
onOpen: handleAgentProbeInfoOpen
|
|
37064
37273
|
}
|
|
37065
37274
|
),
|
|
37066
|
-
/* @__PURE__ */
|
|
37275
|
+
/* @__PURE__ */ jsx71(
|
|
37067
37276
|
CanvasNodeGhostIconButton,
|
|
37068
37277
|
{
|
|
37069
37278
|
"aria-label": isConversationRailCollapsed ? t("agentHost.agentGui.expandConversationRail") : t("agentHost.agentGui.collapseConversationRail"),
|
|
@@ -37075,7 +37284,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37075
37284
|
event.stopPropagation();
|
|
37076
37285
|
handleConversationRailToggle();
|
|
37077
37286
|
},
|
|
37078
|
-
children: /* @__PURE__ */
|
|
37287
|
+
children: /* @__PURE__ */ jsx71(
|
|
37079
37288
|
CanvasNodePanelLinedIcon,
|
|
37080
37289
|
{
|
|
37081
37290
|
width: 18,
|
|
@@ -37099,7 +37308,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37099
37308
|
renderedWidth,
|
|
37100
37309
|
railAutoCollapseWidthPx
|
|
37101
37310
|
);
|
|
37102
|
-
return /* @__PURE__ */
|
|
37311
|
+
return /* @__PURE__ */ jsx71(
|
|
37103
37312
|
AgentGUINodeView,
|
|
37104
37313
|
{
|
|
37105
37314
|
viewModel,
|
|
@@ -37131,6 +37340,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37131
37340
|
capabilityMenuState,
|
|
37132
37341
|
onCapabilitySettingsRequest,
|
|
37133
37342
|
onAgentProviderLogin: onAgentProviderLogin ? handleAgentProviderLogin : void 0,
|
|
37343
|
+
onAgentEnvPanelOpen,
|
|
37134
37344
|
accountMenuState,
|
|
37135
37345
|
conversationRailCollapsed: isRenderedConversationRailCollapsed,
|
|
37136
37346
|
conversationRailWidthPx: clampAgentGUIConversationRailWidthPx(
|
|
@@ -37144,7 +37354,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37144
37354
|
detailMinWidthPx: AGENT_GUI_DETAIL_MIN_WIDTH_PX,
|
|
37145
37355
|
uiLanguage: locale,
|
|
37146
37356
|
onWorkspaceFileReferencesAdded: onWorkspaceFileReferencesAdded ? handleWorkspaceFileReferencesAdded : void 0,
|
|
37147
|
-
|
|
37357
|
+
prepareExternalPromptFiles,
|
|
37358
|
+
promptAssetLimit,
|
|
37148
37359
|
onConversationRailWidthChanged: handleConversationRailWidthChanged,
|
|
37149
37360
|
labels,
|
|
37150
37361
|
workspaceUserProjectI18n,
|
|
@@ -37171,7 +37382,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
37171
37382
|
}, areAgentGUINodePropsEqual);
|
|
37172
37383
|
|
|
37173
37384
|
// AgentGUI.tsx
|
|
37174
|
-
import { jsx as
|
|
37385
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
37175
37386
|
var AgentGUI = memo15(function AgentGUI2({
|
|
37176
37387
|
agentActivityRuntime,
|
|
37177
37388
|
agentHostApi,
|
|
@@ -37184,41 +37395,73 @@ var AgentGUI = memo15(function AgentGUI2({
|
|
|
37184
37395
|
locale,
|
|
37185
37396
|
...props
|
|
37186
37397
|
}) {
|
|
37187
|
-
const normalizedAgents =
|
|
37398
|
+
const normalizedAgents = useMemo42(
|
|
37399
|
+
() => normalizeAgentGUIAgents(agentDirectory.agents),
|
|
37400
|
+
[agentDirectory.agents]
|
|
37401
|
+
);
|
|
37402
|
+
const agentTargets = useMemo42(
|
|
37403
|
+
() => projectAgentGUIAgentsToInternalTargets(normalizedAgents),
|
|
37404
|
+
[normalizedAgents]
|
|
37405
|
+
);
|
|
37188
37406
|
const effectiveHandoffAgentDirectory = handoffAgentDirectory ?? agentDirectory;
|
|
37189
|
-
const normalizedHandoffAgents =
|
|
37190
|
-
effectiveHandoffAgentDirectory.agents
|
|
37407
|
+
const normalizedHandoffAgents = useMemo42(
|
|
37408
|
+
() => effectiveHandoffAgentDirectory.agents === agentDirectory.agents ? normalizedAgents : normalizeAgentGUIAgents(effectiveHandoffAgentDirectory.agents),
|
|
37409
|
+
[
|
|
37410
|
+
agentDirectory.agents,
|
|
37411
|
+
effectiveHandoffAgentDirectory.agents,
|
|
37412
|
+
normalizedAgents
|
|
37413
|
+
]
|
|
37414
|
+
);
|
|
37415
|
+
const handoffAgentTargets = useMemo42(
|
|
37416
|
+
() => normalizedHandoffAgents === normalizedAgents ? agentTargets : projectAgentGUIAgentsToInternalTargets(normalizedHandoffAgents),
|
|
37417
|
+
[agentTargets, normalizedAgents, normalizedHandoffAgents]
|
|
37191
37418
|
);
|
|
37192
37419
|
const hostCapabilities = props.hostCapabilities;
|
|
37193
37420
|
const renderSlots = props.renderSlots;
|
|
37194
|
-
const
|
|
37195
|
-
|
|
37196
|
-
hostCapabilities: {
|
|
37421
|
+
const nodeHostCapabilities = useMemo42(
|
|
37422
|
+
() => ({
|
|
37197
37423
|
...hostCapabilities,
|
|
37198
|
-
agentTargets
|
|
37424
|
+
agentTargets,
|
|
37199
37425
|
agentTargetsLoading: agentDirectory.agents.length === 0 && (agentDirectory.status === "idle" || agentDirectory.status === "loading"),
|
|
37200
|
-
handoffAgentTargets
|
|
37201
|
-
normalizedHandoffAgents
|
|
37202
|
-
),
|
|
37426
|
+
handoffAgentTargets,
|
|
37203
37427
|
handoffAgentTargetsLoading: effectiveHandoffAgentDirectory.agents.length === 0 && (effectiveHandoffAgentDirectory.status === "idle" || effectiveHandoffAgentDirectory.status === "loading"),
|
|
37204
37428
|
disabledHomeSuggestions: disabled,
|
|
37205
37429
|
providerRailAllPresentation: allAgentsPresentation ?? null,
|
|
37206
37430
|
providerRailMode: "exact"
|
|
37207
|
-
},
|
|
37208
|
-
|
|
37431
|
+
}),
|
|
37432
|
+
[
|
|
37433
|
+
agentDirectory.agents.length,
|
|
37434
|
+
agentDirectory.status,
|
|
37435
|
+
agentTargets,
|
|
37436
|
+
allAgentsPresentation,
|
|
37437
|
+
disabled,
|
|
37438
|
+
effectiveHandoffAgentDirectory.agents.length,
|
|
37439
|
+
effectiveHandoffAgentDirectory.status,
|
|
37440
|
+
handoffAgentTargets,
|
|
37441
|
+
hostCapabilities
|
|
37442
|
+
]
|
|
37443
|
+
);
|
|
37444
|
+
const nodeRenderSlots = useMemo42(
|
|
37445
|
+
() => ({
|
|
37209
37446
|
...renderSlots,
|
|
37210
37447
|
providerRailEmpty: renderAgentsEmpty
|
|
37211
|
-
}
|
|
37448
|
+
}),
|
|
37449
|
+
[renderAgentsEmpty, renderSlots]
|
|
37450
|
+
);
|
|
37451
|
+
const nodeProps = {
|
|
37452
|
+
...props,
|
|
37453
|
+
hostCapabilities: nodeHostCapabilities,
|
|
37454
|
+
renderSlots: nodeRenderSlots
|
|
37212
37455
|
};
|
|
37213
|
-
const content = /* @__PURE__ */
|
|
37456
|
+
const content = /* @__PURE__ */ jsx72(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx72(
|
|
37214
37457
|
AgentActivityHostProvider,
|
|
37215
37458
|
{
|
|
37216
37459
|
agentActivityRuntime,
|
|
37217
37460
|
agentHostApi,
|
|
37218
|
-
children: /* @__PURE__ */
|
|
37461
|
+
children: /* @__PURE__ */ jsx72(AgentGUINode, { ...nodeProps })
|
|
37219
37462
|
}
|
|
37220
37463
|
) });
|
|
37221
|
-
return props.frame.previewMode ? content : /* @__PURE__ */
|
|
37464
|
+
return props.frame.previewMode ? content : /* @__PURE__ */ jsx72(TooltipProvider6, { delayDuration: 120, skipDelayDuration: 0, children: content });
|
|
37222
37465
|
});
|
|
37223
37466
|
|
|
37224
37467
|
export {
|
|
@@ -37231,4 +37474,4 @@ export {
|
|
|
37231
37474
|
resolveAgentGUIAgentTarget,
|
|
37232
37475
|
AgentGUI
|
|
37233
37476
|
};
|
|
37234
|
-
//# sourceMappingURL=chunk-
|
|
37477
|
+
//# sourceMappingURL=chunk-Y5HD6XHP.js.map
|