@mcp-b/react-components 0.51.2 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/{CodeBlock-g8sADidM.js → CodeBlock-Bl-q7wMc.js} +1 -0
  2. package/dist/{CodeBlock--r6GS8YV.d.ts → CodeBlock-DJ99TQWy.d.ts} +1 -1
  3. package/dist/EmployeeChrome-C8eTGJWn.d.ts +231 -0
  4. package/dist/{IconButton-ByiyjkYE.d.ts → IconButton-CAlFVb2L.d.ts} +3 -0
  5. package/dist/{ManagerOffice-D-7SOJ4x.js → ManagerOffice-CMJ7laGe.js} +14 -9
  6. package/dist/McpPluginCatalog-DNeHDrts.d.ts +94 -0
  7. package/dist/{Message-DyaTBiV7.d.ts → Message-COsMPZSC.d.ts} +2 -2
  8. package/dist/{ResponsiveSidebarShell-CAmmtQTR.d.ts → ResponsiveSidebarShell-BUBQa_IV.d.ts} +3 -1
  9. package/dist/{SetupChecklist-Btmy3-_C.js → SetupChecklist-BiWQkKEq.js} +5 -4
  10. package/dist/{ThinkThreadPicker-yetGX_s5.d.ts → ThinkThreadPicker-DX0lL-P7.d.ts} +3 -0
  11. package/dist/{Workspace-HzGrWDX3.d.ts → Workspace-mzMZSdts.d.ts} +1 -1
  12. package/dist/WorkspaceConceptPanel-97ZyVpZI.js +20 -0
  13. package/dist/{WorkspaceFile-Bouauobc.d.ts → WorkspaceFile-19WP0EU1.d.ts} +1 -1
  14. package/dist/{WorkspaceFileView-DYPtRVpM.js → WorkspaceFileView-DXgTljKV.js} +2 -1
  15. package/dist/{WorkspaceMessageResponse-8lOSAbw_.d.ts → WorkspaceMessageResponse-BApg8KZv.d.ts} +1 -1
  16. package/dist/WorkspaceMountManager-CkLI1B-G.d.ts +33 -0
  17. package/dist/assets/sigvelo-logo.svg +54 -0
  18. package/dist/components/agents-sdk/AgentChat.d.ts +6 -2
  19. package/dist/components/agents-sdk/AgentChat.js +4 -8
  20. package/dist/components/agents-sdk/EmployeeApp.d.ts +43 -30
  21. package/dist/components/agents-sdk/EmployeeApp.js +47 -34
  22. package/dist/components/agents-sdk/EmployeeChat.d.ts +28 -8
  23. package/dist/components/agents-sdk/EmployeeChat.js +32 -4
  24. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -219
  25. package/dist/components/agents-sdk/EmployeeChrome.js +101 -102
  26. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
  27. package/dist/components/agents-sdk/EmployeeSchedules.js +1 -2
  28. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +12 -11
  29. package/dist/components/agents-sdk/EmployeeStartScreen.js +21 -14
  30. package/dist/components/agents-sdk/ManagerAccountActions.js +0 -1
  31. package/dist/components/agents-sdk/ManagerOffice.js +1 -2
  32. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +2 -2
  33. package/dist/components/agents-sdk/ManagerOfficeScreens.js +30 -13
  34. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -93
  35. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -3
  36. package/dist/components/agents-sdk/McpServerPicker.js +3 -3
  37. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +3 -0
  38. package/dist/components/agents-sdk/SubagentRunPanel.js +66 -46
  39. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
  40. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
  41. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +4 -11
  42. package/dist/components/agents-sdk/ThinkFullApp.d.ts +2 -0
  43. package/dist/components/agents-sdk/ThinkFullApp.js +2 -0
  44. package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
  45. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
  46. package/dist/components/agents-sdk/ThinkThreadPicker.js +32 -19
  47. package/dist/components/agents-sdk/WorkbenchBack.d.ts +18 -0
  48. package/dist/components/agents-sdk/WorkbenchBack.js +27 -0
  49. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  50. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  51. package/dist/components/agents-sdk/WorkspaceBrowser.js +2 -0
  52. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  53. package/dist/components/agents-sdk/WorkspaceExecution.js +7 -4
  54. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -1
  55. package/dist/components/agents-sdk/WorkspaceExplorer.js +13 -4
  56. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  58. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  59. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
  60. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  61. package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +1 -32
  62. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceProject.js +3 -1
  64. package/dist/components/agents-sdk/WorkspaceUserScript.js +3 -1
  65. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  66. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  67. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  68. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  69. package/dist/components/ai-sdk/Message.d.ts +1 -1
  70. package/dist/components/ai-sdk/PromptInput.js +1 -1
  71. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
  72. package/dist/components/extension/ChatGptSignInScreen.js +60 -185
  73. package/dist/components/extension/CodexModelSelector.js +2 -6
  74. package/dist/components/foundations/IconButton.d.ts +1 -1
  75. package/dist/components/foundations/IconButton.js +7 -4
  76. package/dist/components/general-purpose/AccountSignInDialog.d.ts +5 -9
  77. package/dist/components/general-purpose/AccountSignInDialog.js +12 -4
  78. package/dist/components/general-purpose/BrandLoading.d.ts +14 -0
  79. package/dist/components/general-purpose/BrandLoading.js +25 -0
  80. package/dist/components/general-purpose/Commit.d.ts +1 -1
  81. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  82. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  83. package/dist/components/general-purpose/ResponsiveSidebarShell.js +58 -26
  84. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  85. package/dist/components/general-purpose/StatusScreen.d.ts +13 -2
  86. package/dist/components/general-purpose/StatusScreen.js +27 -3
  87. package/dist/components/general-purpose/Terminal.d.ts +2 -2
  88. package/dist/components/general-purpose/WebPreview.d.ts +1 -1
  89. package/dist/components/nanites/AgentConnection.js +1 -1
  90. package/dist/{copy-button-OUwOdgEm.d.ts → copy-button-CJYYgCIU.d.ts} +1 -1
  91. package/dist/styles/activity.css +2 -2
  92. package/dist/styles/agent-chat.css +6 -105
  93. package/dist/styles/app-root.css +9 -0
  94. package/dist/styles/app-top-bar.css +10 -4
  95. package/dist/styles/avatar.css +2 -2
  96. package/dist/styles/base.css +6 -2
  97. package/dist/styles/brand-loading.css +58 -0
  98. package/dist/styles/brand.test.ts +158 -0
  99. package/dist/styles/browser-control-overlay.css +22 -0
  100. package/dist/styles/button.css +22 -1
  101. package/dist/styles/chatgpt-sign-in-screen.css +111 -225
  102. package/dist/styles/code-block.css +5 -0
  103. package/dist/styles/codex-model-selector.css +2 -12
  104. package/dist/styles/description-list.css +9 -2
  105. package/dist/styles/employee-app.css +19 -1
  106. package/dist/styles/employee-chrome.css +35 -5
  107. package/dist/styles/file-tree.css +15 -2
  108. package/dist/styles/index.css +1 -0
  109. package/dist/styles/manager-office.css +80 -55
  110. package/dist/styles/manager-work.css +5 -11
  111. package/dist/styles/mcp-plugin-catalog.css +29 -34
  112. package/dist/styles/mcp-server-picker.css +13 -5
  113. package/dist/styles/prompt-input.css +3 -13
  114. package/dist/styles/queue.css +1 -1
  115. package/dist/styles/recipes.css +9 -2
  116. package/dist/styles/responsive-sidebar-shell-motion.test.ts +67 -0
  117. package/dist/styles/responsive-sidebar-shell.css +70 -25
  118. package/dist/styles/search-field.css +8 -6
  119. package/dist/styles/subagent-run.css +81 -0
  120. package/dist/styles/think-execution-workbench.css +0 -17
  121. package/dist/styles/think-full-app.css +11 -4
  122. package/dist/styles/think-thread-picker.css +16 -38
  123. package/dist/styles/workspace-concepts.css +29 -2
  124. package/dist/styles/workspace-explorer.css +6 -48
  125. package/dist/utils/structured-code.d.ts +1 -1
  126. package/package.json +2 -2
  127. package/dist/styles/extension-status.css +0 -46
