@mcp-b/react-components 0.52.0 → 0.54.0

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 (118) hide show
  1. package/dist/{CodeBlock-Bl-q7wMc.js → CodeBlock-Dw1z6jc8.js} +1 -1
  2. package/dist/{EmployeeChrome-C8eTGJWn.d.ts → EmployeeChrome-B605rpVz.d.ts} +2 -0
  3. package/dist/{FileTree-DruTQ-oa.js → FileTree-okaLnS5j.js} +1 -1
  4. package/dist/{ManagerOffice-CMJ7laGe.js → ManagerOffice-D4L_xO4i.js} +5 -5
  5. package/dist/{SetupChecklist-BiWQkKEq.js → SetupChecklist-DWyifWWg.js} +2 -2
  6. package/dist/{WorkspaceFileView-DXgTljKV.js → WorkspaceFileView-DQDWUpAH.js} +2 -2
  7. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  8. package/dist/components/agents-sdk/AgentChat.d.ts +11 -1
  9. package/dist/components/agents-sdk/AgentChat.js +91 -58
  10. package/dist/components/agents-sdk/AgentEvent.js +2 -2
  11. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  12. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  13. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  14. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  15. package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
  16. package/dist/components/agents-sdk/EmployeeApp.js +2 -2
  17. package/dist/components/agents-sdk/EmployeeChat.d.ts +6 -5
  18. package/dist/components/agents-sdk/EmployeeChat.js +30 -22
  19. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
  20. package/dist/components/agents-sdk/EmployeeChrome.js +181 -123
  21. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
  22. package/dist/components/agents-sdk/EmployeeSchedules.js +3 -3
  23. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
  24. package/dist/components/agents-sdk/EmployeeStartScreen.js +4 -4
  25. package/dist/components/agents-sdk/ManagerAccountActions.js +3 -3
  26. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  27. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  28. package/dist/components/agents-sdk/ManagerOfficeScreens.js +5 -2
  29. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  30. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  31. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -3
  32. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  33. package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
  34. package/dist/components/agents-sdk/ModelSelector.js +4 -4
  35. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  36. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  37. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  38. package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
  39. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  40. package/dist/components/agents-sdk/ThinkChat.js +6 -5
  41. package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
  42. package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
  43. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
  44. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  45. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
  46. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
  47. package/dist/components/agents-sdk/ThinkRoutineActions.js +2 -2
  48. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
  49. package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
  50. package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
  51. package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
  52. package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
  53. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  54. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +6 -6
  55. package/dist/components/agents-sdk/WorkspaceExecution.js +7 -7
  56. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  57. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  58. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  59. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
  61. package/dist/components/agents-sdk/WorkspaceUserScript.js +4 -4
  62. package/dist/components/ai-sdk/Activity.js +1 -1
  63. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  64. package/dist/components/ai-sdk/Approval.js +2 -2
  65. package/dist/components/ai-sdk/Artifact.js +1 -1
  66. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  67. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  68. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  69. package/dist/components/ai-sdk/ComposerLink.js +1 -1
  70. package/dist/components/ai-sdk/ConnectedAppCards.js +3 -3
  71. package/dist/components/ai-sdk/Context.js +1 -1
  72. package/dist/components/ai-sdk/Conversation.js +1 -1
  73. package/dist/components/ai-sdk/Goal.js +1 -1
  74. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  75. package/dist/components/ai-sdk/Message.js +2 -2
  76. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  77. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  78. package/dist/components/ai-sdk/Plan.js +1 -1
  79. package/dist/components/ai-sdk/PromptInput.js +45 -42
  80. package/dist/components/ai-sdk/Queue.js +1 -1
  81. package/dist/components/ai-sdk/Reasoning.js +1 -1
  82. package/dist/components/ai-sdk/Sources.js +1 -1
  83. package/dist/components/ai-sdk/Task.js +1 -1
  84. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  85. package/dist/components/extension/CodexModelSelector.js +2 -2
  86. package/dist/components/extension/ConversationTabPicker.js +2 -2
  87. package/dist/components/foundations/Checkbox.js +1 -1
  88. package/dist/components/foundations/Collapsible.js +1 -1
  89. package/dist/components/foundations/ContextMenu.js +1 -1
  90. package/dist/components/foundations/Menubar.js +1 -1
  91. package/dist/components/foundations/SearchField.js +1 -1
  92. package/dist/components/foundations/Select.js +1 -1
  93. package/dist/components/foundations/Stepper.js +1 -1
  94. package/dist/components/foundations/Toast.js +1 -1
  95. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  96. package/dist/components/foundations/ToggleGroup.js +1 -1
  97. package/dist/components/foundations/icons.js +1 -1
  98. package/dist/components/general-purpose/AccountSignInDialog.js +1 -1
  99. package/dist/components/general-purpose/Commit.js +2 -2
  100. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  101. package/dist/components/general-purpose/FileTree.js +1 -1
  102. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  103. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  104. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  105. package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
  106. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  107. package/dist/components/general-purpose/Terminal.js +2 -2
  108. package/dist/components/general-purpose/TestResults.js +1 -1
  109. package/dist/components/general-purpose/ThemeModeControl.js +2 -2
  110. package/dist/components/general-purpose/WebPreview.js +2 -2
  111. package/dist/components/nanites/AgentConnection.js +2 -2
  112. package/dist/components/nanites/AgentToolDetail.js +7 -6
  113. package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
  114. package/dist/styles/employee-chrome.css +4 -0
  115. package/dist/styles/switch.css +7 -0
  116. package/dist/{workspace-assets-Bg7XhPsk.js → workspace-assets-wW_lQLYK.js} +2 -2
  117. package/package.json +2 -2
  118. package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "./class-names-BiMDVpUo.js";
