@mcp-b/react-components 0.47.0 → 0.49.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.
- package/dist/AgentChatQueue-C_Jaw3Ia.d.ts +48 -0
- package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
- package/dist/Avatar-o2NO1fCG.d.ts +124 -0
- package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
- package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
- package/dist/{CodeBlock-DMHZiw86.js → CodeBlock-g8sADidM.js} +7 -7
- package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
- package/dist/{FileTree-BHebfvkK.js → FileTree-H8mMg4rV.js} +20 -29
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
- package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
- package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
- package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
- package/dist/Separator-CzhtLYE1.d.ts +41 -0
- package/dist/Toolbar-CGY004u0.d.ts +155 -0
- package/dist/{Workspace-C_zHq9KZ.d.ts → Workspace-HzGrWDX3.d.ts} +14 -3
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-DYPtRVpM.js} +4 -3
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-CUJk9_P5.js} +6 -3
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +525 -670
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
- package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
- package/dist/components/agents-sdk/AgentEvent.js +1 -1
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
- package/dist/components/agents-sdk/BrowserLiveScreen.js +21 -13
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +31 -30
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
- package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +115 -85
- package/dist/components/agents-sdk/ManagerOffice.js +545 -1154
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -2
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +3 -2
- package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
- package/dist/components/agents-sdk/McpServerIcon.js +25 -0
- package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
- package/dist/components/agents-sdk/McpServerPicker.js +2 -1
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -2
- package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
- package/dist/components/agents-sdk/SessionCompaction.js +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +18 -23
- package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
- package/dist/components/agents-sdk/SubagentRunList.js +4 -2
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
- package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
- package/dist/components/agents-sdk/SubagentRunSelector.js +4 -2
- package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
- package/dist/components/agents-sdk/ThinkChat.js +233 -2
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +17 -9
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
- package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +23 -18
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +158 -101
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -285
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
- package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +16 -14
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +12 -12
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +6 -6
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
- package/dist/components/agents-sdk/Workspace.d.ts +2 -2
- package/dist/components/agents-sdk/Workspace.js +20 -23
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +15 -10
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +43 -40
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +31 -31
- package/dist/components/agents-sdk/WorkspaceExecution.js +115 -192
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
- package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceMountManager.js +5 -8
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +44 -15
- package/dist/components/agents-sdk/WorkspaceProject.js +74 -51
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +5 -2
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +63 -42
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
- package/dist/components/ai-sdk/Approval.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +2 -2
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -2
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +16 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +69 -94
- package/dist/components/ai-sdk/Context.d.ts +7 -3
- package/dist/components/ai-sdk/Context.js +7 -17
- package/dist/components/ai-sdk/Conversation.d.ts +2 -2
- package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
- package/dist/components/ai-sdk/Correspondent.js +145 -0
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +2 -2
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +11 -2
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +38 -4
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +170 -226
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
- package/dist/components/ai-sdk/Queue.d.ts +28 -5
- package/dist/components/ai-sdk/Queue.js +19 -4
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +4 -4
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Task.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +5 -0
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +3 -2
- package/dist/components/foundations/Autocomplete.js +6 -1
- package/dist/components/foundations/Avatar.d.ts +1 -121
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Card.d.ts +22 -27
- package/dist/components/foundations/Card.js +51 -32
- package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Combobox.js +6 -1
- package/dist/components/foundations/Dialog.d.ts +106 -1
- package/dist/components/foundations/EmptyState.d.ts +1 -1
- package/dist/components/foundations/Field.d.ts +2 -1
- package/dist/components/foundations/Fieldset.d.ts +1 -1
- package/dist/components/foundations/Form.d.ts +4 -4
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/Label.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +2 -2
- package/dist/components/foundations/Meter.d.ts +1 -1
- package/dist/components/foundations/NumberField.d.ts +1 -1
- package/dist/components/foundations/ScrollArea.d.ts +1 -1
- package/dist/components/foundations/SearchField.d.ts +1 -1
- package/dist/components/foundations/Select.js +6 -1
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +3 -2
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/TransitionSurface.d.ts +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
- package/dist/components/general-purpose/ActionGuide.js +4 -18
- package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/FileTree.d.ts +1 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +119 -101
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +40 -70
- package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
- package/dist/components/general-purpose/SetupChecklist.js +76 -1
- package/dist/components/general-purpose/Terminal.d.ts +3 -3
- package/dist/components/general-purpose/Terminal.js +10 -5
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +48 -50
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +37 -12
- package/dist/components/nanites/AgentConnection.js +1 -1
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +20 -41
- package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
- package/dist/mcp-server-mAErsxHU.js +27 -0
- package/dist/styles/activity.css +1 -96
- package/dist/styles/agent-chat.css +75 -102
- package/dist/styles/agent-tool-detail.css +0 -16
- package/dist/styles/base.css +3 -3
- package/dist/styles/browser-run-panel.css +1 -15
- package/dist/styles/button.css +7 -1
- package/dist/styles/code-block.css +12 -0
- package/dist/styles/composition-motion.css +0 -2
- package/dist/styles/correspondent.css +73 -0
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +5 -0
- package/dist/styles/index.css +5 -2
- package/dist/styles/manager-office.css +380 -1086
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- package/dist/styles/subagent-run.css +122 -6
- package/dist/styles/test-results.css +2 -5
- package/dist/styles/think-chat-activity.css +13 -0
- package/dist/styles/think-chat-tool-panels.css +81 -0
- package/dist/styles/think-execution-workbench.css +2 -8
- package/dist/styles/think-full-app.css +42 -251
- package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
- package/dist/styles/web-preview.css +15 -1
- package/dist/utils/mcp-server-catalog.d.ts +1112 -2
- package/dist/utils/mcp-server-catalog.js +28 -9
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-CxpEHsac.js → workspace-assets-Bg7XhPsk.js} +16 -2
- package/package.json +7 -3
- package/dist/AgentChat-BLmQghkt.d.ts +0 -327
- package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
- package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
- package/dist/Dialog-B_FhRWaz.d.ts +0 -107
- package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
- package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
- package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
- package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
- package/dist/SetupChecklist-CwRjIDH4.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DLDta57t.js +0 -332
- package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
- package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
- package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
- package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
- package/dist/Toggle-DLrIf5YH.d.ts +0 -69
- package/dist/WorkspaceLive-DLGhtIly.d.ts +0 -49
- package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
- package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
- package/dist/mcp-server-7NR24ASj.js +0 -69
- package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
- package/dist/styles/think-sidepanel.css +0 -78
- package/dist/think-agent-Cip5KAPj.d.ts +0 -7
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { J as PromptInputMessage } from "./PromptInput-C4Mofitz.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ChatStatus } from "ai";
|
|
4
|
+
|
|
5
|
+
//#region src/components/agents-sdk/AgentChatQueue.d.ts
|
|
6
|
+
interface AgentChatQueuedPrompt {
|
|
7
|
+
id: string;
|
|
8
|
+
message: PromptInputMessage;
|
|
9
|
+
}
|
|
10
|
+
interface AgentChatQueueProviderProps {
|
|
11
|
+
/** Keep this owner above navigation when the parent conversation remains active. */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
status: ChatStatus;
|
|
14
|
+
onSubmit?: (message: PromptInputMessage) => void | Promise<void>;
|
|
15
|
+
onStop?: () => void | Promise<void>;
|
|
16
|
+
onPromptQueued?: () => void;
|
|
17
|
+
}
|
|
18
|
+
interface AgentChatQueueValue {
|
|
19
|
+
items: readonly AgentChatQueuedPrompt[];
|
|
20
|
+
held: boolean;
|
|
21
|
+
error: string | null;
|
|
22
|
+
submissionVersion: number;
|
|
23
|
+
canStop: boolean;
|
|
24
|
+
canSubmit: boolean;
|
|
25
|
+
hold: () => void;
|
|
26
|
+
submit: (message: PromptInputMessage) => void | Promise<void>;
|
|
27
|
+
/** Capture user intent before asynchronous attachment conversion. */
|
|
28
|
+
captureSubmit: () => AgentChatQueueValue["submit"];
|
|
29
|
+
stop: () => Promise<void>;
|
|
30
|
+
steer: (id: string) => Promise<void>;
|
|
31
|
+
sendNext: (id?: string) => void;
|
|
32
|
+
remove: (id: string) => void;
|
|
33
|
+
}
|
|
34
|
+
declare function useOptionalAgentChatQueue(): AgentChatQueueValue | null;
|
|
35
|
+
/**
|
|
36
|
+
* The queue's single owner, including dispatch reservations and the turn's
|
|
37
|
+
* busy-to-ready edge. Hoist it with the parent connection to preserve queued
|
|
38
|
+
* prompts and cancellation holds while the selected child is visible.
|
|
39
|
+
*/
|
|
40
|
+
declare function AgentChatQueueProvider({
|
|
41
|
+
children,
|
|
42
|
+
status,
|
|
43
|
+
onSubmit,
|
|
44
|
+
onStop,
|
|
45
|
+
onPromptQueued
|
|
46
|
+
}: AgentChatQueueProviderProps): React.JSX.Element;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { useOptionalAgentChatQueue as i, AgentChatQueueProviderProps as n, AgentChatQueuedPrompt as r, AgentChatQueueProvider as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { UIMessage } from "ai";
|
|
3
|
+
import { useAgentToolEvents } from "agents/react";
|
|
4
|
+
import { AgentToolRunPart, AgentToolRunState, AgentToolRunStatus } from "agents/agent-tools";
|
|
5
|
+
|
|
6
|
+
//#region src/components/agents-sdk/AgentToolRunsContext.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Whole native run fields with the SDK's complete lifecycle status. Published
|
|
9
|
+
* Agents 0.21.0 excludes `starting` from AgentToolRunState while its native
|
|
10
|
+
* AgentToolRunStatus includes it and current retained replay emits it. This
|
|
11
|
+
* type-only correction does not translate records or accept another shape.
|
|
12
|
+
*/
|
|
13
|
+
type AgentToolRunValue<Part extends AgentToolRunPart = AgentToolRunPart> = Omit<AgentToolRunState<Part>, "status"> & {
|
|
14
|
+
status: AgentToolRunStatus;
|
|
15
|
+
};
|
|
16
|
+
/** Whole event-hook value; run records keep the complete native lifecycle. */
|
|
17
|
+
type AgentToolEventsValue<Part extends AgentToolRunPart = UIMessage["parts"][number]> = Omit<ReturnType<typeof useAgentToolEvents<Part>>, "runsById" | "runsByToolCallId" | "unboundRuns" | "getRunsForToolCall"> & {
|
|
18
|
+
runsById: Record<string, AgentToolRunValue<Part>>;
|
|
19
|
+
runsByToolCallId: Record<string, AgentToolRunValue<Part>[]>;
|
|
20
|
+
unboundRuns: AgentToolRunValue<Part>[];
|
|
21
|
+
getRunsForToolCall(toolCallId: string): AgentToolRunValue<Part>[];
|
|
22
|
+
};
|
|
23
|
+
interface AgentToolRunsProviderProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> {
|
|
24
|
+
/** Pass the whole `useAgentToolEvents({ agent })` result directly. */
|
|
25
|
+
agentTools: AgentToolEventsValue<Part>;
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/** Provides one parent connection's retained Agent Tool event projection. */
|
|
29
|
+
declare function AgentToolRunsProvider<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
|
|
30
|
+
agentTools,
|
|
31
|
+
children
|
|
32
|
+
}: AgentToolRunsProviderProps<Part>): React.JSX.Element;
|
|
33
|
+
declare function useOptionalAgentToolRuns<Part extends AgentToolRunPart = UIMessage["parts"][number]>(): AgentToolEventsValue<Part> | null;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { useOptionalAgentToolRuns as a, AgentToolRunsProviderProps as i, AgentToolRunValue as n, AgentToolRunsProvider as r, AgentToolEventsValue as t };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Avatar.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Avatar.Root component.
|
|
7
|
+
*/
|
|
8
|
+
interface AvatarRootProps extends React.ComponentPropsWithoutRef<typeof Avatar.Root> {
|
|
9
|
+
/** Avatar dimensions; use `md` for standard identity rows. */
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/** Circular for people, rounded for app or entity artwork. */
|
|
12
|
+
shape?: "circle" | "rounded";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for the Avatar.Image component.
|
|
16
|
+
*/
|
|
17
|
+
interface AvatarImageProps extends React.ComponentPropsWithoutRef<typeof Avatar.Image> {
|
|
18
|
+
fit?: "cover" | "contain";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Props for the Avatar.Fallback component.
|
|
22
|
+
*/
|
|
23
|
+
interface AvatarFallbackProps extends React.ComponentPropsWithoutRef<typeof Avatar.Fallback> {}
|
|
24
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
25
|
+
interface AvatarGroupCountProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
26
|
+
/**
|
|
27
|
+
* Container for the avatar. Renders a `<span>` element.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Avatar.Root>
|
|
32
|
+
* <Avatar.Image src="/photo.jpg" alt="User" />
|
|
33
|
+
* <Avatar.Fallback>JD</Avatar.Fallback>
|
|
34
|
+
* </Avatar.Root>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
38
|
+
*/
|
|
39
|
+
declare function AvatarRoot({
|
|
40
|
+
className,
|
|
41
|
+
size,
|
|
42
|
+
shape,
|
|
43
|
+
ref,
|
|
44
|
+
...props
|
|
45
|
+
}: AvatarRootProps & {
|
|
46
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLSpanElement>;
|
|
47
|
+
}): React.JSX.Element;
|
|
48
|
+
/**
|
|
49
|
+
* Displays the avatar image. Renders an `<img>` element.
|
|
50
|
+
*/
|
|
51
|
+
declare function AvatarImage({
|
|
52
|
+
className,
|
|
53
|
+
fit,
|
|
54
|
+
ref,
|
|
55
|
+
...props
|
|
56
|
+
}: AvatarImageProps & {
|
|
57
|
+
ref?: React.Ref<HTMLImageElement>;
|
|
58
|
+
}): React.JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Displays when the image fails to load or isn't provided.
|
|
61
|
+
* Typically contains initials or an icon. Renders a `<span>` element.
|
|
62
|
+
*/
|
|
63
|
+
declare function AvatarFallback({
|
|
64
|
+
className,
|
|
65
|
+
ref,
|
|
66
|
+
...props
|
|
67
|
+
}: AvatarFallbackProps & {
|
|
68
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
69
|
+
}): React.JSX.Element;
|
|
70
|
+
declare function AvatarGroup({
|
|
71
|
+
className,
|
|
72
|
+
ref,
|
|
73
|
+
...props
|
|
74
|
+
}: AvatarGroupProps & {
|
|
75
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
76
|
+
}): React.JSX.Element;
|
|
77
|
+
declare function AvatarGroupCount({
|
|
78
|
+
className,
|
|
79
|
+
ref,
|
|
80
|
+
...props
|
|
81
|
+
}: AvatarGroupCountProps & {
|
|
82
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
83
|
+
}): React.JSX.Element;
|
|
84
|
+
/**
|
|
85
|
+
* An avatar component for displaying user profile pictures with fallback support.
|
|
86
|
+
* Shows initials or an icon when the image fails to load or isn't provided.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* // With image
|
|
91
|
+
* <Avatar.Root>
|
|
92
|
+
* <Avatar.Image src="/profile.jpg" alt="John Doe" />
|
|
93
|
+
* <Avatar.Fallback>JD</Avatar.Fallback>
|
|
94
|
+
* </Avatar.Root>
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* // Fallback only (no image)
|
|
100
|
+
* <Avatar.Root>
|
|
101
|
+
* <Avatar.Fallback>AB</Avatar.Fallback>
|
|
102
|
+
* </Avatar.Root>
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* // With delayed fallback
|
|
108
|
+
* <Avatar.Root>
|
|
109
|
+
* <Avatar.Image src="/slow-loading.jpg" alt="User" />
|
|
110
|
+
* <Avatar.Fallback delay={500}>?</Avatar.Fallback>
|
|
111
|
+
* </Avatar.Root>
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
115
|
+
*/
|
|
116
|
+
declare const Avatar$1: {
|
|
117
|
+
Root: typeof AvatarRoot;
|
|
118
|
+
Image: typeof AvatarImage;
|
|
119
|
+
Fallback: typeof AvatarFallback;
|
|
120
|
+
Group: typeof AvatarGroup;
|
|
121
|
+
GroupCount: typeof AvatarGroupCount;
|
|
122
|
+
};
|
|
123
|
+
//#endregion
|
|
124
|
+
export { AvatarImageProps as a, AvatarGroupProps as i, AvatarFallbackProps as n, AvatarRootProps as o, AvatarGroupCountProps as r, Avatar$1 as t };
|
|
@@ -96,7 +96,7 @@ declare function Button$1({
|
|
|
96
96
|
ref,
|
|
97
97
|
...props
|
|
98
98
|
}: ButtonProps & {
|
|
99
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
99
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLButtonElement>;
|
|
100
100
|
}): import("react").JSX.Element;
|
|
101
101
|
//#endregion
|
|
102
102
|
export { ButtonVariant as a, ButtonSize as i, ButtonColor as n, ButtonVariantsOptions as o, ButtonProps as r, buttonVariants as s, Button$1 as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as CopyButtonProps } from "./copy-button-OUwOdgEm.js";
|
|
1
2
|
import { m as SelectProps, t as Select } from "./Select-RrceeEIe.js";
|
|
2
|
-
import { t as CopyButtonProps } from "./copy-button-C0JyjClr.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage } from "shiki";
|
|
5
5
|
|
|
@@ -15,6 +15,10 @@ declare const CODE_BLOCK_LANGUAGES: ReadonlyArray<CodeBlockLanguage>;
|
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/components/ai-sdk/CodeBlock.d.ts
|
|
17
17
|
interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** Plain code blends into an owning panel instead of painting another surface. */
|
|
19
|
+
surface?: "subtle" | "plain";
|
|
20
|
+
/** Wrap long lines in constrained transcript panels. */
|
|
21
|
+
wrap?: boolean;
|
|
18
22
|
/** The source code to display. */
|
|
19
23
|
code: string;
|
|
20
24
|
/** The language to highlight as. */
|
|
@@ -33,6 +37,8 @@ interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
33
37
|
/**
|
|
34
38
|
* A syntax-highlighted code block powered by Shiki. Supports line numbers,
|
|
35
39
|
* inline language switching, and a copy-to-clipboard action.
|
|
40
|
+
* The root supplies context and its outer surface: compose CodeBlockContainer and
|
|
41
|
+
* CodeBlockContent explicitly, alongside any optional header and actions.
|
|
36
42
|
*
|
|
37
43
|
* Supports Shiki bundled language names plus the short aliases in
|
|
38
44
|
* `CODE_BLOCK_LANGUAGES`. The highlighter is loaded lazily on first render and
|
|
@@ -60,7 +66,7 @@ declare function CodeBlock({
|
|
|
60
66
|
language,
|
|
61
67
|
...props
|
|
62
68
|
}: CodeBlockProps & {
|
|
63
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
69
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
64
70
|
}): React.JSX.Element;
|
|
65
71
|
interface CodeBlockHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
66
72
|
declare function CodeBlockHeader({
|
|
@@ -76,12 +76,11 @@ function renderPlainCode(code, showLineNumbers) {
|
|
|
76
76
|
children: line || " "
|
|
77
77
|
}, `${index}-${line}`));
|
|
78
78
|
}
|
|
79
|
-
function hasCustomCodeBlockContent(children) {
|
|
80
|
-
return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === CodeBlockContainer || child.type === CodeBlockContent));
|
|
81
|
-
}
|
|
82
79
|
/**
|
|
83
80
|
* A syntax-highlighted code block powered by Shiki. Supports line numbers,
|
|
84
81
|
* inline language switching, and a copy-to-clipboard action.
|
|
82
|
+
* The root supplies context and its outer surface: compose CodeBlockContainer and
|
|
83
|
+
* CodeBlockContent explicitly, alongside any optional header and actions.
|
|
85
84
|
*
|
|
86
85
|
* Supports Shiki bundled language names plus the short aliases in
|
|
87
86
|
* `CODE_BLOCK_LANGUAGES`. The highlighter is loaded lazily on first render and
|
|
@@ -111,7 +110,7 @@ function CodeBlock({ language, ...props }) {
|
|
|
111
110
|
...props
|
|
112
111
|
}, language);
|
|
113
112
|
}
|
|
114
|
-
function CodeBlockState({ className, code, language, showLineNumbers = false, isStreaming = false, onLanguageChange, children, ref, ...props }) {
|
|
113
|
+
function CodeBlockState({ surface = "subtle", wrap = false, className, code, language, showLineNumbers = false, isStreaming = false, onLanguageChange, children, ref, ...props }) {
|
|
115
114
|
const [internalLanguage, setInternalLanguage] = React.useState(language);
|
|
116
115
|
const setLanguage = React.useCallback((next) => {
|
|
117
116
|
setInternalLanguage(next);
|
|
@@ -130,14 +129,15 @@ function CodeBlockState({ className, code, language, showLineNumbers = false, is
|
|
|
130
129
|
showLineNumbers,
|
|
131
130
|
isStreaming
|
|
132
131
|
]);
|
|
133
|
-
const hasCustomContent = hasCustomCodeBlockContent(children);
|
|
134
132
|
return /* @__PURE__ */ jsx(CodeBlockContext.Provider, {
|
|
135
133
|
value: ctxValue,
|
|
136
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
137
135
|
ref,
|
|
138
136
|
className: cx("code-block", className),
|
|
137
|
+
"data-surface": surface,
|
|
138
|
+
"data-wrap": wrap || void 0,
|
|
139
139
|
...props,
|
|
140
|
-
children
|
|
140
|
+
children
|
|
141
141
|
})
|
|
142
142
|
});
|
|
143
143
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ai-sdk/Correspondent.d.ts
|
|
4
|
+
/** One live handle. Extra handles are extra correspondents — no merge. */
|
|
5
|
+
type CorrespondentHandle = {
|
|
6
|
+
kind: "email";
|
|
7
|
+
address: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "slack";
|
|
10
|
+
userId: string;
|
|
11
|
+
userName?: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "linkedin";
|
|
14
|
+
url: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "people";
|
|
17
|
+
resourceName: string;
|
|
18
|
+
};
|
|
19
|
+
type CorrespondentLatest = {
|
|
20
|
+
kind: "email-thread";
|
|
21
|
+
label: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "slack-thread";
|
|
24
|
+
threadId: string;
|
|
25
|
+
label: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "linkedin-tab";
|
|
28
|
+
tabId: number;
|
|
29
|
+
url: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "calendar-event";
|
|
33
|
+
label: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Presentation of a person-shaped destination on current work. Not a contact
|
|
37
|
+
* record and not a ManagerOfficeEmployee seat.
|
|
38
|
+
*/
|
|
39
|
+
interface Correspondent {
|
|
40
|
+
handle: CorrespondentHandle;
|
|
41
|
+
displayName?: string;
|
|
42
|
+
avatarUrl?: string;
|
|
43
|
+
latest?: CorrespondentLatest;
|
|
44
|
+
}
|
|
45
|
+
declare function slackDestinationCorrespondent(to: string): Correspondent | undefined;
|
|
46
|
+
declare function emailDestinationCorrespondent(to: string): Correspondent | undefined;
|
|
47
|
+
declare function linkedinTabCorrespondent(url: string): Correspondent | undefined;
|
|
48
|
+
declare function correspondentHandleLabel(handle: CorrespondentHandle): string;
|
|
49
|
+
declare function correspondentInitials(label: string): string;
|
|
50
|
+
interface CorrespondentNameProps {
|
|
51
|
+
correspondent: Correspondent;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Avatar + name for a person-shaped destination. LinkedIn handles open the
|
|
56
|
+
* profile; other handles disclose handle and latest thread without inventing
|
|
57
|
+
* a directory.
|
|
58
|
+
*/
|
|
59
|
+
declare function CorrespondentName({
|
|
60
|
+
correspondent,
|
|
61
|
+
className
|
|
62
|
+
}: CorrespondentNameProps): React.ReactElement;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { CorrespondentNameProps as a, emailDestinationCorrespondent as c, CorrespondentName as i, linkedinTabCorrespondent as l, CorrespondentHandle as n, correspondentHandleLabel as o, CorrespondentLatest as r, correspondentInitials as s, Correspondent as t, slackDestinationCorrespondent as u };
|
|
@@ -6,7 +6,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
//#region src/components/_internal/use-file-tree-nav.ts
|
|
7
7
|
const FileTreeContext = React.createContext(null);
|
|
8
8
|
function getVisibleFileTreeNodes(tree) {
|
|
9
|
-
return tree ? [...tree.querySelectorAll(".file-tree__node")].filter((node) => !node.closest(".file-tree__group[data-collapsed]")) : [];
|
|
9
|
+
return tree ? [...tree.querySelectorAll(".file-tree__node")].filter((node) => node.closest("[role=\"tree\"]") === tree && !node.closest(".file-tree__group[data-collapsed]")) : [];
|
|
10
10
|
}
|
|
11
11
|
function useFileTreeContext() {
|
|
12
12
|
const ctx = React.useContext(FileTreeContext);
|
|
@@ -17,8 +17,8 @@ function useFileTreeContext() {
|
|
|
17
17
|
* Builds a FileTreeContextValue that dispatches keyboard navigation per the
|
|
18
18
|
* WAI-ARIA Tree Pattern.
|
|
19
19
|
*/
|
|
20
|
-
function useFileTreeNav({ expanded,
|
|
21
|
-
const [focusedPath, setFocusedPath] = React.useState(
|
|
20
|
+
function useFileTreeNav({ expanded, selectedPath, onSelect, onExpandedChange }) {
|
|
21
|
+
const [focusedPath, setFocusedPath] = React.useState(null);
|
|
22
22
|
const setFolderExpanded = React.useCallback((path, nextExpanded) => {
|
|
23
23
|
const next = new Set(expanded);
|
|
24
24
|
if (nextExpanded) next.add(path);
|
|
@@ -90,18 +90,7 @@ function useFileTreeNav({ expanded, initialFocusedPath, selectedPath, onSelect,
|
|
|
90
90
|
}
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region src/components/general-purpose/FileTree.tsx
|
|
93
|
-
|
|
94
|
-
let firstPath = null;
|
|
95
|
-
React.Children.forEach(children, (child) => {
|
|
96
|
-
if (firstPath || !React.isValidElement(child)) return;
|
|
97
|
-
if (child.type === FileTreeFolder || child.type === FileTreeFile) {
|
|
98
|
-
firstPath = child.props.path;
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
if (child.type === React.Fragment) firstPath = getFirstFileTreePath(child.props.children);
|
|
102
|
-
});
|
|
103
|
-
return firstPath;
|
|
104
|
-
}
|
|
93
|
+
const FileTreeLevelContext = React.createContext(0);
|
|
105
94
|
/**
|
|
106
95
|
* A keyboard-accessible hierarchical file browser. Compose with
|
|
107
96
|
* FileTreeFolder and FileTreeFile children.
|
|
@@ -129,19 +118,17 @@ function FileTree({ appearance = "contained", className, "aria-label": ariaLabel
|
|
|
129
118
|
if (!isControlled) setInternalExpanded(next);
|
|
130
119
|
onExpandedChange?.(next);
|
|
131
120
|
}, [isControlled, onExpandedChange]);
|
|
132
|
-
const handleSelect = React.useCallback((path) => {
|
|
133
|
-
onSelect?.(path);
|
|
134
|
-
}, [onSelect]);
|
|
135
121
|
const ctx = useFileTreeNav({
|
|
136
122
|
expanded: currentExpanded,
|
|
137
|
-
initialFocusedPath: getFirstFileTreePath(children),
|
|
138
123
|
selectedPath,
|
|
139
|
-
onSelect:
|
|
124
|
+
onSelect: React.useCallback((path) => {
|
|
125
|
+
onSelect?.(path);
|
|
126
|
+
}, [onSelect]),
|
|
140
127
|
onExpandedChange: handleExpandedChange
|
|
141
128
|
});
|
|
142
129
|
const treeRef = React.useRef(null);
|
|
143
130
|
React.useLayoutEffect(() => {
|
|
144
|
-
const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => !node.closest(".file-tree__group[data-collapsed]"));
|
|
131
|
+
const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => node.closest("[role=\"tree\"]") === treeRef.current && !node.closest(".file-tree__group[data-collapsed]"));
|
|
145
132
|
if (nodes.length === 0) return;
|
|
146
133
|
if (nodes.some((node) => node.dataset.workspacePath === ctx.focusedPath)) return;
|
|
147
134
|
const firstPath = nodes[0]?.dataset.workspacePath;
|
|
@@ -163,15 +150,14 @@ function FileTree({ appearance = "contained", className, "aria-label": ariaLabel
|
|
|
163
150
|
className: "file-tree__list sigvelo-stack-list",
|
|
164
151
|
role: "tree",
|
|
165
152
|
"aria-label": ariaLabel,
|
|
166
|
-
children
|
|
153
|
+
children: /* @__PURE__ */ jsx(FileTreeLevelContext.Provider, {
|
|
154
|
+
value: 0,
|
|
155
|
+
children
|
|
156
|
+
})
|
|
167
157
|
})
|
|
168
158
|
})
|
|
169
159
|
});
|
|
170
160
|
}
|
|
171
|
-
function renderNestedFileTreeChild(child, level) {
|
|
172
|
-
if (React.isValidElement(child) && (child.type === FileTreeFolder || child.type === FileTreeFile)) return React.cloneElement(child, { level: level + 1 });
|
|
173
|
-
return child;
|
|
174
|
-
}
|
|
175
161
|
function dataFlag(enabled) {
|
|
176
162
|
return enabled ? "" : void 0;
|
|
177
163
|
}
|
|
@@ -188,7 +174,8 @@ function FileTreeNodeRow({ actions, children }) {
|
|
|
188
174
|
children: [children, /* @__PURE__ */ jsx(FileTreeActions, { children: actions })]
|
|
189
175
|
});
|
|
190
176
|
}
|
|
191
|
-
function FileTreeFolder({ className, path, name, icon, actions,
|
|
177
|
+
function FileTreeFolder({ className, path, name, icon, actions, children, ref, ...props }) {
|
|
178
|
+
const level = React.useContext(FileTreeLevelContext);
|
|
192
179
|
const { expanded, focusedPath, selectedPath, onFocus, onSelect, handleKeyDown, onExpandedChange } = useFileTreeContext();
|
|
193
180
|
const isExpanded = expanded.has(path);
|
|
194
181
|
const isFocused = focusedPath === path;
|
|
@@ -244,11 +231,15 @@ function FileTreeFolder({ className, path, name, icon, actions, level = 0, child
|
|
|
244
231
|
"aria-hidden": !isExpanded,
|
|
245
232
|
"data-collapsed": dataFlag(!isExpanded),
|
|
246
233
|
inert: !isExpanded,
|
|
247
|
-
children:
|
|
234
|
+
children: /* @__PURE__ */ jsx(FileTreeLevelContext.Provider, {
|
|
235
|
+
value: level + 1,
|
|
236
|
+
children
|
|
237
|
+
})
|
|
248
238
|
})]
|
|
249
239
|
});
|
|
250
240
|
}
|
|
251
|
-
function FileTreeFile({ className, path, name, icon, actions, render,
|
|
241
|
+
function FileTreeFile({ className, path, name, icon, actions, render, ref, ...props }) {
|
|
242
|
+
const level = React.useContext(FileTreeLevelContext);
|
|
252
243
|
const { selectedPath, focusedPath, onFocus, onSelect, handleKeyDown } = useFileTreeContext();
|
|
253
244
|
const isSelected = selectedPath === path;
|
|
254
245
|
const isFocused = focusedPath === path;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ButtonSize, r as ButtonProps } from "./Button-
|
|
1
|
+
import { i as ButtonSize, r as ButtonProps } from "./Button-DjONW5UW.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/foundations/IconButton.d.ts
|
|
@@ -29,7 +29,7 @@ declare function IconButton({
|
|
|
29
29
|
ref,
|
|
30
30
|
...props
|
|
31
31
|
}: IconButtonProps & {
|
|
32
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
32
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLButtonElement>;
|
|
33
33
|
}): React.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { IconButtonProps as n, IconButton as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as IconButtonProps } from "./IconButton-
|
|
1
|
+
import { n as IconButtonProps } from "./IconButton-ByiyjkYE.js";
|
|
2
|
+
import { t as CopyButtonProps } from "./copy-button-OUwOdgEm.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { FileUIPart, UIMessage } from "ai";
|
|
4
5
|
import { StreamdownProps } from "streamdown";
|
|
@@ -40,7 +41,7 @@ declare function Message({
|
|
|
40
41
|
ref,
|
|
41
42
|
...props
|
|
42
43
|
}: MessageProps & {
|
|
43
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
44
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
44
45
|
}): React.JSX.Element;
|
|
45
46
|
interface MessageContentProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
46
47
|
/**
|
|
@@ -94,12 +95,16 @@ declare function MessageAttachment({
|
|
|
94
95
|
className,
|
|
95
96
|
...props
|
|
96
97
|
}: MessageAttachmentProps): React.JSX.Element;
|
|
97
|
-
interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
98
|
+
interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
99
|
+
/** Preserve the action row height while its controls are unavailable. */
|
|
100
|
+
reserveSpace?: boolean;
|
|
101
|
+
}
|
|
98
102
|
/**
|
|
99
103
|
* Horizontal list of action buttons (copy, retry, thumbs-up, etc.) shown
|
|
100
104
|
* alongside or beneath a message.
|
|
101
105
|
*/
|
|
102
106
|
declare function MessageActions({
|
|
107
|
+
reserveSpace,
|
|
103
108
|
className,
|
|
104
109
|
children,
|
|
105
110
|
ref,
|
|
@@ -127,6 +132,14 @@ declare function MessageAction({
|
|
|
127
132
|
}: MessageActionProps & {
|
|
128
133
|
ref?: React.Ref<HTMLButtonElement>;
|
|
129
134
|
}): React.JSX.Element;
|
|
135
|
+
interface MessageCopyActionProps extends CopyButtonProps {}
|
|
136
|
+
/** Copy a message with the shared clipboard feedback and message action treatment. */
|
|
137
|
+
declare function MessageCopyAction({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: MessageCopyActionProps & {
|
|
141
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
142
|
+
}): React.JSX.Element;
|
|
130
143
|
interface MessageToolbarProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
131
144
|
/**
|
|
132
145
|
* Horizontal container that places children in a row with space between —
|
|
@@ -244,4 +257,4 @@ declare function MessageBranchPage({
|
|
|
244
257
|
ref?: React.Ref<HTMLSpanElement>;
|
|
245
258
|
}): React.JSX.Element;
|
|
246
259
|
//#endregion
|
|
247
|
-
export {
|
|
260
|
+
export { MessageTimestamp as A, MessageCopyActionProps as C, MessageResponse as D, MessageProps as E, MessageToolbar as M, MessageToolbarProps as N, MessageResponseProps as O, MessageCopyAction as S, MessageMetaProps as T, MessageBranchProps as _, MessageActionsProps as a, MessageContent as b, MessageBranch as c, MessageBranchNext as d, MessageBranchNextProps as f, MessageBranchPreviousProps as g, MessageBranchPrevious as h, MessageActions as i, MessageTimestampProps as j, MessageRole as k, MessageBranchContent as l, MessageBranchPageProps as m, MessageAction as n, MessageAttachment as o, MessageBranchPage as p, MessageActionProps as r, MessageAttachmentProps as s, Message as t, MessageBranchContentProps as u, MessageBranchSelector as v, MessageMeta as w, MessageContentProps as x, MessageBranchSelectorProps as y };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { r as ButtonProps } from "./Button-DjONW5UW.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ai-sdk/MessageScrollerVirtual.d.ts
|
|
5
|
+
interface VirtualMessageScrollAnchor {
|
|
6
|
+
key: string | number;
|
|
7
|
+
offset: number;
|
|
8
|
+
followLatest: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface VirtualMessageScrollerProps<Item> extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
11
|
+
items: readonly Item[];
|
|
12
|
+
/**
|
|
13
|
+
* Stable per-item key. Must survive prepends and stream updates — the
|
|
14
|
+
* virtualizer tracks identity by key to keep scroll anchored. Message ids,
|
|
15
|
+
* never indexes (deliberately not passed here).
|
|
16
|
+
*/
|
|
17
|
+
getItemKey: (item: Item) => string | number;
|
|
18
|
+
renderItem: (item: Item, index: number) => React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Pre-measurement height estimate in px. Rows are measured once rendered;
|
|
21
|
+
* changing this later never re-estimates already-measured rows — only rows
|
|
22
|
+
* measured afterward see the new value.
|
|
23
|
+
*/
|
|
24
|
+
estimateSize?: number;
|
|
25
|
+
/** Rows rendered beyond the viewport on each side. */
|
|
26
|
+
overscan?: number;
|
|
27
|
+
/** Rendered inside the viewport when `items` is empty. */
|
|
28
|
+
emptyState?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Props for the inner content element. Defaults to `role="log"` with
|
|
31
|
+
* `aria-live="off"` — windowing re-inserts old rows as they scroll back
|
|
32
|
+
* into view, and a live region would announce them as new; override via
|
|
33
|
+
* these props only with that in mind.
|
|
34
|
+
*/
|
|
35
|
+
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
36
|
+
/** Accessible label for the scroll-to-latest button. */
|
|
37
|
+
scrollButtonLabel?: string;
|
|
38
|
+
scrollButtonProps?: Omit<ButtonProps, "onClick" | "aria-label" | "tabIndex">;
|
|
39
|
+
/** Thread-owned reading position retained while the transcript is unmounted. */
|
|
40
|
+
scrollAnchor?: React.RefObject<VirtualMessageScrollAnchor | undefined>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Windowed chat transcript for unbounded threads (hours-long agent runs):
|
|
44
|
+
* only the visible slice of rows exists in the DOM, end-anchored so streaming
|
|
45
|
+
* growth and appends keep the viewport pinned while reading history doesn't
|
|
46
|
+
* get yanked to the bottom (TanStack Virtual `anchorTo: 'end'`).
|
|
47
|
+
*
|
|
48
|
+
* Windowing means rows unmount when scrolled away, so browser find-in-page
|
|
49
|
+
* only searches the rendered window, and any disclosure state living inside a
|
|
50
|
+
* row is lost unless it is persisted — wrap the transcript in
|
|
51
|
+
* `ExpansionStateProvider` (AgentChat does) and give disclosures a `stateKey`.
|
|
52
|
+
* New turns pin to the bottom.
|
|
53
|
+
*
|
|
54
|
+
* Host-side contract (what the consuming app must do — the scroller cannot
|
|
55
|
+
* compensate for any of these):
|
|
56
|
+
* - Give every item a stable id for `getItemKey`; keys must not change when
|
|
57
|
+
* older history is prepended or the last message grows.
|
|
58
|
+
* - Keep unchanged items referentially stable across updates so memoized row
|
|
59
|
+
* content skips re-rendering. Rebuilding the array element-by-element —
|
|
60
|
+
* e.g. structured-clone over a worker/extension boundary per delta —
|
|
61
|
+
* defeats this; clone once per batch, not per row.
|
|
62
|
+
* - Throttle stream deltas before they reach React state (AI SDK
|
|
63
|
+
* `experimental_throttle: 50` or equivalent); the scroller re-windows per
|
|
64
|
+
* update.
|
|
65
|
+
* - Bound the data itself: windowing caps DOM size, not JS memory. Truncate
|
|
66
|
+
* stored tool output at the buffer (Codex caps at 20k chars) and keep
|
|
67
|
+
* compaction on so a six-hour run doesn't hold every byte it ever streamed.
|
|
68
|
+
*/
|
|
69
|
+
declare function VirtualMessageScroller<Item>({
|
|
70
|
+
items,
|
|
71
|
+
getItemKey,
|
|
72
|
+
renderItem,
|
|
73
|
+
estimateSize,
|
|
74
|
+
overscan,
|
|
75
|
+
emptyState,
|
|
76
|
+
contentProps,
|
|
77
|
+
scrollButtonLabel,
|
|
78
|
+
scrollButtonProps,
|
|
79
|
+
className,
|
|
80
|
+
scrollAnchor,
|
|
81
|
+
...props
|
|
82
|
+
}: VirtualMessageScrollerProps<Item>): React.JSX.Element;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { VirtualMessageScroller as n, VirtualMessageScrollerProps as r, VirtualMessageScrollAnchor as t };
|