@tutti-os/agent-gui 0.0.55 → 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.
Files changed (59) hide show
  1. package/dist/@-lined-14px-64O2KKB4.svg +3 -0
  2. package/dist/{AgentMentionSearchController-DzhWr0PN.d.ts → AgentMentionSearchController-Po0KQLcL.d.ts} +13 -1
  3. package/dist/agent-conversation/index.d.ts +3 -3
  4. package/dist/agent-conversation/index.js +6 -6
  5. package/dist/agent-message-center/index.d.ts +1 -1
  6. package/dist/agent-message-center/index.js +8 -8
  7. package/dist/{agentGuiNodeTypes-DCnsaqJr.d.ts → agentGuiNodeTypes-BRU6P22B.d.ts} +2 -1
  8. package/dist/app/renderer/agentactivity.css +48 -3
  9. package/dist/app/renderer/assets/icons/@-lined-14px.svg +3 -0
  10. package/dist/{chunk-ZFDO72FE.js → chunk-2VHP7KQ5.js} +16 -3
  11. package/dist/chunk-2VHP7KQ5.js.map +1 -0
  12. package/dist/{chunk-2XVECUTU.js → chunk-33LWYV6O.js} +33 -1
  13. package/dist/chunk-33LWYV6O.js.map +1 -0
  14. package/dist/{chunk-GBAQVKQN.js → chunk-DZ76JPCV.js} +104 -10
  15. package/dist/chunk-DZ76JPCV.js.map +1 -0
  16. package/dist/{chunk-PBHTLI3E.js → chunk-HFZOXSSQ.js} +2 -2
  17. package/dist/{chunk-7H4IH67L.js → chunk-IMZBRUP3.js} +13 -5
  18. package/dist/{chunk-7H4IH67L.js.map → chunk-IMZBRUP3.js.map} +1 -1
  19. package/dist/{chunk-6AXH2BOD.js → chunk-KOR6UVUJ.js} +5 -5
  20. package/dist/{chunk-NBTJEF3H.js → chunk-N37A5CJH.js} +140 -4
  21. package/dist/chunk-N37A5CJH.js.map +1 -0
  22. package/dist/{chunk-WMQN7SZC.js → chunk-QFHR527D.js} +2 -2
  23. package/dist/{chunk-BGZ2OSDQ.js → chunk-RGVVHF7Q.js} +2 -2
  24. package/dist/{chunk-GL54NRMB.js → chunk-S6PCOX3S.js} +40 -1
  25. package/dist/chunk-S6PCOX3S.js.map +1 -0
  26. package/dist/{chunk-CMOGPJ23.js → chunk-SZ7JGCS3.js} +2 -2
  27. package/dist/{chunk-H2YWXFYX.js → chunk-Z3AAQQFD.js} +2 -2
  28. package/dist/context-mention-palette/index.d.ts +2 -2
  29. package/dist/context-mention-palette/index.js +7 -7
  30. package/dist/i18n/index.d.ts +32 -0
  31. package/dist/i18n/index.js +2 -2
  32. package/dist/index.d.ts +49 -8
  33. package/dist/index.js +322 -75
  34. package/dist/index.js.map +1 -1
  35. package/dist/queued-prompt-runtime.d.ts +2 -2
  36. package/dist/{types-B2m7UcBb.d.ts → types-BsHvTjIZ.d.ts} +8 -1
  37. package/dist/workbench/contribution.d.ts +1 -1
  38. package/dist/workbench/index.d.ts +1 -1
  39. package/dist/workbench/index.js +3 -3
  40. package/dist/workbench/launch.d.ts +1 -1
  41. package/dist/workbench/providerCatalog.d.ts +1 -1
  42. package/dist/workbench/sessionTitle.d.ts +1 -1
  43. package/dist/workbench/sessionTitle.js +3 -3
  44. package/dist/workbench/state.d.ts +1 -1
  45. package/dist/workbench/types.d.ts +1 -1
  46. package/dist/workspace-agent-generated-files.js +3 -3
  47. package/dist/{workspaceLinkActions-C6POH38D.d.ts → workspaceLinkActions-Bjy_XfBm.d.ts} +8 -1
  48. package/package.json +14 -14
  49. package/dist/chunk-2XVECUTU.js.map +0 -1
  50. package/dist/chunk-GBAQVKQN.js.map +0 -1
  51. package/dist/chunk-GL54NRMB.js.map +0 -1
  52. package/dist/chunk-NBTJEF3H.js.map +0 -1
  53. package/dist/chunk-ZFDO72FE.js.map +0 -1
  54. /package/dist/{chunk-PBHTLI3E.js.map → chunk-HFZOXSSQ.js.map} +0 -0
  55. /package/dist/{chunk-6AXH2BOD.js.map → chunk-KOR6UVUJ.js.map} +0 -0
  56. /package/dist/{chunk-WMQN7SZC.js.map → chunk-QFHR527D.js.map} +0 -0
  57. /package/dist/{chunk-BGZ2OSDQ.js.map → chunk-RGVVHF7Q.js.map} +0 -0
  58. /package/dist/{chunk-CMOGPJ23.js.map → chunk-SZ7JGCS3.js.map} +0 -0
  59. /package/dist/{chunk-H2YWXFYX.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-6AXH2BOD.js";
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-CMOGPJ23.js";
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-GBAQVKQN.js";
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-ZFDO72FE.js";
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-7H4IH67L.js";
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-PBHTLI3E.js";
91
+ } from "./chunk-HFZOXSSQ.js";
92
92
  import {
93
93
  Spinner
94
- } from "./chunk-WMQN7SZC.js";
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-NBTJEF3H.js";
105
+ } from "./chunk-N37A5CJH.js";
106
106
  import "./chunk-Y35GDLP2.js";