@@ -10,7 +10,7 @@ import { VirtualMessageScroller } from "../ai-sdk/MessageScrollerVirtual.js";
10
10
  import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
11
11
  import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemIndicator, QueueList } from "../ai-sdk/Queue.js";
12
12
  import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
13
- import { EmptyState } from "../foundations/EmptyState.js";
13
+ import { BrandLoading } from "../general-purpose/BrandLoading.js";
14
14
  import { Marker, MarkerContent } from "../foundations/Marker.js";
15
15
  import { TransitionSurface } from "../foundations/TransitionSurface.js";
16
16
  import * as React from "react";
@@ -153,14 +153,10 @@ function AgentChatTranscript({ children, emptyState, className, scrollAnchor })
153
153
  })
154
154
  }) });
155
155
  }
156
- function AgentChatLoading() {
157
- return /* @__PURE__ */ jsx("div", {
156
+ function AgentChatLoading({ label = "Loading conversation" }) {
157
+ return /* @__PURE__ */ jsx(BrandLoading, {
158
158
  className: "agent-chat__transcript-loading",
159
- role: "status",
160
- children: /* @__PURE__ */ jsx(EmptyState, {
161
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
162
- description: "Loading conversation"
163
- })
159
+ label
164
160
  });
165
161
  }
166
162
  const ChatMessageContext = React.createContext(null);
@@ -1,49 +1,62 @@
1
- import { EmployeeAgentRun, EmployeeBrand, EmployeeModelSetup, EmployeeShellProps, EmployeeStatus } from "./EmployeeChrome.js";
1
+ import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
+ import { f as EmployeeShellProps, l as EmployeeModelSetup, n as EmployeeBrand, p as EmployeeStatus, t as EmployeeAgentRun } from "../../EmployeeChrome-C8eTGJWn.js";
2
3
  import * as React from "react";
3
4
 
4
5
  //#region src/components/agents-sdk/EmployeeApp.d.ts
5
- interface EmployeeAppProps extends EmployeeShellProps {
6
- /** Application admission. Gates occupy the entire screen, without navigation. */
6
+ interface EmployeeAppRootProps extends EmployeeShellProps {
7
+ /** Admission gates remain separate; connecting keeps the application frame mounted. */
7
8
  status: EmployeeStatus;
9
+ workspaceNavigation?: WorkspaceNavigationAdapter;
8
10
  brand: EmployeeBrand;
9
11
  modelSetup?: EmployeeModelSetup;
10
- connectingLabel?: string;
11
- /** Transcript hydration does not withdraw the parent's navigation or Stop controls. */
12
- conversationLoading?: string;
13
- /** Child transcript state; null means a parent chat, independently of toolbar state. */
14
- conversationRun: EmployeeAgentRun | null;
15
- /** Current output pane, or null when the conversation occupies the screen. */
16
- workbench: React.ReactNode;
17
- /** Host-bound live browser screen. */
18
- live: React.ReactNode;
19
- /** Host-bound schedule screen. */
12
+ /** Schedule navigation owns its own shell; the chat remains mounted behind it. */
20
13
  schedules: React.ReactNode;
21
- report?: React.ReactNode;
22
- /** Render the extension or manager shell from this package using the same chrome state. */
14
+ /** Render the extension or manager shell with the same chrome state. */
23
15
  shell: (props: EmployeeShellProps) => React.ReactNode;
24
- /** Host-bound conversation. */
25
- children: React.ReactNode;
26
16
  ref?: React.Ref<HTMLDivElement>;
27
17
  }
28
- /**
29
- * Canonical employee screen. Hosts keep chat providers mounted above it and
30
- * supply live content; this component owns admission, navigation and layout.
31
- */
32
- declare function EmployeeApp({
18
+ /** Persistent admission and navigation frame. Put keyed runtimes and Suspense inside it. */
19
+ declare function EmployeeAppRoot({
33
20
  status,
21
+ workspaceNavigation,
34
22
  brand,
35
23
  modelSetup,
36
- connectingLabel,
37
- conversationLoading,
38
- conversationRun,
39
- workbench,
40
- live,
41
24
  schedules,
42
- report,
43
25
  shell,
44
26
  ref,
45
27
  children,
46
28
  ...chrome
47
- }: EmployeeAppProps): React.JSX.Element;
29
+ }: EmployeeAppRootProps): React.JSX.Element;
30
+ interface EmployeeAppContentProps {
31
+ view: EmployeeShellProps["view"];
32
+ /** Current output pane, or null when the conversation occupies the screen. */
33
+ workbench: React.ReactNode;
34
+ live: React.ReactNode;
35
+ report?: React.ReactNode;
36
+ /** Place transcript hydration boundaries here so they cannot replace navigation or output. */
37
+ children: React.ReactNode;
38
+ }
39
+ /** Stable content lanes. Hosts hydrate the conversation locally and retain output while waiting. */
40
+ declare function EmployeeAppContent({
41
+ view,
42
+ workbench,
43
+ live,
44
+ report,
45
+ children
46
+ }: EmployeeAppContentProps): React.JSX.Element;
47
+ /** Local run failure presentation; keep the parent connection and queue above this part. */
48
+ declare function EmployeeAppConversation({
49
+ run,
50
+ children
51
+ }: {
52
+ run: EmployeeAgentRun | null;
53
+ children: React.ReactNode;
54
+ }): React.JSX.Element;
55
+ /** Compose one persistent frame around independently hydrating conversation content. */
56
+ declare const EmployeeApp: {
57
+ Root: typeof EmployeeAppRoot;
58
+ Content: typeof EmployeeAppContent;
59
+ Conversation: typeof EmployeeAppConversation;
60
+ };
48
61
  //#endregion
49
- export { EmployeeApp, EmployeeAppProps };
62
+ export { EmployeeApp, EmployeeAppContentProps, EmployeeAppRootProps };
@@ -1,57 +1,70 @@
1
- import { K as SpinnerIcon, et as WarningIcon } from "../../icons-cuEtsgj9.js";
2
- import "../foundations/icons.js";
1
+ import { et as WarningIcon } from "../../icons-cuEtsgj9.js";
2
+ import { WorkbenchBack } from "./WorkbenchBack.js";
3
3
  import { StatusScreen } from "../general-purpose/StatusScreen.js";
4
4
  import { EmployeeChrome } from "./EmployeeChrome.js";
5
5
  import { ThinkFullApp } from "./ThinkFullApp.js";
6
6
  import "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/agents-sdk/EmployeeApp.tsx
9
- /**
10
- * Canonical employee screen. Hosts keep chat providers mounted above it and
11
- * supply live content; this component owns admission, navigation and layout.
12
- */
13
- function EmployeeApp({ status, brand, modelSetup, connectingLabel, conversationLoading, conversationRun, workbench, live, schedules, report, shell, ref, children, ...chrome }) {
14
- if (status !== "ready") return /* @__PURE__ */ jsx("div", {
9
+ /** Persistent admission and navigation frame. Put keyed runtimes and Suspense inside it. */
10
+ function EmployeeAppRoot({ status, workspaceNavigation, brand, modelSetup, schedules, shell, ref, children, ...chrome }) {
11
+ const admitted = status === "ready" || status === "connecting";
12
+ chrome.compactBack ??= /* @__PURE__ */ jsx(WorkbenchBack, {
13
+ navigation: workspaceNavigation,
14
+ filesOpen: chrome.view === "files",
15
+ backToChatLink: chrome.renderLink({
16
+ kind: "view",
17
+ view: "chat"
18
+ })
19
+ });
20
+ return /* @__PURE__ */ jsx("div", {
15
21
  className: "employee-app",
16
22
  "data-view": chrome.view,
17
23
  ref,
18
- children: /* @__PURE__ */ jsx(EmployeeChrome.Gate, {
24
+ children: !admitted ? /* @__PURE__ */ jsx(EmployeeChrome.Gate, {
19
25
  status,
20
26
  brand,
21
27
  identity: chrome.identity,
22
- modelSetup,
23
- connectingLabel
24
- })
28
+ modelSetup
29
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
30
+ className: "employee-app__surface",
31
+ hidden: chrome.view === "schedules",
32
+ children: shell({
33
+ ...chrome,
34
+ children
35
+ })
36
+ }), chrome.view === "schedules" ? schedules : null] })
25
37
  });
26
- const run = conversationRun;
27
- const content = chrome.view === "live" ? live : /* @__PURE__ */ jsxs(ThinkFullApp.Root, {
38
+ }
39
+ /** Stable content lanes. Hosts hydrate the conversation locally and retain output while waiting. */
40
+ function EmployeeAppContent({ view, workbench, live, report, children }) {
41
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(ThinkFullApp.Root, {
28
42
  workbenchOpen: Boolean(workbench),
43
+ hidden: view === "live",
29
44
  children: [
30
45
  /* @__PURE__ */ jsxs(ThinkFullApp.Conversation, {
31
46
  "data-workspace-restoration-scope": "chat",
32
- children: [report, run?.state === "unavailable" || run?.state === "error" ? /* @__PURE__ */ jsx(StatusScreen, {
33
- role: "alert",
34
- icon: /* @__PURE__ */ jsx(WarningIcon, {}),
35
- title: run.state === "unavailable" ? "Delegated run unavailable" : "Could not open this run",
36
- description: run.state === "error" ? run.error : "This run is no longer available. The parent conversation keeps its history and controls."
37
- }) : conversationLoading ? /* @__PURE__ */ jsx(StatusScreen, {
38
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
39
- description: conversationLoading
40
- }) : children]
47
+ children: [report, children]
41
48
  }),
42
49
  /* @__PURE__ */ jsx(ThinkFullApp.ResizeHandle, {}),
43
50
  /* @__PURE__ */ jsx(ThinkFullApp.Workbench, { children: workbench })
44
51
  ]
45
- });
46
- return /* @__PURE__ */ jsx("div", {
47
- className: "employee-app",
48
- "data-view": chrome.view,
49
- ref,
50
- children: chrome.view === "schedules" ? schedules : shell({
51
- ...chrome,
52
- children: content
53
- })
54
- });
52
+ }), view === "live" ? live : null] });
53
+ }
54
+ /** Local run failure presentation; keep the parent connection and queue above this part. */
55
+ function EmployeeAppConversation({ run, children }) {
56
+ return /* @__PURE__ */ jsx(Fragment, { children: run?.state === "unavailable" || run?.state === "error" ? /* @__PURE__ */ jsx(StatusScreen, {
57
+ role: "alert",
58
+ icon: /* @__PURE__ */ jsx(WarningIcon, {}),
59
+ title: run.state === "unavailable" ? "Delegated run unavailable" : "Could not open this run",
60
+ description: run.state === "error" ? run.error : "This run is no longer available. The parent conversation keeps its history and controls."
61
+ }) : children });
55
62
  }
63
+ /** Compose one persistent frame around independently hydrating conversation content. */
64
+ const EmployeeApp = {
65
+ Root: EmployeeAppRoot,
66
+ Content: EmployeeAppContent,
67
+ Conversation: EmployeeAppConversation
68
+ };
56
69
  //#endregion
57
70
  export { EmployeeApp };
@@ -1,12 +1,16 @@
1
1
  import { E as PromptInputCommandComposerProps, F as PromptInputDictationProps, M as PromptInputContextSelectorProps } from "../../PromptInput-DGPrCTPl.js";
2
2
  import { AgentChatTranscriptProps } from "./AgentChat.js";
3
+ import { ConversationTabPickerProps } from "../extension/ConversationTabPicker.js";
4
+ import { SetupChecklistGroupProps } from "../general-purpose/SetupChecklist.js";
5
+ import { McpServerPickerItemsProps } from "./McpServerPicker.js";
6
+ import { EmployeeStartScreenProps } from "./EmployeeStartScreen.js";
3
7
  import { ContextProps } from "../ai-sdk/Context.js";
4
8
  import { CodexModelSelectorProps } from "../extension/CodexModelSelector.js";
5
9
  import { ThinkChatMessageContentProps } from "./ThinkChat.js";
6
10
  import * as React from "react";
7
11
 
8
12
  //#region src/components/agents-sdk/EmployeeChat.d.ts
9
- interface EmployeeComposerProps {
13
+ interface EmployeeComposerProps<Id extends string = string> {
10
14
  commands: PromptInputCommandComposerProps["commands"];
11
15
  mentionCommands?: PromptInputCommandComposerProps["mentionCommands"];
12
16
  onCompact?: () => Promise<{
@@ -14,18 +18,19 @@ interface EmployeeComposerProps {
14
18
  }>;
15
19
  placeholder?: string;
16
20
  disabled?: boolean;
17
- /** Additional connection/personalization menu entries, using shared menu components. */
18
- menu?: React.ReactNode;
21
+ personalization?: Pick<SetupChecklistGroupProps<Id>, "entries" | "onSelect">;
22
+ connections?: McpServerPickerItemsProps;
19
23
  tools?: React.ReactNode;
20
24
  contextSelector?: PromptInputContextSelectorProps;
21
- tabs?: React.ReactNode;
25
+ tabs?: ConversationTabPickerProps;
22
26
  model?: CodexModelSelectorProps;
23
27
  dictation?: PromptInputDictationProps;
24
28
  context?: ContextProps;
25
29
  }
26
30
  /** One composer anatomy for the app and its examples; capabilities remain explicit. */
27
- declare function EmployeeComposer({
28
- menu,
31
+ declare function EmployeeComposer<Id extends string = string>({
32
+ personalization,
33
+ connections,
29
34
  tools,
30
35
  contextSelector,
31
36
  tabs,
@@ -36,7 +41,7 @@ declare function EmployeeComposer({
36
41
  placeholder,
37
42
  disabled,
38
43
  ...input
39
- }: EmployeeComposerProps): React.JSX.Element;
44
+ }: EmployeeComposerProps<Id>): React.JSX.Element;
40
45
  interface EmployeeTranscriptProps extends Omit<ThinkChatMessageContentProps, "message"> {
41
46
  readOnly?: boolean;
42
47
  scrollAnchor?: AgentChatTranscriptProps["scrollAnchor"];
@@ -59,5 +64,20 @@ declare function EmployeeChatDock({
59
64
  readOnly?: boolean;
60
65
  children?: React.ReactNode;
61
66
  }): React.JSX.Element;
67
+ /** Shared conversation layout. Hosts hydrate the parts and retain their runtime providers. */
68
+ declare function EmployeeConversation<Id extends string = string>({
69
+ transcript,
70
+ composer,
71
+ welcome,
72
+ loading,
73
+ loadingLabel,
74
+ ...dock
75
+ }: {
76
+ transcript?: EmployeeTranscriptProps;
77
+ composer: EmployeeComposerProps<Id>;
78
+ welcome?: Omit<EmployeeStartScreenProps<Id>, "children">;
79
+ loading?: boolean;
80
+ loadingLabel?: string;
81
+ } & React.ComponentProps<typeof EmployeeChatDock>): React.JSX.Element;
62
82
  //#endregion
63
- export { EmployeeChatDock, EmployeeComposer, EmployeeComposerProps, EmployeeTranscript, EmployeeTranscriptProps };
83
+ export { EmployeeChatDock, EmployeeComposer, EmployeeComposerProps, EmployeeConversation, EmployeeTranscript, EmployeeTranscriptProps };
@@ -1,5 +1,9 @@
1
1
  import { PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger, PromptInputAttachments, PromptInputBody, PromptInputCommandComposer, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputFooterEnd, PromptInputTools } from "../ai-sdk/PromptInput.js";
2
2
  import { AgentChat, useAgentChatCompaction } from "./AgentChat.js";
3
+ import { ConversationTabPicker } from "../extension/ConversationTabPicker.js";
4
+ import { n as SetupChecklistGroup } from "../../SetupChecklist-BiWQkKEq.js";
5
+ import { McpServerPickerItems } from "./McpServerPicker.js";
6
+ import { EmployeeStartScreen } from "./EmployeeStartScreen.js";
3
7
  import { Context, ContextContent, ContextContentBody, ContextContentHeader, ContextTrigger } from "../ai-sdk/Context.js";
4
8
  import { CodexModelSelector } from "../extension/CodexModelSelector.js";
5
9
  import { ThinkChat } from "./ThinkChat.js";
@@ -23,7 +27,7 @@ function CompactingInput({ onCompact, ...props }) {
23
27
  })] });
24
28
  }
25
29
  /** One composer anatomy for the app and its examples; capabilities remain explicit. */
26
- function EmployeeComposer({ menu, tools, contextSelector, tabs, model, dictation, context, onCompact, placeholder = "How can I help you today?", disabled, ...input }) {
30
+ function EmployeeComposer({ personalization, connections, tools, contextSelector, tabs, model, dictation, context, onCompact, placeholder = "How can I help you today?", disabled, ...input }) {
27
31
  const inputProps = {
28
32
  ...input,
29
33
  placeholder,
@@ -38,11 +42,18 @@ function EmployeeComposer({ menu, tools, contextSelector, tabs, model, dictation
38
42
  onCompact
39
43
  }) : /* @__PURE__ */ jsx(CommandInput, { ...inputProps }),
40
44
  /* @__PURE__ */ jsxs(PromptInputFooter, { children: [/* @__PURE__ */ jsxs(PromptInputTools, { children: [
41
- /* @__PURE__ */ jsxs(PromptInputActionMenu, { children: [/* @__PURE__ */ jsx(PromptInputActionMenuTrigger, { disabled }), /* @__PURE__ */ jsxs(PromptInputActionMenuContent, { children: [/* @__PURE__ */ jsx(PromptInputActionAddAttachments, {}), menu] })] }),
45
+ /* @__PURE__ */ jsxs(PromptInputActionMenu, { children: [/* @__PURE__ */ jsx(PromptInputActionMenuTrigger, { disabled }), /* @__PURE__ */ jsxs(PromptInputActionMenuContent, { children: [
46
+ /* @__PURE__ */ jsx(PromptInputActionAddAttachments, {}),
47
+ personalization ? /* @__PURE__ */ jsx(SetupChecklistGroup, {
48
+ label: "Prompts",
49
+ ...personalization
50
+ }) : null,
51
+ connections ? /* @__PURE__ */ jsx(McpServerPickerItems, { ...connections }) : null
52
+ ] })] }),
42
53
  contextSelector ? /* @__PURE__ */ jsx(PromptInputContextSelector, { ...contextSelector }) : null,
43
54
  tools
44
55
  ] }), /* @__PURE__ */ jsxs(PromptInputFooterEnd, { children: [
45
- tabs,
56
+ tabs ? /* @__PURE__ */ jsx(ConversationTabPicker, { ...tabs }) : null,
46
57
  model ? /* @__PURE__ */ jsx(CodexModelSelector, { ...model }) : null,
47
58
  dictation ? /* @__PURE__ */ jsx(PromptInputDictation, { ...dictation }) : null,
48
59
  context ? /* @__PURE__ */ jsxs(Context, {
@@ -80,5 +91,22 @@ function EmployeeChatDock({ recovery, notices, readOnly, children }) {
80
91
  children
81
92
  ] })] });
82
93
  }
94
+ /** Shared conversation layout. Hosts hydrate the parts and retain their runtime providers. */
95
+ function EmployeeConversation({ transcript, composer, welcome, loading, loadingLabel, ...dock }) {
96
+ if (welcome && !loading && !dock.readOnly) return /* @__PURE__ */ jsx(EmployeeStartScreen, {
97
+ ...welcome,
98
+ children: /* @__PURE__ */ jsx(EmployeeComposer, { ...composer })
99
+ });
100
+ return /* @__PURE__ */ jsxs(Fragment, { children: [loading ? /* @__PURE__ */ jsx(AgentChat.Loading, { label: loadingLabel }) : /* @__PURE__ */ jsx(EmployeeTranscript, {
101
+ ...transcript,
102
+ readOnly: dock.readOnly
103
+ }), /* @__PURE__ */ jsxs(EmployeeChatDock, {
104
+ ...dock,
105
+ children: [dock.children, /* @__PURE__ */ jsx(EmployeeComposer, {
106
+ ...composer,
107
+ disabled: loading || composer.disabled
108
+ })]
109
+ })] });
110
+ }
83
111
  //#endregion
84
- export { EmployeeChatDock, EmployeeComposer, EmployeeTranscript };
112
+ export { EmployeeChatDock, EmployeeComposer, EmployeeConversation, EmployeeTranscript };
@@ -1,220 +1,2 @@
1
- import { J as PromptInputMessage } from "../../PromptInput-DGPrCTPl.js";
2
- import { n as AgentToolRunValue } from "../../AgentToolRunsContext-GMe_hSnD.js";
3
- import { n as ResponsiveSidebarShell } from "../../ResponsiveSidebarShell-CAmmtQTR.js";
4
- import { t as ThinkThreadItem } from "../../ThinkThreadPicker-yetGX_s5.js";
5
- import * as React from "react";
6
-
7
- //#region src/components/agents-sdk/EmployeeChrome.d.ts
8
- /**
9
- * Chat, the two exclusive full-screen surfaces (`live`, `schedules`), or an
10
- * opaque workbench panel id. Built-in workbench destinations are `files` and
11
- * `plugins`; hosts append more through `workbenchNavigation`. An unknown id
12
- * keeps the conversation visible without rewriting the host's destination.
13
- */
14
- type EmployeeView = string;
15
- type EmployeeDestination = {
16
- kind: "thread";
17
- threadId: string;
18
- } | {
19
- kind: "new-thread";
20
- } | {
21
- kind: "view";
22
- view: EmployeeView;
23
- } | {
24
- kind: "agent-run";
25
- runId: string;
26
- } | {
27
- kind: "routine";
28
- routineId: string;
29
- } | {
30
- kind: "create-routine";
31
- } | {
32
- kind: "edit-routine";
33
- routineId: string;
34
- } | {
35
- kind: "routine-run";
36
- routineId: string;
37
- runId: string;
38
- };
39
- /** Host-owned router link for a destination; the chrome has no route vocabulary. */
40
- type EmployeeRenderLink = (destination: EmployeeDestination) => React.ReactElement;
41
- type EmployeeStatus = "ready" | "connecting" | "offline" | "identity-blocked" | "needs-model";
42
- interface EmployeeBrand {
43
- logo: React.ReactNode;
44
- name: string;
45
- }
46
- interface EmployeeIdentity {
47
- email?: string;
48
- liveProfile: string;
49
- assignedAccount: string;
50
- managed?: boolean;
51
- canBind?: boolean;
52
- onBind?: () => void | Promise<void>;
53
- onUnbind?: () => void | Promise<void>;
54
- }
55
- /** Host-owned follow preference for the selected conversation. */
56
- interface EmployeeFollow {
57
- followed: boolean;
58
- onCheckedChange: (followed: boolean) => void;
59
- }
60
- /** Companion availability and its destination, both host-owned. */
61
- interface EmployeeCompanion {
62
- enabled: boolean;
63
- origin: string;
64
- setEnabled: (enabled: boolean) => void;
65
- }
66
- /** Host-owned passkey-vault preference; credential storage stays outside the chrome. */
67
- interface EmployeePasskeyVault {
68
- enabled: boolean;
69
- setEnabled: (enabled: boolean) => void;
70
- }
71
- /** Host sign-in and endpoint-setup controls behind the `needs-model` gate. */
72
- interface EmployeeModelSetup {
73
- onSignIn?: () => void;
74
- busy?: boolean;
75
- error?: React.ReactNode;
76
- label?: string;
77
- onCustomEndpoint?: () => void;
78
- }
79
- /**
80
- * The delegated run the chrome is drilled into. A `ready` run carries the whole
81
- * retained record out of the dispatching thread's projection, so status,
82
- * progress, and report are the dispatching thread's facts, never the child's.
83
- * The host decides which state applies and whether the run may still be
84
- * stopped — `onCancel` is the whole Stop affordance's condition.
85
- */
86
- type EmployeeAgentRun = {
87
- state: "loading";
88
- } | {
89
- state: "unavailable";
90
- } | {
91
- state: "error";
92
- error: string;
93
- } | {
94
- state: "ready";
95
- run: AgentToolRunValue; /** Stops the run. Omit while the run cannot be stopped; the bar follows. */
96
- onCancel?: () => void; /** A stop already in flight, so the control reads as busy rather than dead. */
97
- cancelPending?: boolean;
98
- };
99
- /** One host view following Files and Plugins in the bar and the compact overflow. */
100
- interface EmployeeWorkbenchItem {
101
- id: string;
102
- label: string;
103
- icon: React.ReactNode;
104
- }
105
- interface EmployeeMenuProps {
106
- renderLink: EmployeeRenderLink;
107
- /** Identity assignment and bind/unbind operations behind the account dialog. */
108
- identity?: EmployeeIdentity;
109
- /** Opens the host's model-selection surface. */
110
- onModel?: () => void;
111
- /** Requests host sign-out; session teardown stays host-owned. */
112
- onSignOut?: () => void;
113
- companion?: EmployeeCompanion;
114
- passkeys?: EmployeePasskeyVault;
115
- /** Shown for a selected conversation; omit when there is nothing to follow. */
116
- follow?: EmployeeFollow;
117
- /** Additional host views, following Files and Plugins. */
118
- workbenchNavigation?: readonly EmployeeWorkbenchItem[];
119
- }
120
- /** Employee settings are host-owned state; the menu stores only dialog visibility. */
121
- declare function EmployeeMenu({
122
- renderLink,
123
- identity,
124
- onModel,
125
- onSignOut,
126
- companion,
127
- passkeys,
128
- follow,
129
- workbenchNavigation
130
- }: EmployeeMenuProps): React.JSX.Element;
131
- /** Bar links to Files, Plugins, and host views; the compact overflow carries them instead. */
132
- declare function EmployeeWorkbenchLinks({
133
- view,
134
- renderLink,
135
- workbenchNavigation
136
- }: {
137
- view: EmployeeView;
138
- renderLink: EmployeeRenderLink;
139
- workbenchNavigation?: readonly EmployeeWorkbenchItem[];
140
- }): React.JSX.Element | null;
141
- interface EmployeeShellProps<Thread extends ThinkThreadItem = ThinkThreadItem> extends EmployeeMenuProps {
142
- view: EmployeeView;
143
- /** Host-projected thread history; the chrome neither fetches nor persists it. */
144
- threads?: readonly Thread[];
145
- /** Selected thread, used for the title, the picker, and the return link. */
146
- threadId?: string;
147
- /** The delegated run this chrome is drilled into, when it is drilled into one. */
148
- agentRun?: EmployeeAgentRun;
149
- /** Caller-owned leading bar content, such as the extension's navigation control. */
150
- appBarLeading?: React.ReactNode;
151
- /** Passed the whole history item after the thread picker confirms removal. */
152
- onDeleteThread?: (thread: Thread) => void | Promise<void>;
153
- /** Shared manager shell supplies workforce navigation in place of thread-only navigation. */
154
- sidebar?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
155
- sidebarLabel?: string;
156
- navigation?: readonly EmployeeWorkbenchItem[];
157
- children: React.ReactNode;
158
- }
159
- declare function EmployeeShell<Thread extends ThinkThreadItem = ThinkThreadItem>({
160
- view,
161
- threads,
162
- threadId,
163
- agentRun,
164
- renderLink,
165
- appBarLeading,
166
- onDeleteThread,
167
- sidebar,
168
- sidebarLabel,
169
- navigation,
170
- children,
171
- ...menu
172
- }: EmployeeShellProps<Thread>): React.JSX.Element;
173
- /** Policy and connection gates are host facts, not design-system presets. */
174
- declare function EmployeeGate({
175
- status,
176
- connectingLabel,
177
- identity,
178
- brand,
179
- modelSetup
180
- }: {
181
- status: EmployeeStatus;
182
- connectingLabel?: string;
183
- identity?: EmployeeIdentity;
184
- brand: EmployeeBrand;
185
- modelSetup?: EmployeeModelSetup;
186
- }): React.JSX.Element | null;
187
- /** The composer remains under its existing prompt provider; connection controls are explicit slots. */
188
- declare function EmployeeWelcome({
189
- brand,
190
- children,
191
- suggestions,
192
- suggestionsError,
193
- onRetrySuggestions,
194
- onSubmit,
195
- tray,
196
- setupActions,
197
- hasConnectedApps
198
- }: {
199
- brand: EmployeeBrand;
200
- children: React.ReactNode;
201
- suggestions?: readonly {
202
- label: string;
203
- value: string;
204
- }[];
205
- suggestionsError?: boolean;
206
- onRetrySuggestions?: () => void;
207
- onSubmit: (message: PromptInputMessage) => void | Promise<void>;
208
- tray?: React.ReactNode; /** Slack, Discord, and local-folder actions composed by the host. */
209
- setupActions?: React.ReactNode;
210
- hasConnectedApps?: boolean;
211
- }): React.JSX.Element;
212
- declare const EmployeeChrome: {
213
- Shell: typeof EmployeeShell;
214
- Menu: typeof EmployeeMenu;
215
- WorkbenchLinks: typeof EmployeeWorkbenchLinks;
216
- Gate: typeof EmployeeGate;
217
- Welcome: typeof EmployeeWelcome;
218
- };
219
- //#endregion
1
+ import { a as EmployeeDestination, c as EmployeeMenuProps, d as EmployeeRenderLink, f as EmployeeShellProps, h as EmployeeWorkbenchItem, i as EmployeeCompanion, l as EmployeeModelSetup, m as EmployeeView, n as EmployeeBrand, o as EmployeeFollow, p as EmployeeStatus, r as EmployeeChrome, s as EmployeeIdentity, t as EmployeeAgentRun, u as EmployeePasskeyVault } from "../../EmployeeChrome-C8eTGJWn.js";
220
2
  export { EmployeeAgentRun, EmployeeBrand, EmployeeChrome, EmployeeCompanion, EmployeeDestination, EmployeeFollow, EmployeeIdentity, EmployeeMenuProps, EmployeeModelSetup, EmployeePasskeyVault, EmployeeRenderLink, EmployeeShellProps, EmployeeStatus, EmployeeView, EmployeeWorkbenchItem };