@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.
- package/dist/{AgentChat-DVr2giwD.d.ts → AgentChat-Bibfj7u1.d.ts} +1 -1
- package/dist/{AgentChatStartScreen-CO49yepa.d.ts → AgentChatStartScreen-Bkv7Avni.d.ts} +6 -0
- package/dist/McpPluginCatalog-mbGw8FTu.d.ts +92 -0
- package/dist/ResponsiveSidebarShell-DOXd5T-d.d.ts +111 -0
- package/dist/SetupChecklist-H1JRCIIe.js +77 -0
- package/dist/{ThinkChatActivity-DyGHj01E.d.ts → ThinkChatActivity-CgvmTXXB.d.ts} +4 -1
- package/dist/Workspace-F3raHdYV.d.ts +140 -0
- package/dist/{WorkspaceFileView-D0yFwoDr.js → WorkspaceFileView-DWMKxX_u.js} +15 -21
- package/dist/components/agents-sdk/AgentActivity.js +3 -2
- package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChat.js +1 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +2 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +39 -27
- package/dist/components/agents-sdk/ManagerOffice.js +80 -44
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -91
- package/dist/components/agents-sdk/McpPluginCatalog.js +3 -1
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +18 -4
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +6 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -0
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -0
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +56 -90
- package/dist/components/agents-sdk/ThinkFullApp.js +74 -122
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +8 -6
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +71 -93
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +173 -0
- package/dist/components/agents-sdk/ThinkSidepanel.js +656 -0
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +4 -5
- package/dist/components/agents-sdk/ThinkThreadPicker.js +6 -5
- package/dist/components/agents-sdk/Workspace.d.ts +1 -139
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +5 -2
- package/dist/components/ai-sdk/MessageScroller.js +2 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
- package/dist/components/ai-sdk/PromptInput.js +20 -14
- package/dist/components/extension/ChatGptSignInScreen.js +1 -0
- package/dist/components/foundations/ToggleGroup.d.ts +79 -1
- package/dist/components/foundations/Toolbar.d.ts +151 -1
- package/dist/components/general-purpose/AppFrame.js +1 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +96 -1
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
- package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -95
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +74 -74
- package/dist/components/general-purpose/SetupChecklist.js +1 -76
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.d.ts +3 -0
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +1 -0
- package/dist/styles/accordion.css +1 -0
- package/dist/styles/action-guide.css +8 -7
- package/dist/styles/activity-header.css +13 -39
- package/dist/styles/activity.css +40 -55
- package/dist/styles/agent-attention.css +14 -14
- package/dist/styles/agent-chat.css +80 -58
- package/dist/styles/agent-connection.css +10 -4
- package/dist/styles/agent-tool-detail.css +4 -4
- package/dist/styles/alert-dialog.css +4 -4
- package/dist/styles/app-frame.css +1 -3
- package/dist/styles/app-top-bar.css +5 -9
- package/dist/styles/approval.css +1 -0
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +5 -4
- package/dist/styles/browser-replay.css +6 -6
- package/dist/styles/browser-run-panel.css +1 -0
- package/dist/styles/button.css +15 -6
- package/dist/styles/card.css +5 -5
- package/dist/styles/chatgpt-sign-in-screen.css +1 -1
- package/dist/styles/code-block.css +14 -13
- package/dist/styles/codex-model-selector.css +2 -0
- package/dist/styles/collapsible.css +1 -0
- package/dist/styles/commit.css +6 -6
- package/dist/styles/context.css +9 -9
- package/dist/styles/conversation-tab-picker.css +1 -1
- package/dist/styles/conversation.css +6 -8
- package/dist/styles/dialog.css +4 -4
- package/dist/styles/empty-state.css +3 -3
- package/dist/styles/environment-variables.css +9 -9
- package/dist/styles/field.css +2 -1
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/index.css +4 -3
- package/dist/styles/manager-office.css +23 -29
- package/dist/styles/mcp-plugin-catalog.css +11 -10
- package/dist/styles/mcp-server-picker.css +3 -3
- package/dist/styles/message-scroller.css +9 -11
- package/dist/styles/message.css +43 -20
- package/dist/styles/navigation-menu.css +1 -0
- package/dist/styles/plan.css +13 -12
- package/dist/styles/pricing-page.css +26 -23
- package/dist/styles/prompt-input.css +18 -5
- package/dist/styles/queue.css +1 -0
- package/dist/styles/reasoning.css +1 -9
- package/dist/styles/recipes.css +28 -1
- package/dist/styles/responsive-sidebar-shell.css +55 -24
- package/dist/styles/separator.css +5 -5
- package/dist/styles/sources.css +4 -4
- package/dist/styles/stepper.css +1 -0
- package/dist/styles/streamdown.css +31 -21
- package/dist/styles/tabs.css +1 -0
- package/dist/styles/task.css +5 -17
- package/dist/styles/terminal.css +10 -10
- package/dist/styles/test-results.css +6 -6
- package/dist/styles/think-execution-status.css +2 -2
- package/dist/styles/think-execution-workbench.css +12 -15
- package/dist/styles/think-full-app.css +26 -64
- package/dist/styles/think-routine-library.css +26 -55
- package/dist/styles/think-sidepanel.css +74 -0
- package/dist/styles/think-thread-picker.css +9 -9
- package/dist/styles/utilities.css +33 -0
- package/dist/styles/web-preview.css +20 -19
- package/dist/styles/workspace-explorer.css +18 -21
- package/dist/styles/workspace-mount-manager.css +2 -2
- package/dist/utils/favicon.d.ts +6 -1
- package/dist/utils/favicon.js +18 -1
- package/package.json +2 -2
- package/dist/AppTopBar-ZdgmB_Lu.d.ts +0 -97
- package/dist/ToggleGroup-BrQZOQn_.d.ts +0 -80
- 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 {
|
|
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
|
|
19
|
-
|
|
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
|
-
|
|
31
|
-
label: "
|
|
32
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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:
|
|
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({
|
|
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(
|
|
97
|
+
return /* @__PURE__ */ jsxs(ResponsiveSidebarShell, {
|
|
112
98
|
ref,
|
|
113
99
|
className: cx("think-routine-library", className),
|
|
114
100
|
...props,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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 };
|