@mcp-b/react-components 0.49.0 → 0.50.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 → AgentChatQueue-MrHhV901.d.ts} +1 -1
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +46 -0
- package/dist/AppTopBar-CVkLRdk7.d.ts +99 -0
- package/dist/{CodeBlock-g8sADidM.js → CodeBlock-BMK6CW9D.js} +1 -1
- package/dist/Dialog-88GF7_Th.d.ts +107 -0
- package/dist/{FileTree-H8mMg4rV.js → FileTree-okaLnS5j.js} +20 -9
- package/dist/Form-CM7GNTwR.d.ts +91 -0
- package/dist/ManagerOffice-5pEFpoV3.js +1146 -0
- package/dist/McpConnectorForm--HB0MEGC.d.ts +39 -0
- package/dist/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- package/dist/Popover-CgHG5DtS.d.ts +220 -0
- package/dist/{PromptInput-C4Mofitz.d.ts → PromptInput-DGPrCTPl.d.ts} +3 -2
- package/dist/ResponsiveSidebarShell-CAmmtQTR.d.ts +128 -0
- package/dist/SessionCompaction-CmTJFpzj.d.ts +89 -0
- package/dist/SetupChecklist-O6qmgwz4.js +77 -0
- package/dist/ThinkChatActivity-DENkintt.d.ts +77 -0
- package/dist/ThinkChatContext-COIgzkYp.d.ts +28 -0
- package/dist/ThinkRoutine-Cb1DdaHa.d.ts +30 -0
- package/dist/ThinkThreadPicker-yetGX_s5.d.ts +91 -0
- package/dist/{WorkspaceFileView-DYPtRVpM.js → WorkspaceFileView-ncZuIWhC.js} +2 -2
- package/dist/WorkspaceMessageResponse-8lOSAbw_.d.ts +48 -0
- package/dist/codex-model-catalog-BBN_gWcc.d.ts +155 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +8 -8
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/DiscordConnectionDialog.d.ts +20 -0
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +65 -0
- package/dist/components/agents-sdk/EmployeeApp.d.ts +49 -0
- package/dist/components/agents-sdk/EmployeeApp.js +57 -0
- package/dist/components/agents-sdk/EmployeeChat.d.ts +63 -0
- package/dist/components/agents-sdk/EmployeeChat.js +84 -0
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +10 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +26 -16
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +24 -0
- package/dist/components/agents-sdk/EmployeeSchedules.js +105 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +43 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.js +133 -0
- package/dist/components/agents-sdk/ManagerAccountActions.d.ts +29 -0
- package/dist/components/agents-sdk/ManagerAccountActions.js +62 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1145
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +49 -0
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +198 -0
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +3 -3
- package/dist/components/agents-sdk/McpPluginCatalog.js +4 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -4
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.d.ts +31 -0
- package/dist/components/agents-sdk/ModelEndpointDialog.js +118 -0
- package/dist/components/agents-sdk/ModelSelector.d.ts +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- 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 +1 -1
- package/dist/components/agents-sdk/SessionCompaction.d.ts +1 -88
- package/dist/components/agents-sdk/SlackConnectionDialog.d.ts +18 -0
- package/dist/components/agents-sdk/SlackConnectionDialog.js +48 -0
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +6 -6
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -76
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +1 -27
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -29
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkRoutineActions.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +6 -6
- package/dist/components/agents-sdk/WorkspaceExecution.js +7 -7
- package/dist/components/agents-sdk/WorkspaceExplorer.js +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/WorkspaceMessageResponse.d.ts +1 -47
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
- package/dist/components/agents-sdk/WorkspaceUserScript.js +4 -4
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +5 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +1 -45
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.js +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.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +3 -3
- package/dist/components/ai-sdk/Context.d.ts +1 -1
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +2 -1
- 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 +1 -1
- package/dist/components/ai-sdk/PromptInput.js +7 -7
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +2 -2
- package/dist/components/extension/CodexModelSelector.js +3 -3
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +3 -2
- package/dist/components/foundations/Dialog.d.ts +1 -106
- package/dist/components/foundations/Form.d.ts +1 -90
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.d.ts +1 -219
- package/dist/components/foundations/PreviewCard.d.ts +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Tooltip.d.ts +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/AccountSignInDialog.d.ts +26 -0
- package/dist/components/general-purpose/AccountSignInDialog.js +25 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -98
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/NotificationPrompt.d.ts +13 -0
- package/dist/components/general-purpose/NotificationPrompt.js +18 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -127
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +124 -72
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +2 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -76
- package/dist/components/general-purpose/StatusScreen.d.ts +10 -0
- package/dist/components/general-purpose/StatusScreen.js +13 -0
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +4 -4
- package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
- package/dist/mcp-server-catalog-D9p4gGeJ.d.ts +1112 -0
- package/dist/styles/accessibility.css +20 -0
- package/dist/styles/agent-chat.css +1 -1
- package/dist/styles/base.css +0 -8
- package/dist/styles/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/employee-app.css +29 -0
- package/dist/styles/file-tree.css +5 -1
- package/dist/styles/index.css +2 -0
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/manager-work.css +93 -0
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- package/dist/utils/codex-model-catalog.d.ts +1 -135
- package/dist/utils/codex-model-catalog.js +22 -5
- package/dist/utils/mcp-server-catalog.d.ts +1 -1111
- package/dist/{workspace-assets-Bg7XhPsk.js → workspace-assets-wW_lQLYK.js} +2 -2
- package/package.json +3 -3
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -1,1147 +1,3 @@
|
|
|
1
|
-
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
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";
|
|
4
|
-
import { Collapsible } from "../foundations/Collapsible.js";
|
|
5
|
-
import { Button } from "../foundations/Button.js";
|
|
6
|
-
import { Tooltip } from "../foundations/Tooltip.js";
|
|
7
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
|
-
import { Avatar } from "../foundations/Avatar.js";
|
|
9
|
-
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
|
-
import { LinkButton } from "../foundations/LinkButton.js";
|
|
11
1
|
import "../foundations/icons.js";
|
|
12
|
-
import {
|
|
13
|
-
import { CorrespondentName, correspondentHandleLabel } from "../ai-sdk/Correspondent.js";
|
|
14
|
-
import { getThinkExecutionRunStatus } from "./ThinkExecutionRun.js";
|
|
15
|
-
import * as React from "react";
|
|
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";
|
|
19
|
-
//#region src/components/_internal/chrome-profile-colors.ts
|
|
20
|
-
const PALETTE = [
|
|
21
|
-
{
|
|
22
|
-
bg: "#ffab40",
|
|
23
|
-
fg: "#1f1f1f"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
bg: "#43a047",
|
|
27
|
-
fg: "#ffffff"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
bg: "#199da9",
|
|
31
|
-
fg: "#ffffff"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
bg: "#5d93e4",
|
|
35
|
-
fg: "#ffffff"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
bg: "#ffaebd",
|
|
39
|
-
fg: "#1f1f1f"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
bg: "#bd165c",
|
|
43
|
-
fg: "#ffffff"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
bg: "#b71c1c",
|
|
47
|
-
fg: "#ffffff"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
bg: "#2e7d32",
|
|
51
|
-
fg: "#ffffff"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
bg: "#006e78",
|
|
55
|
-
fg: "#ffffff"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
bg: "#1565c0",
|
|
59
|
-
fg: "#ffffff"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
bg: "#5b3689",
|
|
63
|
-
fg: "#ffffff"
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
/** FNV-1a, for a stable pick from the same seat across reloads. */
|
|
67
|
-
function hash(seed) {
|
|
68
|
-
let value = 2166136261;
|
|
69
|
-
for (let index = 0; index < seed.length; index++) {
|
|
70
|
-
value ^= seed.charCodeAt(index);
|
|
71
|
-
value = Math.imul(value, 16777619);
|
|
72
|
-
}
|
|
73
|
-
return value >>> 0;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Deterministic Chrome-style profile color for one identity. Pass the set of
|
|
77
|
-
* `bg` values already assigned to the rest of the roster so two profiles only
|
|
78
|
-
* share a color once the palette is exhausted, exactly as Chrome avoids
|
|
79
|
-
* colors in use by other profiles.
|
|
80
|
-
*/
|
|
81
|
-
function chromeProfileColor(seed, taken) {
|
|
82
|
-
const start = hash(seed) % PALETTE.length;
|
|
83
|
-
for (let offset = 0; offset < PALETTE.length; offset++) {
|
|
84
|
-
const candidate = PALETTE[(start + offset) % PALETTE.length];
|
|
85
|
-
if (!taken?.has(candidate.bg)) return candidate;
|
|
86
|
-
}
|
|
87
|
-
return PALETTE[start];
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
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
|
-
}
|
|
103
|
-
const statusLabels = {
|
|
104
|
-
"needs-you": "Waiting on you",
|
|
105
|
-
working: "Working",
|
|
106
|
-
idle: "Idle",
|
|
107
|
-
issue: "Waiting on you",
|
|
108
|
-
offline: "Offline",
|
|
109
|
-
connecting: "Connecting…",
|
|
110
|
-
unavailable: "Unavailable"
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Named positively, so a status added to the union later is disconnected until
|
|
114
|
-
* someone says otherwise. The negative form — "not offline, connecting, or
|
|
115
|
-
* unavailable" — silently admits every new status, and the first thing this
|
|
116
|
-
* component does with a connected employee is read `handoffs`, which a
|
|
117
|
-
* disconnected one does not carry.
|
|
118
|
-
*/
|
|
119
|
-
const CONNECTED_STATUSES = {
|
|
120
|
-
"needs-you": true,
|
|
121
|
-
working: true,
|
|
122
|
-
idle: true,
|
|
123
|
-
issue: true
|
|
124
|
-
};
|
|
125
|
-
function isConnected(employee) {
|
|
126
|
-
return employee.status in CONNECTED_STATUSES;
|
|
127
|
-
}
|
|
128
|
-
function employeeAttentionCount(employee) {
|
|
129
|
-
return isConnected(employee) ? employee.handoffs.length : 0;
|
|
130
|
-
}
|
|
131
|
-
/** The roster spells out what its handoff count measures. */
|
|
132
|
-
function employeeStatusText(employee) {
|
|
133
|
-
const count = employeeAttentionCount(employee);
|
|
134
|
-
const label = statusLabels[employee.status];
|
|
135
|
-
return count ? `${label} · ${count} handoff${count === 1 ? "" : "s"}` : label;
|
|
136
|
-
}
|
|
137
|
-
function EmployeePresence({ employee }) {
|
|
138
|
-
return /* @__PURE__ */ jsx("span", {
|
|
139
|
-
className: "manager-office__nav-status",
|
|
140
|
-
"data-status": employee.status,
|
|
141
|
-
"aria-hidden": "true"
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Each employee is a Chrome profile, so the bubble wears its profile color —
|
|
146
|
-
* the same palette Chrome assigns profiles from. Chrome's pick is per-machine
|
|
147
|
-
* state the host can't read, so the roster re-derives it: a stable hash per
|
|
148
|
-
* seat, skipping colors already worn by earlier roster entries the way Chrome
|
|
149
|
-
* skips colors in use by other profiles.
|
|
150
|
-
*/
|
|
151
|
-
function rosterProfileColors(employees) {
|
|
152
|
-
const taken = /* @__PURE__ */ new Set();
|
|
153
|
-
const colors = /* @__PURE__ */ new Map();
|
|
154
|
-
for (const employee of employees) {
|
|
155
|
-
const color = chromeProfileColor(employee.id, taken);
|
|
156
|
-
taken.add(color.bg);
|
|
157
|
-
colors.set(employee.id, color);
|
|
158
|
-
}
|
|
159
|
-
return colors;
|
|
160
|
-
}
|
|
161
|
-
function EmployeeAvatar({ color, employee, index = 0, size = "sm" }) {
|
|
162
|
-
const variant = index % 4;
|
|
163
|
-
return /* @__PURE__ */ jsx(Avatar.Root, {
|
|
164
|
-
size,
|
|
165
|
-
shape: "rounded",
|
|
166
|
-
className: "manager-office__employee-character",
|
|
167
|
-
"aria-hidden": "true",
|
|
168
|
-
children: /* @__PURE__ */ jsxs(Avatar.Fallback, {
|
|
169
|
-
className: "manager-office__employee-character-fallback",
|
|
170
|
-
style: {
|
|
171
|
-
color: color.fg,
|
|
172
|
-
backgroundColor: "transparent"
|
|
173
|
-
},
|
|
174
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
175
|
-
viewBox: "0 0 36 36",
|
|
176
|
-
focusable: "false",
|
|
177
|
-
role: "presentation",
|
|
178
|
-
style: { fill: color.bg },
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ jsx("rect", {
|
|
181
|
-
x: "5",
|
|
182
|
-
y: "6",
|
|
183
|
-
width: "26",
|
|
184
|
-
height: "25",
|
|
185
|
-
rx: "7"
|
|
186
|
-
}),
|
|
187
|
-
/* @__PURE__ */ jsx("rect", {
|
|
188
|
-
x: "8",
|
|
189
|
-
y: "28",
|
|
190
|
-
width: "8",
|
|
191
|
-
height: "5",
|
|
192
|
-
rx: "2.5",
|
|
193
|
-
opacity: "0.78"
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ jsx("rect", {
|
|
196
|
-
x: "20",
|
|
197
|
-
y: "28",
|
|
198
|
-
width: "8",
|
|
199
|
-
height: "5",
|
|
200
|
-
rx: "2.5",
|
|
201
|
-
opacity: "0.78"
|
|
202
|
-
}),
|
|
203
|
-
variant === 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M10 7c.6-3 3.2-5 6.2-5h3.6c3 0 5.6 2 6.2 5Z" }), /* @__PURE__ */ jsx("circle", {
|
|
204
|
-
cx: "18",
|
|
205
|
-
cy: "3",
|
|
206
|
-
r: "1.8"
|
|
207
|
-
})] }) : variant === 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
|
|
208
|
-
x: "2.5",
|
|
209
|
-
y: "13",
|
|
210
|
-
width: "4",
|
|
211
|
-
height: "10",
|
|
212
|
-
rx: "2"
|
|
213
|
-
}), /* @__PURE__ */ jsx("rect", {
|
|
214
|
-
x: "29.5",
|
|
215
|
-
y: "13",
|
|
216
|
-
width: "4",
|
|
217
|
-
height: "10",
|
|
218
|
-
rx: "2"
|
|
219
|
-
})] }) : variant === 2 ? /* @__PURE__ */ jsx("path", {
|
|
220
|
-
d: "M11 6V3.5h14V6M15 3.5V1.5h6v2",
|
|
221
|
-
fill: "none",
|
|
222
|
-
stroke: color.bg,
|
|
223
|
-
strokeWidth: "2",
|
|
224
|
-
strokeLinecap: "round",
|
|
225
|
-
strokeLinejoin: "round"
|
|
226
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 7V3l4 3 4-4 4 5Z" }), /* @__PURE__ */ jsx("circle", {
|
|
227
|
-
cx: "26.5",
|
|
228
|
-
cy: "7",
|
|
229
|
-
r: "2"
|
|
230
|
-
})] }),
|
|
231
|
-
/* @__PURE__ */ jsx("g", {
|
|
232
|
-
className: "manager-office__employee-character-face",
|
|
233
|
-
fill: color.fg,
|
|
234
|
-
children: variant === 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
235
|
-
/* @__PURE__ */ jsx("rect", {
|
|
236
|
-
className: "manager-office__employee-character-visor",
|
|
237
|
-
x: "10",
|
|
238
|
-
y: "14",
|
|
239
|
-
width: "16",
|
|
240
|
-
height: "8",
|
|
241
|
-
rx: "4",
|
|
242
|
-
opacity: "0.94"
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ jsx("circle", {
|
|
245
|
-
cx: "14",
|
|
246
|
-
cy: "18",
|
|
247
|
-
r: "1.5",
|
|
248
|
-
fill: color.bg
|
|
249
|
-
}),
|
|
250
|
-
/* @__PURE__ */ jsx("circle", {
|
|
251
|
-
cx: "22",
|
|
252
|
-
cy: "18",
|
|
253
|
-
r: "1.5",
|
|
254
|
-
fill: color.bg
|
|
255
|
-
})
|
|
256
|
-
] }) : variant === 3 ? /* @__PURE__ */ jsxs("g", {
|
|
257
|
-
className: "manager-office__employee-character-glasses",
|
|
258
|
-
children: [
|
|
259
|
-
/* @__PURE__ */ jsx("circle", {
|
|
260
|
-
className: "manager-office__employee-character-lens",
|
|
261
|
-
cx: "13.5",
|
|
262
|
-
cy: "17",
|
|
263
|
-
r: "3"
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ jsx("circle", {
|
|
266
|
-
className: "manager-office__employee-character-lens",
|
|
267
|
-
cx: "22.5",
|
|
268
|
-
cy: "17",
|
|
269
|
-
r: "3"
|
|
270
|
-
}),
|
|
271
|
-
/* @__PURE__ */ jsx("path", {
|
|
272
|
-
className: "manager-office__employee-character-bridge",
|
|
273
|
-
d: "M16.5 17h3"
|
|
274
|
-
})
|
|
275
|
-
]
|
|
276
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
277
|
-
/* @__PURE__ */ jsx("circle", {
|
|
278
|
-
cx: "13.5",
|
|
279
|
-
cy: "17",
|
|
280
|
-
r: "3.2"
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ jsx("circle", {
|
|
283
|
-
cx: "22.5",
|
|
284
|
-
cy: "17",
|
|
285
|
-
r: "3.2"
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ jsx("circle", {
|
|
288
|
-
cx: "14.5",
|
|
289
|
-
cy: "16",
|
|
290
|
-
r: "1",
|
|
291
|
-
fill: color.bg,
|
|
292
|
-
opacity: "0.72"
|
|
293
|
-
}),
|
|
294
|
-
/* @__PURE__ */ jsx("circle", {
|
|
295
|
-
cx: "23.5",
|
|
296
|
-
cy: "16",
|
|
297
|
-
r: "1",
|
|
298
|
-
fill: color.bg,
|
|
299
|
-
opacity: "0.72"
|
|
300
|
-
})
|
|
301
|
-
] })
|
|
302
|
-
}),
|
|
303
|
-
/* @__PURE__ */ jsx("path", {
|
|
304
|
-
className: "manager-office__employee-character-shine",
|
|
305
|
-
d: "M9 11c2-2 4.7-3 7.7-3",
|
|
306
|
-
fill: "none",
|
|
307
|
-
stroke: color.fg,
|
|
308
|
-
strokeWidth: "1.5",
|
|
309
|
-
strokeLinecap: "round"
|
|
310
|
-
})
|
|
311
|
-
]
|
|
312
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
313
|
-
className: "sigvelo-visually-hidden",
|
|
314
|
-
children: employee.initials
|
|
315
|
-
})]
|
|
316
|
-
})
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* One glyph per manager action, not one glyph per backend state. Both an
|
|
321
|
-
* employee asking for a person (`needs-you`) and one blocked by an issue
|
|
322
|
-
* (`issue`) require the same response here, so the roster presents both as
|
|
323
|
-
* "Waiting on you" with the warning glyph. An unreachable employee remains a
|
|
324
|
-
* distinct shape because there is no work for the manager to resume yet.
|
|
325
|
-
*
|
|
326
|
-
* `working` and `connecting` deliberately share the spinner: both mean "in
|
|
327
|
-
* motion, wait", and mistaking one for the other costs the manager nothing.
|
|
328
|
-
*/
|
|
329
|
-
function ThreadStatusIcon({ status }) {
|
|
330
|
-
return /* @__PURE__ */ jsx("span", {
|
|
331
|
-
className: "manager-office__thread-status",
|
|
332
|
-
"data-status": status,
|
|
333
|
-
"aria-hidden": "true",
|
|
334
|
-
children: status === "running" ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : status === "error" ? /* @__PURE__ */ jsx(WarningIcon, {}) : status === "interrupted" ? /* @__PURE__ */ jsx(PauseIcon, {}) : /* @__PURE__ */ jsx(DotIcon, {})
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
function threadStatusLabel(status) {
|
|
338
|
-
if (status === "attention") return "Update ready";
|
|
339
|
-
if (status === "running") return "Working";
|
|
340
|
-
if (status === "error") return "Issue";
|
|
341
|
-
if (status === "interrupted") return "Stopped";
|
|
342
|
-
return "Updated";
|
|
343
|
-
}
|
|
344
|
-
function relativeTime(timestamp, now) {
|
|
345
|
-
const elapsed = Math.max(0, now - timestamp);
|
|
346
|
-
const minute = 6e4;
|
|
347
|
-
const hour = 60 * minute;
|
|
348
|
-
const day = 24 * hour;
|
|
349
|
-
if (elapsed < minute) return "now";
|
|
350
|
-
if (elapsed < hour) return `${Math.floor(elapsed / minute)}m`;
|
|
351
|
-
if (elapsed < day) return `${Math.floor(elapsed / hour)}h`;
|
|
352
|
-
return `${Math.floor(elapsed / day)}d`;
|
|
353
|
-
}
|
|
354
|
-
function Timestamp({ now, timestamp }) {
|
|
355
|
-
const date = new Date(timestamp);
|
|
356
|
-
return /* @__PURE__ */ jsx("time", {
|
|
357
|
-
dateTime: date.toISOString(),
|
|
358
|
-
title: date.toLocaleString(),
|
|
359
|
-
children: relativeTime(timestamp, now)
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Deliberately the same three glyphs the employee statuses use: a channel that
|
|
364
|
-
* needs a sign-in is the same kind of event as an employee that needs one, and
|
|
365
|
-
* a manager should not have to learn a second vocabulary for it.
|
|
366
|
-
*/
|
|
367
|
-
function channelStatusIcon(status) {
|
|
368
|
-
if (status === "connected") return /* @__PURE__ */ jsx(CheckIcon, {});
|
|
369
|
-
if (status === "needs-auth") return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
370
|
-
return /* @__PURE__ */ jsx(WarningIcon, {});
|
|
371
|
-
}
|
|
372
|
-
const channelStatusLabels = {
|
|
373
|
-
connected: "Connected",
|
|
374
|
-
"needs-auth": "Needs sign-in",
|
|
375
|
-
error: "Error"
|
|
376
|
-
};
|
|
377
|
-
function ChannelMark({ channel }) {
|
|
378
|
-
if (channel.icon) return /* @__PURE__ */ jsx("span", {
|
|
379
|
-
className: "manager-office__channel-mark",
|
|
380
|
-
children: channel.icon
|
|
381
|
-
});
|
|
382
|
-
const card = findCatalogMcpServerCard({
|
|
383
|
-
id: channel.id,
|
|
384
|
-
name: channel.name
|
|
385
|
-
});
|
|
386
|
-
const src = card ? getMcpServerIconSrc(card) : void 0;
|
|
387
|
-
if (src) return /* @__PURE__ */ jsx("span", {
|
|
388
|
-
className: "manager-office__channel-mark",
|
|
389
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
390
|
-
alt: "",
|
|
391
|
-
className: "sigvelo-brand-mark sigvelo-brand-mark--colorful",
|
|
392
|
-
decoding: "async",
|
|
393
|
-
referrerPolicy: "no-referrer",
|
|
394
|
-
src
|
|
395
|
-
})
|
|
396
|
-
});
|
|
397
|
-
return /* @__PURE__ */ jsx(AppIcon.Fallback, { children: channel.name.slice(0, 1) });
|
|
398
|
-
}
|
|
399
|
-
function ChannelRow({ channel }) {
|
|
400
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
401
|
-
className: "manager-office__channel",
|
|
402
|
-
"data-status": channel.status,
|
|
403
|
-
children: [
|
|
404
|
-
/* @__PURE__ */ jsx(AppIcon.Root, {
|
|
405
|
-
size: "sm",
|
|
406
|
-
"aria-hidden": "true",
|
|
407
|
-
children: /* @__PURE__ */ jsx(ChannelMark, { channel })
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ jsxs("span", {
|
|
410
|
-
className: "manager-office__identity",
|
|
411
|
-
children: [/* @__PURE__ */ jsx("strong", {
|
|
412
|
-
className: "sigvelo-truncate",
|
|
413
|
-
children: channel.name
|
|
414
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
415
|
-
className: "sigvelo-truncate",
|
|
416
|
-
children: channel.detail ?? channelStatusLabels[channel.status]
|
|
417
|
-
})]
|
|
418
|
-
}),
|
|
419
|
-
/* @__PURE__ */ jsxs("span", {
|
|
420
|
-
className: "manager-office__channel-status",
|
|
421
|
-
"data-status": channel.status,
|
|
422
|
-
title: channelStatusLabels[channel.status],
|
|
423
|
-
children: [channelStatusIcon(channel.status), /* @__PURE__ */ jsx("span", {
|
|
424
|
-
className: "sigvelo-visually-hidden",
|
|
425
|
-
children: channelStatusLabels[channel.status]
|
|
426
|
-
})]
|
|
427
|
-
})
|
|
428
|
-
]
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* A handoff is the one thing on this surface that is waiting on a person, so
|
|
433
|
-
* it gets the surface built for that — `AgentAttention` in its warning tone —
|
|
434
|
-
* rather than another ghost row indistinguishable from the work beneath it.
|
|
435
|
-
* The action is a link into the owning work, because that is where the single
|
|
436
|
-
* approval surface lives; nothing is approved or dismissed from the roster.
|
|
437
|
-
*/
|
|
438
|
-
function HandoffCard({ employee, handoff, renderLink, now, showEmployee }) {
|
|
439
|
-
return /* @__PURE__ */ jsxs(AgentAttention, {
|
|
440
|
-
tone: "attention",
|
|
441
|
-
className: cx("manager-office__handoff", !handoff.request && "manager-office__handoff--bare"),
|
|
442
|
-
children: [
|
|
443
|
-
/* @__PURE__ */ jsx(AgentAttentionHeader, {
|
|
444
|
-
icon: /* @__PURE__ */ jsx(InfoIcon, {}),
|
|
445
|
-
title: handoff.reason,
|
|
446
|
-
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
447
|
-
showEmployee ? `${employee.name} · ` : null,
|
|
448
|
-
handoff.workTitle,
|
|
449
|
-
" · ",
|
|
450
|
-
/* @__PURE__ */ jsx(Timestamp, {
|
|
451
|
-
timestamp: handoff.createdAt,
|
|
452
|
-
now
|
|
453
|
-
})
|
|
454
|
-
] })
|
|
455
|
-
}),
|
|
456
|
-
handoff.request ? /* @__PURE__ */ jsx(AgentAttentionBody, {
|
|
457
|
-
className: "manager-office__handoff-ask",
|
|
458
|
-
children: handoff.request
|
|
459
|
-
}) : null,
|
|
460
|
-
/* @__PURE__ */ jsx(AgentAttentionActions, { children: /* @__PURE__ */ jsxs(LinkButton, {
|
|
461
|
-
render: renderLink({
|
|
462
|
-
kind: "handoff",
|
|
463
|
-
employee,
|
|
464
|
-
handoff
|
|
465
|
-
}),
|
|
466
|
-
size: "sm",
|
|
467
|
-
"aria-label": `Open ${handoff.workTitle} to ${handoff.reason.toLowerCase()}`,
|
|
468
|
-
children: [/* @__PURE__ */ jsx(MonitorIcon, {}), "Open browser"]
|
|
469
|
-
}) })
|
|
470
|
-
]
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
/** Dense nested action for an employee alert already signalled by the roster status. */
|
|
474
|
-
function ManagerOfficeSidebarAlert({ className, detail, title, ...props }) {
|
|
475
|
-
return /* @__PURE__ */ jsxs(LinkButton, {
|
|
476
|
-
variant: "ghost",
|
|
477
|
-
color: "neutral",
|
|
478
|
-
size: "sm",
|
|
479
|
-
className: cx("manager-office__sidebar-alert", className),
|
|
480
|
-
...props,
|
|
481
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
482
|
-
className: "manager-office__sidebar-alert-copy",
|
|
483
|
-
children: [/* @__PURE__ */ jsx("strong", { children: title }), /* @__PURE__ */ jsxs("span", {
|
|
484
|
-
className: "manager-office__sidebar-alert-meta",
|
|
485
|
-
children: [detail ? /* @__PURE__ */ jsx("small", { children: detail }) : null, /* @__PURE__ */ jsx("span", {
|
|
486
|
-
className: "manager-office__sidebar-alert-status",
|
|
487
|
-
children: "Blocked"
|
|
488
|
-
})]
|
|
489
|
-
})]
|
|
490
|
-
}), /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
491
|
-
className: "manager-office__sidebar-alert-chevron",
|
|
492
|
-
"aria-hidden": "true"
|
|
493
|
-
})]
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Shared Manager Office rail. Stories and host shells may add employee-owned
|
|
498
|
-
* content, but the Workforce header, roster identity, status language, scrolling,
|
|
499
|
-
* and footer placement stay component-owned and therefore cannot drift.
|
|
500
|
-
*/
|
|
501
|
-
function moveRosterFocus(event, layout) {
|
|
502
|
-
const nextKey = layout === "office" ? "ArrowDown" : "ArrowRight";
|
|
503
|
-
const prevKey = layout === "office" ? "ArrowUp" : "ArrowLeft";
|
|
504
|
-
if (event.key !== nextKey && event.key !== prevKey && event.key !== "Home" && event.key !== "End") return;
|
|
505
|
-
const links = [...event.currentTarget.querySelectorAll("a[href], button")];
|
|
506
|
-
const index = links.findIndex((link) => link === document.activeElement);
|
|
507
|
-
if (index < 0) return;
|
|
508
|
-
event.preventDefault();
|
|
509
|
-
const last = links.length - 1;
|
|
510
|
-
links[event.key === "Home" ? 0 : event.key === "End" ? last : event.key === nextKey ? Math.min(last, index + 1) : Math.max(0, index - 1)]?.focus();
|
|
511
|
-
}
|
|
512
|
-
function ManagerOfficeSidebar({ className, closeSidebarOnCompact, content, employees, renderLink, footer, layout = "office", officeActions, selectedEmployeeId, ...props }) {
|
|
513
|
-
const rosterLabelId = React.useId();
|
|
514
|
-
const profileColors = rosterProfileColors(employees);
|
|
515
|
-
const isChat = layout === "chat";
|
|
516
|
-
return /* @__PURE__ */ jsx(Tooltip.Provider, { children: /* @__PURE__ */ jsxs("nav", {
|
|
517
|
-
className: cx("manager-office__sidebar", className),
|
|
518
|
-
"aria-label": "Workforce",
|
|
519
|
-
"data-layout": layout,
|
|
520
|
-
...props,
|
|
521
|
-
children: [
|
|
522
|
-
/* @__PURE__ */ jsxs("div", {
|
|
523
|
-
className: "manager-office__sidebar-heading",
|
|
524
|
-
children: [isChat ? null : /* @__PURE__ */ jsx("strong", { children: "Workforce" }), officeActions ? /* @__PURE__ */ jsx("span", {
|
|
525
|
-
className: "manager-office__sidebar-actions",
|
|
526
|
-
children: officeActions
|
|
527
|
-
}) : null]
|
|
528
|
-
}),
|
|
529
|
-
/* @__PURE__ */ jsx("p", {
|
|
530
|
-
className: "manager-office__nav-label sigvelo-visually-hidden",
|
|
531
|
-
id: rosterLabelId,
|
|
532
|
-
children: "Employees"
|
|
533
|
-
}),
|
|
534
|
-
/* @__PURE__ */ jsx("ul", {
|
|
535
|
-
className: "manager-office__employee-nav",
|
|
536
|
-
role: "list",
|
|
537
|
-
"aria-labelledby": rosterLabelId,
|
|
538
|
-
onKeyDown: (event) => moveRosterFocus(event, layout),
|
|
539
|
-
children: employees.map((employee, index) => {
|
|
540
|
-
const selected = selectedEmployeeId === employee.id;
|
|
541
|
-
const status = employeeStatusText(employee);
|
|
542
|
-
return /* @__PURE__ */ jsx("li", {
|
|
543
|
-
className: "manager-office__employee-group",
|
|
544
|
-
children: /* @__PURE__ */ jsxs(LinkButton, {
|
|
545
|
-
render: renderLink({
|
|
546
|
-
kind: "employee",
|
|
547
|
-
employee
|
|
548
|
-
}),
|
|
549
|
-
onClick: closeSidebarOnCompact,
|
|
550
|
-
variant: "ghost",
|
|
551
|
-
color: "neutral",
|
|
552
|
-
size: "sm",
|
|
553
|
-
className: "manager-office__employee-link",
|
|
554
|
-
"aria-current": selected ? "page" : void 0,
|
|
555
|
-
"aria-label": `Open ${employee.name} · ${status}`,
|
|
556
|
-
title: isChat ? `${employee.name} · ${status}` : void 0,
|
|
557
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
558
|
-
className: "manager-office__employee-avatar",
|
|
559
|
-
children: [/* @__PURE__ */ jsx(EmployeeAvatar, {
|
|
560
|
-
employee,
|
|
561
|
-
color: profileColors.get(employee.id),
|
|
562
|
-
index,
|
|
563
|
-
size: isChat ? "sm" : "md"
|
|
564
|
-
}), /* @__PURE__ */ jsx(EmployeePresence, { employee })]
|
|
565
|
-
}), isChat ? null : /* @__PURE__ */ jsxs("span", {
|
|
566
|
-
className: "manager-office__identity",
|
|
567
|
-
children: [/* @__PURE__ */ jsx("strong", {
|
|
568
|
-
className: "sigvelo-truncate",
|
|
569
|
-
children: employee.name
|
|
570
|
-
}), /* @__PURE__ */ jsx("small", {
|
|
571
|
-
className: "sigvelo-truncate",
|
|
572
|
-
children: statusLabels[employee.status]
|
|
573
|
-
})]
|
|
574
|
-
})]
|
|
575
|
-
})
|
|
576
|
-
}, employee.id);
|
|
577
|
-
})
|
|
578
|
-
}),
|
|
579
|
-
content ? /* @__PURE__ */ jsx("div", {
|
|
580
|
-
className: "manager-office__sidebar-content",
|
|
581
|
-
children: content
|
|
582
|
-
}) : null,
|
|
583
|
-
footer ? /* @__PURE__ */ jsx("div", {
|
|
584
|
-
className: "manager-office__sidebar-footer",
|
|
585
|
-
children: footer
|
|
586
|
-
}) : null
|
|
587
|
-
]
|
|
588
|
-
}) });
|
|
589
|
-
}
|
|
590
|
-
function isReviewWork(work) {
|
|
591
|
-
return work.status === "attention" || work.status === "error";
|
|
592
|
-
}
|
|
593
|
-
/** Finished or failed work the manager should open in chat — not a live-tab wait. */
|
|
594
|
-
function reviewWorkFor(employee) {
|
|
595
|
-
const waiting = new Set(employee.handoffs.map((handoff) => handoff.workId));
|
|
596
|
-
return employee.work.filter((work) => isReviewWork(work) && !waiting.has(work.id));
|
|
597
|
-
}
|
|
598
|
-
function workingSetOf(work) {
|
|
599
|
-
return work.workingSet ?? [];
|
|
600
|
-
}
|
|
601
|
-
function workingSetKey(item) {
|
|
602
|
-
if (item.kind === "file" || item.kind === "folder") return `${item.kind}:${item.path}`;
|
|
603
|
-
if (item.kind === "link") return `link:${item.href}`;
|
|
604
|
-
return `correspondent:${correspondentHandleLabel(item.correspondent.handle)}`;
|
|
605
|
-
}
|
|
606
|
-
function safeHttpUrl(url) {
|
|
607
|
-
try {
|
|
608
|
-
const parsed = new URL(url);
|
|
609
|
-
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return void 0;
|
|
610
|
-
return parsed.href;
|
|
611
|
-
} catch {
|
|
612
|
-
return;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
function providerCardForHref(href) {
|
|
616
|
-
let parsed;
|
|
617
|
-
try {
|
|
618
|
-
parsed = new URL(href);
|
|
619
|
-
} catch {
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
const host = parsed.hostname.toLowerCase();
|
|
623
|
-
if (host === "docs.google.com" || host.endsWith(".docs.google.com")) {
|
|
624
|
-
if (parsed.pathname.includes("/spreadsheets/")) return findCatalogMcpServerCard({ id: "google-sheets" });
|
|
625
|
-
if (parsed.pathname.includes("/document/")) return findCatalogMcpServerCard({ id: "google-docs" });
|
|
626
|
-
if (parsed.pathname.includes("/presentation/")) return findCatalogMcpServerCard({ id: "google-slides" });
|
|
627
|
-
}
|
|
628
|
-
if (host === "drive.google.com" || host.endsWith(".drive.google.com")) return findCatalogMcpServerCard({ id: "google-drive" });
|
|
629
|
-
}
|
|
630
|
-
function workingSetLinkDetail(item) {
|
|
631
|
-
const card = providerCardForHref(item.href);
|
|
632
|
-
if (card) return card.name;
|
|
633
|
-
try {
|
|
634
|
-
return new URL(item.href).hostname.replace(/^www\./u, "");
|
|
635
|
-
} catch {
|
|
636
|
-
return item.href;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
function WorkingSetMark({ item }) {
|
|
640
|
-
if (item.kind === "file") return /* @__PURE__ */ jsx(FileIcon, {});
|
|
641
|
-
if (item.kind === "folder") return /* @__PURE__ */ jsx(FolderIcon, {});
|
|
642
|
-
const card = providerCardForHref(item.href);
|
|
643
|
-
const src = card ? getMcpServerIconSrc(card) : void 0;
|
|
644
|
-
if (src) return /* @__PURE__ */ jsxs(AppIcon.Root, {
|
|
645
|
-
size: "xs",
|
|
646
|
-
variant: "artwork",
|
|
647
|
-
"aria-hidden": "true",
|
|
648
|
-
children: [/* @__PURE__ */ jsx(AppIcon.Image, {
|
|
649
|
-
src,
|
|
650
|
-
alt: ""
|
|
651
|
-
}), /* @__PURE__ */ jsx(AppIcon.Fallback, { children: (card?.name ?? item.title).slice(0, 1) })]
|
|
652
|
-
});
|
|
653
|
-
return /* @__PURE__ */ jsx(LinkIcon, {});
|
|
654
|
-
}
|
|
655
|
-
function routineDetail(routine) {
|
|
656
|
-
const schedule = routine.enabled ? routine.task.schedule : `Paused · ${routine.task.schedule}`;
|
|
657
|
-
const finishedRuns = routine.runs.filter((run) => run.completedAt != null);
|
|
658
|
-
if (!finishedRuns.length) return schedule;
|
|
659
|
-
return `${schedule} · ${finishedRuns.filter((run) => {
|
|
660
|
-
const status = getThinkExecutionRunStatus(run);
|
|
661
|
-
return status === "completed" || status === "complete";
|
|
662
|
-
}).length} of ${finishedRuns.length} recent runs completed`;
|
|
663
|
-
}
|
|
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 }) {
|
|
675
|
-
return /* @__PURE__ */ jsxs(LinkButton, {
|
|
676
|
-
render: renderLink({
|
|
677
|
-
kind: "work",
|
|
678
|
-
employee,
|
|
679
|
-
work
|
|
680
|
-
}),
|
|
681
|
-
variant: "ghost",
|
|
682
|
-
color: "neutral",
|
|
683
|
-
size: "sm",
|
|
684
|
-
className: workLinkClassNames[placement],
|
|
685
|
-
"aria-label": `Open ${work.title} to ${threadStatusLabel(work.status).toLowerCase()}`,
|
|
686
|
-
children: [
|
|
687
|
-
/* @__PURE__ */ jsx(ThreadStatusIcon, { status: work.status }),
|
|
688
|
-
/* @__PURE__ */ jsxs("span", {
|
|
689
|
-
className: "manager-office__identity",
|
|
690
|
-
children: [/* @__PURE__ */ jsxs("strong", {
|
|
691
|
-
className: "sigvelo-truncate",
|
|
692
|
-
children: [work.title, work.status === "attention" ? /* @__PURE__ */ jsx("span", {
|
|
693
|
-
className: "manager-office__unread-dot",
|
|
694
|
-
"aria-hidden": "true"
|
|
695
|
-
}) : null]
|
|
696
|
-
}), /* @__PURE__ */ jsxs("small", {
|
|
697
|
-
className: "sigvelo-truncate",
|
|
698
|
-
children: [
|
|
699
|
-
showEmployee ? `${employee.name} · ` : null,
|
|
700
|
-
threadStatusLabel(work.status),
|
|
701
|
-
" · ",
|
|
702
|
-
/* @__PURE__ */ jsx(Timestamp, {
|
|
703
|
-
timestamp: work.updatedAt,
|
|
704
|
-
now
|
|
705
|
-
})
|
|
706
|
-
]
|
|
707
|
-
})]
|
|
708
|
-
}),
|
|
709
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "manager-office__row-chevron" })
|
|
710
|
-
]
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
function workingSetItemCaption(item) {
|
|
714
|
-
if (item.kind === "link") return workingSetLinkDetail(item);
|
|
715
|
-
return item.kind === "folder" ? "Workspace folder" : "Workspace file";
|
|
716
|
-
}
|
|
717
|
-
function WorkingSetAttachment(props) {
|
|
718
|
-
const { caption, label, mark, title } = props;
|
|
719
|
-
const contents = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
720
|
-
className: "manager-office__working-set-mark",
|
|
721
|
-
"aria-hidden": "true",
|
|
722
|
-
children: mark
|
|
723
|
-
}), /* @__PURE__ */ jsx("strong", {
|
|
724
|
-
className: "sigvelo-truncate",
|
|
725
|
-
children: title
|
|
726
|
-
})] });
|
|
727
|
-
const link = "href" in props ? /* @__PURE__ */ jsx(LinkButton, {
|
|
728
|
-
href: props.href,
|
|
729
|
-
target: "_blank",
|
|
730
|
-
rel: "noreferrer",
|
|
731
|
-
variant: "ghost",
|
|
732
|
-
color: "neutral",
|
|
733
|
-
size: "sm",
|
|
734
|
-
className: "manager-office__working-set-link",
|
|
735
|
-
"aria-label": label,
|
|
736
|
-
children: contents
|
|
737
|
-
}) : /* @__PURE__ */ jsx(LinkButton, {
|
|
738
|
-
render: props.render,
|
|
739
|
-
variant: "ghost",
|
|
740
|
-
color: "neutral",
|
|
741
|
-
size: "sm",
|
|
742
|
-
className: "manager-office__working-set-link",
|
|
743
|
-
"aria-label": label,
|
|
744
|
-
children: contents
|
|
745
|
-
});
|
|
746
|
-
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: link }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
747
|
-
side: "bottom",
|
|
748
|
-
sideOffset: 6,
|
|
749
|
-
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: caption })
|
|
750
|
-
}) })] });
|
|
751
|
-
}
|
|
752
|
-
function WorkingSetItemRow({ employee, item, renderLink, work }) {
|
|
753
|
-
if (item.kind === "correspondent") return /* @__PURE__ */ jsx("li", {
|
|
754
|
-
className: "manager-office__working-set-item",
|
|
755
|
-
children: /* @__PURE__ */ jsx(CorrespondentName, { correspondent: item.correspondent })
|
|
756
|
-
});
|
|
757
|
-
const caption = workingSetItemCaption(item);
|
|
758
|
-
const mark = /* @__PURE__ */ jsx(WorkingSetMark, { item });
|
|
759
|
-
if (item.kind === "link") {
|
|
760
|
-
const href = safeHttpUrl(item.href);
|
|
761
|
-
if (!href) return null;
|
|
762
|
-
return /* @__PURE__ */ jsx("li", {
|
|
763
|
-
className: "manager-office__working-set-item",
|
|
764
|
-
children: /* @__PURE__ */ jsx(WorkingSetAttachment, {
|
|
765
|
-
caption,
|
|
766
|
-
label: `${item.title} (${caption}, opens in a new tab)`,
|
|
767
|
-
href,
|
|
768
|
-
mark,
|
|
769
|
-
title: item.title
|
|
770
|
-
})
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
const location = item.kind === "folder" ? "folder" : "file";
|
|
774
|
-
return /* @__PURE__ */ jsx("li", {
|
|
775
|
-
className: "manager-office__working-set-item",
|
|
776
|
-
children: /* @__PURE__ */ jsx(WorkingSetAttachment, {
|
|
777
|
-
caption,
|
|
778
|
-
label: `Open ${item.title} ${location} in workspace`,
|
|
779
|
-
render: renderLink({
|
|
780
|
-
kind: "workspace",
|
|
781
|
-
employee,
|
|
782
|
-
work,
|
|
783
|
-
path: item.path
|
|
784
|
-
}),
|
|
785
|
-
mark,
|
|
786
|
-
title: item.title
|
|
787
|
-
})
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
function WorkLane({ employee, now, renderLink, work }) {
|
|
791
|
-
const titleId = React.useId();
|
|
792
|
-
const workingSet = workingSetOf(work);
|
|
793
|
-
return /* @__PURE__ */ jsxs("article", {
|
|
794
|
-
className: "manager-office__lane",
|
|
795
|
-
"aria-labelledby": titleId,
|
|
796
|
-
children: [
|
|
797
|
-
/* @__PURE__ */ jsx("h3", {
|
|
798
|
-
id: titleId,
|
|
799
|
-
className: "manager-office__lane-heading",
|
|
800
|
-
children: /* @__PURE__ */ jsx(WorkLink, {
|
|
801
|
-
employee,
|
|
802
|
-
now,
|
|
803
|
-
placement: "lane",
|
|
804
|
-
renderLink,
|
|
805
|
-
showEmployee: false,
|
|
806
|
-
work
|
|
807
|
-
})
|
|
808
|
-
}),
|
|
809
|
-
work.summary ? /* @__PURE__ */ jsx("p", {
|
|
810
|
-
className: "manager-office__lane-summary",
|
|
811
|
-
children: work.summary
|
|
812
|
-
}) : null,
|
|
813
|
-
workingSet.length ? /* @__PURE__ */ jsx("ul", {
|
|
814
|
-
className: "manager-office__working-set",
|
|
815
|
-
role: "list",
|
|
816
|
-
"aria-label": "Working set",
|
|
817
|
-
children: workingSet.map((item) => /* @__PURE__ */ jsx(WorkingSetItemRow, {
|
|
818
|
-
employee,
|
|
819
|
-
item,
|
|
820
|
-
renderLink,
|
|
821
|
-
work
|
|
822
|
-
}, workingSetKey(item)))
|
|
823
|
-
}) : null
|
|
824
|
-
]
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
function ManagerOfficeAttention({ className, ...props }) {
|
|
828
|
-
const { employees, renderLink, now } = useOffice();
|
|
829
|
-
const waits = employees.flatMap((employee) => isConnected(employee) ? employee.handoffs.map((handoff) => ({
|
|
830
|
-
employee,
|
|
831
|
-
handoff
|
|
832
|
-
})) : []);
|
|
833
|
-
const reviews = employees.flatMap((employee) => isConnected(employee) ? reviewWorkFor(employee).map((work) => ({
|
|
834
|
-
employee,
|
|
835
|
-
work
|
|
836
|
-
})) : []);
|
|
837
|
-
if (!waits.length && !reviews.length) return /* @__PURE__ */ jsx("div", {
|
|
838
|
-
...props,
|
|
839
|
-
className: cx("manager-office__attention", className),
|
|
840
|
-
"data-recipe": "page",
|
|
841
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
842
|
-
icon: /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
843
|
-
title: "Nothing needs you",
|
|
844
|
-
description: "Employee connection state remains visible in the roster."
|
|
845
|
-
})
|
|
846
|
-
});
|
|
847
|
-
const both = waits.length > 0 && reviews.length > 0;
|
|
848
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
849
|
-
...props,
|
|
850
|
-
className: cx("manager-office__attention", className),
|
|
851
|
-
"data-recipe": "page",
|
|
852
|
-
children: [waits.length ? /* @__PURE__ */ jsxs("div", {
|
|
853
|
-
className: "manager-office__attention-group",
|
|
854
|
-
children: [both ? /* @__PURE__ */ jsx("h2", {
|
|
855
|
-
className: "manager-office__section-title",
|
|
856
|
-
children: "Needs you in the browser"
|
|
857
|
-
}) : null, /* @__PURE__ */ jsx("ul", {
|
|
858
|
-
className: "manager-office__attention-list sigvelo-stack-list",
|
|
859
|
-
"aria-label": "Waiting on you",
|
|
860
|
-
children: waits.map(({ employee, handoff }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(HandoffCard, {
|
|
861
|
-
employee,
|
|
862
|
-
handoff,
|
|
863
|
-
renderLink,
|
|
864
|
-
now,
|
|
865
|
-
showEmployee: true
|
|
866
|
-
}) }, `${employee.id}:${handoff.id}`))
|
|
867
|
-
})]
|
|
868
|
-
}) : null, reviews.length ? /* @__PURE__ */ jsxs("div", {
|
|
869
|
-
className: "manager-office__attention-group",
|
|
870
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
871
|
-
className: "manager-office__section-title",
|
|
872
|
-
children: "Ready for you"
|
|
873
|
-
}), /* @__PURE__ */ jsx("ul", {
|
|
874
|
-
className: "manager-office__work-list sigvelo-stack-list",
|
|
875
|
-
"aria-label": "Ready for you",
|
|
876
|
-
children: reviews.map(({ employee, work }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkLink, {
|
|
877
|
-
employee,
|
|
878
|
-
work,
|
|
879
|
-
placement: "row",
|
|
880
|
-
renderLink,
|
|
881
|
-
now,
|
|
882
|
-
showEmployee: true
|
|
883
|
-
}) }, `${employee.id}:${work.id}`))
|
|
884
|
-
})]
|
|
885
|
-
}) : null]
|
|
886
|
-
});
|
|
887
|
-
}
|
|
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", {
|
|
1094
|
-
"data-recipe": "page",
|
|
1095
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
1096
|
-
icon: employee.status === "connecting" ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(MonitorIcon, {}),
|
|
1097
|
-
title: `${employee.name} is ${statusLabels[employee.status].toLowerCase()}`,
|
|
1098
|
-
description: employee.statusDescription
|
|
1099
|
-
})
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
/** Office data and relative-time boundary; hosts compose their shell and routed content. */
|
|
1103
|
-
function ManagerOfficeRoot({ employees, renderLink, render, ref, ...props }) {
|
|
1104
|
-
const [now, setNow] = React.useState(Date.now);
|
|
1105
|
-
React.useEffect(() => {
|
|
1106
|
-
const interval = window.setInterval(() => setNow(Date.now()), 6e4);
|
|
1107
|
-
return () => window.clearInterval(interval);
|
|
1108
|
-
}, []);
|
|
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
|
-
});
|
|
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
|
-
};
|
|
1146
|
-
//#endregion
|
|
2
|
+
import { n as ManagerOfficeSidebar, r as ManagerOfficeSidebarAlert, t as ManagerOffice } from "../../ManagerOffice-5pEFpoV3.js";
|
|
1147
3
|
export { ManagerOffice, ManagerOfficeSidebar, ManagerOfficeSidebarAlert };
|