2
- import { t as CopyButton } from "./copy-button-CSDuDfdP.js";
2
+ import { t as CopyButton } from "./copy-button-Dk2vRe9j.js";
3
3
  import { Select } from "./components/foundations/Select.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -100,6 +100,8 @@ type EmployeeAgentRun = {
100
100
  interface EmployeeWorkbenchItem {
101
101
  id: string;
102
102
  label: string;
103
+ /** Explains the destination on hover and keyboard focus. */
104
+ description: string;
103
105
  icon: React.ReactNode;
104
106
  }
105
107
  interface EmployeeMenuProps {
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "./class-names-BiMDVpUo.js";
2
- import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-cuEtsgj9.js";
2
+ import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-CeGfXO21.js";
3
3
  import { t as NavigationLink } from "./navigation-link-kqMa81v5.js";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,17 +1,17 @@
1
1
  import { findCatalogMcpServerCard, getMcpServerIconSrc } from "./utils/mcp-server-catalog.js";
2
2
  import { t as cx } from "./class-names-BiMDVpUo.js";
3
- import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, nt as XIcon, p as ChevronRightIcon, u as CalendarIcon } from "./icons-cuEtsgj9.js";
4
3
  import { Collapsible } from "./components/foundations/Collapsible.js";
4
+ import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, nt as XIcon, p as ChevronRightIcon, u as CalendarIcon } from "./icons-CeGfXO21.js";
5
5
  import { Button } from "./components/foundations/Button.js";
6
+ import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "./components/ai-sdk/AgentAttention.js";
6
7
  import { Tooltip } from "./components/foundations/Tooltip.js";
7
- import { EmptyState } from "./components/foundations/EmptyState.js";
8
- import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
9
8
  import { Avatar } from "./components/foundations/Avatar.js";
9
+ import { CorrespondentName, correspondentHandleLabel } from "./components/ai-sdk/Correspondent.js";
10
10
  import { AppIcon } from "./components/foundations/AppIcon.js";
11
+ import { EmptyState } from "./components/foundations/EmptyState.js";
11
12
  import { LinkButton } from "./components/foundations/LinkButton.js";
13
+ import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
12
14
  import { getThinkExecutionRunStatus } from "./components/agents-sdk/ThinkExecutionRun.js";
13
- import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "./components/ai-sdk/AgentAttention.js";
14
- import { CorrespondentName, correspondentHandleLabel } from "./components/ai-sdk/Correspondent.js";
15
15
  import * as React from "react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
17
  import { useRender } from "@base-ui/react/use-render";
@@ -1,7 +1,7 @@
1
1
  import { n as mergeBaseClassName } from "./class-names-BiMDVpUo.js";
2
- import { B as PlusIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon } from "./icons-cuEtsgj9.js";
3
- import { IconButton } from "./components/foundations/IconButton.js";
2
+ import { B as PlusIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon } from "./icons-CeGfXO21.js";
4
3
  import { Menu } from "./components/foundations/Menu.js";
4
+ import { IconButton } from "./components/foundations/IconButton.js";
5
5
  import * as React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/_internal/menu-disclosure-group.tsx
@@ -1,7 +1,7 @@
1
- import { b as EyeIcon, d as CheckIcon, et as WarningIcon, k as MaximizeIcon, m as CodeIcon, r as ArrowLeftIcon, v as DownloadIcon } from "./icons-cuEtsgj9.js";
1
+ import { b as EyeIcon, d as CheckIcon, et as WarningIcon, k as MaximizeIcon, m as CodeIcon, r as ArrowLeftIcon, v as DownloadIcon } from "./icons-CeGfXO21.js";
2
2
  import { i as formatClock } from "./format-COCyV98Z.js";
3
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-Dw1z6jc8.js";
3
4
  import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
4
- import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-Bl-q7wMc.js";
5
5
  import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/agents-sdk/WorkspaceFile.js";
6
6
  import { i as useWorkspaceNavigationContext } from "./WorkspaceLink-BYZG-V_I.js";
7
7
  import { useWorkspaceNavigationRestoration } from "./components/agents-sdk/WorkspaceNavigationRestoration.js";
@@ -1,5 +1,5 @@
1
1
  import { canRequestFavicon, inferFaviconUrl } from "../../utils/favicon.js";
2
- import { D as LinkIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WarningIcon, tt as WrenchIcon } from "../../icons-cuEtsgj9.js";
2
+ import { D as LinkIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WarningIcon, tt as WrenchIcon } from "../../icons-CeGfXO21.js";
3
3
  import * as React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/agents-sdk/AgentActivity.tsx
@@ -32,6 +32,8 @@ interface AgentChatRootProps<MessageT extends UIMessage = UIMessage> extends Omi
32
32
  interface AgentChatRenderMessageContext<MessageT extends UIMessage = UIMessage> {
33
33
  message: MessageT;
34
34
  messageIndex: number;
35
+ /** One-based ordinal among ordinary messages of the same role. */
36
+ messageNumber: number;
35
37
  }