107
107
  import "./chunk-LUGELG5V.js";
108
108
  import {
@@ -111,17 +111,20 @@ import {
111
111
  MANAGED_AGENT_ICON_FALLBACK_URL,
112
112
  MANAGED_AGENT_ICON_URLS,
113
113
  getAgentActivityRuntime,
114
+ getAgentCustomMentionKind,
114
115
  getOptionalAgentActivityRuntime,
115
116
  getOptionalAgentHostApi,
116
117
  normalizeManagedAgentProvider,
118
+ registerAgentCustomMentionKind,
117
119
  resetAgentActivityRuntimeForTests,
120
+ resetAgentCustomMentionKindsForTests,
118
121
  setAgentActivityRuntimeForTests,
119
122
  useAgentActivityRuntime,
120
123
  useAgentActivitySnapshot,
121
124
  useAgentHostApi,
122
125
  useOptionalAgentActivityRuntime,
123
126
  useOptionalAgentHostApi
124
- } from "./chunk-GL54NRMB.js";
127
+ } from "./chunk-S6PCOX3S.js";
125
128
  import "./chunk-TYGL25EL.js";
126
129
  import "./chunk-PJP5BUU6.js";
127
130
  import "./chunk-MTFSQWZ6.js";
@@ -138,8 +141,8 @@ import {
138
141
  agentGuiI18nResources,
139
142
  translate,
140
143
  useTranslation
141
- } from "./chunk-H2YWXFYX.js";
142
- import "./chunk-2XVECUTU.js";
144
+ } from "./chunk-Z3AAQQFD.js";
145
+ import "./chunk-33LWYV6O.js";
143
146
 
144
147
  // shared/agentActivitySnapshotProjection.ts
