@tutti-os/agent-gui 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@-lined-14px-64O2KKB4.svg +3 -0
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +5 -5
- package/dist/agent-message-center/index.js +7 -7
- package/dist/{agentGuiNodeTypes-DCnsaqJr.d.ts → agentGuiNodeTypes-BRU6P22B.d.ts} +2 -1
- package/dist/app/renderer/agentactivity.css +48 -3
- package/dist/app/renderer/assets/icons/@-lined-14px.svg +3 -0
- package/dist/{chunk-6QFURP4M.js → chunk-2VHP7KQ5.js} +2 -2
- package/dist/{chunk-54CMFCHF.js → chunk-33LWYV6O.js} +31 -1
- package/dist/chunk-33LWYV6O.js.map +1 -0
- package/dist/{chunk-X4C4HD6E.js → chunk-DZ76JPCV.js} +103 -9
- package/dist/chunk-DZ76JPCV.js.map +1 -0
- package/dist/{chunk-4URDQNBP.js → chunk-HFZOXSSQ.js} +2 -2
- package/dist/{chunk-PQYSB2WC.js → chunk-IMZBRUP3.js} +4 -4
- package/dist/{chunk-752VTG4P.js → chunk-KOR6UVUJ.js} +4 -4
- package/dist/{chunk-MXDPRBS6.js → chunk-N37A5CJH.js} +2 -2
- package/dist/{chunk-SITURZG6.js → chunk-QFHR527D.js} +2 -2
- package/dist/{chunk-EVVIWZLX.js → chunk-RGVVHF7Q.js} +2 -2
- package/dist/{chunk-PQYMG6PQ.js → chunk-SZ7JGCS3.js} +2 -2
- package/dist/{chunk-5PGMLZ4W.js → chunk-Z3AAQQFD.js} +2 -2
- package/dist/context-mention-palette/index.js +6 -6
- package/dist/i18n/index.d.ts +30 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +7 -4
- package/dist/index.js +315 -74
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-B2m7UcBb.d.ts → types-BsHvTjIZ.d.ts} +8 -1
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/launch.d.ts +1 -1
- package/dist/workbench/providerCatalog.d.ts +1 -1
- package/dist/workbench/sessionTitle.d.ts +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.d.ts +1 -1
- package/dist/workbench/types.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- package/dist/chunk-54CMFCHF.js.map +0 -1
- package/dist/chunk-X4C4HD6E.js.map +0 -1
- /package/dist/{chunk-6QFURP4M.js.map → chunk-2VHP7KQ5.js.map} +0 -0
- /package/dist/{chunk-4URDQNBP.js.map → chunk-HFZOXSSQ.js.map} +0 -0
- /package/dist/{chunk-PQYSB2WC.js.map → chunk-IMZBRUP3.js.map} +0 -0
- /package/dist/{chunk-752VTG4P.js.map → chunk-KOR6UVUJ.js.map} +0 -0
- /package/dist/{chunk-MXDPRBS6.js.map → chunk-N37A5CJH.js.map} +0 -0
- /package/dist/{chunk-SITURZG6.js.map → chunk-QFHR527D.js.map} +0 -0
- /package/dist/{chunk-EVVIWZLX.js.map → chunk-RGVVHF7Q.js.map} +0 -0
- /package/dist/{chunk-PQYMG6PQ.js.map → chunk-SZ7JGCS3.js.map} +0 -0
- /package/dist/{chunk-5PGMLZ4W.js.map → chunk-Z3AAQQFD.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
AgentInteractivePromptSurface,
|
|
24
24
|
approvalOptionDisplayLabel
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KOR6UVUJ.js";
|
|
26
26
|
import {
|
|
27
27
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
28
28
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
resolveAgentGUIExplicitConversationTitle,
|
|
42
42
|
resolveAgentGUIProviderDisplayLabel,
|
|
43
43
|
resolveAgentGUIProviderIdentity
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SZ7JGCS3.js";
|
|
45
45
|
import {
|
|
46
46
|
AgentConversationFlow,
|
|
47
47
|
Button,
|
|
@@ -63,14 +63,14 @@ import {
|
|
|
63
63
|
skillTriggerForPrefix,
|
|
64
64
|
toLocalShortDateTime,
|
|
65
65
|
useProjectedAgentConversation
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-DZ76JPCV.js";
|
|
67
67
|
import {
|
|
68
68
|
AgentMessageMarkdown,
|
|
69
69
|
AgentTargetPresentationProvider,
|
|
70
70
|
ZoomableImage,
|
|
71
71
|
cn,
|
|
72
72
|
resolveWorkspaceLinkAction
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-2VHP7KQ5.js";
|
|
74
74
|
import {
|
|
75
75
|
AGENT_MENTION_FILTER_TAB_ORDER,
|
|
76
76
|
AgentFileMentionPalette,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
79
79
|
agentMentionItemKey,
|
|
80
80
|
preloadAgentMentionBrowse
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-IMZBRUP3.js";
|
|
82
82
|
import {
|
|
83
83
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
84
84
|
buildWorkspaceAgentActivityListViewModel,
|
|
@@ -88,10 +88,10 @@ import {
|
|
|
88
88
|
isWorkspaceAgentUntitledTask,
|
|
89
89
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
90
90
|
selectWorkspaceAgentActivityOverlayMessages
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-HFZOXSSQ.js";
|
|
92
92
|
import {
|
|
93
93
|
Spinner
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-QFHR527D.js";
|
|
95
95
|
import {
|
|
96
96
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
97
97
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
mentionItemToAttrs,
|
|
103
103
|
normalizeAgentSessionMentionTitle,
|
|
104
104
|
parseMentionItemFromHref
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-N37A5CJH.js";
|
|
106
106
|
import "./chunk-Y35GDLP2.js";
|
|
107
107
|
import "./chunk-LUGELG5V.js";
|
|
108
108
|
import {
|
|
@@ -141,8 +141,8 @@ import {
|
|
|
141
141
|
agentGuiI18nResources,
|
|
142
142
|
translate,
|
|
143
143
|
useTranslation
|
|
144
|
-
} from "./chunk-
|
|
145
|
-
import "./chunk-
|
|
144
|
+
} from "./chunk-Z3AAQQFD.js";
|
|
145
|
+
import "./chunk-33LWYV6O.js";
|
|
146
146
|
|
|
147
147
|
// shared/agentActivitySnapshotProjection.ts
|
|
148
148
|
import {
|
|
@@ -8682,6 +8682,7 @@ function useAgentGUINodeController({
|
|
|
8682
8682
|
conversationScope = "single-provider",
|
|
8683
8683
|
providerTargets,
|
|
8684
8684
|
providerTargetsLoading = false,
|
|
8685
|
+
providerReadinessGates = null,
|
|
8685
8686
|
defaultProviderTargetId = null,
|
|
8686
8687
|
openSessionRequest = null,
|
|
8687
8688
|
prefillPromptRequest = null,
|
|
@@ -14428,6 +14429,7 @@ function useAgentGUINodeController({
|
|
|
14428
14429
|
updateConversationFilter
|
|
14429
14430
|
);
|
|
14430
14431
|
const viewData = activeConversationId === null ? selectedComposerTargetData.data : data;
|
|
14432
|
+
const providerReadinessGate = activeConversationId === null ? providerReadinessGates?.[effectiveSelectedProviderTarget.provider] ?? null : null;
|
|
14431
14433
|
const controllerActions = useMemo4(
|
|
14432
14434
|
() => ({
|
|
14433
14435
|
updateConversationFilter: stableUpdateConversationFilter,
|
|
@@ -14553,7 +14555,8 @@ function useAgentGUINodeController({
|
|
|
14553
14555
|
tone: "error",
|
|
14554
14556
|
autoDismissMs: null
|
|
14555
14557
|
} : null,
|
|
14556
|
-
detailError
|
|
14558
|
+
detailError,
|
|
14559
|
+
providerReadinessGate
|
|
14557
14560
|
},
|
|
14558
14561
|
actions: controllerActions
|
|
14559
14562
|
}),
|
|
@@ -14575,6 +14578,7 @@ function useAgentGUINodeController({
|
|
|
14575
14578
|
data,
|
|
14576
14579
|
effectiveSelectedProviderTarget,
|
|
14577
14580
|
normalizedProviderTargets,
|
|
14581
|
+
providerReadinessGate,
|
|
14578
14582
|
providerTargetsLoading,
|
|
14579
14583
|
detailError,
|
|
14580
14584
|
draftContent,
|
|
@@ -16615,6 +16619,10 @@ var styles3 = {
|
|
|
16615
16619
|
emptyHeroIconEffect: "agent-gui-node__empty-hero-icon-effect",
|
|
16616
16620
|
emptyHeroProvider: "agent-gui-node__empty-hero-provider",
|
|
16617
16621
|
emptyHeroTitle: "agent-gui-node__empty-hero-title",
|
|
16622
|
+
emptyProviderGate: "agent-gui-node__empty-provider-gate",
|
|
16623
|
+
emptyProviderGateAction: "agent-gui-node__empty-provider-gate-action",
|
|
16624
|
+
emptyProviderGateDescription: "agent-gui-node__empty-provider-gate-description",
|
|
16625
|
+
emptyProviderGateStatus: "agent-gui-node__empty-provider-gate-status",
|
|
16618
16626
|
emptyState: "agent-gui-node__empty-state",
|
|
16619
16627
|
unavailableChatEmpty: "agent-gui-node__unavailable-chat-empty",
|
|
16620
16628
|
unavailableChatEmptyIcon: "agent-gui-node__unavailable-chat-empty-icon",
|
|
@@ -18220,6 +18228,19 @@ function isPromptVisualLineStart(editor, position) {
|
|
|
18220
18228
|
"\n"
|
|
18221
18229
|
) === "\n";
|
|
18222
18230
|
}
|
|
18231
|
+
function isMentionTriggerBoundaryBeforeSelection(editor) {
|
|
18232
|
+
const position = editor.state.selection.from;
|
|
18233
|
+
if (position <= 1) {
|
|
18234
|
+
return true;
|
|
18235
|
+
}
|
|
18236
|
+
const previous = editor.state.doc.textBetween(
|
|
18237
|
+
Math.max(1, position - 1),
|
|
18238
|
+
position,
|
|
18239
|
+
"\n",
|
|
18240
|
+
"\n"
|
|
18241
|
+
);
|
|
18242
|
+
return previous === "" || /\s/.test(previous);
|
|
18243
|
+
}
|
|
18223
18244
|
function findCaretAnchorBeforeAtomicRun(doc, position) {
|
|
18224
18245
|
let anchorPosition = null;
|
|
18225
18246
|
doc.descendants((node, nodePosition) => {
|
|
@@ -19025,6 +19046,16 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
19025
19046
|
"\n"
|
|
19026
19047
|
);
|
|
19027
19048
|
},
|
|
19049
|
+
openMentionPalette() {
|
|
19050
|
+
const currentEditor = editorRef.current;
|
|
19051
|
+
if (!currentEditor || currentEditor.isDestroyed || !currentEditor.isEditable) {
|
|
19052
|
+
return;
|
|
19053
|
+
}
|
|
19054
|
+
const triggerText = isMentionTriggerBoundaryBeforeSelection(
|
|
19055
|
+
currentEditor
|
|
19056
|
+
) ? "@" : " @";
|
|
19057
|
+
currentEditor.chain().focus().insertContent(triggerText).run();
|
|
19058
|
+
},
|
|
19028
19059
|
insertWorkspaceReferences(items) {
|
|
19029
19060
|
const currentEditor = editorRef.current;
|
|
19030
19061
|
if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
|
|
@@ -19930,6 +19961,9 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19930
19961
|
);
|
|
19931
19962
|
});
|
|
19932
19963
|
|
|
19964
|
+
// app/renderer/assets/icons/@-lined-14px.svg
|
|
19965
|
+
var lined_14px_default = "./@-lined-14px-64O2KKB4.svg";
|
|
19966
|
+
|
|
19933
19967
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
19934
19968
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
19935
19969
|
var USAGE_POPOVER_HOVER_DELAY_MS = 120;
|
|
@@ -21474,6 +21508,12 @@ function AgentComposer({
|
|
|
21474
21508
|
isHeroLayout && AgentGUINode_styles_default.composerInputShellHero
|
|
21475
21509
|
);
|
|
21476
21510
|
const inputDisabled = isSelectedProjectMissing || disabled && !canQueueWhileBusy;
|
|
21511
|
+
const handleMentionPaletteButton = useCallback9(() => {
|
|
21512
|
+
if (composerControlsHardDisabled || inputDisabled) {
|
|
21513
|
+
return;
|
|
21514
|
+
}
|
|
21515
|
+
editorHandleRef.current?.openMentionPalette();
|
|
21516
|
+
}, [composerControlsHardDisabled, inputDisabled]);
|
|
21477
21517
|
const scheduleComposerFocus = useCallback9(() => {
|
|
21478
21518
|
if (inputDisabled) {
|
|
21479
21519
|
return;
|
|
@@ -22291,65 +22331,100 @@ function AgentComposer({
|
|
|
22291
22331
|
),
|
|
22292
22332
|
/* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
|
|
22293
22333
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22303
|
-
|
|
22304
|
-
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
22308
|
-
|
|
22309
|
-
|
|
22310
|
-
|
|
22311
|
-
|
|
22312
|
-
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22316
|
-
|
|
22317
|
-
|
|
22318
|
-
|
|
22319
|
-
|
|
22320
|
-
|
|
22321
|
-
|
|
22322
|
-
|
|
22323
|
-
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
|
|
22335
|
-
|
|
22336
|
-
|
|
22337
|
-
|
|
22338
|
-
|
|
22339
|
-
|
|
22340
|
-
|
|
22341
|
-
|
|
22342
|
-
|
|
22343
|
-
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
|
|
22334
|
+
/* @__PURE__ */ jsxs15("div", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
22335
|
+
previewMode ? /* @__PURE__ */ jsx28(
|
|
22336
|
+
"button",
|
|
22337
|
+
{
|
|
22338
|
+
type: "button",
|
|
22339
|
+
"aria-label": labels.referenceWorkspaceFiles,
|
|
22340
|
+
title: labels.referenceWorkspaceFiles,
|
|
22341
|
+
className: cn(
|
|
22342
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22343
|
+
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22344
|
+
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
|
|
22345
|
+
),
|
|
22346
|
+
children: /* @__PURE__ */ jsx28(
|
|
22347
|
+
AddIcon,
|
|
22348
|
+
{
|
|
22349
|
+
"aria-hidden": true,
|
|
22350
|
+
className: "size-3.5",
|
|
22351
|
+
"data-agent-reference-add-icon": "true"
|
|
22352
|
+
}
|
|
22353
|
+
)
|
|
22354
|
+
}
|
|
22355
|
+
) : /* @__PURE__ */ jsx28(
|
|
22356
|
+
Select2,
|
|
22357
|
+
{
|
|
22358
|
+
open: false,
|
|
22359
|
+
value: workspaceReferenceSelectValue,
|
|
22360
|
+
disabled: !onRequestWorkspaceReferences || composerControlsHardDisabled,
|
|
22361
|
+
onOpenChange: (isOpen) => {
|
|
22362
|
+
if (isOpen) {
|
|
22363
|
+
void handleWorkspaceReferencePicker();
|
|
22364
|
+
}
|
|
22365
|
+
},
|
|
22366
|
+
onValueChange: (nextValue) => {
|
|
22367
|
+
if (nextValue === workspaceReferenceOptionValue) {
|
|
22368
|
+
void handleWorkspaceReferencePicker();
|
|
22369
|
+
}
|
|
22370
|
+
},
|
|
22371
|
+
children: /* @__PURE__ */ jsx28(
|
|
22372
|
+
SelectTrigger2,
|
|
22373
|
+
{
|
|
22374
|
+
size: "sm",
|
|
22375
|
+
"aria-label": labels.referenceWorkspaceFiles,
|
|
22376
|
+
title: labels.referenceWorkspaceFiles,
|
|
22377
|
+
className: cn(
|
|
22378
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22379
|
+
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22380
|
+
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
|
|
22381
|
+
),
|
|
22382
|
+
children: /* @__PURE__ */ jsx28(
|
|
22383
|
+
AddIcon,
|
|
22384
|
+
{
|
|
22385
|
+
"aria-hidden": true,
|
|
22386
|
+
className: "size-3.5",
|
|
22387
|
+
"data-agent-reference-add-icon": "true"
|
|
22388
|
+
}
|
|
22389
|
+
)
|
|
22390
|
+
}
|
|
22391
|
+
)
|
|
22392
|
+
}
|
|
22393
|
+
),
|
|
22394
|
+
/* @__PURE__ */ jsx28(
|
|
22395
|
+
"button",
|
|
22396
|
+
{
|
|
22397
|
+
type: "button",
|
|
22398
|
+
"aria-label": labels.mentionPalette,
|
|
22399
|
+
title: labels.mentionPalette,
|
|
22400
|
+
disabled: composerControlsHardDisabled || inputDisabled,
|
|
22401
|
+
className: cn(
|
|
22402
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22403
|
+
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22404
|
+
"group w-auto justify-center text-[var(--agent-gui-text-secondary)] disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0"
|
|
22405
|
+
),
|
|
22406
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
22407
|
+
onClick: handleMentionPaletteButton,
|
|
22408
|
+
children: /* @__PURE__ */ jsx28(
|
|
22409
|
+
"span",
|
|
22410
|
+
{
|
|
22411
|
+
"aria-hidden": true,
|
|
22412
|
+
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)]",
|
|
22413
|
+
style: {
|
|
22414
|
+
WebkitMaskImage: `url("${lined_14px_default}")`,
|
|
22415
|
+
WebkitMaskPosition: "center",
|
|
22416
|
+
WebkitMaskRepeat: "no-repeat",
|
|
22417
|
+
WebkitMaskSize: "contain",
|
|
22418
|
+
maskImage: `url("${lined_14px_default}")`,
|
|
22419
|
+
maskPosition: "center",
|
|
22420
|
+
maskRepeat: "no-repeat",
|
|
22421
|
+
maskSize: "contain"
|
|
22347
22422
|
}
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
),
|
|
22423
|
+
}
|
|
22424
|
+
)
|
|
22425
|
+
}
|
|
22426
|
+
)
|
|
22427
|
+
] }),
|
|
22353
22428
|
showProviderSelect && selectedProviderSwitchTarget ? /* @__PURE__ */ jsxs15(
|
|
22354
22429
|
Select2,
|
|
22355
22430
|
{
|
|
@@ -24002,6 +24077,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24002
24077
|
avoidGroupingEdits: viewModel.avoidGroupingEdits
|
|
24003
24078
|
});
|
|
24004
24079
|
const hasActiveConversation = viewModel.activeConversationId !== null;
|
|
24080
|
+
const emptyProviderReadinessGate = !hasActiveConversation ? viewModel.providerReadinessGate : null;
|
|
24005
24081
|
const activePrompt = viewModel.pendingInteractivePrompt ?? viewModel.pendingApproval;
|
|
24006
24082
|
const activePromptRequestId = activePrompt?.requestId ?? null;
|
|
24007
24083
|
const sessionChrome = useMemo10(
|
|
@@ -24084,7 +24160,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24084
24160
|
});
|
|
24085
24161
|
const canQueueWhileBusy = viewModel.canQueueWhileBusy && isAgentProviderReady && !isCollaboratorConversation;
|
|
24086
24162
|
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : isAgentProviderReady ? null : labels.installRequiredPlaceholder;
|
|
24087
|
-
const showProviderSetupNotice = !isAgentProviderReady && !isCollaboratorConversation;
|
|
24163
|
+
const showProviderSetupNotice = !emptyProviderReadinessGate && !isAgentProviderReady && !isCollaboratorConversation;
|
|
24088
24164
|
const submitDisabled = isCollaboratorConversation || !isAgentProviderReady || !viewModel.canSubmit && !canQueueWhileBusy;
|
|
24089
24165
|
const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false;
|
|
24090
24166
|
const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !isAgentProviderReady || !canQueueWhileBusy && (viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isSubmitting || viewModel.isInterrupting || viewModel.isCreatingConversation);
|
|
@@ -24312,6 +24388,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24312
24388
|
fileMentionEmpty: labels.fileMentionEmpty,
|
|
24313
24389
|
fileMentionError: labels.fileMentionError,
|
|
24314
24390
|
fileMentionTabHint: labels.fileMentionTabHint,
|
|
24391
|
+
mentionPalette: labels.mentionPalette,
|
|
24315
24392
|
removeMention: labels.removeMention,
|
|
24316
24393
|
addReference: labels.addReference,
|
|
24317
24394
|
referenceWorkspaceFiles: labels.referenceWorkspaceFiles,
|
|
@@ -24928,7 +25005,14 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24928
25005
|
viewportTestId: "agent-gui-timeline",
|
|
24929
25006
|
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(),
|
|
24930
25007
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
24931
|
-
children: !hasActiveConversation ? /* @__PURE__ */ jsx31(
|
|
25008
|
+
children: !hasActiveConversation ? emptyProviderReadinessGate ? /* @__PURE__ */ jsx31(
|
|
25009
|
+
AgentGUIProviderReadinessGatePane,
|
|
25010
|
+
{
|
|
25011
|
+
provider: emptyHeroProvider,
|
|
25012
|
+
gate: emptyProviderReadinessGate,
|
|
25013
|
+
labels
|
|
25014
|
+
}
|
|
25015
|
+
) : /* @__PURE__ */ jsx31(
|
|
24932
25016
|
AgentGUIEmptyHeroPane,
|
|
24933
25017
|
{
|
|
24934
25018
|
provider: emptyHeroProvider,
|
|
@@ -25117,6 +25201,113 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
25117
25201
|
/* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
|
|
25118
25202
|
] }) });
|
|
25119
25203
|
});
|
|
25204
|
+
var AgentGUIProviderReadinessGatePane = memo(
|
|
25205
|
+
function AgentGUIProviderReadinessGatePane2({
|
|
25206
|
+
provider,
|
|
25207
|
+
gate,
|
|
25208
|
+
labels
|
|
25209
|
+
}) {
|
|
25210
|
+
"use memo";
|
|
25211
|
+
const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
|
|
25212
|
+
const pendingAction = gate.pendingAction ?? null;
|
|
25213
|
+
const isPending = pendingAction !== null;
|
|
25214
|
+
const content = providerGateContent(gate.status, labels);
|
|
25215
|
+
const action = providerGateAction(gate.status);
|
|
25216
|
+
const pendingLabel = pendingAction === "install" ? labels.providerGatePendingInstall : pendingAction === "login" ? labels.providerGatePendingLogin : pendingAction === "refresh" ? labels.providerGatePendingRefresh : null;
|
|
25217
|
+
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17(
|
|
25218
|
+
"div",
|
|
25219
|
+
{
|
|
25220
|
+
className: cn3(AgentGUINode_styles_default.emptyHeroBody, AgentGUINode_styles_default.emptyProviderGate),
|
|
25221
|
+
"data-testid": "agent-gui-provider-readiness-gate",
|
|
25222
|
+
role: "status",
|
|
25223
|
+
children: [
|
|
25224
|
+
/* @__PURE__ */ jsx31(
|
|
25225
|
+
"img",
|
|
25226
|
+
{
|
|
25227
|
+
"aria-hidden": "true",
|
|
25228
|
+
className: AgentGUINode_styles_default.emptyHeroIconEffect,
|
|
25229
|
+
draggable: false,
|
|
25230
|
+
src: heroIconUrl,
|
|
25231
|
+
alt: ""
|
|
25232
|
+
}
|
|
25233
|
+
),
|
|
25234
|
+
/* @__PURE__ */ jsx31("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: content.title }),
|
|
25235
|
+
/* @__PURE__ */ jsx31("p", { className: AgentGUINode_styles_default.emptyProviderGateDescription, children: content.description }),
|
|
25236
|
+
pendingLabel ? /* @__PURE__ */ jsx31(
|
|
25237
|
+
"div",
|
|
25238
|
+
{
|
|
25239
|
+
className: AgentGUINode_styles_default.emptyProviderGateStatus,
|
|
25240
|
+
"data-testid": "agent-gui-provider-readiness-gate-pending",
|
|
25241
|
+
children: pendingLabel
|
|
25242
|
+
}
|
|
25243
|
+
) : null,
|
|
25244
|
+
action ? /* @__PURE__ */ jsxs17(
|
|
25245
|
+
Button,
|
|
25246
|
+
{
|
|
25247
|
+
type: "button",
|
|
25248
|
+
className: cn3(
|
|
25249
|
+
AgentGUINode_styles_default.emptyProviderGateAction,
|
|
25250
|
+
"nodrag tsh-desktop-no-drag [-webkit-app-region:no-drag]"
|
|
25251
|
+
),
|
|
25252
|
+
"data-testid": "agent-gui-provider-readiness-gate-action",
|
|
25253
|
+
disabled: isPending,
|
|
25254
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
25255
|
+
onClick: () => {
|
|
25256
|
+
if (isPending) {
|
|
25257
|
+
return;
|
|
25258
|
+
}
|
|
25259
|
+
gate.onAction?.(provider, action);
|
|
25260
|
+
},
|
|
25261
|
+
children: [
|
|
25262
|
+
/* @__PURE__ */ jsx31(Wrench, { size: 16, strokeWidth: 2, "aria-hidden": "true" }),
|
|
25263
|
+
isPending && pendingLabel ? pendingLabel : content.actionLabel
|
|
25264
|
+
]
|
|
25265
|
+
}
|
|
25266
|
+
) : null
|
|
25267
|
+
]
|
|
25268
|
+
}
|
|
25269
|
+
) });
|
|
25270
|
+
}
|
|
25271
|
+
);
|
|
25272
|
+
function providerGateContent(status, labels) {
|
|
25273
|
+
switch (status) {
|
|
25274
|
+
case "checking":
|
|
25275
|
+
return {
|
|
25276
|
+
title: labels.providerGateCheckingTitle,
|
|
25277
|
+
description: labels.providerGateCheckingDescription
|
|
25278
|
+
};
|
|
25279
|
+
case "not_installed":
|
|
25280
|
+
return {
|
|
25281
|
+
title: labels.providerGateInstallTitle,
|
|
25282
|
+
description: labels.providerGateInstallDescription,
|
|
25283
|
+
actionLabel: labels.providerGateInstallAction
|
|
25284
|
+
};
|
|
25285
|
+
case "auth_required":
|
|
25286
|
+
return {
|
|
25287
|
+
title: labels.providerGateLoginTitle,
|
|
25288
|
+
description: labels.providerGateLoginDescription,
|
|
25289
|
+
actionLabel: labels.providerGateLoginAction
|
|
25290
|
+
};
|
|
25291
|
+
case "unavailable":
|
|
25292
|
+
return {
|
|
25293
|
+
title: labels.providerGateUnavailableTitle,
|
|
25294
|
+
description: labels.providerGateUnavailableDescription,
|
|
25295
|
+
actionLabel: labels.providerGateRetryAction
|
|
25296
|
+
};
|
|
25297
|
+
}
|
|
25298
|
+
}
|
|
25299
|
+
function providerGateAction(status) {
|
|
25300
|
+
switch (status) {
|
|
25301
|
+
case "not_installed":
|
|
25302
|
+
return "install";
|
|
25303
|
+
case "auth_required":
|
|
25304
|
+
return "login";
|
|
25305
|
+
case "unavailable":
|
|
25306
|
+
return "refresh";
|
|
25307
|
+
case "checking":
|
|
25308
|
+
return null;
|
|
25309
|
+
}
|
|
25310
|
+
}
|
|
25120
25311
|
function EmptyHeroTitle({
|
|
25121
25312
|
label,
|
|
25122
25313
|
providerLabel
|
|
@@ -27259,7 +27450,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
|
|
|
27259
27450
|
return true;
|
|
27260
27451
|
}
|
|
27261
27452
|
function areAgentGUINodePropsEqual(previous, next) {
|
|
27262
|
-
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.conversationScope === next.conversationScope && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && (previous.conversationScope === "multi-provider" || next.conversationScope === "multi-provider" ? previous.workspaceAgentProbes === next.workspaceAgentProbes : workspaceAgentProbeRenderStateEqualsForProvider(
|
|
27453
|
+
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.providerReadinessGates === next.providerReadinessGates && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.conversationScope === next.conversationScope && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && (previous.conversationScope === "multi-provider" || next.conversationScope === "multi-provider" ? previous.workspaceAgentProbes === next.workspaceAgentProbes : workspaceAgentProbeRenderStateEqualsForProvider(
|
|
27263
27454
|
previous.workspaceAgentProbes,
|
|
27264
27455
|
next.workspaceAgentProbes,
|
|
27265
27456
|
previous.state.provider
|
|
@@ -27291,6 +27482,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27291
27482
|
onAgentProviderLogin,
|
|
27292
27483
|
providerTargets,
|
|
27293
27484
|
providerTargetsLoading = false,
|
|
27485
|
+
providerReadinessGates = null,
|
|
27294
27486
|
defaultProviderTargetId = null,
|
|
27295
27487
|
conversationScope = "single-provider",
|
|
27296
27488
|
onWorkspaceFileReferencesAdded,
|
|
@@ -27454,6 +27646,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27454
27646
|
prefillPromptRequest,
|
|
27455
27647
|
providerTargets,
|
|
27456
27648
|
providerTargetsLoading,
|
|
27649
|
+
providerReadinessGates,
|
|
27457
27650
|
defaultProviderTargetId,
|
|
27458
27651
|
previewMode,
|
|
27459
27652
|
onDataChange: handleDataChange,
|
|
@@ -27484,6 +27677,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27484
27677
|
);
|
|
27485
27678
|
const fallbackAgentTitle = t("sidebar.fallbackAgentLabel");
|
|
27486
27679
|
const activeProvider = viewModel.activeConversation?.provider ?? state.provider;
|
|
27680
|
+
const activeReadinessProvider = viewModel.activeConversationId !== null ? activeProvider : viewModel.selectedProviderTarget.provider;
|
|
27487
27681
|
const selectedProviderTargetLabel = viewModel.selectedProviderTarget?.label ?? resolveAgentGUIProviderDisplayLabel(state.provider, fallbackAgentTitle);
|
|
27488
27682
|
const displayProviderLabel = viewModel.activeConversation ? resolveAgentGUIProviderDisplayLabel(activeProvider, fallbackAgentTitle) : selectedProviderTargetLabel;
|
|
27489
27683
|
const windowAgentTitle = viewModel.activeConversation ? getAgentHostManagedToolchainAgentByName(activeProvider)?.label ?? displayProviderLabel : displayProviderLabel;
|
|
@@ -27537,6 +27731,50 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27537
27731
|
}
|
|
27538
27732
|
),
|
|
27539
27733
|
installRequiredAction: t("agentHost.agentGui.installRequiredAction"),
|
|
27734
|
+
providerGateCheckingTitle: t(
|
|
27735
|
+
"agentHost.agentGui.providerGateCheckingTitle"
|
|
27736
|
+
),
|
|
27737
|
+
providerGateCheckingDescription: t(
|
|
27738
|
+
"agentHost.agentGui.providerGateCheckingDescription",
|
|
27739
|
+
{ provider: displayProviderLabel }
|
|
27740
|
+
),
|
|
27741
|
+
providerGateInstallTitle: t(
|
|
27742
|
+
"agentHost.agentGui.providerGateInstallTitle",
|
|
27743
|
+
{ provider: displayProviderLabel }
|
|
27744
|
+
),
|
|
27745
|
+
providerGateInstallDescription: t(
|
|
27746
|
+
"agentHost.agentGui.providerGateInstallDescription",
|
|
27747
|
+
{ provider: displayProviderLabel }
|
|
27748
|
+
),
|
|
27749
|
+
providerGateInstallAction: t(
|
|
27750
|
+
"agentHost.agentGui.providerGateInstallAction"
|
|
27751
|
+
),
|
|
27752
|
+
providerGateLoginTitle: t("agentHost.agentGui.providerGateLoginTitle", {
|
|
27753
|
+
provider: displayProviderLabel
|
|
27754
|
+
}),
|
|
27755
|
+
providerGateLoginDescription: t(
|
|
27756
|
+
"agentHost.agentGui.providerGateLoginDescription",
|
|
27757
|
+
{ provider: displayProviderLabel }
|
|
27758
|
+
),
|
|
27759
|
+
providerGateLoginAction: t("agentHost.agentGui.providerGateLoginAction"),
|
|
27760
|
+
providerGateUnavailableTitle: t(
|
|
27761
|
+
"agentHost.agentGui.providerGateUnavailableTitle",
|
|
27762
|
+
{ provider: displayProviderLabel }
|
|
27763
|
+
),
|
|
27764
|
+
providerGateUnavailableDescription: t(
|
|
27765
|
+
"agentHost.agentGui.providerGateUnavailableDescription",
|
|
27766
|
+
{ provider: displayProviderLabel }
|
|
27767
|
+
),
|
|
27768
|
+
providerGateRetryAction: t("agentHost.agentGui.providerGateRetryAction"),
|
|
27769
|
+
providerGatePendingInstall: t(
|
|
27770
|
+
"agentHost.agentGui.providerGatePendingInstall"
|
|
27771
|
+
),
|
|
27772
|
+
providerGatePendingLogin: t(
|
|
27773
|
+
"agentHost.agentGui.providerGatePendingLogin"
|
|
27774
|
+
),
|
|
27775
|
+
providerGatePendingRefresh: t(
|
|
27776
|
+
"agentHost.agentGui.providerGatePendingRefresh"
|
|
27777
|
+
),
|
|
27540
27778
|
collaboratorSessionReadOnlyPlaceholder: t(
|
|
27541
27779
|
"agentHost.agentGui.collaboratorSessionReadOnlyPlaceholder"
|
|
27542
27780
|
),
|
|
@@ -27971,6 +28209,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27971
28209
|
fileMentionEmpty: t("agentHost.agentGui.fileMentionEmpty"),
|
|
27972
28210
|
fileMentionError: t("agentHost.agentGui.fileMentionError"),
|
|
27973
28211
|
fileMentionTabHint: t("agentHost.agentGui.fileMentionTabHint"),
|
|
28212
|
+
mentionPalette: t("agentHost.agentGui.mentionPalette"),
|
|
27974
28213
|
removeMention: t("common.remove"),
|
|
27975
28214
|
addReference: t("agentHost.agentGui.addReference"),
|
|
27976
28215
|
referenceWorkspaceFiles: t("agentHost.issue.referenceWorkspaceFiles")
|
|
@@ -28019,7 +28258,9 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
28019
28258
|
[railStatusProvider, workspaceAgentProbes?.snapshot]
|
|
28020
28259
|
);
|
|
28021
28260
|
const isActiveAgentProviderReady = useMemo11(() => {
|
|
28022
|
-
const managedAgent = getAgentHostManagedToolchainAgentByName(
|
|
28261
|
+
const managedAgent = getAgentHostManagedToolchainAgentByName(
|
|
28262
|
+
activeReadinessProvider
|
|
28263
|
+
);
|
|
28023
28264
|
if (!managedAgent) {
|
|
28024
28265
|
return true;
|
|
28025
28266
|
}
|
|
@@ -28030,7 +28271,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
28030
28271
|
managedAgent,
|
|
28031
28272
|
managedAgentsState
|
|
28032
28273
|
) === "installed";
|
|
28033
|
-
}, [
|
|
28274
|
+
}, [activeReadinessProvider, managedAgentsState]);
|
|
28034
28275
|
const runtimeSlashStatusQuotas = useMemo11(
|
|
28035
28276
|
() => slashStatusQuotasFromRuntimeUsage(
|
|
28036
28277
|
viewModel.sessionChrome.rawState?.runtimeContext?.usage
|