@mcp-b/react-components 0.40.0 → 0.42.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-CVO7xyLC.d.ts → AgentChat-DVr2giwD.d.ts} +1 -1
- package/dist/{AgentToolRunsContext-BCVqCtJ1.d.ts → AgentToolRunsContext-daY67hFM.d.ts} +12 -0
- package/dist/{CodeBlock-CWk1FVtm.js → CodeBlock-BjELA-_s.js} +1 -1
- package/dist/{FileTree-xqHYBw4g.js → FileTree-DMYRdT6R.js} +1 -1
- package/dist/McpConnectorForm-MRm1r59e.d.ts +39 -0
- package/dist/{Message-DBsHHhcM.d.ts → Message-D_vCVEGB.d.ts} +20 -1
- package/dist/{ThinkChatActivity-D6-_5Phw.d.ts → ThinkChatActivity-CsDql-ER.d.ts} +4 -1
- package/dist/{ThinkExecutionRun-lYYgyeE1.d.ts → ThinkExecutionRun-k8bpyXqt.d.ts} +3 -3
- package/dist/{WorkspaceFileView-Lab3om3F.js → WorkspaceFileView-DwdXiKku.js} +17 -22
- package/dist/{WorkspaceMessageResponse-Cy28WGSz.d.ts → WorkspaceMessageResponse-D66ty4FO.d.ts} +1 -1
- package/dist/components/agents-sdk/AgentActivity.js +4 -3
- package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChat.js +42 -18
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +1 -1
- package/dist/components/agents-sdk/AgentToolRunsContext.js +12 -0
- package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +135 -0
- package/dist/components/agents-sdk/BrowserLiveScreen.js +637 -0
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +2 -2
- package/dist/components/agents-sdk/BrowserLiveView.js +6 -9
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +8 -13
- package/dist/components/agents-sdk/ManagerOffice.d.ts +168 -0
- package/dist/components/agents-sdk/ManagerOffice.js +698 -0
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +8 -2
- package/dist/components/agents-sdk/McpPluginCatalog.js +82 -62
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +1 -9
- package/dist/components/agents-sdk/SubagentRunDetails.js +1 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +4 -2
- package/dist/components/agents-sdk/SubagentRunSelector.js +7 -6
- package/dist/components/agents-sdk/ThinkChat.d.ts +4 -4
- 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 +7 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +45 -43
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +5 -6
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +8 -12
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +43 -37
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +42 -78
- package/dist/components/agents-sdk/ThinkFullApp.js +121 -202
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +4 -15
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +7 -6
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +112 -140
- package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +3 -10
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +2 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +11 -11
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +1 -1
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.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.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +25 -3
- package/dist/components/ai-sdk/MessageScroller.js +3 -2
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +2 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +21 -15
- package/dist/components/ai-sdk/Queue.d.ts +4 -4
- package/dist/components/ai-sdk/Queue.js +6 -15
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +2 -2
- package/dist/components/ai-sdk/Task.js +2 -2
- package/dist/components/extension/ChatGptSignInScreen.js +2 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/Avatar.d.ts +1 -10
- package/dist/components/foundations/Avatar.js +1 -10
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.js +1 -0
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/LinkButton.d.ts +12 -10
- package/dist/components/foundations/LinkButton.js +15 -11
- package/dist/components/foundations/Menubar.js +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 +79 -1
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AppFrame.js +1 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +6 -0
- package/dist/components/general-purpose/AppTopBar.js +2 -1
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +5 -13
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +4 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +4 -9
- package/dist/components/general-purpose/PricingPlanCard.js +15 -14
- 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 +105 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +112 -56
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.d.ts +1 -1
- package/dist/components/general-purpose/Terminal.js +4 -12
- package/dist/components/general-purpose/TestResults.d.ts +1 -1
- package/dist/components/general-purpose/TestResults.js +8 -21
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.d.ts +4 -1
- package/dist/components/general-purpose/WebPreview.js +6 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +6 -5
- package/dist/components/nanites/NaniteScene.js +11 -11
- package/dist/{copy-button-Bc7jsYv_.js → copy-button-lys9N_aI.js} +1 -1
- package/dist/{icons-DwgNir1Q.d.ts → icons-0corjfxR.d.ts} +1 -16
- package/dist/{icons-MmIXciMO.js → icons-CVFSeTJn.js} +2 -5
- 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 +19 -19
- package/dist/styles/agent-chat.css +94 -42
- package/dist/styles/agent-connection.css +10 -4
- package/dist/styles/agent-tool-detail.css +5 -15
- package/dist/styles/alert-dialog.css +4 -4
- package/dist/styles/app-frame.css +1 -3
- package/dist/styles/app-icon.css +12 -18
- package/dist/styles/app-top-bar.css +31 -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/avatar.css +6 -22
- package/dist/styles/base.css +2 -8
- package/dist/styles/browser-live-screen.css +38 -0
- package/dist/styles/browser-live-view.css +12 -4
- package/dist/styles/browser-replay.css +6 -6
- package/dist/styles/browser-run-panel.css +21 -18
- package/dist/styles/button.css +15 -6
- package/dist/styles/card.css +5 -5
- package/dist/styles/chatgpt-sign-in-screen.css +6 -6
- 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 +30 -7
- 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 +12 -9
- package/dist/styles/field.css +2 -1
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/index.css +8 -7
- package/dist/styles/manager-office.css +480 -0
- package/dist/styles/mcp-plugin-catalog.css +44 -39
- package/dist/styles/mcp-server-picker.css +4 -4
- package/dist/styles/message-scroller.css +9 -11
- package/dist/styles/message.css +74 -28
- package/dist/styles/nanite-scene.css +9 -9
- package/dist/styles/navigation-menu.css +1 -0
- package/dist/styles/plan.css +13 -12
- package/dist/styles/pricing-page.css +37 -30
- package/dist/styles/prompt-input.css +26 -18
- package/dist/styles/queue.css +1 -0
- package/dist/styles/reasoning.css +1 -9
- package/dist/styles/recipes.css +29 -58
- package/dist/styles/responsive-sidebar-shell.css +107 -29
- 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/subagent-run.css +20 -3
- package/dist/styles/tabs.css +1 -0
- package/dist/styles/task.css +5 -17
- package/dist/styles/terminal.css +29 -10
- package/dist/styles/test-results.css +16 -7
- package/dist/styles/think-execution-status.css +10 -26
- package/dist/styles/think-execution-workbench.css +98 -108
- package/dist/styles/think-full-app.css +75 -225
- package/dist/styles/think-routine-library.css +26 -95
- package/dist/styles/think-thread-picker.css +17 -12
- package/dist/styles/transition-surface.css +7 -8
- package/dist/styles/utilities.css +75 -0
- package/dist/styles/web-preview.css +46 -22
- package/dist/styles/workspace-explorer.css +22 -44
- package/dist/styles/workspace-mount-manager.css +24 -2
- package/dist/utils/favicon.d.ts +6 -1
- package/dist/utils/favicon.js +18 -1
- package/package.json +37 -35
- package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +0 -68
- package/dist/ToggleGroup-_pQMyHGM.d.ts +0 -80
- package/dist/components/agents-sdk/AgentActivityPreview.d.ts +0 -46
- package/dist/components/agents-sdk/AgentActivityPreview.js +0 -93
- package/dist/components/agents-sdk/ThinkThreadShell.d.ts +0 -38
- package/dist/components/agents-sdk/ThinkThreadShell.js +0 -27
- package/dist/components/foundations/Badge.d.ts +0 -62
- package/dist/components/foundations/Badge.js +0 -55
- package/dist/components/foundations/StatusPill.d.ts +0 -43
- package/dist/components/foundations/StatusPill.js +0 -35
- package/dist/components/general-purpose/Shell.d.ts +0 -149
- package/dist/components/general-purpose/Shell.js +0 -116
- package/dist/styles/agent-activity-preview-overlay.css +0 -169
- package/dist/styles/agent-activity-preview.css +0 -209
- package/dist/styles/badge.css +0 -120
- package/dist/styles/shell.css +0 -122
- package/dist/styles/status-pill.css +0 -39
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Button } from "../foundations/Button.js";
|
|
2
|
+
import { S as FileIcon, c as BoxIcon } from "../../icons-CVFSeTJn.js";
|
|
4
3
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
5
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
-
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
4
|
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
5
|
+
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
9
6
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DtH66bAY.js";
|
|
10
7
|
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DkA4Wr71.js";
|
|
11
8
|
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
12
|
-
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
13
9
|
import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
|
|
14
10
|
import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
|
|
15
|
-
import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
16
11
|
import { useWorkspace } from "./Workspace.js";
|
|
17
12
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
18
13
|
import * as React from "react";
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
15
|
//#region src/components/agents-sdk/ThinkFullApp.tsx
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
16
|
+
/** Matches --sigvelo-layout-conversation (24.5rem). */
|
|
17
|
+
const conversationDefaultWidth = 392;
|
|
18
|
+
const conversationMinWidth = 320;
|
|
19
|
+
const conversationMaxWidth = 640;
|
|
20
|
+
const conversationKeyboardStep = 24;
|
|
21
|
+
/** Keep in lockstep with --sigvelo-layout-break-compact / the 56rem @container. */
|
|
22
|
+
function compactBreakPx(el) {
|
|
23
|
+
const raw = getComputedStyle(el).getPropertyValue("--sigvelo-layout-break-compact").trim();
|
|
24
|
+
if (raw.endsWith("rem")) return Number.parseFloat(raw) * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
25
|
+
const px = Number.parseFloat(raw);
|
|
26
|
+
return Number.isFinite(px) ? px : 896;
|
|
27
|
+
}
|
|
28
|
+
function isCompactApp(el) {
|
|
29
|
+
return el.getBoundingClientRect().width <= compactBreakPx(el);
|
|
30
|
+
}
|
|
26
31
|
function WorkspacePanel({ config }) {
|
|
27
32
|
const selectedPath = config.navigation.current.destination.kind === "file" ? config.navigation.current.destination.path : null;
|
|
28
33
|
return /* @__PURE__ */ jsx(WorkspaceExplorer, {
|
|
@@ -40,12 +45,6 @@ function WorkspacePanel({ config }) {
|
|
|
40
45
|
actions: config.actions
|
|
41
46
|
});
|
|
42
47
|
}
|
|
43
|
-
function PluginsPanel({ config }) {
|
|
44
|
-
return /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
45
|
-
className: "think-full-app__workbench",
|
|
46
|
-
children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(ScrollArea.Content, { children: /* @__PURE__ */ jsx(McpPluginCatalog, { ...config }) }) }), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })]
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
48
|
/**
|
|
50
49
|
* Approval discovery and background-agent events need a live connection, so they
|
|
51
50
|
* live here rather than in the shell, which also renders before there is one.
|
|
@@ -81,33 +80,40 @@ function ThinkFullAppThreadChat({ agent, agentTools, chat, messages, renderAgent
|
|
|
81
80
|
})
|
|
82
81
|
});
|
|
83
82
|
}
|
|
84
|
-
/** Combines ThinkChat with
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
/** Combines ThinkChat with a resizable workbench. Wide apps with a workspace
|
|
84
|
+
* open Files beside the conversation; compact (extension) widths stay on chat
|
|
85
|
+
* until a view is selected. */
|
|
86
|
+
function ThinkFullApp({ bar, className, conversation, defaultView: defaultViewProp, messages, onViewChange, plugins, ref, renderAgentToolRunLink, sourceKey, style, threadSidebar, threadStatusSummary, view, workbenchPanels, workspace, ...props }) {
|
|
87
87
|
const appRef = React.useRef(null);
|
|
88
88
|
const workbenchPanelRef = React.useRef(null);
|
|
89
89
|
const pendingPanelFocusRef = React.useRef(null);
|
|
90
|
-
const [
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
90
|
+
const [innerView, setInnerView] = React.useState(defaultViewProp ?? "chat");
|
|
91
|
+
const userChoseView = React.useRef(defaultViewProp !== void 0 || view !== void 0);
|
|
92
|
+
const requestedView = view ?? innerView;
|
|
93
|
+
const setView = React.useCallback((next) => {
|
|
94
|
+
userChoseView.current = true;
|
|
95
|
+
if (view === void 0) setInnerView(next);
|
|
96
|
+
onViewChange?.(next);
|
|
97
|
+
}, [onViewChange, view]);
|
|
98
|
+
React.useLayoutEffect(() => {
|
|
99
|
+
if (view !== void 0 || defaultViewProp !== void 0 || userChoseView.current) return;
|
|
100
|
+
if (workspace === void 0) return;
|
|
101
|
+
const el = appRef.current;
|
|
102
|
+
if (!el) return;
|
|
103
|
+
const syncViewToWidth = () => {
|
|
104
|
+
if (userChoseView.current) return;
|
|
105
|
+
const next = isCompactApp(el) ? "chat" : "files";
|
|
106
|
+
setInnerView((current) => current === next ? current : next);
|
|
107
|
+
};
|
|
108
|
+
syncViewToWidth();
|
|
109
|
+
const observer = new ResizeObserver(syncViewToWidth);
|
|
110
|
+
observer.observe(el);
|
|
111
|
+
return () => observer.disconnect();
|
|
112
|
+
}, [
|
|
113
|
+
defaultViewProp,
|
|
114
|
+
view,
|
|
115
|
+
workspace
|
|
116
|
+
]);
|
|
111
117
|
const availableWorkbenchPanels = [];
|
|
112
118
|
if (workspace !== void 0) availableWorkbenchPanels.push({
|
|
113
119
|
id: "files",
|
|
@@ -115,52 +121,24 @@ function ThinkFullApp({ appBarActions, appBarLeading, appBarTitle, className, co
|
|
|
115
121
|
icon: /* @__PURE__ */ jsx(FileIcon, {}),
|
|
116
122
|
render: () => /* @__PURE__ */ jsx(WorkspacePanel, { config: workspace })
|
|
117
123
|
});
|
|
118
|
-
if (renderExecutionRunLink && agent) availableWorkbenchPanels.push({
|
|
119
|
-
id: "execution",
|
|
120
|
-
label: "Execution",
|
|
121
|
-
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
122
|
-
render: () => /* @__PURE__ */ jsx(React.Suspense, {
|
|
123
|
-
fallback: /* @__PURE__ */ jsx("div", {
|
|
124
|
-
className: "think-full-app__workbench think-full-app__workbench--loading",
|
|
125
|
-
role: "status",
|
|
126
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
127
|
-
icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
|
|
128
|
-
description: "Loading execution"
|
|
129
|
-
})
|
|
130
|
-
}),
|
|
131
|
-
children: /* @__PURE__ */ jsx(ThinkExecutionWorkbench, {
|
|
132
|
-
source: agent.stub,
|
|
133
|
-
sourceKey,
|
|
134
|
-
title: "Execution",
|
|
135
|
-
selectedRun: selectedExecutionRun,
|
|
136
|
-
renderRunLink: renderExecutionRunLink
|
|
137
|
-
})
|
|
138
|
-
})
|
|
139
|
-
});
|
|
140
124
|
if (plugins) availableWorkbenchPanels.push({
|
|
141
125
|
id: "plugins",
|
|
142
126
|
label: "Plugins",
|
|
143
127
|
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
144
|
-
render: () => /* @__PURE__ */ jsx(
|
|
128
|
+
render: () => /* @__PURE__ */ jsx(McpPluginCatalog, { ...plugins })
|
|
145
129
|
});
|
|
146
130
|
if (workbenchPanels) availableWorkbenchPanels.push(...workbenchPanels);
|
|
147
|
-
const
|
|
148
|
-
const activePanel = requestedWorkbenchOpen ? selectedPanel : void 0;
|
|
149
|
-
const activeWorkbenchView = activePanel?.id;
|
|
131
|
+
const activePanel = requestedView === "chat" ? void 0 : availableWorkbenchPanels.find((panel) => panel.id === requestedView);
|
|
150
132
|
const hasWorkbench = activePanel !== void 0;
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
const shouldShowWorkbenchViewSwitch = showWorkbenchViewSwitch && availableWorkbenchPanels.length > 0;
|
|
154
|
-
const workbenchViews = availableWorkbenchPanels;
|
|
155
|
-
const shouldRenderInlineAppBar = !threadSidebar && (Boolean(appBarActions || appBarLeading || appBarTitle || threadSidebar) || hasAvailableWorkbench);
|
|
156
|
-
const hasAppBarRow = shouldRenderInlineAppBar;
|
|
133
|
+
const activeMobileView = hasWorkbench ? "workbench" : "chat";
|
|
134
|
+
const hasAppBarRow = Boolean(bar?.back || bar?.leading || bar?.compactLeading || bar?.title || bar?.actions || threadSidebar) || availableWorkbenchPanels.length > 0;
|
|
157
135
|
React.useLayoutEffect(() => {
|
|
158
136
|
const pendingFocus = pendingPanelFocusRef.current;
|
|
159
|
-
if (!pendingFocus || pendingFocus.id !==
|
|
137
|
+
if (!pendingFocus || pendingFocus.id !== activePanel?.id) return;
|
|
160
138
|
pendingPanelFocusRef.current = null;
|
|
161
139
|
Array.from(workbenchPanelRef.current?.querySelectorAll("button") ?? []).find((button) => button.getAttribute("aria-label") === pendingFocus.label)?.focus({ preventScroll: true });
|
|
162
|
-
}, [
|
|
163
|
-
const
|
|
140
|
+
}, [activePanel?.id]);
|
|
141
|
+
const updateView = (next) => {
|
|
164
142
|
const activeElement = document.activeElement;
|
|
165
143
|
const restorePanelSwitchFocus = activeElement instanceof HTMLElement && workbenchPanelRef.current?.contains(activeElement);
|
|
166
144
|
const nextLabel = availableWorkbenchPanels.find((panel) => panel.id === next)?.label;
|
|
@@ -168,137 +146,70 @@ function ThinkFullApp({ appBarActions, appBarLeading, appBarTitle, className, co
|
|
|
168
146
|
id: next,
|
|
169
147
|
label: nextLabel
|
|
170
148
|
} : null;
|
|
171
|
-
React.startTransition(() =>
|
|
149
|
+
React.startTransition(() => setView(next));
|
|
172
150
|
};
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
children: appBarTitle
|
|
182
|
-
}) : null, sidebarControls ? /* @__PURE__ */ jsxs(Button, {
|
|
183
|
-
type: "button",
|
|
184
|
-
variant: "ghost",
|
|
185
|
-
color: "neutral",
|
|
186
|
-
size: "sm",
|
|
187
|
-
className: "think-full-app__thread-trigger",
|
|
188
|
-
"aria-label": "Threads",
|
|
189
|
-
"aria-controls": sidebarControls.sidebarId,
|
|
190
|
-
"aria-expanded": sidebarControls.sidebarOpen,
|
|
191
|
-
onClick: (event) => sidebarControls.toggleSidebar(event.currentTarget),
|
|
192
|
-
children: [
|
|
193
|
-
/* @__PURE__ */ jsx("span", {
|
|
194
|
-
className: "think-full-app__thread-trigger-title sigvelo-truncate",
|
|
195
|
-
children: appBarTitle ?? "Threads"
|
|
196
|
-
}),
|
|
197
|
-
threadStatusSummary ? /* @__PURE__ */ jsx(ThinkThreadStatusIndicators, { summary: threadStatusSummary }) : null,
|
|
198
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })
|
|
199
|
-
]
|
|
200
|
-
}) : null] }) : null,
|
|
201
|
-
/* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [
|
|
202
|
-
appBarActions,
|
|
203
|
-
shouldShowWorkbenchViewSwitch && selectedPanel ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
|
|
204
|
-
className: "think-full-app__workbench-view-switch",
|
|
205
|
-
views: workbenchViews,
|
|
206
|
-
value: activeWorkbenchView,
|
|
207
|
-
allowEmpty: true,
|
|
208
|
-
onValueChange: (next) => {
|
|
209
|
-
updateAppView(() => {
|
|
210
|
-
if (!next) {
|
|
211
|
-
setWorkbenchOpen(false);
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
updateWorkbenchPanel(next);
|
|
215
|
-
setWorkbenchOpen(true);
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
"aria-label": "Workbench views"
|
|
219
|
-
}) : null,
|
|
220
|
-
selectedPanel && showMobileViewSwitch ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
|
|
221
|
-
className: "think-full-app__mobile-view-switch",
|
|
222
|
-
views: workbenchViews,
|
|
223
|
-
value: activeMobileView === "workbench" ? activeWorkbenchView : void 0,
|
|
224
|
-
allowEmpty: true,
|
|
225
|
-
onValueChange: (next) => {
|
|
226
|
-
updateAppView(() => {
|
|
227
|
-
if (!next) {
|
|
228
|
-
setMobileView("chat");
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
setWorkbenchView(next);
|
|
232
|
-
setMobileView("workbench");
|
|
233
|
-
});
|
|
234
|
-
},
|
|
235
|
-
"aria-label": "App views"
|
|
236
|
-
}) : null
|
|
237
|
-
] })
|
|
238
|
-
]
|
|
239
|
-
});
|
|
151
|
+
const viewSwitch = availableWorkbenchPanels.length ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
|
|
152
|
+
views: availableWorkbenchPanels,
|
|
153
|
+
value: activePanel?.id,
|
|
154
|
+
allowEmpty: true,
|
|
155
|
+
"aria-label": "App views",
|
|
156
|
+
onValueChange: (next) => updateView(next ?? "chat")
|
|
157
|
+
}) : null;
|
|
158
|
+
const appBarActions = bar?.actions || viewSwitch ? /* @__PURE__ */ jsxs(Fragment, { children: [bar?.actions, viewSwitch] }) : void 0;
|
|
240
159
|
const appContent = /* @__PURE__ */ jsxs(ResizableSidePanel.Root, {
|
|
241
160
|
ref: mergeRefs(appRef, ref),
|
|
242
161
|
className: cx("think-full-app", className),
|
|
243
162
|
label: "workbench",
|
|
244
|
-
side: "
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
onCollapse: () => setWorkbenchOpen(false),
|
|
251
|
-
"data-has-thread-sidebar": threadSidebar ? "true" : "false",
|
|
163
|
+
side: "start",
|
|
164
|
+
sizeVariable: "--think-full-app-conversation-size",
|
|
165
|
+
defaultSize: conversationDefaultWidth,
|
|
166
|
+
minSize: conversationMinWidth,
|
|
167
|
+
maxSize: conversationMaxWidth,
|
|
168
|
+
keyboardStep: conversationKeyboardStep,
|
|
252
169
|
"data-has-workbench": hasWorkbench ? "true" : "false",
|
|
253
|
-
"data-has-workbench-topbar": hasAppBarRow ? "true" : "false",
|
|
254
170
|
"data-mobile-view": activeMobileView,
|
|
255
171
|
style,
|
|
256
172
|
...props,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
173
|
+
"data-recipe": "fill-host",
|
|
174
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
175
|
+
className: "think-full-app__view-scope",
|
|
176
|
+
"data-mobile-view": activeMobileView,
|
|
177
|
+
children: [/* @__PURE__ */ jsx("section", {
|
|
178
|
+
className: "think-full-app__chat-surface",
|
|
179
|
+
"data-workspace-restoration-scope": "chat",
|
|
180
|
+
"aria-label": "Chat",
|
|
181
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
182
|
+
className: "think-full-app__chat",
|
|
267
183
|
children: /* @__PURE__ */ jsx("div", {
|
|
268
|
-
className: "think-full-app__chat",
|
|
269
|
-
children: /* @__PURE__ */ jsx(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
...messages,
|
|
278
|
-
renderAgentToolRunLink
|
|
279
|
-
})
|
|
184
|
+
className: "think-full-app__chat-inner",
|
|
185
|
+
children: conversation ? /* @__PURE__ */ jsx(ThinkFullAppThreadChat, {
|
|
186
|
+
...conversation,
|
|
187
|
+
messages,
|
|
188
|
+
renderAgentToolRunLink,
|
|
189
|
+
sourceKey
|
|
190
|
+
}) : /* @__PURE__ */ jsx(ThinkChat.Messages, {
|
|
191
|
+
...messages,
|
|
192
|
+
renderAgentToolRunLink
|
|
280
193
|
})
|
|
281
194
|
})
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
})
|
|
195
|
+
})
|
|
196
|
+
}), activePanel ? /* @__PURE__ */ jsx("aside", {
|
|
197
|
+
className: "think-full-app__aside",
|
|
198
|
+
"aria-label": "Workbench",
|
|
199
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
200
|
+
className: "think-full-app__workbench-slot",
|
|
201
|
+
children: /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
202
|
+
default: "sigvelo-layout-transition",
|
|
203
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
204
|
+
ref: workbenchPanelRef,
|
|
205
|
+
className: "think-full-app__workbench-panel",
|
|
206
|
+
tabIndex: -1,
|
|
207
|
+
children: activePanel.render()
|
|
296
208
|
})
|
|
297
209
|
})
|
|
298
|
-
})
|
|
299
|
-
})
|
|
300
|
-
|
|
301
|
-
]
|
|
210
|
+
})
|
|
211
|
+
}) : null]
|
|
212
|
+
}), activePanel ? /* @__PURE__ */ jsx(ResizableSidePanel.Handle, { className: "think-full-app__resizer" }) : null]
|
|
302
213
|
});
|
|
303
214
|
const app = workspace ? /* @__PURE__ */ jsx(WorkspaceNavigationProvider, {
|
|
304
215
|
root: workspace.root ?? "/",
|
|
@@ -313,14 +224,22 @@ function ThinkFullApp({ appBarActions, appBarLeading, appBarTitle, className, co
|
|
|
313
224
|
scope: "chat"
|
|
314
225
|
}), appContent] })
|
|
315
226
|
}) : appContent;
|
|
316
|
-
|
|
317
|
-
|
|
227
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
|
|
228
|
+
className: "think-full-app-shell",
|
|
318
229
|
sidebar: threadSidebar,
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
230
|
+
sidebarLabel: "threads",
|
|
231
|
+
showMainLabel: "Show selected thread",
|
|
232
|
+
bar: {
|
|
233
|
+
...bar,
|
|
234
|
+
actions: appBarActions,
|
|
235
|
+
className: "think-full-app__app-bar",
|
|
236
|
+
label: "Workbench controls",
|
|
237
|
+
hidden: !hasAppBarRow,
|
|
238
|
+
compactTitleTrigger: threadSidebar ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
239
|
+
className: "sigvelo-truncate",
|
|
240
|
+
children: bar?.title ?? "Threads"
|
|
241
|
+
}), threadStatusSummary ? /* @__PURE__ */ jsx(ThinkThreadStatusIndicators, { summary: threadStatusSummary }) : null] }) : void 0
|
|
242
|
+
},
|
|
324
243
|
children: app
|
|
325
244
|
});
|
|
326
245
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { B as PlusIcon } from "../../icons-CVFSeTJn.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { t as capitalize } from "../../format-DB2mX9DA.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Badge } from "../foundations/Badge.js";
|
|
3
2
|
import { Switch } from "../foundations/Switch.js";
|
|
4
3
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
5
4
|
import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
|
|
@@ -25,20 +24,10 @@ function ThinkRoutineDetail({ busy = false, className, routine, showOwner = true
|
|
|
25
24
|
className: "think-routine-library__detail-header",
|
|
26
25
|
children: /* @__PURE__ */ jsxs("div", {
|
|
27
26
|
className: "think-routine-library__detail-heading",
|
|
28
|
-
children: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
color: routine.enabled ? "success" : "neutral",
|
|
33
|
-
size: "sm",
|
|
34
|
-
children: routine.enabled ? "Active" : "Paused"
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ jsx("h1", {
|
|
37
|
-
id: titleId,
|
|
38
|
-
children: routine.name
|
|
39
|
-
}),
|
|
40
|
-
routine.description ? /* @__PURE__ */ jsx("p", { children: routine.description }) : null
|
|
41
|
-
]
|
|
27
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
28
|
+
id: titleId,
|
|
29
|
+
children: routine.name
|
|
30
|
+
}), routine.description ? /* @__PURE__ */ jsx("p", { children: routine.description }) : null]
|
|
42
31
|
})
|
|
43
32
|
}),
|
|
44
33
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon } from "../../icons-CVFSeTJn.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Field } from "../foundations/Field.js";
|
|
5
5
|
import { Form } from "../foundations/Form.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppBarSlots } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
1
2
|
import { ThinkRoutine, ThinkRoutineRunOf } from "./ThinkRoutine.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
|
|
@@ -29,10 +30,11 @@ interface ThinkRoutineLibraryProps<TRoutine extends ThinkRoutine = ThinkRoutine>
|
|
|
29
30
|
showOwner?: boolean;
|
|
30
31
|
/** Host-owned catalog error shown above the library without replacing loaded routines. */
|
|
31
32
|
error?: React.ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Application bar slots. `title` defaults to the selected schedule's name;
|
|
35
|
+
* `actions` render before the built-in schedule actions.
|
|
36
|
+
*/
|
|
37
|
+
bar?: AppBarSlots;
|
|
36
38
|
/** Starts the selected routine immediately. */
|
|
37
39
|
onRunRoutine?: (routine: TRoutine) => void | Promise<void>;
|
|
38
40
|
/** Activates or pauses the selected app-owned routine. */
|
|
@@ -54,8 +56,7 @@ interface ThinkRoutineLibraryProps<TRoutine extends ThinkRoutine = ThinkRoutine>
|
|
|
54
56
|
* route and may also use these surfaces independently.
|
|
55
57
|
*/
|
|
56
58
|
declare function ThinkRoutineLibrary<TRoutine extends ThinkRoutine = ThinkRoutine>({
|
|
57
|
-
|
|
58
|
-
appBarLeading,
|
|
59
|
+
bar,
|
|
59
60
|
className,
|
|
60
61
|
createRoutineLink,
|
|
61
62
|
error: catalogError,
|