@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
|
@@ -5,6 +5,7 @@ import { Field } from "../foundations/Field.js";
|
|
|
5
5
|
import { Textarea } from "../foundations/Textarea.js";
|
|
6
6
|
import { Input } from "../foundations/Input.js";
|
|
7
7
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
|
+
import { CorrespondentName, emailDestinationCorrespondent, slackDestinationCorrespondent } from "./Correspondent.js";
|
|
8
9
|
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
9
10
|
import * as React from "react";
|
|
10
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,15 +15,26 @@ const STATE_ICON = {
|
|
|
14
15
|
sent: CheckIcon,
|
|
15
16
|
denied: XIcon
|
|
16
17
|
};
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
function fieldItem(name, term, value, display) {
|
|
19
|
+
return display === void 0 ? {
|
|
20
|
+
name,
|
|
21
|
+
term,
|
|
22
|
+
value
|
|
23
|
+
} : {
|
|
24
|
+
name,
|
|
25
|
+
term,
|
|
26
|
+
value,
|
|
27
|
+
display
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function createDraftUpdater(draft, onChange) {
|
|
31
|
+
let current = draft;
|
|
20
32
|
return (patch) => {
|
|
21
33
|
const next = {
|
|
22
|
-
...current
|
|
34
|
+
...current,
|
|
23
35
|
...patch
|
|
24
36
|
};
|
|
25
|
-
current
|
|
37
|
+
current = next;
|
|
26
38
|
onChange?.(next);
|
|
27
39
|
};
|
|
28
40
|
}
|
|
@@ -86,32 +98,38 @@ function ConnectedAppCardFrame({ children, className, headerActions, icon, kind,
|
|
|
86
98
|
const saveBlocked = saveState !== void 0;
|
|
87
99
|
const saveErrorMessage = saveState?.status === "error" ? saveState.message : "";
|
|
88
100
|
return /* @__PURE__ */ jsxs(Card, {
|
|
101
|
+
render: /* @__PURE__ */ jsx("article", {}),
|
|
89
102
|
...props,
|
|
90
103
|
ref,
|
|
91
|
-
role: props.role ?? "article",
|
|
92
104
|
"aria-labelledby": ariaLabelledBy,
|
|
93
105
|
"data-slot": slot,
|
|
94
106
|
"data-state": state,
|
|
95
107
|
size: "sm",
|
|
96
108
|
className: cx("connected-app-card", className),
|
|
97
109
|
children: [
|
|
98
|
-
/* @__PURE__ */ jsxs(CardHeader, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
/* @__PURE__ */ jsxs(CardHeader, {
|
|
111
|
+
render: /* @__PURE__ */ jsx("header", {}),
|
|
112
|
+
children: [/* @__PURE__ */ jsxs(CardTitle, {
|
|
113
|
+
id: titleId,
|
|
114
|
+
className: "connected-app-card__title",
|
|
115
|
+
render: (props) => /* @__PURE__ */ jsx("h3", {
|
|
116
|
+
...props,
|
|
117
|
+
children: props.children
|
|
118
|
+
}),
|
|
119
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
120
|
+
className: "connected-app-card__icon",
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
children: icon
|
|
123
|
+
}), kind]
|
|
124
|
+
}), /* @__PURE__ */ jsxs(CardAction, {
|
|
125
|
+
className: "sigvelo-cluster",
|
|
126
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
127
|
+
className: "connected-app-card__status",
|
|
128
|
+
"data-state": state,
|
|
129
|
+
children: [/* @__PURE__ */ jsx(StateIcon, { size: 14 }), state === "pending" && !hasDecision ? "Sending" : stateLabels[state]]
|
|
130
|
+
}), headerActions]
|
|
131
|
+
})]
|
|
132
|
+
}),
|
|
115
133
|
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
116
134
|
children,
|
|
117
135
|
hasDecision && decision.reject ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Tell the agent what to do differently" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
@@ -148,6 +166,7 @@ function ConnectedAppCardFrame({ children, className, headerActions, icon, kind,
|
|
|
148
166
|
})
|
|
149
167
|
] }),
|
|
150
168
|
hasDecision ? /* @__PURE__ */ jsxs(CardFooter, {
|
|
169
|
+
render: /* @__PURE__ */ jsx("footer", {}),
|
|
151
170
|
className: "connected-app-card__footer",
|
|
152
171
|
children: [
|
|
153
172
|
decision.send ? /* @__PURE__ */ jsx(Button, {
|
|
@@ -184,14 +203,16 @@ function ConnectedAppCardFrame({ children, className, headerActions, icon, kind,
|
|
|
184
203
|
* Email draft or result. Pending cards can be edited and released; send,
|
|
185
204
|
* discard, and reject-with-reason stay application-owned.
|
|
186
205
|
*/
|
|
187
|
-
function EmailMessageCard({ body, from, icon, onChange, onDiscard, onReject, onSend, state = "pending", subject, to, ref, ...props }) {
|
|
206
|
+
function EmailMessageCard({ body, correspondent, from, icon, onChange, onDiscard, onReject, onSend, state = "pending", subject, to, ref, ...props }) {
|
|
188
207
|
const editing = state === "pending" && onChange != null;
|
|
189
|
-
const
|
|
208
|
+
const draft = {
|
|
190
209
|
from,
|
|
191
210
|
to,
|
|
192
211
|
subject,
|
|
193
212
|
body
|
|
194
|
-
}
|
|
213
|
+
};
|
|
214
|
+
const toCorrespondent = !editing && to ? correspondent ?? emailDestinationCorrespondent(to) : void 0;
|
|
215
|
+
const updateDraft = createDraftUpdater(draft, onChange);
|
|
195
216
|
return /* @__PURE__ */ jsx(ConnectedAppCardFrame, {
|
|
196
217
|
...props,
|
|
197
218
|
ref,
|
|
@@ -211,39 +232,15 @@ function EmailMessageCard({ body, from, icon, onChange, onDiscard, onReject, onS
|
|
|
211
232
|
children: /* @__PURE__ */ jsx(FieldList, {
|
|
212
233
|
editing,
|
|
213
234
|
onFieldChange: (name, value) => updateDraft({ [name]: value }),
|
|
214
|
-
items:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
value: from ?? ""
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: "to",
|
|
222
|
-
term: "To",
|
|
223
|
-
value: to ?? ""
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: "subject",
|
|
227
|
-
term: "Subject",
|
|
228
|
-
value: subject
|
|
229
|
-
}
|
|
235
|
+
items: editing ? [
|
|
236
|
+
fieldItem("from", "From", from ?? ""),
|
|
237
|
+
fieldItem("to", "To", to ?? ""),
|
|
238
|
+
fieldItem("subject", "Subject", subject)
|
|
230
239
|
] : [
|
|
231
|
-
from ?
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
} : null,
|
|
236
|
-
to ? {
|
|
237
|
-
name: "to",
|
|
238
|
-
term: "To",
|
|
239
|
-
value: to
|
|
240
|
-
} : null,
|
|
241
|
-
{
|
|
242
|
-
name: "subject",
|
|
243
|
-
term: "Subject",
|
|
244
|
-
value: subject
|
|
245
|
-
}
|
|
246
|
-
]).filter((item) => item != null),
|
|
240
|
+
...from ? [fieldItem("from", "From", from)] : [],
|
|
241
|
+
...to ? [fieldItem("to", "To", to, toCorrespondent ? /* @__PURE__ */ jsx(CorrespondentName, { correspondent: toCorrespondent }) : void 0)] : [],
|
|
242
|
+
fieldItem("subject", "Subject", subject)
|
|
243
|
+
],
|
|
247
244
|
children: editing ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Message" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
248
245
|
render: /* @__PURE__ */ jsx(Textarea, {
|
|
249
246
|
name: "body",
|
|
@@ -261,14 +258,16 @@ function EmailMessageCard({ body, from, icon, onChange, onDiscard, onReject, onS
|
|
|
261
258
|
});
|
|
262
259
|
}
|
|
263
260
|
/** Slack draft or posted message with workspace, destination, and thread fields. */
|
|
264
|
-
function SlackMessageCard({ icon, message, onChange, onDiscard, onReject, onSend, state = "pending", thread, to, workspace, ref, ...props }) {
|
|
261
|
+
function SlackMessageCard({ correspondent, icon, message, onChange, onDiscard, onReject, onSend, state = "pending", thread, to, workspace, ref, ...props }) {
|
|
265
262
|
const editing = state === "pending" && onChange != null;
|
|
266
|
-
const
|
|
263
|
+
const draft = {
|
|
267
264
|
workspace,
|
|
268
265
|
to,
|
|
269
266
|
thread,
|
|
270
267
|
message
|
|
271
|
-
}
|
|
268
|
+
};
|
|
269
|
+
const toCorrespondent = !editing ? correspondent ?? slackDestinationCorrespondent(to) : void 0;
|
|
270
|
+
const updateDraft = createDraftUpdater(draft, onChange);
|
|
272
271
|
return /* @__PURE__ */ jsx(ConnectedAppCardFrame, {
|
|
273
272
|
...props,
|
|
274
273
|
ref,
|
|
@@ -288,39 +287,15 @@ function SlackMessageCard({ icon, message, onChange, onDiscard, onReject, onSend
|
|
|
288
287
|
children: /* @__PURE__ */ jsx(FieldList, {
|
|
289
288
|
editing,
|
|
290
289
|
onFieldChange: (name, value) => updateDraft({ [name]: value }),
|
|
291
|
-
items:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
value: workspace ?? ""
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: "to",
|
|
299
|
-
term: "To",
|
|
300
|
-
value: to
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: "thread",
|
|
304
|
-
term: "Thread",
|
|
305
|
-
value: thread ?? ""
|
|
306
|
-
}
|
|
290
|
+
items: editing ? [
|
|
291
|
+
fieldItem("workspace", "Workspace", workspace ?? ""),
|
|
292
|
+
fieldItem("to", "To", to),
|
|
293
|
+
fieldItem("thread", "Thread", thread ?? "")
|
|
307
294
|
] : [
|
|
308
|
-
workspace ?
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
} : null,
|
|
313
|
-
{
|
|
314
|
-
name: "to",
|
|
315
|
-
term: "To",
|
|
316
|
-
value: to
|
|
317
|
-
},
|
|
318
|
-
thread ? {
|
|
319
|
-
name: "thread",
|
|
320
|
-
term: "Thread",
|
|
321
|
-
value: thread
|
|
322
|
-
} : null
|
|
323
|
-
]).filter((item) => item != null),
|
|
295
|
+
...workspace ? [fieldItem("workspace", "Workspace", workspace)] : [],
|
|
296
|
+
fieldItem("to", "To", to, toCorrespondent ? /* @__PURE__ */ jsx(CorrespondentName, { correspondent: toCorrespondent }) : void 0),
|
|
297
|
+
...thread ? [fieldItem("thread", "Thread", thread)] : []
|
|
298
|
+
],
|
|
324
299
|
children: editing ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Message" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
325
300
|
render: /* @__PURE__ */ jsx(Textarea, {
|
|
326
301
|
name: "message",
|
|
@@ -343,7 +318,7 @@ function SlackMessageCard({ icon, message, onChange, onDiscard, onReject, onSend
|
|
|
343
318
|
*/
|
|
344
319
|
function CalendarEventCard({ attendees, eventTitle, icon, location, onChange, onDiscard, onReject, onSend, state = "pending", when, whenDateTime, ref, ...props }) {
|
|
345
320
|
const editing = state === "pending" && onChange != null;
|
|
346
|
-
const updateDraft =
|
|
321
|
+
const updateDraft = createDraftUpdater({
|
|
347
322
|
eventTitle,
|
|
348
323
|
when,
|
|
349
324
|
whenDateTime,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PopoverPositionerProps, PopoverProps } from "../foundations/Popover.js";
|
|
1
|
+
import { PopoverPositionerProps, PopoverProps, PopoverTriggerProps } from "../foundations/Popover.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { LanguageModelUsage, UIMessage } from "ai";
|
|
4
4
|
|
|
@@ -14,8 +14,11 @@ interface ContextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
modelId?: string;
|
|
15
15
|
/** Optional total cost in USD. */
|
|
16
16
|
totalCostUsd?: number;
|
|
17
|
+
/** Controlled visibility of the usage-details popover. */
|
|
17
18
|
open?: PopoverProps["open"];
|
|
19
|
+
/** Initial visibility when the popover is uncontrolled. */
|
|
18
20
|
defaultOpen?: PopoverProps["defaultOpen"];
|
|
21
|
+
/** Receives visibility changes from the usage-details popover. */
|
|
19
22
|
onOpenChange?: PopoverProps["onOpenChange"];
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
@@ -57,9 +60,10 @@ declare function Context({
|
|
|
57
60
|
ref,
|
|
58
61
|
...props
|
|
59
62
|
}: ContextProps & {
|
|
60
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
63
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
61
64
|
}): React.JSX.Element;
|
|
62
|
-
interface ContextTriggerProps extends
|
|
65
|
+
interface ContextTriggerProps extends PopoverTriggerProps {}
|
|
66
|
+
/** Context ring trigger; use `render` to compose a custom control and `children` for its content. */
|
|
63
67
|
declare function ContextTrigger({
|
|
64
68
|
className,
|
|
65
69
|
children,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Popover } from "../foundations/Popover.js";
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
2
|
import { Separator } from "../foundations/Separator.js";
|
|
3
|
+
import { Popover } from "../foundations/Popover.js";
|
|
4
4
|
import { t as ProgressRing } from "../../progress-ring-Cgii90dC.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -65,27 +65,17 @@ function Context({ className, usedTokens, maxTokens, usage, modelId, totalCostUs
|
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
+
/** Context ring trigger; use `render` to compose a custom control and `children` for its content. */
|
|
68
69
|
function ContextTrigger({ className, children, ...props }) {
|
|
69
70
|
const { usedTokens, maxTokens } = useContextContext();
|
|
70
71
|
const percent = maxTokens > 0 ? usedTokens / maxTokens * 100 : 0;
|
|
71
|
-
|
|
72
|
-
unstyled: true,
|
|
73
|
-
className: cx("context__trigger", className),
|
|
74
|
-
...props,
|
|
75
|
-
render: children
|
|
76
|
-
});
|
|
77
|
-
if (children) return /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
78
|
-
unstyled: true,
|
|
79
|
-
className: cx("context__trigger", className),
|
|
80
|
-
...props,
|
|
81
|
-
children
|
|
82
|
-
});
|
|
72
|
+
const hasContent = children != null && typeof children !== "boolean" && children !== "";
|
|
83
73
|
return /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
84
74
|
unstyled: true,
|
|
85
|
-
className:
|
|
86
|
-
"aria-label": `Context usage: ${percent.toFixed(0)}%`,
|
|
75
|
+
className: mergeBaseClassName("context__trigger", className),
|
|
76
|
+
"aria-label": hasContent ? void 0 : `Context usage: ${percent.toFixed(0)}%`,
|
|
87
77
|
...props,
|
|
88
|
-
children: /* @__PURE__ */ jsx(ProgressRing, {
|
|
78
|
+
children: hasContent ? children : /* @__PURE__ */ jsx(ProgressRing, {
|
|
89
79
|
percent,
|
|
90
80
|
size: 16,
|
|
91
81
|
stroke: 2.5
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as IconButtonProps } from "../../IconButton-
|
|
1
|
+
import { n as IconButtonProps } from "../../IconButton-ByiyjkYE.js";
|
|
2
2
|
import { MessageScrollerButtonProps, MessageScrollerItemProps } from "./MessageScroller.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { UIMessage } from "ai";
|
|
@@ -55,7 +55,7 @@ declare function Conversation({
|
|
|
55
55
|
ref,
|
|
56
56
|
...props
|
|
57
57
|
}: ConversationProps & {
|
|
58
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
}): React.JSX.Element;
|
|
60
60
|
interface ConversationContentProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
61
61
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as CorrespondentNameProps, c as emailDestinationCorrespondent, i as CorrespondentName, l as linkedinTabCorrespondent, n as CorrespondentHandle, o as correspondentHandleLabel, r as CorrespondentLatest, s as correspondentInitials, t as Correspondent, u as slackDestinationCorrespondent } from "../../Correspondent-7K6uNLUm.js";
|
|
2
|
+
export { Correspondent, CorrespondentHandle, CorrespondentLatest, CorrespondentName, CorrespondentNameProps, correspondentHandleLabel, correspondentInitials, emailDestinationCorrespondent, linkedinTabCorrespondent, slackDestinationCorrespondent };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
3
|
+
import { Avatar } from "../foundations/Avatar.js";
|
|
4
|
+
import { Popover } from "../foundations/Popover.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/ai-sdk/Correspondent.tsx
|
|
8
|
+
const SLACK_USER_ID = /^U[A-Z0-9]+$/iu;
|
|
9
|
+
const EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
10
|
+
function slackDestinationCorrespondent(to) {
|
|
11
|
+
const userId = to.trim();
|
|
12
|
+
if (!SLACK_USER_ID.test(userId)) return void 0;
|
|
13
|
+
return { handle: {
|
|
14
|
+
kind: "slack",
|
|
15
|
+
userId
|
|
16
|
+
} };
|
|
17
|
+
}
|
|
18
|
+
function emailDestinationCorrespondent(to) {
|
|
19
|
+
const address = to.trim();
|
|
20
|
+
if (!address || address.includes(",")) return void 0;
|
|
21
|
+
if (!EMAIL_ADDRESS.test(address)) return void 0;
|
|
22
|
+
return { handle: {
|
|
23
|
+
kind: "email",
|
|
24
|
+
address
|
|
25
|
+
} };
|
|
26
|
+
}
|
|
27
|
+
function linkedinTabCorrespondent(url) {
|
|
28
|
+
const href = safeHttpUrl(url);
|
|
29
|
+
if (!href) return void 0;
|
|
30
|
+
let parsed;
|
|
31
|
+
try {
|
|
32
|
+
parsed = new URL(href);
|
|
33
|
+
} catch {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!/(^|\.)linkedin\.com$/iu.test(parsed.hostname)) return void 0;
|
|
37
|
+
if (!parsed.pathname.includes("/in/")) return void 0;
|
|
38
|
+
return { handle: {
|
|
39
|
+
kind: "linkedin",
|
|
40
|
+
url: href
|
|
41
|
+
} };
|
|
42
|
+
}
|
|
43
|
+
function correspondentHandleLabel(handle) {
|
|
44
|
+
if (handle.kind === "email") return handle.address;
|
|
45
|
+
if (handle.kind === "slack") return handle.userName ? `@${handle.userName}` : handle.userId;
|
|
46
|
+
if (handle.kind === "linkedin") return handle.url;
|
|
47
|
+
return handle.resourceName;
|
|
48
|
+
}
|
|
49
|
+
function correspondentInitials(label) {
|
|
50
|
+
const parts = (label.split("@", 1)[0] ?? label).split(/[\s._-]+/u).filter(Boolean);
|
|
51
|
+
if (parts.length >= 2) {
|
|
52
|
+
const first = parts[0]?.[0];
|
|
53
|
+
const second = parts[1]?.[0];
|
|
54
|
+
if (first && second) return `${first}${second}`.toUpperCase();
|
|
55
|
+
}
|
|
56
|
+
return (parts[0] ?? label).slice(0, 2).toUpperCase() || "?";
|
|
57
|
+
}
|
|
58
|
+
function safeHttpUrl(url) {
|
|
59
|
+
try {
|
|
60
|
+
const parsed = new URL(url);
|
|
61
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return void 0;
|
|
62
|
+
return parsed.href;
|
|
63
|
+
} catch {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function correspondentHref(handle) {
|
|
68
|
+
return handle.kind === "linkedin" ? safeHttpUrl(handle.url) : void 0;
|
|
69
|
+
}
|
|
70
|
+
function latestLabel(latest) {
|
|
71
|
+
if (latest.kind === "linkedin-tab") return latest.title ?? latest.url;
|
|
72
|
+
return latest.label;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Avatar + name for a person-shaped destination. LinkedIn handles open the
|
|
76
|
+
* profile; other handles disclose handle and latest thread without inventing
|
|
77
|
+
* a directory.
|
|
78
|
+
*/
|
|
79
|
+
function CorrespondentName({ correspondent, className }) {
|
|
80
|
+
const handleLabel = correspondentHandleLabel(correspondent.handle);
|
|
81
|
+
const label = correspondent.displayName?.trim() || handleLabel;
|
|
82
|
+
const href = correspondentHref(correspondent.handle);
|
|
83
|
+
const initials = correspondentInitials(label);
|
|
84
|
+
const trigger = /* @__PURE__ */ jsxs("span", {
|
|
85
|
+
className: cx("correspondent", className),
|
|
86
|
+
"data-slot": "correspondent",
|
|
87
|
+
children: [/* @__PURE__ */ jsxs(Avatar.Root, {
|
|
88
|
+
size: "sm",
|
|
89
|
+
children: [correspondent.avatarUrl ? /* @__PURE__ */ jsx(Avatar.Image, {
|
|
90
|
+
src: correspondent.avatarUrl,
|
|
91
|
+
alt: ""
|
|
92
|
+
}) : null, /* @__PURE__ */ jsx(Avatar.Fallback, { children: initials })]
|
|
93
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: "correspondent__name sigvelo-truncate",
|
|
95
|
+
children: label
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
const details = /* @__PURE__ */ jsxs("div", {
|
|
99
|
+
className: "correspondent__details",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx("strong", {
|
|
102
|
+
className: "correspondent__title sigvelo-truncate",
|
|
103
|
+
children: label
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ jsx("span", {
|
|
106
|
+
className: "correspondent__handle",
|
|
107
|
+
children: handleLabel
|
|
108
|
+
}),
|
|
109
|
+
correspondent.latest ? /* @__PURE__ */ jsx("span", {
|
|
110
|
+
className: "correspondent__latest",
|
|
111
|
+
children: latestLabel(correspondent.latest)
|
|
112
|
+
}) : null
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
if (href) return /* @__PURE__ */ jsxs(PreviewCard.Root, { children: [/* @__PURE__ */ jsx(PreviewCard.Trigger, {
|
|
116
|
+
delay: 0,
|
|
117
|
+
closeDelay: 0,
|
|
118
|
+
href,
|
|
119
|
+
target: "_blank",
|
|
120
|
+
rel: "noreferrer",
|
|
121
|
+
className: "correspondent__trigger",
|
|
122
|
+
"aria-label": `${label} (${handleLabel}, opens in a new tab)`,
|
|
123
|
+
children: trigger
|
|
124
|
+
}), /* @__PURE__ */ jsx(PreviewCard.Portal, { children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
125
|
+
sideOffset: 8,
|
|
126
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
|
|
127
|
+
className: "correspondent__popup",
|
|
128
|
+
children: details
|
|
129
|
+
})
|
|
130
|
+
}) })] });
|
|
131
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
132
|
+
unstyled: true,
|
|
133
|
+
className: "correspondent__trigger",
|
|
134
|
+
"aria-label": `${label} (${handleLabel})`,
|
|
135
|
+
children: trigger
|
|
136
|
+
}), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
137
|
+
sideOffset: 8,
|
|
138
|
+
children: /* @__PURE__ */ jsx(Popover.Popup, {
|
|
139
|
+
className: "correspondent__popup",
|
|
140
|
+
children: details
|
|
141
|
+
})
|
|
142
|
+
}) })] });
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
export { CorrespondentName, correspondentHandleLabel, correspondentInitials, emailDestinationCorrespondent, linkedinTabCorrespondent, slackDestinationCorrespondent };
|
|
@@ -15,8 +15,8 @@ interface GoalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
/**
|
|
16
16
|
* Presentation-only banner for a persisted conversation goal — an objective
|
|
17
17
|
* the agent keeps pursuing across turns until it completes, pauses, or
|
|
18
|
-
* blocks on the user.
|
|
19
|
-
*
|
|
18
|
+
* blocks on the user. Compose it in `PromptInputHeader` or an explicit tray
|
|
19
|
+
* alongside `AgentChat.Queue`. The row is capped: the
|
|
20
20
|
* objective truncates to one line, so pass full objective and progress text
|
|
21
21
|
* via `title` (or a popover) rather than rendering it inline.
|
|
22
22
|
*
|
|
@@ -30,7 +30,7 @@ declare function Goal({
|
|
|
30
30
|
ref,
|
|
31
31
|
...props
|
|
32
32
|
}: GoalProps & {
|
|
33
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
34
34
|
}): React.JSX.Element;
|
|
35
35
|
interface GoalIconProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
36
36
|
declare function GoalIcon({
|
|
@@ -16,8 +16,8 @@ const STATUS_LABELS = {
|
|
|
16
16
|
/**
|
|
17
17
|
* Presentation-only banner for a persisted conversation goal — an objective
|
|
18
18
|
* the agent keeps pursuing across turns until it completes, pauses, or
|
|
19
|
-
* blocks on the user.
|
|
20
|
-
*
|
|
19
|
+
* blocks on the user. Compose it in `PromptInputHeader` or an explicit tray
|
|
20
|
+
* alongside `AgentChat.Queue`. The row is capped: the
|
|
21
21
|
* objective truncates to one line, so pass full objective and progress text
|
|
22
22
|
* via `title` (or a popover) rather than rendering it inline.
|
|
23
23
|
*
|
|
@@ -22,7 +22,7 @@ declare function InlineCitation({
|
|
|
22
22
|
ref,
|
|
23
23
|
...props
|
|
24
24
|
}: InlineCitationProps & {
|
|
25
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
25
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLSpanElement>;
|
|
26
26
|
}): React.JSX.Element;
|
|
27
27
|
interface InlineCitationTextProps extends React.ComponentPropsWithoutRef<"span"> {}
|
|
28
28
|
/** Claim text whose citation is placed by the consuming app. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Popover } from "../foundations/Popover.js";
|
|
3
2
|
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
3
|
+
import { Popover } from "../foundations/Popover.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/InlineCitation.tsx
|
|
@@ -23,7 +23,7 @@ declare function MediaPreviewCard({
|
|
|
23
23
|
ref,
|
|
24
24
|
...props
|
|
25
25
|
}: MediaPreviewCardProps & {
|
|
26
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
26
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
27
27
|
}): React.JSX.Element;
|
|
28
28
|
type FixedVideoProps = "autoPlay" | "controls" | "loop" | "muted" | "playsInline" | "preload";
|
|
29
29
|
interface MediaPreviewCardVideoProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, FixedVideoProps> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { Message, MessageAction, MessageActionProps, MessageActions, MessageActionsProps, MessageAttachment, MessageAttachmentProps, MessageBranch, MessageBranchContent, MessageBranchContentProps, MessageBranchNext, MessageBranchNextProps, MessageBranchPage, MessageBranchPageProps, MessageBranchPrevious, MessageBranchPreviousProps, MessageBranchProps, MessageBranchSelector, MessageBranchSelectorProps, MessageContent, MessageContentProps, MessageMeta, MessageMetaProps, MessageProps, MessageResponse, MessageResponseProps, MessageRole, MessageTimestamp, MessageTimestampProps, MessageToolbar, MessageToolbarProps };
|
|
1
|
+
import { A as MessageTimestamp, C as MessageCopyActionProps, D as MessageResponse, E as MessageProps, M as MessageToolbar, N as MessageToolbarProps, O as MessageResponseProps, S as MessageCopyAction, T as MessageMetaProps, _ as MessageBranchProps, a as MessageActionsProps, b as MessageContent, c as MessageBranch, d as MessageBranchNext, f as MessageBranchNextProps, g as MessageBranchPreviousProps, h as MessageBranchPrevious, i as MessageActions, j as MessageTimestampProps, k as MessageRole, l as MessageBranchContent, m as MessageBranchPageProps, n as MessageAction, o as MessageAttachment, p as MessageBranchPage, r as MessageActionProps, s as MessageAttachmentProps, t as Message, u as MessageBranchContentProps, v as MessageBranchSelector, w as MessageMeta, x as MessageContentProps, y as MessageBranchSelectorProps } from "../../Message-DyaTBiV7.js";
|
|
2
|
+
export { Message, MessageAction, MessageActionProps, MessageActions, MessageActionsProps, MessageAttachment, MessageAttachmentProps, MessageBranch, MessageBranchContent, MessageBranchContentProps, MessageBranchNext, MessageBranchNextProps, MessageBranchPage, MessageBranchPageProps, MessageBranchPrevious, MessageBranchPreviousProps, MessageBranchProps, MessageBranchSelector, MessageBranchSelectorProps, MessageContent, MessageContentProps, MessageCopyAction, MessageCopyActionProps, MessageMeta, MessageMetaProps, MessageProps, MessageResponse, MessageResponseProps, MessageRole, MessageTimestamp, MessageTimestampProps, MessageToolbar, MessageToolbarProps };
|
|
@@ -3,6 +3,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
3
3
|
import { S as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-cuEtsgj9.js";
|
|
4
4
|
import { Button } from "../foundations/Button.js";
|
|
5
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
|
+
import { t as CopyButton } from "../../copy-button-CSDuDfdP.js";
|
|
6
7
|
import { t as AttachmentPreview } from "../../attachment-preview-1CXJvrmb.js";
|
|
7
8
|
import { n as clamp } from "../../format-COCyV98Z.js";
|
|
8
9
|
import { ComposerLink } from "./ComposerLink.js";
|
|
@@ -144,10 +145,11 @@ function MessageAttachment({ part, className, ...props }) {
|
|
|
144
145
|
* Horizontal list of action buttons (copy, retry, thumbs-up, etc.) shown
|
|
145
146
|
* alongside or beneath a message.
|
|
146
147
|
*/
|
|
147
|
-
function MessageActions({ className, children, ref, ...props }) {
|
|
148
|
+
function MessageActions({ reserveSpace = false, className, children, ref, ...props }) {
|
|
148
149
|
return /* @__PURE__ */ jsx("div", {
|
|
149
150
|
ref,
|
|
150
151
|
className: cx("message__actions", className),
|
|
152
|
+
"data-reserve-space": reserveSpace || void 0,
|
|
151
153
|
role: "group",
|
|
152
154
|
...props,
|
|
153
155
|
children
|
|
@@ -171,6 +173,13 @@ function MessageAction({ className, label, tooltip, variant = "ghost", color = "
|
|
|
171
173
|
children
|
|
172
174
|
});
|
|
173
175
|
}
|
|
176
|
+
/** Copy a message with the shared clipboard feedback and message action treatment. */
|
|
177
|
+
function MessageCopyAction({ className, ...props }) {
|
|
178
|
+
return /* @__PURE__ */ jsx(CopyButton, {
|
|
179
|
+
className: cx("message__action", className),
|
|
180
|
+
...props
|
|
181
|
+
});
|
|
182
|
+
}
|
|
174
183
|
/**
|
|
175
184
|
* Horizontal container that places children in a row with space between —
|
|
176
185
|
* typically a {@link MessageBranchSelector} on one side and
|
|
@@ -308,4 +317,4 @@ function MessageBranchPage({ className, format, ref, ...props }) {
|
|
|
308
317
|
});
|
|
309
318
|
}
|
|
310
319
|
//#endregion
|
|
311
|
-
export { Message, MessageAction, MessageActions, MessageAttachment, MessageBranch, MessageBranchContent, MessageBranchNext, MessageBranchPage, MessageBranchPrevious, MessageBranchSelector, MessageContent, MessageMeta, MessageResponse, MessageTimestamp, MessageToolbar };
|
|
320
|
+
export { Message, MessageAction, MessageActions, MessageAttachment, MessageBranch, MessageBranchContent, MessageBranchNext, MessageBranchPage, MessageBranchPrevious, MessageBranchSelector, MessageContent, MessageCopyAction, MessageMeta, MessageResponse, MessageTimestamp, MessageToolbar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../../Button-
|
|
1
|
+
import { r as ButtonProps } from "../../Button-DjONW5UW.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
4
4
|
|