145
148
  import {
@@ -8679,6 +8682,7 @@ function useAgentGUINodeController({
8679
8682
  conversationScope = "single-provider",
8680
8683
  providerTargets,
8681
8684
  providerTargetsLoading = false,
8685
+ providerReadinessGates = null,
8682
8686
  defaultProviderTargetId = null,
8683
8687
  openSessionRequest = null,
8684
8688
  prefillPromptRequest = null,
@@ -14425,6 +14429,7 @@ function useAgentGUINodeController({
14425
14429
  updateConversationFilter
14426
14430
  );
14427
14431
  const viewData = activeConversationId === null ? selectedComposerTargetData.data : data;
14432
+ const providerReadinessGate = activeConversationId === null ? providerReadinessGates?.[effectiveSelectedProviderTarget.provider] ?? null : null;
14428
14433
  const controllerActions = useMemo4(
14429
14434
  () => ({
14430
14435
  updateConversationFilter: stableUpdateConversationFilter,
@@ -14550,7 +14555,8 @@ function useAgentGUINodeController({
14550
14555
  tone: "error",
14551
14556
  autoDismissMs: null
14552
14557
  } : null,
14553
- detailError
14558
+ detailError,
14559
+ providerReadinessGate
14554
14560
  },
14555
14561
  actions: controllerActions
14556
14562
  }),
@@ -14572,6 +14578,7 @@ function useAgentGUINodeController({
14572
14578
  data,
14573
14579
  effectiveSelectedProviderTarget,
14574
14580
  normalizedProviderTargets,
14581
+ providerReadinessGate,
14575
14582
  providerTargetsLoading,
14576
14583
  detailError,
14577
14584
  draftContent,
@@ -16612,6 +16619,10 @@ var styles3 = {
16612
16619
  emptyHeroIconEffect: "agent-gui-node__empty-hero-icon-effect",
16613
16620
  emptyHeroProvider: "agent-gui-node__empty-hero-provider",
16614
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",
16615
16626
  emptyState: "agent-gui-node__empty-state",
16616
16627
  unavailableChatEmpty: "agent-gui-node__unavailable-chat-empty",
16617
16628
  unavailableChatEmptyIcon: "agent-gui-node__unavailable-chat-empty-icon",
@@ -18217,6 +18228,19 @@ function isPromptVisualLineStart(editor, position) {
18217
18228
  "\n"
18218
18229
  ) === "\n";
18219
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
+ }
18220
18244
  function findCaretAnchorBeforeAtomicRun(doc, position) {
18221
18245
  let anchorPosition = null;
18222
18246
  doc.descendants((node, nodePosition) => {
@@ -19022,6 +19046,16 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
19022
19046
  "\n"
19023
19047
  );
19024
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
+ },
19025
19059
  insertWorkspaceReferences(items) {
19026
19060
  const currentEditor = editorRef.current;
19027
19061
  if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
@@ -19927,6 +19961,9 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
19927
19961
  );
19928
19962
  });
19929
19963
 
19964
+ // app/renderer/assets/icons/@-lined-14px.svg
19965
+ var lined_14px_default = "./@-lined-14px-64O2KKB4.svg";
19966
+
19930
19967
  // agent-gui/agentGuiNode/AgentComposer.tsx
19931
19968
  import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
19932
19969
  var USAGE_POPOVER_HOVER_DELAY_MS = 120;
@@ -21471,6 +21508,12 @@ function AgentComposer({
21471
21508
  isHeroLayout && AgentGUINode_styles_default.composerInputShellHero
21472
21509
  );
21473
21510
  const inputDisabled = isSelectedProjectMissing || disabled && !canQueueWhileBusy;
21511
+ const handleMentionPaletteButton = useCallback9(() => {
21512
+ if (composerControlsHardDisabled || inputDisabled) {
21513
+ return;
21514
+ }
21515
+ editorHandleRef.current?.openMentionPalette();
21516
+ }, [composerControlsHardDisabled, inputDisabled]);
21474
21517
  const scheduleComposerFocus = useCallback9(() => {
21475
21518
  if (inputDisabled) {
21476
21519
  return;
@@ -22288,65 +22331,100 @@ function AgentComposer({
22288
22331
  ),
22289
22332
  /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
22290
22333
  /* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
22291
- previewMode ? /* @__PURE__ */ jsx28(
22292
- "button",
22293
- {
22294
- type: "button",
22295
- "aria-label": labels.referenceWorkspaceFiles,
22296
- title: labels.referenceWorkspaceFiles,
22297
- className: cn(
22298
- AgentGUINode_styles_default.composerMenuTrigger,
22299
- AgentGUINode_styles_default.composerReferenceTrigger,
22300
- "w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
22301
- ),
22302
- children: /* @__PURE__ */ jsx28(
22303
- AddIcon,
22304
- {
22305
- "aria-hidden": true,
22306
- className: "size-3.5",
22307
- "data-agent-reference-add-icon": "true"
22308
- }
22309
- )
22310
- }
22311
- ) : /* @__PURE__ */ jsx28(
22312
- Select2,
22313
- {
22314
- open: false,
22315
- value: workspaceReferenceSelectValue,
22316
- disabled: !onRequestWorkspaceReferences || composerControlsHardDisabled,
22317
- onOpenChange: (isOpen) => {
22318
- if (isOpen) {
22319
- void handleWorkspaceReferencePicker();
22320
- }
22321
- },
22322
- onValueChange: (nextValue) => {
22323
- if (nextValue === workspaceReferenceOptionValue) {
22324
- void handleWorkspaceReferencePicker();
22325
- }
22326
- },
22327
- children: /* @__PURE__ */ jsx28(
22328
- SelectTrigger2,
22329
- {
22330
- size: "sm",
22331
- "aria-label": labels.referenceWorkspaceFiles,
22332
- title: labels.referenceWorkspaceFiles,
22333
- className: cn(
22334
- AgentGUINode_styles_default.composerMenuTrigger,
22335
- AgentGUINode_styles_default.composerReferenceTrigger,
22336
- "w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
22337
- ),
22338
- children: /* @__PURE__ */ jsx28(
22339
- AddIcon,
22340
- {
22341
- "aria-hidden": true,
22342
- className: "size-3.5",
22343
- "data-agent-reference-add-icon": "true"
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"
22344
22422
  }
22345
- )
22346
- }
22347
- )
22348
- }
22349
- ),
22423
+ }
22424
+ )
22425
+ }
22426
+ )
22427
+ ] }),
22350
22428
  showProviderSelect && selectedProviderSwitchTarget ? /* @__PURE__ */ jsxs15(
22351
22429
  Select2,
22352
22430
  {
@@ -23999,6 +24077,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
23999
24077
  avoidGroupingEdits: viewModel.avoidGroupingEdits
24000
24078
  });
24001
24079
  const hasActiveConversation = viewModel.activeConversationId !== null;
24080
+ const emptyProviderReadinessGate = !hasActiveConversation ? viewModel.providerReadinessGate : null;
24002
24081
  const activePrompt = viewModel.pendingInteractivePrompt ?? viewModel.pendingApproval;
24003
24082
  const activePromptRequestId = activePrompt?.requestId ?? null;
24004
24083
  const sessionChrome = useMemo10(
@@ -24081,7 +24160,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24081
24160
  });
24082
24161
  const canQueueWhileBusy = viewModel.canQueueWhileBusy && isAgentProviderReady && !isCollaboratorConversation;
24083
24162
  const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : isAgentProviderReady ? null : labels.installRequiredPlaceholder;
24084
- const showProviderSetupNotice = !isAgentProviderReady && !isCollaboratorConversation;
24163
+ const showProviderSetupNotice = !emptyProviderReadinessGate && !isAgentProviderReady && !isCollaboratorConversation;
24085
24164
  const submitDisabled = isCollaboratorConversation || !isAgentProviderReady || !viewModel.canSubmit && !canQueueWhileBusy;
24086
24165
  const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false;
24087
24166
  const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !isAgentProviderReady || !canQueueWhileBusy && (viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isSubmitting || viewModel.isInterrupting || viewModel.isCreatingConversation);
@@ -24309,6 +24388,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24309
24388
  fileMentionEmpty: labels.fileMentionEmpty,
24310
24389
  fileMentionError: labels.fileMentionError,
24311
24390
  fileMentionTabHint: labels.fileMentionTabHint,
24391
+ mentionPalette: labels.mentionPalette,
24312
24392
  removeMention: labels.removeMention,
24313
24393
  addReference: labels.addReference,
24314
24394
  referenceWorkspaceFiles: labels.referenceWorkspaceFiles,
@@ -24925,7 +25005,14 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
24925
25005
  viewportTestId: "agent-gui-timeline",
24926
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(),
24927
25007
  viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
24928
- 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(
24929
25016
  AgentGUIEmptyHeroPane,
24930
25017
  {
24931
25018
  provider: emptyHeroProvider,
@@ -25114,6 +25201,113 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
25114
25201
  /* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
25115
25202
  ] }) });
25116
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
+ }
25117
25311
  function EmptyHeroTitle({
25118
25312
  label,
25119
25313
  providerLabel
@@ -27256,7 +27450,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
27256
27450
  return true;
27257
27451
  }
27258
27452
  function areAgentGUINodePropsEqual(previous, next) {
27259
- 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(
27260
27454
  previous.workspaceAgentProbes,
27261
27455
  next.workspaceAgentProbes,
27262
27456
  previous.state.provider
@@ -27288,6 +27482,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27288
27482
  onAgentProviderLogin,
27289
27483
  providerTargets,
27290
27484
  providerTargetsLoading = false,
27485
+ providerReadinessGates = null,
27291
27486
  defaultProviderTargetId = null,
27292
27487
  conversationScope = "single-provider",
27293
27488
  onWorkspaceFileReferencesAdded,
@@ -27451,6 +27646,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27451
27646
  prefillPromptRequest,
27452
27647
  providerTargets,
27453
27648
  providerTargetsLoading,
27649
+ providerReadinessGates,
27454
27650
  defaultProviderTargetId,
27455
27651
  previewMode,
27456
27652
  onDataChange: handleDataChange,
@@ -27481,6 +27677,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27481
27677
  );
27482
27678
  const fallbackAgentTitle = t("sidebar.fallbackAgentLabel");
27483
27679
  const activeProvider = viewModel.activeConversation?.provider ?? state.provider;
27680
+ const activeReadinessProvider = viewModel.activeConversationId !== null ? activeProvider : viewModel.selectedProviderTarget.provider;
27484
27681
  const selectedProviderTargetLabel = viewModel.selectedProviderTarget?.label ?? resolveAgentGUIProviderDisplayLabel(state.provider, fallbackAgentTitle);
27485
27682
  const displayProviderLabel = viewModel.activeConversation ? resolveAgentGUIProviderDisplayLabel(activeProvider, fallbackAgentTitle) : selectedProviderTargetLabel;
27486
27683
  const windowAgentTitle = viewModel.activeConversation ? getAgentHostManagedToolchainAgentByName(activeProvider)?.label ?? displayProviderLabel : displayProviderLabel;
@@ -27534,6 +27731,50 @@ var AgentGUINode = memo2(function AgentGUINode2({
27534
27731
  }
27535
27732
  ),
27536
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
+ ),
27537
27778
  collaboratorSessionReadOnlyPlaceholder: t(
27538
27779
  "agentHost.agentGui.collaboratorSessionReadOnlyPlaceholder"
27539
27780
  ),
@@ -27968,6 +28209,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
27968
28209
  fileMentionEmpty: t("agentHost.agentGui.fileMentionEmpty"),
27969
28210
  fileMentionError: t("agentHost.agentGui.fileMentionError"),
27970
28211
  fileMentionTabHint: t("agentHost.agentGui.fileMentionTabHint"),
28212
+ mentionPalette: t("agentHost.agentGui.mentionPalette"),
27971
28213
  removeMention: t("common.remove"),
27972
28214
  addReference: t("agentHost.agentGui.addReference"),
27973
28215
  referenceWorkspaceFiles: t("agentHost.issue.referenceWorkspaceFiles")
@@ -28016,7 +28258,9 @@ var AgentGUINode = memo2(function AgentGUINode2({
28016
28258
  [railStatusProvider, workspaceAgentProbes?.snapshot]
28017
28259
  );
28018
28260
  const isActiveAgentProviderReady = useMemo11(() => {
28019
- const managedAgent = getAgentHostManagedToolchainAgentByName(activeProbeProvider);
28261
+ const managedAgent = getAgentHostManagedToolchainAgentByName(
28262
+ activeReadinessProvider
28263
+ );
28020
28264
  if (!managedAgent) {
28021
28265
  return true;
28022
28266
  }
@@ -28027,7 +28271,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
28027
28271
  managedAgent,
28028
28272
  managedAgentsState
28029
28273
  ) === "installed";
28030
- }, [activeProbeProvider, managedAgentsState]);
28274
+ }, [activeReadinessProvider, managedAgentsState]);
28031
28275
  const runtimeSlashStatusQuotas = useMemo11(
28032
28276
  () => slashStatusQuotasFromRuntimeUsage(
28033
28277
  viewModel.sessionChrome.rawState?.runtimeContext?.usage
@@ -28267,12 +28511,15 @@ export {
28267
28511
  createLocalAgentGUIProviderTarget,
28268
28512
  createLocalAgentGUIProviderTargets,
28269
28513
  getAgentActivityRuntime,
28514
+ getAgentCustomMentionKind,
28270
28515
  getOptionalAgentActivityRuntime,
28271
28516
  localAgentGUIProviderTargetId,
28272
28517
  normalizeAgentGUIProviderTargets,
28273
28518
  preloadAgentMentionBrowse,
28274
28519
  projectCoreSessionStatus,
28520
+ registerAgentCustomMentionKind,
28275
28521
  resetAgentActivityRuntimeForTests,
28522
+ resetAgentCustomMentionKindsForTests,
28276
28523
  resetAgentQueuedPromptRuntimeForTests,
28277
28524
  resolveAgentGUIExpandedWindowFrame,
28278
28525
  resolveAgentGUIProviderTarget,