@mcp-b/react-components 0.48.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-BSJl682D.js → CodeBlock-g8sADidM.js} +8 -8
- package/dist/{FileTree-DvE0hNZu.js → FileTree-H8mMg4rV.js} +21 -30
- 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-LIoU30n7.d.ts → Workspace-HzGrWDX3.d.ts} +1 -1
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-C_WnYm-a.js → WorkspaceFileView-DYPtRVpM.js} +5 -4
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-BqOezptB.js → WorkspaceMessageResponse-CUJk9_P5.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +527 -672
- 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 +2 -2
- 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 +22 -14
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +32 -31
- 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 +79 -40
- package/dist/components/agents-sdk/ManagerOffice.js +291 -281
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +4 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -4
- 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 +4 -3
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +2 -3
- 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 +19 -24
- 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 +5 -3
- 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 +18 -10
- 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 +24 -19
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +159 -102
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -290
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -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 +17 -15
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +14 -14
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +7 -7
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +7 -13
- 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 +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +10 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +10 -7
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceExecution.js +24 -38
- 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/WorkspaceHeader.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/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 +6 -9
- 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 +5 -14
- package/dist/components/agents-sdk/WorkspaceProject.js +21 -35
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +8 -5
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +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 +64 -43
- 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/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +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 +2 -3
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +9 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +28 -21
- 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/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +3 -3
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +12 -3
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +39 -5
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +175 -231
- 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 +20 -5
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +5 -5
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +5 -0
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- 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/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/Combobox.js +6 -1
- package/dist/components/foundations/ContextMenu.js +1 -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/Menubar.js +1 -1
- 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/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +7 -2
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +4 -3
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/TransitionSurface.d.ts +1 -1
- package/dist/components/foundations/icons.js +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 +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +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/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- 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 +120 -102
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +42 -72
- 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 +11 -6
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +49 -51
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +39 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +21 -42
- package/dist/{copy-button-Dk2vRe9j.js → copy-button-CSDuDfdP.js} +1 -1
- 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 +1 -1
- 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/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +5 -0
- package/dist/styles/index.css +4 -2
- 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-GqsCYxqT.js → workspace-assets-Bg7XhPsk.js} +2 -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-DeTU9YpW.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DiI6hhDP.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-DfjH1Ypm.d.ts +0 -61
- 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
- package/dist/{icons-CeGfXO21.js → icons-cuEtsgj9.js} +1 -1
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
1
|
+
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
+
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, p as ChevronRightIcon, u as CalendarIcon } from "../../icons-cuEtsgj9.js";
|
|
3
4
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
4
|
-
import { B as PlusIcon, C as FolderIcon, D as LinkIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, _ as DotIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, p as ChevronRightIcon, u as CalendarIcon } from "../../icons-CeGfXO21.js";
|
|
5
5
|
import { Button } from "../foundations/Button.js";
|
|
6
|
-
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
7
6
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
7
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { Avatar } from "../foundations/Avatar.js";
|
|
9
9
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
|
-
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
11
|
-
import { CorrespondentName, correspondentHandleLabel } from "../ai-sdk/Correspondent.js";
|
|
12
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
13
10
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
14
11
|
import "../foundations/icons.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
13
|
+
import { CorrespondentName, correspondentHandleLabel } from "../ai-sdk/Correspondent.js";
|
|
17
14
|
import { getThinkExecutionRunStatus } from "./ThinkExecutionRun.js";
|
|
18
15
|
import * as React from "react";
|
|
19
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
18
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
20
19
|
//#region src/components/_internal/chrome-profile-colors.ts
|
|
21
20
|
const PALETTE = [
|
|
22
21
|
{
|
|
@@ -89,6 +88,18 @@ function chromeProfileColor(seed, taken) {
|
|
|
89
88
|
}
|
|
90
89
|
//#endregion
|
|
91
90
|
//#region src/components/agents-sdk/ManagerOffice.tsx
|
|
91
|
+
const OfficeContext = React.createContext(null);
|
|
92
|
+
const EmployeeContext = React.createContext(null);
|
|
93
|
+
function useOffice() {
|
|
94
|
+
const value = React.useContext(OfficeContext);
|
|
95
|
+
if (!value) throw new Error("ManagerOffice parts require ManagerOffice.Root.");
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
function useEmployee() {
|
|
99
|
+
const value = React.useContext(EmployeeContext);
|
|
100
|
+
if (!value) throw new Error("Employee parts require ManagerOffice.Employee.");
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
92
103
|
const statusLabels = {
|
|
93
104
|
"needs-you": "Waiting on you",
|
|
94
105
|
working: "Working",
|
|
@@ -123,10 +134,6 @@ function employeeStatusText(employee) {
|
|
|
123
134
|
const label = statusLabels[employee.status];
|
|
124
135
|
return count ? `${label} · ${count} handoff${count === 1 ? "" : "s"}` : label;
|
|
125
136
|
}
|
|
126
|
-
/** One presence phrase on the office row. Counts stay in the accessible name. */
|
|
127
|
-
function employeePresenceCaption(employee) {
|
|
128
|
-
return statusLabels[employee.status];
|
|
129
|
-
}
|
|
130
137
|
function EmployeePresence({ employee }) {
|
|
131
138
|
return /* @__PURE__ */ jsx("span", {
|
|
132
139
|
className: "manager-office__nav-status",
|
|
@@ -562,7 +569,7 @@ function ManagerOfficeSidebar({ className, closeSidebarOnCompact, content, emplo
|
|
|
562
569
|
children: employee.name
|
|
563
570
|
}), /* @__PURE__ */ jsx("small", {
|
|
564
571
|
className: "sigvelo-truncate",
|
|
565
|
-
children:
|
|
572
|
+
children: statusLabels[employee.status]
|
|
566
573
|
})]
|
|
567
574
|
})]
|
|
568
575
|
})
|
|
@@ -654,7 +661,17 @@ function routineDetail(routine) {
|
|
|
654
661
|
return status === "completed" || status === "complete";
|
|
655
662
|
}).length} of ${finishedRuns.length} recent runs completed`;
|
|
656
663
|
}
|
|
657
|
-
|
|
664
|
+
/**
|
|
665
|
+
* Where a work link sits decides whether it draws its own surface: a row in a
|
|
666
|
+
* work list is a bounded row, while a lane heading sits inside the lane card,
|
|
667
|
+
* which already draws one.
|
|
668
|
+
*/
|
|
669
|
+
const workLinkClassNames = {
|
|
670
|
+
row: "manager-office__work-link",
|
|
671
|
+
lane: "manager-office__lane-title"
|
|
672
|
+
};
|
|
673
|
+
/** The link onto a work thread, shared by standalone rows and lane headings. */
|
|
674
|
+
function WorkLink({ employee, placement, renderLink, now, showEmployee, work }) {
|
|
658
675
|
return /* @__PURE__ */ jsxs(LinkButton, {
|
|
659
676
|
render: renderLink({
|
|
660
677
|
kind: "work",
|
|
@@ -664,7 +681,7 @@ function ReviewRow({ employee, renderLink, now, showEmployee, work }) {
|
|
|
664
681
|
variant: "ghost",
|
|
665
682
|
color: "neutral",
|
|
666
683
|
size: "sm",
|
|
667
|
-
className:
|
|
684
|
+
className: workLinkClassNames[placement],
|
|
668
685
|
"aria-label": `Open ${work.title} to ${threadStatusLabel(work.status).toLowerCase()}`,
|
|
669
686
|
children: [
|
|
670
687
|
/* @__PURE__ */ jsx(ThreadStatusIcon, { status: work.status }),
|
|
@@ -780,41 +797,13 @@ function WorkLane({ employee, now, renderLink, work }) {
|
|
|
780
797
|
/* @__PURE__ */ jsx("h3", {
|
|
781
798
|
id: titleId,
|
|
782
799
|
className: "manager-office__lane-heading",
|
|
783
|
-
children: /* @__PURE__ */
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
color: "neutral",
|
|
791
|
-
size: "sm",
|
|
792
|
-
className: "manager-office__lane-title",
|
|
793
|
-
"aria-label": `Open ${work.title} to ${threadStatusLabel(work.status).toLowerCase()}`,
|
|
794
|
-
children: [
|
|
795
|
-
/* @__PURE__ */ jsx(ThreadStatusIcon, { status: work.status }),
|
|
796
|
-
/* @__PURE__ */ jsxs("span", {
|
|
797
|
-
className: "manager-office__identity",
|
|
798
|
-
children: [/* @__PURE__ */ jsxs("strong", {
|
|
799
|
-
className: "sigvelo-truncate",
|
|
800
|
-
children: [work.title, work.status === "attention" ? /* @__PURE__ */ jsx("span", {
|
|
801
|
-
className: "manager-office__unread-dot",
|
|
802
|
-
"aria-hidden": "true"
|
|
803
|
-
}) : null]
|
|
804
|
-
}), /* @__PURE__ */ jsxs("small", {
|
|
805
|
-
className: "sigvelo-truncate",
|
|
806
|
-
children: [
|
|
807
|
-
threadStatusLabel(work.status),
|
|
808
|
-
" · ",
|
|
809
|
-
/* @__PURE__ */ jsx(Timestamp, {
|
|
810
|
-
timestamp: work.updatedAt,
|
|
811
|
-
now
|
|
812
|
-
})
|
|
813
|
-
]
|
|
814
|
-
})]
|
|
815
|
-
}),
|
|
816
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "manager-office__row-chevron" })
|
|
817
|
-
]
|
|
800
|
+
children: /* @__PURE__ */ jsx(WorkLink, {
|
|
801
|
+
employee,
|
|
802
|
+
now,
|
|
803
|
+
placement: "lane",
|
|
804
|
+
renderLink,
|
|
805
|
+
showEmployee: false,
|
|
806
|
+
work
|
|
818
807
|
})
|
|
819
808
|
}),
|
|
820
809
|
work.summary ? /* @__PURE__ */ jsx("p", {
|
|
@@ -835,7 +824,8 @@ function WorkLane({ employee, now, renderLink, work }) {
|
|
|
835
824
|
]
|
|
836
825
|
});
|
|
837
826
|
}
|
|
838
|
-
function
|
|
827
|
+
function ManagerOfficeAttention({ className, ...props }) {
|
|
828
|
+
const { employees, renderLink, now } = useOffice();
|
|
839
829
|
const waits = employees.flatMap((employee) => isConnected(employee) ? employee.handoffs.map((handoff) => ({
|
|
840
830
|
employee,
|
|
841
831
|
handoff
|
|
@@ -845,7 +835,8 @@ function AttentionView({ employees, renderLink, now }) {
|
|
|
845
835
|
work
|
|
846
836
|
})) : []);
|
|
847
837
|
if (!waits.length && !reviews.length) return /* @__PURE__ */ jsx("div", {
|
|
848
|
-
|
|
838
|
+
...props,
|
|
839
|
+
className: cx("manager-office__attention", className),
|
|
849
840
|
"data-recipe": "page",
|
|
850
841
|
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
851
842
|
icon: /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
@@ -855,7 +846,8 @@ function AttentionView({ employees, renderLink, now }) {
|
|
|
855
846
|
});
|
|
856
847
|
const both = waits.length > 0 && reviews.length > 0;
|
|
857
848
|
return /* @__PURE__ */ jsxs("div", {
|
|
858
|
-
|
|
849
|
+
...props,
|
|
850
|
+
className: cx("manager-office__attention", className),
|
|
859
851
|
"data-recipe": "page",
|
|
860
852
|
children: [waits.length ? /* @__PURE__ */ jsxs("div", {
|
|
861
853
|
className: "manager-office__attention-group",
|
|
@@ -881,9 +873,10 @@ function AttentionView({ employees, renderLink, now }) {
|
|
|
881
873
|
}), /* @__PURE__ */ jsx("ul", {
|
|
882
874
|
className: "manager-office__work-list sigvelo-stack-list",
|
|
883
875
|
"aria-label": "Ready for you",
|
|
884
|
-
children: reviews.map(({ employee, work }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
876
|
+
children: reviews.map(({ employee, work }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkLink, {
|
|
885
877
|
employee,
|
|
886
878
|
work,
|
|
879
|
+
placement: "row",
|
|
887
880
|
renderLink,
|
|
888
881
|
now,
|
|
889
882
|
showEmployee: true
|
|
@@ -892,8 +885,212 @@ function AttentionView({ employees, renderLink, now }) {
|
|
|
892
885
|
}) : null]
|
|
893
886
|
});
|
|
894
887
|
}
|
|
895
|
-
|
|
896
|
-
|
|
888
|
+
const employeeDefaults = {
|
|
889
|
+
className: "manager-office__employee-detail",
|
|
890
|
+
"data-recipe": "page"
|
|
891
|
+
};
|
|
892
|
+
/** Scope the selected employee without imposing dossier content or column order. */
|
|
893
|
+
function ManagerOfficeEmployeeRoot({ employee, render, ref, ...props }) {
|
|
894
|
+
const element = useRender({
|
|
895
|
+
defaultTagName: "div",
|
|
896
|
+
render,
|
|
897
|
+
ref,
|
|
898
|
+
props: mergeProps(employeeDefaults, props)
|
|
899
|
+
});
|
|
900
|
+
return /* @__PURE__ */ jsx(EmployeeContext.Provider, {
|
|
901
|
+
value: employee,
|
|
902
|
+
children: element
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
function ManagerOfficeEmployeeHeader({ className, ...props }) {
|
|
906
|
+
const employee = useEmployee();
|
|
907
|
+
const { profileColors } = useOffice();
|
|
908
|
+
const profileColor = profileColors.get(employee.id) ?? chromeProfileColor(employee.id);
|
|
909
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
910
|
+
...props,
|
|
911
|
+
className: cx("manager-office__employee-header", className),
|
|
912
|
+
children: [/* @__PURE__ */ jsx(EmployeeAvatar, {
|
|
913
|
+
employee,
|
|
914
|
+
color: profileColor,
|
|
915
|
+
size: "lg"
|
|
916
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
917
|
+
className: "manager-office__briefing",
|
|
918
|
+
children: [
|
|
919
|
+
/* @__PURE__ */ jsx("strong", {
|
|
920
|
+
className: "sigvelo-truncate",
|
|
921
|
+
children: employee.name
|
|
922
|
+
}),
|
|
923
|
+
/* @__PURE__ */ jsx("small", {
|
|
924
|
+
className: "sigvelo-truncate",
|
|
925
|
+
children: employee.email
|
|
926
|
+
}),
|
|
927
|
+
/* @__PURE__ */ jsx("p", {
|
|
928
|
+
className: "manager-office__role",
|
|
929
|
+
children: employee.role
|
|
930
|
+
})
|
|
931
|
+
]
|
|
932
|
+
})]
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
function ManagerOfficeHandoffs({ className, ...props }) {
|
|
936
|
+
const employee = useEmployee();
|
|
937
|
+
const { renderLink, now } = useOffice();
|
|
938
|
+
return employee.handoffs.length ? /* @__PURE__ */ jsx("section", {
|
|
939
|
+
...props,
|
|
940
|
+
className: cx("manager-office__employee-handoffs", className),
|
|
941
|
+
"aria-label": "Waiting on you",
|
|
942
|
+
children: employee.handoffs.map((handoff) => /* @__PURE__ */ jsx(HandoffCard, {
|
|
943
|
+
employee,
|
|
944
|
+
handoff,
|
|
945
|
+
renderLink,
|
|
946
|
+
now,
|
|
947
|
+
showEmployee: false
|
|
948
|
+
}, handoff.id))
|
|
949
|
+
}) : null;
|
|
950
|
+
}
|
|
951
|
+
function ManagerOfficeWorkSection({ className, ...props }) {
|
|
952
|
+
const employee = useEmployee();
|
|
953
|
+
const { renderLink, now } = useOffice();
|
|
954
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
955
|
+
...props,
|
|
956
|
+
className: cx("manager-office__section", className),
|
|
957
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
958
|
+
className: "manager-office__section-header",
|
|
959
|
+
children: /* @__PURE__ */ jsxs("h2", {
|
|
960
|
+
className: "manager-office__section-title",
|
|
961
|
+
children: [/* @__PURE__ */ jsx(MessageSquareIcon, {}), "Work"]
|
|
962
|
+
})
|
|
963
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
964
|
+
className: "manager-office__section-content",
|
|
965
|
+
children: employee.work.length ? /* @__PURE__ */ jsx("ul", {
|
|
966
|
+
className: "manager-office__work-list sigvelo-stack-list",
|
|
967
|
+
children: employee.work.map((work) => /* @__PURE__ */ jsx("li", { children: workingSetOf(work).length ? /* @__PURE__ */ jsx(WorkLane, {
|
|
968
|
+
employee,
|
|
969
|
+
now,
|
|
970
|
+
renderLink,
|
|
971
|
+
work
|
|
972
|
+
}) : /* @__PURE__ */ jsx(WorkLink, {
|
|
973
|
+
employee,
|
|
974
|
+
now,
|
|
975
|
+
placement: "row",
|
|
976
|
+
renderLink,
|
|
977
|
+
showEmployee: false,
|
|
978
|
+
work
|
|
979
|
+
}) }, work.id))
|
|
980
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
981
|
+
className: "manager-office__section-empty",
|
|
982
|
+
children: "No work yet."
|
|
983
|
+
})
|
|
984
|
+
})]
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
function ManagerOfficeRoutines({ className, ...props }) {
|
|
988
|
+
const employee = useEmployee();
|
|
989
|
+
const { renderLink } = useOffice();
|
|
990
|
+
return /* @__PURE__ */ jsx("section", {
|
|
991
|
+
...props,
|
|
992
|
+
className: cx("manager-office__section", className),
|
|
993
|
+
"aria-label": "Routines",
|
|
994
|
+
children: /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
995
|
+
defaultOpen: true,
|
|
996
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
997
|
+
render: /* @__PURE__ */ jsx(Collapsible.Trigger, { unstyled: true }),
|
|
998
|
+
type: "button",
|
|
999
|
+
variant: "ghost",
|
|
1000
|
+
color: "neutral",
|
|
1001
|
+
size: "sm",
|
|
1002
|
+
className: "manager-office__routine-trigger",
|
|
1003
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
1004
|
+
className: "manager-office__identity",
|
|
1005
|
+
children: [/* @__PURE__ */ jsx(CalendarIcon, {}), /* @__PURE__ */ jsx("strong", { children: "Routines" })]
|
|
1006
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, { className: "sigvelo-disclosure-chevron" })]
|
|
1007
|
+
}), /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
1008
|
+
unstyled: true,
|
|
1009
|
+
children: employee.routines.length ? /* @__PURE__ */ jsx("ul", {
|
|
1010
|
+
className: "manager-office__routine-list sigvelo-stack-list",
|
|
1011
|
+
children: employee.routines.map((routine) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(LinkButton, {
|
|
1012
|
+
render: renderLink({
|
|
1013
|
+
kind: "routine",
|
|
1014
|
+
employee,
|
|
1015
|
+
routine
|
|
1016
|
+
}),
|
|
1017
|
+
variant: "ghost",
|
|
1018
|
+
color: "neutral",
|
|
1019
|
+
size: "sm",
|
|
1020
|
+
className: "manager-office__routine-link",
|
|
1021
|
+
children: [
|
|
1022
|
+
routine.enabled ? /* @__PURE__ */ jsx(CalendarIcon, {}) : /* @__PURE__ */ jsx(PauseIcon, {}),
|
|
1023
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1024
|
+
className: "manager-office__identity",
|
|
1025
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
1026
|
+
className: "sigvelo-truncate",
|
|
1027
|
+
children: routine.name
|
|
1028
|
+
}), /* @__PURE__ */ jsx("small", {
|
|
1029
|
+
className: "sigvelo-truncate",
|
|
1030
|
+
children: routineDetail(routine)
|
|
1031
|
+
})]
|
|
1032
|
+
}),
|
|
1033
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "manager-office__row-chevron" })
|
|
1034
|
+
]
|
|
1035
|
+
}) }, routine.id))
|
|
1036
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
1037
|
+
className: "manager-office__section-empty",
|
|
1038
|
+
children: "No routines yet."
|
|
1039
|
+
})
|
|
1040
|
+
})]
|
|
1041
|
+
})
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
function ManagerOfficeChannels({ className, ...props }) {
|
|
1045
|
+
const employee = useEmployee();
|
|
1046
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1047
|
+
...props,
|
|
1048
|
+
className: cx("manager-office__section", className),
|
|
1049
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
1050
|
+
className: "manager-office__section-header",
|
|
1051
|
+
children: /* @__PURE__ */ jsxs("h2", {
|
|
1052
|
+
className: "manager-office__section-title",
|
|
1053
|
+
children: [/* @__PURE__ */ jsx(LinkIcon, {}), "Channels"]
|
|
1054
|
+
})
|
|
1055
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1056
|
+
className: "manager-office__section-content",
|
|
1057
|
+
children: employee.channels.length ? /* @__PURE__ */ jsx("ul", {
|
|
1058
|
+
className: "manager-office__channel-list sigvelo-stack-list",
|
|
1059
|
+
children: employee.channels.map((channel) => /* @__PURE__ */ jsx(ChannelRow, { channel }, channel.id))
|
|
1060
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
1061
|
+
className: "manager-office__section-empty",
|
|
1062
|
+
children: "Nothing connected yet."
|
|
1063
|
+
})
|
|
1064
|
+
})]
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
function ManagerOfficeMain({ render, ref, ...props }) {
|
|
1068
|
+
return useRender({
|
|
1069
|
+
defaultTagName: "main",
|
|
1070
|
+
render,
|
|
1071
|
+
ref,
|
|
1072
|
+
props: mergeProps({ className: "manager-office__main" }, props)
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
function ManagerOfficeColumns({ render, ref, ...props }) {
|
|
1076
|
+
return useRender({
|
|
1077
|
+
defaultTagName: "div",
|
|
1078
|
+
render,
|
|
1079
|
+
ref,
|
|
1080
|
+
props: mergeProps({ className: "manager-office__employee-columns" }, props)
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
function ManagerOfficeAside({ render, ref, ...props }) {
|
|
1084
|
+
return useRender({
|
|
1085
|
+
defaultTagName: "aside",
|
|
1086
|
+
render,
|
|
1087
|
+
ref,
|
|
1088
|
+
props: mergeProps({ className: "manager-office__employee-aside" }, props)
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
/** Honest disconnected state; the host chooses when and where to display it. */
|
|
1092
|
+
function ManagerOfficeConnectionState({ employee }) {
|
|
1093
|
+
return /* @__PURE__ */ jsx("div", {
|
|
897
1094
|
"data-recipe": "page",
|
|
898
1095
|
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
899
1096
|
icon: employee.status === "connecting" ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(MonitorIcon, {}),
|
|
@@ -901,237 +1098,50 @@ function EmployeeDetail({ employee, renderLink, now, profileColor }) {
|
|
|
901
1098
|
description: employee.statusDescription
|
|
902
1099
|
})
|
|
903
1100
|
});
|
|
904
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
905
|
-
className: "manager-office__employee-detail",
|
|
906
|
-
"data-recipe": "page",
|
|
907
|
-
children: [
|
|
908
|
-
/* @__PURE__ */ jsxs("header", {
|
|
909
|
-
className: "manager-office__employee-header",
|
|
910
|
-
children: [/* @__PURE__ */ jsx(EmployeeAvatar, {
|
|
911
|
-
employee,
|
|
912
|
-
color: profileColor,
|
|
913
|
-
size: "lg"
|
|
914
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
915
|
-
className: "manager-office__briefing",
|
|
916
|
-
children: [
|
|
917
|
-
/* @__PURE__ */ jsx("strong", {
|
|
918
|
-
className: "sigvelo-truncate",
|
|
919
|
-
children: employee.name
|
|
920
|
-
}),
|
|
921
|
-
/* @__PURE__ */ jsx("small", {
|
|
922
|
-
className: "sigvelo-truncate",
|
|
923
|
-
children: employee.email
|
|
924
|
-
}),
|
|
925
|
-
/* @__PURE__ */ jsx("p", {
|
|
926
|
-
className: "manager-office__role",
|
|
927
|
-
children: employee.role
|
|
928
|
-
})
|
|
929
|
-
]
|
|
930
|
-
})]
|
|
931
|
-
}),
|
|
932
|
-
employee.handoffs.length ? /* @__PURE__ */ jsx("section", {
|
|
933
|
-
className: "manager-office__employee-handoffs",
|
|
934
|
-
"aria-label": "Waiting on you",
|
|
935
|
-
children: employee.handoffs.map((handoff) => /* @__PURE__ */ jsx(HandoffCard, {
|
|
936
|
-
employee,
|
|
937
|
-
handoff,
|
|
938
|
-
renderLink,
|
|
939
|
-
now,
|
|
940
|
-
showEmployee: false
|
|
941
|
-
}, handoff.id))
|
|
942
|
-
}) : null,
|
|
943
|
-
/* @__PURE__ */ jsxs("div", {
|
|
944
|
-
className: "manager-office__employee-columns",
|
|
945
|
-
children: [/* @__PURE__ */ jsxs("section", {
|
|
946
|
-
className: "manager-office__section",
|
|
947
|
-
children: [/* @__PURE__ */ jsx("header", {
|
|
948
|
-
className: "manager-office__section-header",
|
|
949
|
-
children: /* @__PURE__ */ jsxs("h2", {
|
|
950
|
-
className: "manager-office__section-title",
|
|
951
|
-
children: [/* @__PURE__ */ jsx(MessageSquareIcon, {}), "Work"]
|
|
952
|
-
})
|
|
953
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
954
|
-
className: "manager-office__section-content",
|
|
955
|
-
children: employee.work.length ? /* @__PURE__ */ jsx("ul", {
|
|
956
|
-
className: "manager-office__work-list sigvelo-stack-list",
|
|
957
|
-
children: employee.work.map((work) => /* @__PURE__ */ jsx("li", { children: workingSetOf(work).length ? /* @__PURE__ */ jsx(WorkLane, {
|
|
958
|
-
employee,
|
|
959
|
-
now,
|
|
960
|
-
renderLink,
|
|
961
|
-
work
|
|
962
|
-
}) : /* @__PURE__ */ jsx(ReviewRow, {
|
|
963
|
-
employee,
|
|
964
|
-
now,
|
|
965
|
-
renderLink,
|
|
966
|
-
showEmployee: false,
|
|
967
|
-
work
|
|
968
|
-
}) }, work.id))
|
|
969
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
970
|
-
className: "manager-office__section-empty",
|
|
971
|
-
children: "No work yet."
|
|
972
|
-
})
|
|
973
|
-
})]
|
|
974
|
-
}), /* @__PURE__ */ jsxs("aside", {
|
|
975
|
-
className: "manager-office__employee-aside",
|
|
976
|
-
children: [/* @__PURE__ */ jsx("section", {
|
|
977
|
-
className: "manager-office__section",
|
|
978
|
-
"aria-label": "Routines",
|
|
979
|
-
children: /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
980
|
-
defaultOpen: true,
|
|
981
|
-
children: [/* @__PURE__ */ jsxs(Button, {
|
|
982
|
-
render: /* @__PURE__ */ jsx(Collapsible.Trigger, { unstyled: true }),
|
|
983
|
-
type: "button",
|
|
984
|
-
variant: "ghost",
|
|
985
|
-
color: "neutral",
|
|
986
|
-
size: "sm",
|
|
987
|
-
className: "manager-office__routine-trigger",
|
|
988
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
989
|
-
className: "manager-office__identity",
|
|
990
|
-
children: [/* @__PURE__ */ jsx(CalendarIcon, {}), /* @__PURE__ */ jsx("strong", { children: "Routines" })]
|
|
991
|
-
}), /* @__PURE__ */ jsx(ChevronDownIcon, { className: "sigvelo-disclosure-chevron" })]
|
|
992
|
-
}), /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
993
|
-
unstyled: true,
|
|
994
|
-
children: employee.routines.length ? /* @__PURE__ */ jsx("ul", {
|
|
995
|
-
className: "manager-office__routine-list sigvelo-stack-list",
|
|
996
|
-
children: employee.routines.map((routine) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(LinkButton, {
|
|
997
|
-
render: renderLink({
|
|
998
|
-
kind: "routine",
|
|
999
|
-
employee,
|
|
1000
|
-
routine
|
|
1001
|
-
}),
|
|
1002
|
-
variant: "ghost",
|
|
1003
|
-
color: "neutral",
|
|
1004
|
-
size: "sm",
|
|
1005
|
-
className: "manager-office__routine-link",
|
|
1006
|
-
children: [
|
|
1007
|
-
routine.enabled ? /* @__PURE__ */ jsx(CalendarIcon, {}) : /* @__PURE__ */ jsx(PauseIcon, {}),
|
|
1008
|
-
/* @__PURE__ */ jsxs("span", {
|
|
1009
|
-
className: "manager-office__identity",
|
|
1010
|
-
children: [/* @__PURE__ */ jsx("strong", {
|
|
1011
|
-
className: "sigvelo-truncate",
|
|
1012
|
-
children: routine.name
|
|
1013
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
1014
|
-
className: "sigvelo-truncate",
|
|
1015
|
-
children: routineDetail(routine)
|
|
1016
|
-
})]
|
|
1017
|
-
}),
|
|
1018
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "manager-office__row-chevron" })
|
|
1019
|
-
]
|
|
1020
|
-
}) }, routine.id))
|
|
1021
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
1022
|
-
className: "manager-office__section-empty",
|
|
1023
|
-
children: "No routines yet."
|
|
1024
|
-
})
|
|
1025
|
-
})]
|
|
1026
|
-
})
|
|
1027
|
-
}), /* @__PURE__ */ jsxs("section", {
|
|
1028
|
-
className: "manager-office__section",
|
|
1029
|
-
children: [/* @__PURE__ */ jsx("header", {
|
|
1030
|
-
className: "manager-office__section-header",
|
|
1031
|
-
children: /* @__PURE__ */ jsxs("h2", {
|
|
1032
|
-
className: "manager-office__section-title",
|
|
1033
|
-
children: [/* @__PURE__ */ jsx(LinkIcon, {}), "Channels"]
|
|
1034
|
-
})
|
|
1035
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1036
|
-
className: "manager-office__section-content",
|
|
1037
|
-
children: employee.channels.length ? /* @__PURE__ */ jsx("ul", {
|
|
1038
|
-
className: "manager-office__channel-list sigvelo-stack-list",
|
|
1039
|
-
children: employee.channels.map((channel) => /* @__PURE__ */ jsx(ChannelRow, { channel }, channel.id))
|
|
1040
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
1041
|
-
className: "manager-office__section-empty",
|
|
1042
|
-
children: "Nothing connected yet."
|
|
1043
|
-
})
|
|
1044
|
-
})]
|
|
1045
|
-
})]
|
|
1046
|
-
})]
|
|
1047
|
-
})
|
|
1048
|
-
]
|
|
1049
|
-
});
|
|
1050
1101
|
}
|
|
1051
|
-
/**
|
|
1052
|
-
|
|
1053
|
-
* employee roster, and one employee dossier of work lanes. The consuming app
|
|
1054
|
-
* owns authentication, Agent connections, routing, and the selected
|
|
1055
|
-
* employee's full work surface.
|
|
1056
|
-
*/
|
|
1057
|
-
function ManagerOffice({ className, emptyOfficeAction, employees, renderLink, officeActions, renderEmployeeActions, sidebarTogglePlacement = "sidebar", style, view, ...props }) {
|
|
1058
|
-
const titleId = React.useId();
|
|
1102
|
+
/** Office data and relative-time boundary; hosts compose their shell and routed content. */
|
|
1103
|
+
function ManagerOfficeRoot({ employees, renderLink, render, ref, ...props }) {
|
|
1059
1104
|
const [now, setNow] = React.useState(Date.now);
|
|
1060
1105
|
React.useEffect(() => {
|
|
1061
1106
|
const interval = window.setInterval(() => setNow(Date.now()), 6e4);
|
|
1062
1107
|
return () => window.clearInterval(interval);
|
|
1063
1108
|
}, []);
|
|
1064
|
-
const
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
})
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
}),
|
|
1087
|
-
title,
|
|
1088
|
-
actions: selectedEmployee && isConnected(selectedEmployee) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1089
|
-
/* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
1090
|
-
label: `Start new work with ${selectedEmployee.name}`,
|
|
1091
|
-
tooltip: "New work",
|
|
1092
|
-
render: renderLink({
|
|
1093
|
-
kind: "new-work",
|
|
1094
|
-
employee: selectedEmployee
|
|
1095
|
-
}),
|
|
1096
|
-
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
1097
|
-
}),
|
|
1098
|
-
/* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
1099
|
-
label: `Open ${selectedEmployee.name} workspace`,
|
|
1100
|
-
tooltip: "Workspace",
|
|
1101
|
-
render: renderLink({
|
|
1102
|
-
kind: "workspace",
|
|
1103
|
-
employee: selectedEmployee
|
|
1104
|
-
}),
|
|
1105
|
-
children: /* @__PURE__ */ jsx(FolderIcon, {})
|
|
1106
|
-
}),
|
|
1107
|
-
renderEmployeeActions?.(selectedEmployee)
|
|
1108
|
-
] }) : void 0
|
|
1109
|
-
},
|
|
1110
|
-
...props,
|
|
1111
|
-
children: /* @__PURE__ */ jsx("main", {
|
|
1112
|
-
className: "manager-office__main",
|
|
1113
|
-
"aria-label": mainLabel,
|
|
1114
|
-
children: !employees.length ? /* @__PURE__ */ jsx(EmptyState, {
|
|
1115
|
-
icon: /* @__PURE__ */ jsx(PlusIcon, {}),
|
|
1116
|
-
title: "Add your first employee",
|
|
1117
|
-
description: "Connect another profile to manage it here.",
|
|
1118
|
-
children: emptyOfficeAction
|
|
1119
|
-
}) : view.kind === "attention" ? /* @__PURE__ */ jsx(AttentionView, {
|
|
1120
|
-
employees,
|
|
1121
|
-
renderLink,
|
|
1122
|
-
now
|
|
1123
|
-
}) : selectedEmployee ? /* @__PURE__ */ jsx(EmployeeDetail, {
|
|
1124
|
-
employee: selectedEmployee,
|
|
1125
|
-
renderLink,
|
|
1126
|
-
now,
|
|
1127
|
-
profileColor: profileColors.get(selectedEmployee.id)
|
|
1128
|
-
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
1129
|
-
icon: /* @__PURE__ */ jsx(WarningIcon, {}),
|
|
1130
|
-
title: "Employee unavailable",
|
|
1131
|
-
description: "Choose another employee from the roster."
|
|
1132
|
-
})
|
|
1133
|
-
})
|
|
1134
|
-
}) });
|
|
1109
|
+
const profileColors = React.useMemo(() => rosterProfileColors(employees), [employees]);
|
|
1110
|
+
const value = React.useMemo(() => ({
|
|
1111
|
+
employees,
|
|
1112
|
+
renderLink,
|
|
1113
|
+
now,
|
|
1114
|
+
profileColors
|
|
1115
|
+
}), [
|
|
1116
|
+
employees,
|
|
1117
|
+
renderLink,
|
|
1118
|
+
now,
|
|
1119
|
+
profileColors
|
|
1120
|
+
]);
|
|
1121
|
+
const element = useRender({
|
|
1122
|
+
defaultTagName: "div",
|
|
1123
|
+
render,
|
|
1124
|
+
ref,
|
|
1125
|
+
props: mergeProps({ className: "manager-office" }, props)
|
|
1126
|
+
});
|
|
1127
|
+
return /* @__PURE__ */ jsx(OfficeContext.Provider, {
|
|
1128
|
+
value,
|
|
1129
|
+
children: /* @__PURE__ */ jsx(Tooltip.Provider, { children: element })
|
|
1130
|
+
});
|
|
1135
1131
|
}
|
|
1132
|
+
const ManagerOffice = {
|
|
1133
|
+
Root: ManagerOfficeRoot,
|
|
1134
|
+
Main: ManagerOfficeMain,
|
|
1135
|
+
Attention: ManagerOfficeAttention,
|
|
1136
|
+
Employee: ManagerOfficeEmployeeRoot,
|
|
1137
|
+
EmployeeHeader: ManagerOfficeEmployeeHeader,
|
|
1138
|
+
Handoffs: ManagerOfficeHandoffs,
|
|
1139
|
+
Columns: ManagerOfficeColumns,
|
|
1140
|
+
Aside: ManagerOfficeAside,
|
|
1141
|
+
Work: ManagerOfficeWorkSection,
|
|
1142
|
+
Routines: ManagerOfficeRoutines,
|
|
1143
|
+
Channels: ManagerOfficeChannels,
|
|
1144
|
+
ConnectionState: ManagerOfficeConnectionState
|
|
1145
|
+
};
|
|
1136
1146
|
//#endregion
|
|
1137
1147
|
export { ManagerOffice, ManagerOfficeSidebar, ManagerOfficeSidebarAlert };
|