@mcp-b/react-components 0.41.0 → 0.43.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 (125) hide show
  1. package/dist/{AgentChat-DVr2giwD.d.ts → AgentChat-Bibfj7u1.d.ts} +1 -1
  2. package/dist/{AgentChatStartScreen-CO49yepa.d.ts → AgentChatStartScreen-Bkv7Avni.d.ts} +6 -0
  3. package/dist/McpPluginCatalog-mbGw8FTu.d.ts +92 -0
  4. package/dist/ResponsiveSidebarShell-DOXd5T-d.d.ts +111 -0
  5. package/dist/SetupChecklist-H1JRCIIe.js +77 -0
  6. package/dist/{ThinkChatActivity-DyGHj01E.d.ts → ThinkChatActivity-CgvmTXXB.d.ts} +4 -1
  7. package/dist/Workspace-F3raHdYV.d.ts +140 -0
  8. package/dist/{WorkspaceFileView-D0yFwoDr.js → WorkspaceFileView-DWMKxX_u.js} +15 -21
  9. package/dist/components/agents-sdk/AgentActivity.js +3 -2
  10. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  11. package/dist/components/agents-sdk/AgentChat.js +1 -0
  12. package/dist/components/agents-sdk/BrowserRunPanel.js +2 -1
  13. package/dist/components/agents-sdk/ManagerOffice.d.ts +39 -27
  14. package/dist/components/agents-sdk/ManagerOffice.js +80 -44
  15. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -91
  16. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -1
  17. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  18. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  19. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  20. package/dist/components/agents-sdk/ThinkChatActivity.js +18 -4
  21. package/dist/components/agents-sdk/ThinkChatToolPanels.js +6 -2
  22. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -0
  23. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -0
  24. package/dist/components/agents-sdk/ThinkFullApp.d.ts +56 -90
  25. package/dist/components/agents-sdk/ThinkFullApp.js +74 -122
  26. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  27. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +8 -6
  28. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +71 -93
  29. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +173 -0
  30. package/dist/components/agents-sdk/ThinkSidepanel.js +656 -0
  31. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +4 -5
  32. package/dist/components/agents-sdk/ThinkThreadPicker.js +6 -5
  33. package/dist/components/agents-sdk/Workspace.d.ts +1 -139
  34. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  35. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  36. package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -3
  37. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  38. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  39. package/dist/components/ai-sdk/AgentChatStartScreen.js +5 -2
  40. package/dist/components/ai-sdk/MessageScroller.js +2 -1
  41. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
  42. package/dist/components/ai-sdk/PromptInput.js +20 -14
  43. package/dist/components/extension/ChatGptSignInScreen.js +1 -0
  44. package/dist/components/foundations/ToggleGroup.d.ts +79 -1
  45. package/dist/components/foundations/Toolbar.d.ts +151 -1
  46. package/dist/components/general-purpose/AppFrame.js +1 -0
  47. package/dist/components/general-purpose/AppTopBar.d.ts +96 -1
  48. package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
  49. package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
  50. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -95
  51. package/dist/components/general-purpose/ResponsiveSidebarShell.js +74 -74
  52. package/dist/components/general-purpose/SetupChecklist.js +1 -76
  53. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  54. package/dist/components/general-purpose/WebPreview.d.ts +3 -0
  55. package/dist/components/general-purpose/WebPreview.js +2 -2
  56. package/dist/components/nanites/AgentToolDetail.js +1 -0
  57. package/dist/styles/accordion.css +1 -0
  58. package/dist/styles/action-guide.css +8 -7
  59. package/dist/styles/activity-header.css +13 -39
  60. package/dist/styles/activity.css +40 -55
  61. package/dist/styles/agent-attention.css +14 -14
  62. package/dist/styles/agent-chat.css +80 -58
  63. package/dist/styles/agent-connection.css +10 -4
  64. package/dist/styles/agent-tool-detail.css +4 -4
  65. package/dist/styles/alert-dialog.css +4 -4
  66. package/dist/styles/app-frame.css +1 -3
  67. package/dist/styles/app-top-bar.css +5 -9
  68. package/dist/styles/approval.css +1 -0
  69. package/dist/styles/artifact.css +6 -6
  70. package/dist/styles/attachment-preview.css +5 -4
  71. package/dist/styles/browser-replay.css +6 -6
  72. package/dist/styles/browser-run-panel.css +1 -0
  73. package/dist/styles/button.css +15 -6
  74. package/dist/styles/card.css +5 -5
  75. package/dist/styles/chatgpt-sign-in-screen.css +1 -1
  76. package/dist/styles/code-block.css +14 -13
  77. package/dist/styles/codex-model-selector.css +2 -0
  78. package/dist/styles/collapsible.css +1 -0
  79. package/dist/styles/commit.css +6 -6
  80. package/dist/styles/context.css +9 -9
  81. package/dist/styles/conversation-tab-picker.css +1 -1
  82. package/dist/styles/conversation.css +6 -8
  83. package/dist/styles/dialog.css +4 -4
  84. package/dist/styles/empty-state.css +3 -3
  85. package/dist/styles/environment-variables.css +9 -9
  86. package/dist/styles/field.css +2 -1
  87. package/dist/styles/fieldset.css +2 -2
  88. package/dist/styles/index.css +4 -3
  89. package/dist/styles/manager-office.css +23 -29
  90. package/dist/styles/mcp-plugin-catalog.css +11 -10
  91. package/dist/styles/mcp-server-picker.css +3 -3
  92. package/dist/styles/message-scroller.css +9 -11
  93. package/dist/styles/message.css +43 -20
  94. package/dist/styles/navigation-menu.css +1 -0
  95. package/dist/styles/plan.css +13 -12
  96. package/dist/styles/pricing-page.css +26 -23
  97. package/dist/styles/prompt-input.css +18 -5
  98. package/dist/styles/queue.css +1 -0
  99. package/dist/styles/reasoning.css +1 -9
  100. package/dist/styles/recipes.css +28 -1
  101. package/dist/styles/responsive-sidebar-shell.css +55 -24
  102. package/dist/styles/separator.css +5 -5
  103. package/dist/styles/sources.css +4 -4
  104. package/dist/styles/stepper.css +1 -0
  105. package/dist/styles/streamdown.css +31 -21
  106. package/dist/styles/tabs.css +1 -0
  107. package/dist/styles/task.css +5 -17
  108. package/dist/styles/terminal.css +10 -10
  109. package/dist/styles/test-results.css +6 -6
  110. package/dist/styles/think-execution-status.css +2 -2
  111. package/dist/styles/think-execution-workbench.css +12 -15
  112. package/dist/styles/think-full-app.css +26 -64
  113. package/dist/styles/think-routine-library.css +26 -55
  114. package/dist/styles/think-sidepanel.css +74 -0
  115. package/dist/styles/think-thread-picker.css +9 -9
  116. package/dist/styles/utilities.css +33 -0
  117. package/dist/styles/web-preview.css +20 -19
  118. package/dist/styles/workspace-explorer.css +18 -21
  119. package/dist/styles/workspace-mount-manager.css +2 -2
  120. package/dist/utils/favicon.d.ts +6 -1
  121. package/dist/utils/favicon.js +18 -1
  122. package/package.json +2 -2
  123. package/dist/AppTopBar-ZdgmB_Lu.d.ts +0 -97
  124. package/dist/ToggleGroup-BrQZOQn_.d.ts +0 -80
  125. package/dist/Toolbar-CBOseBQr.d.ts +0 -152