36
38
  interface AgentChatRuntime<MessageT extends UIMessage = UIMessage> {
37
39
  messages: readonly MessageT[];
@@ -52,6 +54,13 @@ interface AgentChatRuntime<MessageT extends UIMessage = UIMessage> {
52
54
  dockRef: React.RefObject<HTMLDivElement | null>;
53
55
  announce: (text: string) => void;
54
56
  }
57
+ type AgentChatControls<MessageT extends UIMessage = UIMessage> = Omit<AgentChatRuntime<MessageT>, "messages"> & {
58
+ lastMessageId: string | undefined;
59
+ lastUserMessageId: string | undefined;
60
+ lastAssistantMessageId: string | undefined;
61
+ };
62
+ /** Control state excludes streamed message bodies. */
63
+ declare function useAgentChatControls<MessageT extends UIMessage = UIMessage>(): AgentChatControls<MessageT>;
55
64
  declare function useAgentChatRuntime<MessageT extends UIMessage = UIMessage>(): AgentChatRuntime<MessageT>;
56
65
  /** Layout and runtime adapter over the nearest queue owner; connections remain host-owned. */
57
66
  declare function AgentChatRoot<MessageT extends UIMessage = UIMessage>({
@@ -89,6 +98,7 @@ interface AgentChatMessageProps<MessageT extends UIMessage = UIMessage> extends
89
98
  declare function AgentChatMessage<MessageT extends UIMessage = UIMessage>({
90
99
  message,
91
100
  messageIndex,
101
+ messageNumber,
92
102
  children
93
103
  }: AgentChatMessageProps<MessageT>): React.JSX.Element;
94
104
  interface AgentChatMessageContentProps<MessageT extends UIMessage = UIMessage> {
@@ -199,4 +209,4 @@ declare const AgentChat: {
199
209
  Approval: typeof AgentChatApproval;
200
210
  };
201
211
  //#endregion
202
- export { AgentChat, AgentChatActions, AgentChatApproval, AgentChatApprovals, AgentChatApprovalsProps, AgentChatComposer, AgentChatComposerProps, AgentChatCopyAction, AgentChatDock, AgentChatEditAction, AgentChatLoading, AgentChatMessage, AgentChatMessageContent, AgentChatMessageContentProps, AgentChatMessageProps, AgentChatNotice, AgentChatPromptTray, AgentChatPromptTrayProps, AgentChatQueue, AgentChatRenderMessageContext, AgentChatRetryAction, AgentChatRoot, AgentChatRootProps, AgentChatSubmit, AgentChatTimestamp, AgentChatTranscript, AgentChatTranscriptProps, compactingNotice, useAgentChatApprovals, useAgentChatCompaction, useAgentChatRuntime };
212
+ export { AgentChat, AgentChatActions, AgentChatApproval, AgentChatApprovals, AgentChatApprovalsProps, AgentChatComposer, AgentChatComposerProps, AgentChatCopyAction, AgentChatDock, AgentChatEditAction, AgentChatLoading, AgentChatMessage, AgentChatMessageContent, AgentChatMessageContentProps, AgentChatMessageProps, AgentChatNotice, AgentChatPromptTray, AgentChatPromptTrayProps, AgentChatQueue, AgentChatRenderMessageContext, AgentChatRetryAction, AgentChatRoot, AgentChatRootProps, AgentChatSubmit, AgentChatTimestamp, AgentChatTranscript, AgentChatTranscriptProps, compactingNotice, useAgentChatApprovals, useAgentChatCompaction, useAgentChatControls, useAgentChatRuntime };
@@ -1,24 +1,23 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { H as RefreshIcon, K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, t as ArchiveIcon } from "../../icons-cuEtsgj9.js";
3
2
  import { ExpansionStateProvider } from "../ai-sdk/ExpansionState.js";
3
+ import { H as RefreshIcon, K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, t as ArchiveIcon } from "../../icons-CeGfXO21.js";
4
+ import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
5
+ import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
4
6
  import { Message, MessageAction, MessageActions, MessageCopyAction, MessageMeta, MessageTimestamp } from "../ai-sdk/Message.js";
5
- import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
6
- import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
7
7
  import { AgentMessageParts } from "../ai-sdk/AgentMessageParts.js";
8
- import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
8
+ import { Marker, MarkerContent } from "../foundations/Marker.js";
9
9
  import { VirtualMessageScroller } from "../ai-sdk/MessageScrollerVirtual.js";
10
- import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
11
10
  import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemIndicator, QueueList } from "../ai-sdk/Queue.js";
12
- import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
13
11
  import { BrandLoading } from "../general-purpose/BrandLoading.js";
14
- import { Marker, MarkerContent } from "../foundations/Marker.js";
15
- import { TransitionSurface } from "../foundations/TransitionSurface.js";
12
+ import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
13
+ import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
14
+ import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
16
15
  import * as React from "react";
17
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
17
  import { useRender } from "@base-ui/react/use-render";
19
18
  import { mergeProps } from "@base-ui/react/merge-props";
20
- import { isCompactionMessage } from "agents/experimental/memory/utils";
21
19
  import { isTextUIPart } from "ai";
20
+ import { isCompactionMessage } from "agents/experimental/memory/utils";
22
21
  //#region src/components/agents-sdk/AgentChat.tsx
23
22
  function observeAgentChatDock(element) {
24
23
  if (!element || typeof ResizeObserver === "undefined") return;
@@ -41,12 +40,23 @@ function observeAgentChatDock(element) {
41
40
  observer.disconnect();
42
41
  };
43
42
  }
44
- const AgentChatContext = React.createContext(null);
45
- function useAgentChatRuntime() {
46
- const value = React.useContext(AgentChatContext);
43
+ const AgentChatMessagesContext = React.createContext(null);
44
+ const AgentChatControlsContext = React.createContext(null);
45
+ /** Control state excludes streamed message bodies. */
46
+ function useAgentChatControls() {
47
+ const value = React.useContext(AgentChatControlsContext);
47
48
  if (!value) throw new Error("Chat parts must be used inside AgentChat.Root or ThinkChat.Root.");
48
49
  return value;
49
50
  }
51
+ function useAgentChatRuntime() {
52
+ const messages = React.useContext(AgentChatMessagesContext);
53
+ const controls = useAgentChatControls();
54
+ if (!messages) throw new Error("Chat parts must be used inside AgentChat.Root or ThinkChat.Root.");
55
+ return React.useMemo(() => ({
56
+ messages,
57
+ ...controls
58
+ }), [messages, controls]);
59
+ }
50
60
  /** Layout and runtime adapter over the nearest queue owner; connections remain host-owned. */
51
61
  function AgentChatRoot({ onSubmit, onStop, onPromptQueued, ...props }) {
52
62
  const queue = useOptionalAgentChatQueue();
@@ -73,11 +83,17 @@ function AgentChatRuntimeRoot({ messages, status = "ready", onRegenerate, onEdit
73
83
  const { items: queued, submit, captureSubmit, remove: removeQueued, steer, error: queueError, submissionVersion } = queue;
74
84
  const busy = status === "submitted" || status === "streaming";
75
85
  const dockRef = React.useRef(null);
76
- const stop = React.useMemo(() => queue.canStop ? () => {
77
- queue.stop().catch(() => void 0);
78
- } : void 0, [queue]);
86
+ const { canStop, stop: stopQueued } = queue;
87
+ const stop = React.useMemo(() => canStop ? () => {
88
+ stopQueued().catch(() => void 0);
89
+ } : void 0, [canStop, stopQueued]);
90
+ const lastMessageId = messages.at(-1)?.id;
91
+ const lastUserMessageId = messages.findLast((message) => message.role === "user" && !getAgentEvent(message))?.id;
92
+ const lastAssistantMessageId = messages.findLast((message) => message.role === "assistant" && !isCompactionMessage(message) && !getAgentEvent(message))?.id;
79
93
  const value = React.useMemo(() => ({
80
- messages,
94
+ lastMessageId,
95
+ lastUserMessageId,
96
+ lastAssistantMessageId,
81
97
  status,
82
98
  busy,
83
99
  submit,
@@ -95,7 +111,9 @@ function AgentChatRuntimeRoot({ messages, status = "ready", onRegenerate, onEdit
95
111
  dockRef,
96
112
  announce
97
113
  }), [
98
- messages,
114
+ lastMessageId,
115
+ lastUserMessageId,
116
+ lastAssistantMessageId,
99
117
  status,
100
118
  busy,
101
119
  submit,
@@ -112,27 +130,37 @@ function AgentChatRuntimeRoot({ messages, status = "ready", onRegenerate, onEdit
112
130
  submissionVersion,
113
131
  announce
114
132
  ]);
115
- return /* @__PURE__ */ jsx(AgentChatContext.Provider, {
116
- value,
117
- children: /* @__PURE__ */ jsxs(TransitionSurface, {
118
- ref,
119
- variant: "fade",
120
- className: cx("agent-chat", className),
121
- "data-recipe": "fill-host",
122
- ...props,
123
- children: [children, /* @__PURE__ */ jsx("span", {
124
- className: "sigvelo-visually-hidden",
125
- role: "status",
126
- "aria-live": "polite",
127
- "aria-atomic": "true",
128
- children: announcement
129
- })]
133
+ return /* @__PURE__ */ jsx(AgentChatMessagesContext.Provider, {
134
+ value: messages,
135
+ children: /* @__PURE__ */ jsx(AgentChatControlsContext.Provider, {
136
+ value,
137
+ children: /* @__PURE__ */ jsxs("div", {
138
+ ref,
139
+ className: cx("agent-chat", className),
140
+ "data-recipe": "fill-host",
141
+ ...props,
142
+ children: [children, /* @__PURE__ */ jsx("span", {
143
+ className: "sigvelo-visually-hidden",
144
+ role: "status",
145
+ "aria-live": "polite",
146
+ "aria-atomic": "true",
147
+ children: announcement
148
+ })]
149
+ })
130
150
  })
131
151
  });
132
152
  }
133
153
  /** Windowed transcript. Historical rows are never a live region; their disclosure state survives windowing. */
134
154
  function AgentChatTranscript({ children, emptyState, className, scrollAnchor }) {
135
155
  const { messages, busy } = useAgentChatRuntime();
156
+ const messageNumbers = React.useMemo(() => {
157
+ const counts = {
158
+ system: 0,
159
+ user: 0,
160
+ assistant: 0
161
+ };
162
+ return messages.map((message) => isCompactionMessage(message) || getAgentEvent(message) ? 0 : ++counts[message.role]);
163
+ }, [messages]);
136
164
  return /* @__PURE__ */ jsx(ExpansionStateProvider, { children: /* @__PURE__ */ jsx(VirtualMessageScroller, {
137
165
  className: cx("agent-chat__conversation", className),
138
166
  items: messages,
@@ -149,7 +177,8 @@ function AgentChatTranscript({ children, emptyState, className, scrollAnchor })
149
177
  scrollButtonProps: { className: "agent-chat__scroll-button" },
150
178
  renderItem: (message, messageIndex) => children({
151
179
  message,
152
- messageIndex
180
+ messageIndex,
181
+ messageNumber: messageNumbers[messageIndex]
153
182
  })
154
183
  }) });
155
184
  }
@@ -166,8 +195,8 @@ function useChatMessage() {
166
195
  return value;
167
196
  }
168
197
  /** Preserves runtime-authored event/compaction provenance and owns only the local edit lifecycle. */
169
- function AgentChatMessage({ message, messageIndex, children }) {
170
- const { onEditAndResend } = useAgentChatRuntime();
198
+ function AgentChatMessage({ message, messageIndex, messageNumber, children }) {
199
+ const { onEditAndResend } = useAgentChatControls();
171
200
  const [editing, setEditing] = React.useState(false);
172
201
  const editRef = React.useRef(null);
173
202
  const restoreFocus = React.useRef(false);
@@ -180,9 +209,14 @@ function AgentChatMessage({ message, messageIndex, children }) {
180
209
  const value = React.useMemo(() => ({
181
210
  message,
182
211
  messageIndex,
212
+ messageNumber,
183
213
  editRef,
184
214
  startEdit: () => setEditing(true)
185
- }), [message, messageIndex]);
215
+ }), [
216
+ message,
217
+ messageIndex,
218
+ messageNumber
219
+ ]);
186
220
  if (isCompactionMessage(message)) return /* @__PURE__ */ jsx(Marker, {
187
221
  variant: "separator",
188
222
  children: /* @__PURE__ */ jsx(MarkerContent, { children: "Context compacted" })
@@ -219,11 +253,11 @@ function isCompactedPart(message, partIndex) {
219
253
  return isTextUIPart(part) ? Array.isArray(metadata?.compactedTextParts) && metadata.compactedTextParts.includes(partIndex) : part !== void 0 && "toolCallId" in part && Array.isArray(metadata?.compactedToolOutputs) && metadata.compactedToolOutputs.includes(part.toolCallId);
220
254
  }
221
255
  function AgentChatMessageContent({ message, renderPart }) {
222
- const { messages, status } = useAgentChatRuntime();
256
+ const { lastMessageId, status } = useAgentChatControls();
223
257
  return /* @__PURE__ */ jsx(MemoizedMessageParts, {
224
258
  message,
225
259
  renderPart,
226
- status: message.id === messages.at(-1)?.id ? status : "ready"
260
+ status: message.id === lastMessageId ? status : "ready"
227
261
  });
228
262
  }
229
263
  function MessageParts({ message, renderPart, status }) {
@@ -244,13 +278,12 @@ function MessageParts({ message, renderPart, status }) {
244
278
  const MemoizedMessageParts = React.memo(MessageParts);
245
279
  /** Stable action space for a message; callers choose every action inside it. */
246
280
  function AgentChatActions({ children, ...props }) {
247
- const { message, messageIndex } = useChatMessage();
248
- const { messages, busy } = useAgentChatRuntime();
249
- const number = messages.slice(0, messageIndex + 1).filter((m) => m.role === message.role && !isCompactionMessage(m) && !getAgentEvent(m)).length;
250
- const unavailable = busy && (message.role === "user" ? message.id === messages.findLast((item) => item.role === "user" && !getAgentEvent(item))?.id : message.id === messages.at(-1)?.id);
281
+ const { message, messageNumber } = useChatMessage();
282
+ const { lastMessageId, lastUserMessageId, busy } = useAgentChatControls();
283
+ const unavailable = busy && message.id === (message.role === "user" ? lastUserMessageId : lastMessageId);
251
284
  return /* @__PURE__ */ jsx(MessageMeta, { children: /* @__PURE__ */ jsx(MessageActions, {
252
285
  reserveSpace: message.role === "assistant",
253
- "aria-label": `Actions for ${message.role === "assistant" ? "response" : "message"} ${number}`,
286
+ "aria-label": `Actions for ${message.role === "assistant" ? "response" : "message"} ${messageNumber}`,
254
287
  "data-unavailable": unavailable ? true : void 0,
255
288
  "aria-hidden": unavailable ? true : void 0,
256
289
  inert: unavailable ? true : void 0,
@@ -259,14 +292,14 @@ function AgentChatActions({ children, ...props }) {
259
292
  }) });
260
293
  }
261
294
  function AgentChatCopyAction() {
262
- const { message, messageIndex } = useChatMessage();
263
- const { messages, busy, announce } = useAgentChatRuntime();
295
+ const { message, messageIndex, messageNumber } = useChatMessage();
296
+ const { lastMessageId, busy, announce } = useAgentChatControls();
264
297
  const text = message.parts.filter(isTextUIPart).map((part) => part.text).join("\n\n").trim();
265
298
  if (!text) return null;
266
- const label = message.role === "assistant" ? `Copy response ${messages.slice(0, messageIndex + 1).filter((m) => m.role === "assistant" && !isCompactionMessage(m) && !getAgentEvent(m)).length}` : `Copy message ${messageIndex + 1}`;
299
+ const label = message.role === "assistant" ? `Copy response ${messageNumber}` : `Copy message ${messageIndex + 1}`;
267
300
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MessageCopyAction, {
268
301
  label,
269
- disabled: busy && message.id === messages.at(-1)?.id,
302
+ disabled: busy && message.id === lastMessageId,
270
303
  tooltip: message.role === "assistant" ? "Copy response" : "Copy message",
271
304
  text,
272
305
  size: "xs",
@@ -276,8 +309,8 @@ function AgentChatCopyAction() {
276
309
  }
277
310
  function AgentChatRetryAction() {
278
311
  const { message } = useChatMessage();
279
- const { messages, busy, onRegenerate } = useAgentChatRuntime();
280
- if (!onRegenerate || message.id !== messages.findLast((m) => m.role === "assistant" && !isCompactionMessage(m) && !getAgentEvent(m))?.id) return null;
312
+ const { lastAssistantMessageId, busy, onRegenerate } = useAgentChatControls();
313
+ if (!onRegenerate || message.id !== lastAssistantMessageId) return null;
281
314
  return /* @__PURE__ */ jsx(MessageAction, {
282
315
  disabled: busy,
283
316
  label: "Retry",
@@ -289,8 +322,8 @@ function AgentChatRetryAction() {
289
322
  }
290
323
  function AgentChatEditAction() {
291
324
  const { message, startEdit, editRef } = useChatMessage();
292
- const { messages, busy, onEditAndResend } = useAgentChatRuntime();
293
- if (!onEditAndResend || !editableText(message) || message.id !== messages.findLast((m) => m.role === "user" && !getAgentEvent(m))?.id) return null;
325
+ const { lastUserMessageId, busy, onEditAndResend } = useAgentChatControls();
326
+ if (!onEditAndResend || !editableText(message) || message.id !== lastUserMessageId) return null;
294
327
  return /* @__PURE__ */ jsx(MessageAction, {
295
328
  ref: editRef,
296
329
  disabled: busy,
@@ -312,7 +345,7 @@ function AgentChatTimestamp() {
312
345
  }
313
346
  /** Measured bottom surface for notices, queued prompts, approvals and the form. */
314
347
  function AgentChatDock({ children, render, ref, ...props }) {
315
- const { dockRef } = useAgentChatRuntime();
348
+ const { dockRef } = useAgentChatControls();
316
349
  const observe = React.useCallback((element) => {
317
350
  dockRef.current = element;
318
351
  return observeAgentChatDock(element);
@@ -332,7 +365,7 @@ function AgentChatDock({ children, render, ref, ...props }) {
332
365
  }
333
366
  /** Submission adapter only. Compose it inside Dock; the caller owns its inputs and controls. */
334
367
  function AgentChatComposer({ children, disabled = false, className, onSubmitCapture, ...props }) {
335
- const { submit, captureSubmit, canSubmit } = useAgentChatRuntime();
368
+ const { submit, captureSubmit, canSubmit } = useAgentChatControls();
336
369
  const submissions = React.useRef(/* @__PURE__ */ new WeakMap());
337
370
  return /* @__PURE__ */ jsx(PromptInput, {
338
371
  ...props,
@@ -353,7 +386,7 @@ function AgentChatComposer({ children, disabled = false, className, onSubmitCapt
353
386
  });
354
387
  }
355
388
  function AgentChatSubmit({ disabled = false }) {
356
- const { status, stop, canSubmit } = useAgentChatRuntime();
389
+ const { status, stop, canSubmit } = useAgentChatControls();
357
390
  const { textInput, attachments } = usePromptInputController();
358
391
  return /* @__PURE__ */ jsx(PromptInputSubmit, {
359
392
  status,
@@ -371,7 +404,7 @@ function AgentChatPromptTray({ className, ...props }) {
371
404
  });
372
405
  }
373
406
  function AgentChatQueue() {
374
- const { queued, busy, stop, steer, removeQueued, queueError } = useAgentChatRuntime();
407
+ const { queued, busy, stop, steer, removeQueued, queueError } = useAgentChatControls();
375
408
  if (!queued.length && !queueError) return null;
376
409
  return /* @__PURE__ */ jsx(AgentChatPromptTray, {
377
410
  "data-agent-chat-queue": "",
@@ -499,7 +532,7 @@ function AgentChatApprovals({ thinkStub, pendingApprovals = [], onExecutionSettl
499
532
  });
500
533
  }
501
534
  function AgentChatApproval() {
502
- const { onApprovalResponse } = useAgentChatRuntime();
535
+ const { onApprovalResponse } = useAgentChatControls();
503
536
  const { pending, skip, settled, thinkStub } = useAgentChatApprovals();
504
537
  const first = pending[0];
505
538
  if (!first) return null;
@@ -534,7 +567,7 @@ const COMPACTION_COMMAND = {
534
567
  };
535
568
  /** Explicit command action controller; callers put its command in the catalog and its notice where appropriate. */
536
569
  function useAgentChatCompaction(onCompact) {
537
- const { busy, submissionVersion } = useAgentChatRuntime();
570
+ const { busy, submissionVersion } = useAgentChatControls();
538
571
  const { textInput } = usePromptInputController();
539
572
  const [state, setState] = React.useState(null);
540
573
  React.useEffect(() => {
@@ -581,4 +614,4 @@ const AgentChat = {
581
614
  Approval: AgentChatApproval
582
615
  };
583
616
  //#endregion
584
- export { AgentChat, AgentChatActions, AgentChatApproval, AgentChatApprovals, AgentChatComposer, AgentChatCopyAction, AgentChatDock, AgentChatEditAction, AgentChatLoading, AgentChatMessage, AgentChatMessageContent, AgentChatNotice, AgentChatPromptTray, AgentChatQueue, AgentChatRetryAction, AgentChatRoot, AgentChatSubmit, AgentChatTimestamp, AgentChatTranscript, compactingNotice, useAgentChatApprovals, useAgentChatCompaction, useAgentChatRuntime };
617
+ export { AgentChat, AgentChatActions, AgentChatApproval, AgentChatApprovals, AgentChatComposer, AgentChatCopyAction, AgentChatDock, AgentChatEditAction, AgentChatLoading, AgentChatMessage, AgentChatMessageContent, AgentChatNotice, AgentChatPromptTray, AgentChatQueue, AgentChatRetryAction, AgentChatRoot, AgentChatSubmit, AgentChatTimestamp, AgentChatTranscript, compactingNotice, useAgentChatApprovals, useAgentChatCompaction, useAgentChatControls, useAgentChatRuntime };
@@ -2,9 +2,9 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
3
3
  import { r as firstLine } from "../../format-COCyV98Z.js";
4
4
  import { MessageResponse } from "../ai-sdk/Message.js";
5
- import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
6
- import { getSubagentRunName } from "./SubagentRunIndicator.js";
7
5
  import { NaniteMark } from "../nanites/NaniteScene.js";
6
+ import { getSubagentRunName } from "./SubagentRunIndicator.js";
7
+ import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
8
8
  import "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { isTextUIPart } from "ai";
@@ -1,4 +1,4 @@
1
- import { E as KeyboardIcon, H as RefreshIcon, r as ArrowLeftIcon } from "../../icons-cuEtsgj9.js";
1
+ import { E as KeyboardIcon, H as RefreshIcon, r as ArrowLeftIcon } from "../../icons-CeGfXO21.js";
2
2
  import { Button } from "../foundations/Button.js";
3
3
  import { WebPreviewNavigationButton } from "../general-purpose/WebPreview.js";
4
4
  import { BrowserLiveView } from "./BrowserLiveView.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { K as SpinnerIcon, _ as DotIcon, k as MaximizeIcon } from "../../icons-cuEtsgj9.js";
2
+ import { K as SpinnerIcon, _ as DotIcon, k as MaximizeIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Dialog } from "../foundations/Dialog.js";
5
5
  import { TransitionSurface } from "../foundations/TransitionSurface.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { L as PauseIcon, z as PlayIcon } from "../../icons-cuEtsgj9.js";
2
+ import { L as PauseIcon, z as PlayIcon } from "../../icons-CeGfXO21.js";
3
3
  import { IconButton } from "../foundations/IconButton.js";
4
4
  import { i as formatClock } from "../../format-COCyV98Z.js";
5
5
  import { EmptyState } from "../foundations/EmptyState.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { K as SpinnerIcon, nt as XIcon } from "../../icons-cuEtsgj9.js";
2
+ import { K as SpinnerIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
3
3
  import { Tabs } from "../foundations/Tabs.js";
4
4
  import { WebPreview, WebPreviewEmpty, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl, WebPreviewViewport } from "../general-purpose/WebPreview.js";
5
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
@@ -1,5 +1,5 @@
1
1
  import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
- import { f as EmployeeShellProps, l as EmployeeModelSetup, n as EmployeeBrand, p as EmployeeStatus, t as EmployeeAgentRun } from "../../EmployeeChrome-C8eTGJWn.js";
2
+ import { f as EmployeeShellProps, l as EmployeeModelSetup, n as EmployeeBrand, p as EmployeeStatus, t as EmployeeAgentRun } from "../../EmployeeChrome-B605rpVz.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/agents-sdk/EmployeeApp.d.ts
@@ -1,6 +1,6 @@
1
- import { et as WarningIcon } from "../../icons-cuEtsgj9.js";
2
- import { WorkbenchBack } from "./WorkbenchBack.js";
1
+ import { et as WarningIcon } from "../../icons-CeGfXO21.js";
3
2
  import { StatusScreen } from "../general-purpose/StatusScreen.js";
3
+ import { WorkbenchBack } from "./WorkbenchBack.js";
4
4
  import { EmployeeChrome } from "./EmployeeChrome.js";
5
5
  import { ThinkFullApp } from "./ThinkFullApp.js";
6
6
  import "react";
@@ -1,4 +1,4 @@
1
- import { E as PromptInputCommandComposerProps, F as PromptInputDictationProps, M as PromptInputContextSelectorProps } from "../../PromptInput-DGPrCTPl.js";
1
+ import { E as PromptInputCommandComposerProps, M as PromptInputContextSelectorProps } from "../../PromptInput-DGPrCTPl.js";
2
2
  import { AgentChatTranscriptProps } from "./AgentChat.js";
3
3
  import { ConversationTabPickerProps } from "../extension/ConversationTabPicker.js";
4
4
  import { SetupChecklistGroupProps } from "../general-purpose/SetupChecklist.js";
@@ -24,11 +24,11 @@ interface EmployeeComposerProps<Id extends string = string> {
24
24
  contextSelector?: PromptInputContextSelectorProps;
25
25
  tabs?: ConversationTabPickerProps;
26
26
  model?: CodexModelSelectorProps;
27
- dictation?: PromptInputDictationProps;
27
+ /** Dictation control; mount live meter subscriptions inside this slot. */
28
+ dictation?: React.ReactNode;
28
29
  context?: ContextProps;
29
30
  }
30
- /** One composer anatomy for the app and its examples; capabilities remain explicit. */
31
- declare function EmployeeComposer<Id extends string = string>({
31
+ declare function EmployeeComposerContent<Id extends string = string>({
32
32
  personalization,
33
33
  connections,
34
34
  tools,
@@ -42,13 +42,14 @@ declare function EmployeeComposer<Id extends string = string>({
42
42
  disabled,
43
43
  ...input
44
44
  }: EmployeeComposerProps<Id>): React.JSX.Element;
45
+ /** One composer anatomy for the app and its examples; unchanged configuration stays quiet during streaming. */
46
+ declare const EmployeeComposer: typeof EmployeeComposerContent;
45
47
  interface EmployeeTranscriptProps extends Omit<ThinkChatMessageContentProps, "message"> {
46
48
  readOnly?: boolean;
47
49
  scrollAnchor?: AgentChatTranscriptProps["scrollAnchor"];
48
50
  }
49
51
  /** Shared message content and actions, including the same read-only run behavior. */
50
52
  declare function EmployeeTranscript({
51
- readOnly,
52
53
  scrollAnchor,
53
54
  ...content
54
55
  }: EmployeeTranscriptProps): React.JSX.Element;
@@ -1,13 +1,13 @@
1
- import { PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger, PromptInputAttachments, PromptInputBody, PromptInputCommandComposer, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputFooterEnd, PromptInputTools } from "../ai-sdk/PromptInput.js";
2
- import { AgentChat, useAgentChatCompaction } from "./AgentChat.js";
3
- import { ConversationTabPicker } from "../extension/ConversationTabPicker.js";
4
- import { n as SetupChecklistGroup } from "../../SetupChecklist-BiWQkKEq.js";
5
- import { McpServerPickerItems } from "./McpServerPicker.js";
6
- import { EmployeeStartScreen } from "./EmployeeStartScreen.js";
1
+ import { PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger, PromptInputAttachments, PromptInputBody, PromptInputCommandComposer, PromptInputContextSelector, PromptInputFooter, PromptInputFooterEnd, PromptInputTools } from "../ai-sdk/PromptInput.js";
7
2
  import { Context, ContextContent, ContextContentBody, ContextContentHeader, ContextTrigger } from "../ai-sdk/Context.js";
8
3
  import { CodexModelSelector } from "../extension/CodexModelSelector.js";
4
+ import { ConversationTabPicker } from "../extension/ConversationTabPicker.js";
5
+ import { n as SetupChecklistGroup } from "../../SetupChecklist-DWyifWWg.js";
6
+ import { AgentChat, useAgentChatCompaction } from "./AgentChat.js";
9
7
  import { ThinkChat } from "./ThinkChat.js";
10
- import "react";
8
+ import { McpServerPickerItems } from "./McpServerPicker.js";
9
+ import { EmployeeStartScreen } from "./EmployeeStartScreen.js";
10
+ import * as React from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/components/agents-sdk/EmployeeChat.tsx
13
13
  function CommandInput(props) {
@@ -26,8 +26,7 @@ function CompactingInput({ onCompact, ...props }) {
26
26
  }
27
27
  })] });
28
28
  }
29
- /** One composer anatomy for the app and its examples; capabilities remain explicit. */
30
- function EmployeeComposer({ personalization, connections, tools, contextSelector, tabs, model, dictation, context, onCompact, placeholder = "How can I help you today?", disabled, ...input }) {
29
+ function EmployeeComposerContent({ personalization, connections, tools, contextSelector, tabs, model, dictation, context, onCompact, placeholder = "How can I help you today?", disabled, ...input }) {
31
30
  const inputProps = {
32
31
  ...input,
33
32
  placeholder,
@@ -55,7 +54,7 @@ function EmployeeComposer({ personalization, connections, tools, contextSelector
55
54
  ] }), /* @__PURE__ */ jsxs(PromptInputFooterEnd, { children: [
56
55
  tabs ? /* @__PURE__ */ jsx(ConversationTabPicker, { ...tabs }) : null,
57
56
  model ? /* @__PURE__ */ jsx(CodexModelSelector, { ...model }) : null,
58
- dictation ? /* @__PURE__ */ jsx(PromptInputDictation, { ...dictation }) : null,
57
+ dictation,
59
58
  context ? /* @__PURE__ */ jsxs(Context, {
60
59
  ...context,
61
60
  children: [/* @__PURE__ */ jsx(ContextTrigger, {}), /* @__PURE__ */ jsxs(ContextContent, { children: [/* @__PURE__ */ jsx(ContextContentHeader, {}), /* @__PURE__ */ jsx(ContextContentBody, {})] })]
@@ -65,21 +64,30 @@ function EmployeeComposer({ personalization, connections, tools, contextSelector
65
64
  ]
66
65
  });
67
66
  }
67
+ /** One composer anatomy for the app and its examples; unchanged configuration stays quiet during streaming. */
68
+ const EmployeeComposer = React.memo(EmployeeComposerContent);
69
+ const EmployeeMessage = React.memo(function EmployeeMessage({ message, messageIndex, messageNumber, readOnly, ...content }) {
70
+ return /* @__PURE__ */ jsxs(AgentChat.Message, {
71
+ message,
72
+ messageIndex,
73
+ messageNumber,
74
+ children: [/* @__PURE__ */ jsx(ThinkChat.MessageContent, {
75
+ ...content,
76
+ message
77
+ }), /* @__PURE__ */ jsxs(AgentChat.Actions, { children: [
78
+ /* @__PURE__ */ jsx(AgentChat.CopyAction, {}),
79
+ readOnly ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AgentChat.RetryAction, {}), /* @__PURE__ */ jsx(AgentChat.EditAction, {})] }),
80
+ /* @__PURE__ */ jsx(AgentChat.Timestamp, {})
81
+ ] })]
82
+ });
83
+ });
68
84
  /** Shared message content and actions, including the same read-only run behavior. */
69
- function EmployeeTranscript({ readOnly, scrollAnchor, ...content }) {
85
+ function EmployeeTranscript({ scrollAnchor, ...content }) {
70
86
  return /* @__PURE__ */ jsx(AgentChat.Transcript, {
71
87
  scrollAnchor,
72
- children: ({ message, messageIndex }) => /* @__PURE__ */ jsxs(AgentChat.Message, {
73
- message,
74
- messageIndex,
75
- children: [/* @__PURE__ */ jsx(ThinkChat.MessageContent, {
76
- ...content,
77
- message
78
- }), /* @__PURE__ */ jsxs(AgentChat.Actions, { children: [
79
- /* @__PURE__ */ jsx(AgentChat.CopyAction, {}),
80
- readOnly ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AgentChat.RetryAction, {}), /* @__PURE__ */ jsx(AgentChat.EditAction, {})] }),
81
- /* @__PURE__ */ jsx(AgentChat.Timestamp, {})
82
- ] })]
88
+ children: (row) => /* @__PURE__ */ jsx(EmployeeMessage, {
89
+ ...row,
90
+ ...content
83
91
  })
84
92
  });
85
93
  }
@@ -1,2 +1,2 @@
1
- import { a as EmployeeDestination, c as EmployeeMenuProps, d as EmployeeRenderLink, f as EmployeeShellProps, h as EmployeeWorkbenchItem, i as EmployeeCompanion, l as EmployeeModelSetup, m as EmployeeView, n as EmployeeBrand, o as EmployeeFollow, p as EmployeeStatus, r as EmployeeChrome, s as EmployeeIdentity, t as EmployeeAgentRun, u as EmployeePasskeyVault } from "../../EmployeeChrome-C8eTGJWn.js";
1
+ import { a as EmployeeDestination, c as EmployeeMenuProps, d as EmployeeRenderLink, f as EmployeeShellProps, h as EmployeeWorkbenchItem, i as EmployeeCompanion, l as EmployeeModelSetup, m as EmployeeView, n as EmployeeBrand, o as EmployeeFollow, p as EmployeeStatus, r as EmployeeChrome, s as EmployeeIdentity, t as EmployeeAgentRun, u as EmployeePasskeyVault } from "../../EmployeeChrome-B605rpVz.js";
2
2
  export { EmployeeAgentRun, EmployeeBrand, EmployeeChrome, EmployeeCompanion, EmployeeDestination, EmployeeFollow, EmployeeIdentity, EmployeeMenuProps, EmployeeModelSetup, EmployeePasskeyVault, EmployeeRenderLink, EmployeeShellProps, EmployeeStatus, EmployeeView, EmployeeWorkbenchItem };