@@ -1,7 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, y as EllipsisIcon, z as PlayIcon } from "../../icons-CVFSeTJn.js";
2
+ import { K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, z as PlayIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
- import { Menu } from "../foundations/Menu.js";
5
4
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
6
5
  import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
6
  import { EmptyState } from "../foundations/EmptyState.js";
@@ -15,45 +14,32 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
14
  //#region src/components/agents-sdk/ThinkRoutineLibrary.tsx
16
15
  function RoutineTopBarActions({ appBarActions, busy, onDelete, editLink, onRun, routineName }) {
17
16
  const [deleteOpen, setDeleteOpen] = React.useState(false);
18
- const moreActionsRef = React.useRef(null);
19
- const hasMenu = Boolean(editLink || onDelete);
20
- if (!appBarActions && !onRun && !hasMenu) return null;
17
+ const deleteButtonRef = React.useRef(null);
18
+ if (!appBarActions && !onRun && !editLink && !onDelete) return null;
21
19
  return /* @__PURE__ */ jsxs(Fragment, { children: [
22
20
  appBarActions,
23
21
  onRun ? /* @__PURE__ */ jsx(AppTopBar.Button, {
24
22
  label: "Run schedule",
25
- tooltip: "Run now",
26
23
  disabled: busy,
27
24
  onClick: onRun,
28
25
  children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
29
26
  }) : null,
30
- hasMenu ? /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
31
- label: "More schedule actions",
32
- tooltip: "More actions",
27
+ editLink ? /* @__PURE__ */ jsx(AppTopBar.Link, {
28
+ label: "Edit schedule",
29
+ render: editLink,
30
+ children: /* @__PURE__ */ jsx(PencilIcon, {})
31
+ }) : null,
32
+ onDelete ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
33
+ ref: deleteButtonRef,
34
+ label: "Delete schedule",
33
35
  disabled: busy,
34
- render: /* @__PURE__ */ jsx(Menu.Trigger, {
35
- ref: moreActionsRef,
36
- unstyled: true
37
- }),
38
- children: /* @__PURE__ */ jsx(EllipsisIcon, {})
39
- }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
40
- align: "end",
41
- sideOffset: 4,
42
- children: /* @__PURE__ */ jsxs(Menu.Popup, { children: [editLink ? /* @__PURE__ */ jsx(Menu.Item, {
43
- render: editLink,
44
- children: "Edit schedule"
45
- }) : null, onDelete ? /* @__PURE__ */ jsx(Menu.Item, {
46
- variant: "destructive",
47
- disabled: busy,
48
- onClick: () => setDeleteOpen(true),
49
- children: "Delete schedule"
50
- }) : null] })
51
- }) })] }) : null,
52
- onDelete ? /* @__PURE__ */ jsx(AlertDialog.Root, {
36
+ onClick: () => setDeleteOpen(true),
37
+ children: /* @__PURE__ */ jsx(TrashIcon, {})
38
+ }), /* @__PURE__ */ jsx(AlertDialog.Root, {
53
39
  open: deleteOpen,
54
40
  onOpenChange: setDeleteOpen,
55
41
  children: /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [/* @__PURE__ */ jsx(AlertDialog.Backdrop, {}), /* @__PURE__ */ jsx(AlertDialog.Viewport, { children: /* @__PURE__ */ jsxs(AlertDialog.Popup, {
56
- finalFocus: moreActionsRef,
42
+ finalFocus: deleteButtonRef,
57
43
  children: [
58
44
  /* @__PURE__ */ jsxs(AlertDialog.Title, { children: [
59
45
  "Delete ",
@@ -72,7 +58,7 @@ function RoutineTopBarActions({ appBarActions, busy, onDelete, editLink, onRun,
72
58
  })] })
73
59
  ]
74
60
  }) })] })
75
- }) : null
61
+ })] }) : null
76
62
  ] });
77
63
  }
78
64
  /**
@@ -83,7 +69,7 @@ function RoutineTopBarActions({ appBarActions, busy, onDelete, editLink, onRun,
83
69
  * and `ThinkRoutineRuns`; consumers compose `ThinkRoutineForm` in their create
84
70
  * route and may also use these surfaces independently.
85
71
  */
86
- function ThinkRoutineLibrary({ appBarActions, appBarLeading, className, createRoutineLink, error: catalogError, onDeleteRoutine, onRoutineEnabledChange, onRunRoutine, renderEditRoutineLink, renderRoutineLink, renderRoutineDetail, renderRunLink, ref, routines, selectedRoutineId, showOwner = true, ...props }) {
72
+ function ThinkRoutineLibrary({ bar, className, createRoutineLink, error: catalogError, onDeleteRoutine, onRoutineEnabledChange, onRunRoutine, renderEditRoutineLink, renderRoutineLink, renderRoutineDetail, renderRunLink, ref, routines, selectedRoutineId, showOwner = true, ...props }) {
87
73
  const [busy, setBusy] = React.useState(false);
88
74
  const [announcement, setAnnouncement] = React.useState("");
89
75
  const [actionError, setActionError] = React.useState(null);
@@ -108,73 +94,65 @@ function ThinkRoutineLibrary({ appBarActions, appBarLeading, className, createRo
108
94
  renderRunLink: renderRunLink ? (run) => renderRunLink(selectedRoutine, run) : void 0,
109
95
  onEnabledChange: onRoutineEnabledChange ? (enabled) => void perform(() => onRoutineEnabledChange(selectedRoutine, enabled), `${selectedRoutine.name} ${enabled ? "activated" : "paused"}.`) : void 0
110
96
  } : void 0;
111
- return /* @__PURE__ */ jsxs("div", {
97
+ return /* @__PURE__ */ jsxs(ResponsiveSidebarShell, {
112
98
  ref,
113
99
  className: cx("think-routine-library", className),
114
100
  ...props,
115
- children: [
116
- catalogError || actionError ? /* @__PURE__ */ jsxs("div", {
117
- className: "think-routine-library__error",
118
- role: "alert",
119
- children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: catalogError || actionError })]
120
- }) : null,
121
- /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
122
- className: "think-routine-library__layout",
123
- sidebarLabel: "schedules",
124
- showMainLabel: "Show selected schedule",
125
- topBarProps: { "aria-label": "Schedule controls" },
126
- topBarLeading: appBarLeading,
127
- topBarTitle: selectedRoutine?.name ?? "Schedules",
128
- compactTitleTrigger: selectedRoutine ? /* @__PURE__ */ jsx("span", { children: selectedRoutine.name }) : void 0,
129
- topBarTrailing: /* @__PURE__ */ jsx(RoutineTopBarActions, {
130
- appBarActions,
131
- busy,
132
- routineName: selectedRoutine?.name ?? "schedule",
133
- editLink: selectedRoutine && renderEditRoutineLink ? renderEditRoutineLink(selectedRoutine) : void 0,
134
- onRun: selectedRoutine && onRunRoutine ? () => void perform(() => onRunRoutine(selectedRoutine), `Started ${selectedRoutine.name}.`) : void 0,
135
- onDelete: selectedRoutine && onDeleteRoutine ? () => void perform(() => onDeleteRoutine(selectedRoutine), `Deleted ${selectedRoutine.name}.`) : void 0
136
- }),
137
- sidebar: ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ThinkRoutineBrowser, {
138
- routines,
139
- selectedRoutineId,
140
- showOwner,
141
- renderRoutineLink,
142
- createRoutineLink,
143
- onRoutineLinkClick: (event) => {
144
- if (!isPlainPrimaryLinkActivation(event)) return;
145
- closeSidebarOnCompact();
146
- }
147
- }),
148
- children: /* @__PURE__ */ jsx("main", {
149
- className: "think-routine-library__main",
150
- children: detailProps ? /* @__PURE__ */ jsx(React.Fragment, { children: renderRoutineDetail ? renderRoutineDetail({
151
- ...detailProps,
152
- defaultDetail: /* @__PURE__ */ jsx(ThinkRoutineDetail, {
153
- ...detailProps,
154
- showOwner
155
- })
156
- }) : /* @__PURE__ */ jsx(ThinkRoutineDetail, {
157
- ...detailProps,
158
- showOwner
159
- }) }, detailProps.routine.id) : /* @__PURE__ */ jsx(EmptyState, {
160
- className: "think-routine-library__empty-detail",
161
- title: selectedRoutineId ? "Schedule unavailable" : routines.length ? "Select a schedule" : "No schedules yet",
162
- description: routines.length ? "Select an available schedule." : "Create a schedule to run recurring Think prompts.",
163
- children: !routines.length && createRoutineLink ? /* @__PURE__ */ jsx(NavigationLink, {
164
- render: createRoutineLink,
165
- className: buttonVariants({ color: "primary" }),
166
- children: "Create schedule"
167
- }) : null
168
- })
101
+ sidebarLabel: "schedules",
102
+ showMainLabel: "Show selected schedule",
103
+ error: catalogError || actionError || void 0,
104
+ bar: {
105
+ ...bar,
106
+ label: "Schedule controls",
107
+ title: bar?.title ?? selectedRoutine?.name ?? "Schedules",
108
+ compactTitleTrigger: selectedRoutine ? /* @__PURE__ */ jsx("span", { children: selectedRoutine.name }) : void 0,
109
+ actions: /* @__PURE__ */ jsx(RoutineTopBarActions, {
110
+ appBarActions: bar?.actions,
111
+ busy,
112
+ routineName: selectedRoutine?.name ?? "schedule",
113
+ editLink: selectedRoutine && renderEditRoutineLink ? renderEditRoutineLink(selectedRoutine) : void 0,
114
+ onRun: selectedRoutine && onRunRoutine ? () => void perform(() => onRunRoutine(selectedRoutine), `Started ${selectedRoutine.name}.`) : void 0,
115
+ onDelete: selectedRoutine && onDeleteRoutine ? () => void perform(() => onDeleteRoutine(selectedRoutine), `Deleted ${selectedRoutine.name}.`) : void 0
116
+ })
117
+ },
118
+ sidebar: ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ThinkRoutineBrowser, {
119
+ routines,
120
+ selectedRoutineId,
121
+ showOwner,
122
+ renderRoutineLink,
123
+ createRoutineLink,
124
+ onRoutineLinkClick: (event) => {
125
+ if (!isPlainPrimaryLinkActivation(event)) return;
126
+ closeSidebarOnCompact();
127
+ }
128
+ }),
129
+ children: [/* @__PURE__ */ jsx("main", {
130
+ className: "think-routine-library__main",
131
+ children: detailProps ? /* @__PURE__ */ jsx(React.Fragment, { children: renderRoutineDetail ? renderRoutineDetail({
132
+ ...detailProps,
133
+ defaultDetail: /* @__PURE__ */ jsx(ThinkRoutineDetail, {
134
+ ...detailProps,
135
+ showOwner
169
136
  })
170
- }),
171
- /* @__PURE__ */ jsx("div", {
172
- className: "think-routine-library__status sigvelo-visually-hidden",
173
- role: "status",
174
- "aria-atomic": "true",
175
- children: announcement
137
+ }) : /* @__PURE__ */ jsx(ThinkRoutineDetail, {
138
+ ...detailProps,
139
+ showOwner
140
+ }) }, detailProps.routine.id) : /* @__PURE__ */ jsx(EmptyState, {
141
+ className: "think-routine-library__empty-detail",
142
+ title: selectedRoutineId ? "Schedule unavailable" : routines.length ? "Select a schedule" : "No schedules yet",
143
+ description: routines.length ? "Select an available schedule." : "Create a schedule to run recurring Think prompts.",
144
+ children: !routines.length && createRoutineLink ? /* @__PURE__ */ jsx(NavigationLink, {
145
+ render: createRoutineLink,
146
+ className: buttonVariants({ color: "primary" }),
147
+ children: "Create schedule"
148
+ }) : null
176
149
  })
177
- ]
150
+ }), /* @__PURE__ */ jsx("div", {
151
+ className: "think-routine-library__status sigvelo-visually-hidden",
152
+ role: "status",
153
+ "aria-atomic": "true",
154
+ children: announcement
155
+ })]
178
156
  });
179
157
  }
180
158
  //#endregion
@@ -0,0 +1,173 @@
1
+ import { ThinkChatDraft } from "./ThinkChat.js";
2
+ import { ThinkThreadItem } from "./ThinkThreadPicker.js";
3
+ import { ThinkFullAppAgent, ThinkFullAppConversation, ThinkFullAppProps } from "./ThinkFullApp.js";
4
+ import { ThinkRoutine } from "./ThinkRoutine.js";
5
+ import { SetupChecklistEntry } from "../general-purpose/SetupChecklist.js";
6
+ import * as React from "react";
7
+ import { UIMessage } from "ai";
8
+
9
+ //#region src/components/agents-sdk/ThinkSidepanel.d.ts
10
+ type ThinkSidepanelView = "chat" | "files" | "plugins" | "schedules" | "live";
11
+ type ThinkSidepanelDestination = {
12
+ kind: "thread";
13
+ threadId: string;
14
+ } | {
15
+ kind: "new-thread";
16
+ } | {
17
+ kind: "view";
18
+ view: ThinkSidepanelView;
19
+ } | {
20
+ kind: "agent-run";
21
+ runId: string;
22
+ } | {
23
+ kind: "routine";
24
+ routineId: string;
25
+ } | {
26
+ kind: "create-routine";
27
+ } | {
28
+ kind: "edit-routine";
29
+ routineId: string;
30
+ } | {
31
+ kind: "routine-run";
32
+ routineId: string;
33
+ runId: string;
34
+ };
35
+ type ThinkSidepanelStatus = "ready" | "connecting" | "offline" | "identity-blocked" | "needs-model";
36
+ interface ThinkSidepanelModelSetup {
37
+ onSignIn?: () => void;
38
+ busy?: boolean;
39
+ error?: React.ReactNode;
40
+ label?: string;
41
+ onCustomEndpoint?: () => void;
42
+ }
43
+ interface ThinkSidepanelFollow {
44
+ followed: boolean;
45
+ onCheckedChange: (followed: boolean) => void;
46
+ }
47
+ interface ThinkSidepanelCompanion {
48
+ enabled: boolean;
49
+ origin: string;
50
+ setEnabled: (enabled: boolean) => void;
51
+ }
52
+ interface ThinkSidepanelPasskeyVault {
53
+ enabled: boolean;
54
+ setEnabled: (enabled: boolean) => void;
55
+ }
56
+ interface ThinkSidepanelConnection {
57
+ configured: boolean;
58
+ description?: string;
59
+ onSelect: () => void;
60
+ }
61
+ interface ThinkSidepanelStart {
62
+ onSubmit: ThinkChatDraft["onSubmit"];
63
+ suggestions?: readonly {
64
+ label: string;
65
+ value: string;
66
+ }[];
67
+ suggestionsError?: boolean;
68
+ onRetrySuggestions?: () => void;
69
+ hasConnectedApps?: boolean;
70
+ slack?: ThinkSidepanelConnection;
71
+ discord?: ThinkSidepanelConnection;
72
+ onAttachFolder?: () => void;
73
+ attachFolderBusy?: boolean;
74
+ personalization?: {
75
+ entries: readonly SetupChecklistEntry[];
76
+ onSelect: (id: string) => void;
77
+ };
78
+ }
79
+ interface ThinkSidepanelSchedules<TRoutine extends ThinkRoutine = ThinkRoutine> {
80
+ routines: readonly TRoutine[];
81
+ selectedRoutineId: string | null;
82
+ onRunRoutine?: (routine: TRoutine) => void | Promise<void>;
83
+ onRoutineEnabledChange?: (routine: TRoutine, enabled: boolean) => void | Promise<void>;
84
+ onDeleteRoutine?: (routine: TRoutine) => void | Promise<void>;
85
+ error?: React.ReactNode;
86
+ /** Host-owned create/edit form. The side panel only frames it. */
87
+ editor?: React.ReactNode;
88
+ }
89
+ interface ThinkSidepanelAgentRun {
90
+ title: string;
91
+ running?: boolean;
92
+ onCancel?: () => void;
93
+ }
94
+ interface ThinkSidepanelIdentity {
95
+ email?: string;
96
+ liveProfile: string;
97
+ assignedAccount: string;
98
+ managed?: boolean;
99
+ canBind?: boolean;
100
+ onBind?: () => void | Promise<void>;
101
+ onUnbind?: () => void | Promise<void>;
102
+ }
103
+ interface ThinkSidepanelProps<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
104
+ sourceKey: string;
105
+ view: ThinkSidepanelView;
106
+ thread?: {
107
+ id: string;
108
+ title: string;
109
+ };
110
+ threads?: readonly ThinkThreadItem[];
111
+ conversation?: ThinkFullAppConversation<AgentT, State, MessageT>;
112
+ workspace?: ThinkFullAppProps<AgentT, State, MessageT>["workspace"];
113
+ plugins?: ThinkFullAppProps<AgentT, State, MessageT>["plugins"];
114
+ messages?: ThinkFullAppProps<AgentT, State, MessageT>["messages"];
115
+ /** App-authored TanStack Link for a thread, view, routine, or agent-run destination. */
116
+ renderLink: (destination: ThinkSidepanelDestination) => React.ReactElement;
117
+ onDeleteThread?: (thread: ThinkThreadItem) => void | Promise<void>;
118
+ follow?: ThinkSidepanelFollow;
119
+ companion?: ThinkSidepanelCompanion;
120
+ passkeyVault?: ThinkSidepanelPasskeyVault;
121
+ identity?: ThinkSidepanelIdentity;
122
+ onModel?: () => void;
123
+ onSignOut?: () => void;
124
+ brand: {
125
+ logo: React.ReactNode;
126
+ name: string;
127
+ };
128
+ appBarLeading?: React.ReactNode;
129
+ status?: ThinkSidepanelStatus;
130
+ connectingLabel?: string;
131
+ modelSetup?: ThinkSidepanelModelSetup;
132
+ start?: ThinkSidepanelStart;
133
+ schedules?: ThinkSidepanelSchedules;
134
+ agentRun?: ThinkSidepanelAgentRun;
135
+ /** Host-owned live view. The side panel only frames it. */
136
+ live?: React.ReactNode;
137
+ }
138
+ /**
139
+ * The employee side panel: icon-and-tooltip chrome, start screen, schedules,
140
+ * conversation plus workbench. Hosts hydrate conversation, workspace,
141
+ * plugins, and callables. Storybook is the place to iterate the chrome.
142
+ */
143
+ declare function ThinkSidepanel<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage>({
144
+ agentRun,
145
+ appBarLeading,
146
+ brand,
147
+ className,
148
+ companion,
149
+ connectingLabel,
150
+ conversation,
151
+ follow,
152
+ identity,
153
+ live,
154
+ messages,
155
+ modelSetup,
156
+ onDeleteThread,
157
+ onModel,
158
+ onSignOut,
159
+ passkeyVault,
160
+ plugins,
161
+ renderLink,
162
+ schedules,
163
+ sourceKey,
164
+ start,
165
+ status,
166
+ thread,
167
+ threads,
168
+ view,
169
+ workspace,
170
+ ...props
171
+ }: ThinkSidepanelProps<AgentT, State, MessageT>): React.JSX.Element;
172
+ //#endregion
173
+ export { ThinkSidepanel, ThinkSidepanelAgentRun, ThinkSidepanelCompanion, ThinkSidepanelConnection, ThinkSidepanelDestination, ThinkSidepanelFollow, ThinkSidepanelIdentity, ThinkSidepanelModelSetup, ThinkSidepanelPasskeyVault, ThinkSidepanelProps, ThinkSidepanelSchedules, ThinkSidepanelStart, ThinkSidepanelStatus, ThinkSidepanelView };