@mcp-b/react-components 0.20.5 → 0.22.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/{AgentActivity-D2SHSGFX.d.ts → AgentActivity-D3OvrC02.d.ts} +14 -1
- package/dist/{AgentChat-C-ZyXbJz.d.ts → AgentChat-Bm1qYbOo.d.ts} +24 -1
- package/dist/AgentChatStartScreen-DDZ25aax.d.ts +60 -0
- package/dist/{Button-yRInko9u.d.ts → Button-SBIz6Lqi.d.ts} +2 -1
- package/dist/{CodeBlock-ygtuzqJd.js → CodeBlock-Cp67Njo3.js} +1 -1
- package/dist/{CodeBlock-Bbls1CnA.d.ts → CodeBlock-yMpGqScn.d.ts} +1 -1
- package/dist/Dialog-BD8NBKaE.d.ts +122 -0
- package/dist/{FileTree-CdgfccsM.js → FileTree-DW60q1w7.js} +1 -1
- package/dist/IconButton-CFKhu6OR.d.ts +35 -0
- package/dist/{Message-DzuteocT.js → Message-_-bEYLAO.js} +9 -16
- package/dist/{ModelSelector-pecWyOFI.js → ModelSelector-Brvj9Cab.js} +15 -8
- package/dist/{PromptInput-Cq-8RoXD.d.ts → PromptInput-BjoPWaaG.d.ts} +15 -2
- package/dist/{ThinkChatActivity-CdbL0aoA.d.ts → ThinkChatActivity-2BobmuvR.d.ts} +8 -7
- package/dist/{ThinkChatActivitySummary-D1xOrNrq.d.ts → ThinkChatActivitySummary-kr5fE0wg.d.ts} +14 -5
- package/dist/{ToggleGroup-DNd6cDJZ.d.ts → ToggleGroup-BW1jrhAF.d.ts} +10 -0
- package/dist/{Workspace-CWtust-2.d.ts → Workspace-CIycQ4xE.d.ts} +1 -1
- package/dist/{WorkspaceExplorer-DGigwsgH.d.ts → WorkspaceExplorer-BCipn7Vd.d.ts} +1 -1
- package/dist/{WorkspaceFile-D8Un_xge.d.ts → WorkspaceFile-DMtRMwVv.d.ts} +1 -1
- package/dist/{WorkspaceFileView-Bxx4wEzJ.js → WorkspaceFileView-rUEN2iox.js} +4 -4
- package/dist/assets/think-browser-host.png +0 -0
- package/dist/components/ActionGuide.d.ts +85 -0
- package/dist/components/ActionGuide.js +94 -0
- package/dist/components/Activity.d.ts +33 -17
- package/dist/components/Activity.js +40 -28
- package/dist/components/AgentActivity.d.ts +1 -1
- package/dist/components/AgentActivity.js +3 -11
- package/dist/components/AgentActivityPreview.d.ts +1 -1
- package/dist/components/AgentActivityPreview.js +17 -16
- package/dist/components/AgentAttention.d.ts +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +169 -136
- package/dist/components/AgentChatStartScreen.d.ts +2 -0
- package/dist/components/AgentChatStartScreen.js +88 -0
- package/dist/components/AgentConnection.d.ts +1 -1
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.js +1 -1
- package/dist/components/AlertDialog.d.ts +2 -1
- package/dist/components/AlertDialog.js +8 -2
- package/dist/components/AppIcon.d.ts +58 -0
- package/dist/components/AppIcon.js +51 -0
- package/dist/components/AppTopBar.js +9 -10
- package/dist/components/Approval.js +3 -5
- package/dist/components/Artifact.d.ts +3 -7
- package/dist/components/Artifact.js +12 -18
- package/dist/components/Avatar.d.ts +7 -2
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BrowserLiveView.js +6 -8
- package/dist/components/BrowserReplay.js +9 -9
- package/dist/components/BrowserRunPanel.js +2 -2
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +1 -1
- package/dist/components/ChatGptSignInScreen.js +2 -2
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Checkpoint.js +1 -1
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +1 -1
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.d.ts +3 -24
- package/dist/components/Conversation.js +6 -34
- package/dist/components/Dialog.d.ts +1 -117
- package/dist/components/Dialog.js +9 -1
- package/dist/components/EmptyState.d.ts +46 -0
- package/dist/components/EmptyState.js +50 -0
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/IconButton.d.ts +1 -31
- package/dist/components/IconButton.js +2 -1
- package/dist/components/Kbd.d.ts +32 -0
- package/dist/components/Kbd.js +34 -0
- package/dist/components/McpConnectionRequest.d.ts +1 -1
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpPluginCatalog.d.ts +86 -0
- package/dist/components/McpPluginCatalog.js +364 -0
- package/dist/components/McpServerPicker.d.ts +2 -2
- package/dist/components/McpServerPicker.js +7 -13
- package/dist/components/MediaPreviewCard.js +1 -1
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.d.ts +4 -8
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/ModelSelector.d.ts +12 -6
- package/dist/components/ModelSelector.js +2 -2
- package/dist/components/Plan.js +1 -1
- package/dist/components/PricingBillingToggle.js +1 -0
- package/dist/components/PricingPlanCard.d.ts +1 -1
- package/dist/components/PricingPlanCard.js +10 -12
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +30 -12
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -2
- package/dist/components/Reasoning.js +5 -10
- package/dist/components/ResponsiveSidebarShell.js +2 -1
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Sources.js +1 -1
- package/dist/components/StatusPill.d.ts +43 -0
- package/dist/components/StatusPill.js +35 -0
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/SubagentRunSelector.js +1 -1
- package/dist/components/Task.js +1 -1
- package/dist/components/Terminal.d.ts +3 -3
- package/dist/components/Terminal.js +7 -8
- package/dist/components/TestResults.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +12 -6
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +28 -16
- package/dist/components/ThinkChatActivitySummary.d.ts +2 -2
- package/dist/components/ThinkChatActivitySummary.js +67 -64
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +5 -5
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.js +19 -25
- package/dist/components/ThinkFullApp.d.ts +8 -4
- package/dist/components/ThinkFullApp.js +17 -2
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkRoutineBrowser.js +3 -2
- package/dist/components/ThinkRoutineForm.js +3 -3
- package/dist/components/ThinkRoutineLibrary.js +2 -2
- package/dist/components/ThinkRoutineRuns.js +4 -3
- package/dist/components/ThinkThreadPicker.js +5 -4
- package/dist/components/Toast.d.ts +12 -2
- package/dist/components/Toast.js +14 -4
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +54 -7
- package/dist/components/ToolInvocation.js +1 -1
- package/dist/components/Tooltip.d.ts +6 -4
- package/dist/components/Tooltip.js +11 -4
- package/dist/components/WebPreview.d.ts +13 -6
- package/dist/components/WebPreview.js +55 -50
- package/dist/components/Workspace.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.d.ts +3 -3
- package/dist/components/WorkspaceExplorer.js +1 -1
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +1 -1
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-BrvQ7z4W.d.ts → copy-button-EBv_B9F6.d.ts} +2 -2
- package/dist/{copy-button-vo1paUSi.js → copy-button-TWq8nZhc.js} +8 -8
- package/dist/{icons-DyOM0EJs.js → icons-ua6f_GH3.js} +3 -2
- package/dist/{icons-DkRtZmvT.d.ts → icons-wP1yFUXF.d.ts} +6 -1
- package/dist/mcp-server-catalog-DycejaJ5.d.ts +1077 -0
- package/dist/styles/action-guide.css +128 -0
- package/dist/styles/activity-header.css +41 -10
- package/dist/styles/activity.css +26 -4
- package/dist/styles/agent-activity-preview-overlay.css +51 -12
- package/dist/styles/agent-activity-preview.css +23 -53
- package/dist/styles/agent-attention.css +2 -2
- package/dist/styles/agent-chat.css +291 -57
- package/dist/styles/agent-connection.css +8 -8
- package/dist/styles/alert-dialog.css +5 -20
- package/dist/styles/app-icon.css +122 -0
- package/dist/styles/app-top-bar.css +4 -5
- package/dist/styles/approval.css +1 -7
- package/dist/styles/artifact.css +4 -4
- package/dist/styles/avatar.css +13 -0
- package/dist/styles/base-ui-motion.css +1 -1
- package/dist/styles/base.css +94 -3
- package/dist/styles/browser-control-overlay.css +16 -7
- package/dist/styles/browser-live-view.css +5 -38
- package/dist/styles/browser-replay.css +2 -6
- package/dist/styles/browser-run-panel.css +4 -18
- package/dist/styles/button.css +17 -1
- package/dist/styles/card.css +4 -4
- package/dist/styles/chain-of-thought.css +0 -1
- package/dist/styles/chatgpt-sign-in-screen.css +7 -5
- package/dist/styles/checkbox-group.css +3 -3
- package/dist/styles/code-block.css +4 -4
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/conversation.css +7 -42
- package/dist/styles/description-list.css +4 -4
- package/dist/styles/dialog.css +22 -7
- package/dist/styles/empty-state.css +48 -0
- package/dist/styles/environment-variables.css +4 -4
- package/dist/styles/field.css +2 -2
- package/dist/styles/index.css +6 -0
- package/dist/styles/inline-citation.css +1 -1
- package/dist/styles/kbd.css +40 -0
- package/dist/styles/mcp-plugin-catalog.css +296 -0
- package/dist/styles/mcp-server-picker.css +0 -26
- package/dist/styles/media-preview-card.css +5 -3
- package/dist/styles/message-scroller.css +4 -4
- package/dist/styles/message.css +11 -6
- package/dist/styles/model-selector.css +5 -8
- package/dist/styles/popover.css +1 -1
- package/dist/styles/preview-card.css +1 -1
- package/dist/styles/prompt-input.css +44 -54
- package/dist/styles/queue.css +2 -2
- package/dist/styles/recipes.css +83 -9
- package/dist/styles/resizable-side-panel.css +1 -1
- package/dist/styles/responsive-sidebar-shell.css +19 -14
- package/dist/styles/scrollbars.css +32 -3
- package/dist/styles/search-field.css +9 -0
- package/dist/styles/sources.css +1 -1
- package/dist/styles/status-pill.css +39 -0
- package/dist/styles/stepper.css +2 -2
- package/dist/styles/streamdown.css +13 -12
- package/dist/styles/subagent-run.css +3 -3
- package/dist/styles/switch.css +1 -3
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/task.css +1 -1
- package/dist/styles/terminal.css +2 -2
- package/dist/styles/test-results.css +1 -2
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/theme-mode-control.css +1 -1
- package/dist/styles/think-execution-status.css +4 -23
- package/dist/styles/think-execution-workbench.css +2 -3
- package/dist/styles/think-full-app.css +24 -4
- package/dist/styles/think-routine-library.css +14 -16
- package/dist/styles/think-thread-picker.css +9 -26
- package/dist/styles/toast.css +2 -23
- package/dist/styles/toggle-group.css +76 -3
- package/dist/styles/tooltip.css +1 -2
- package/dist/styles/utilities.css +73 -0
- package/dist/styles/web-preview.css +5 -0
- package/dist/styles/workspace-explorer.css +4 -6
- package/dist/utils/favicon.d.ts +10 -0
- package/dist/utils/favicon.js +18 -0
- package/dist/utils/mcp-server-catalog.d.ts +2 -1078
- package/dist/utils/mcp-server-catalog.js +3 -11
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +2 -2
|
@@ -3,12 +3,22 @@ import { displayUrl, getToolDisplayName, isBrowserToolPart, isExecuteToolPart, i
|
|
|
3
3
|
import { t as summarizeToolInput } from "../summarize-tool-input-CqTcGRYy.js";
|
|
4
4
|
import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
|
|
5
5
|
//#region src/components/ThinkChatActivitySummary.ts
|
|
6
|
+
function described(action, detail) {
|
|
7
|
+
return detail ? {
|
|
8
|
+
action,
|
|
9
|
+
detail
|
|
10
|
+
} : { action };
|
|
11
|
+
}
|
|
6
12
|
const ACTIVITY_HEADER_LABEL_MAX_LENGTH = 240;
|
|
13
|
+
function bounded(text) {
|
|
14
|
+
if (text.length <= ACTIVITY_HEADER_LABEL_MAX_LENGTH) return text;
|
|
15
|
+
return `${text.slice(0, ACTIVITY_HEADER_LABEL_MAX_LENGTH - 1).trimEnd()}…`;
|
|
16
|
+
}
|
|
7
17
|
function boundedActivityHeader(header) {
|
|
8
|
-
if (header.label.length <= ACTIVITY_HEADER_LABEL_MAX_LENGTH) return header;
|
|
9
18
|
return {
|
|
10
19
|
...header,
|
|
11
|
-
|
|
20
|
+
action: bounded(header.action),
|
|
21
|
+
...header.detail ? { detail: bounded(header.detail) } : {}
|
|
12
22
|
};
|
|
13
23
|
}
|
|
14
24
|
function getToolInput(part) {
|
|
@@ -100,9 +110,7 @@ function genericToolPresentation(part, hasUrl) {
|
|
|
100
110
|
}
|
|
101
111
|
function describeGenericToolPart(part) {
|
|
102
112
|
const labels = genericToolPresentation(part, activityPartUrl(part) !== null);
|
|
103
|
-
|
|
104
|
-
const detail = summarizeToolInput(getToolInput(part));
|
|
105
|
-
return detail ? `${label} · ${detail}` : label;
|
|
113
|
+
return described(isPartFailed(part) ? labels.failed : isPartWorking(part) ? labels.working : labels.done, summarizeToolInput(getToolInput(part)));
|
|
106
114
|
}
|
|
107
115
|
function activityPartUrl(part) {
|
|
108
116
|
if (isFetchToolPart(part)) return firstHttpUrl(part.input?.url ?? part.input?.path);
|
|
@@ -151,7 +159,7 @@ function activityPartWorkspaceDestination(part) {
|
|
|
151
159
|
}
|
|
152
160
|
}
|
|
153
161
|
/**
|
|
154
|
-
* One-line natural-language
|
|
162
|
+
* One-line natural-language action for an activity part ("Ran vp test",
|
|
155
163
|
* "Fetched developers.cloudflare.com/agents/"); `null` for boundaries that
|
|
156
164
|
* aren't steps (step-start). Exported so a custom `renderPart` can reuse the
|
|
157
165
|
* built-in labels for tools it doesn't override.
|
|
@@ -159,12 +167,12 @@ function activityPartWorkspaceDestination(part) {
|
|
|
159
167
|
function describeThinkChatActivityPart(part, toolRenderers) {
|
|
160
168
|
if (isToolUIPart(part)) {
|
|
161
169
|
const custom = toolRenderers?.[getToolName(part)]?.describe?.(part);
|
|
162
|
-
if (custom !== void 0) return custom;
|
|
170
|
+
if (custom !== void 0) return custom ?? null;
|
|
163
171
|
}
|
|
164
172
|
if (isReasoningUIPart(part)) {
|
|
165
173
|
const snippet = summarizeReasoningTitle(part.text);
|
|
166
|
-
const
|
|
167
|
-
return snippet ??
|
|
174
|
+
const action = part.state === "streaming" ? "Thinking…" : "Thought";
|
|
175
|
+
return described(snippet ?? action);
|
|
168
176
|
}
|
|
169
177
|
if (isWorkspaceToolPart(part)) return describeWorkspaceToolPart(part);
|
|
170
178
|
if (isSkillToolPart(part)) return describeSkillToolPart(part);
|
|
@@ -183,88 +191,83 @@ function describeWorkspaceToolPart(part) {
|
|
|
183
191
|
const failed = isPartFailed(part);
|
|
184
192
|
if (part.type === "tool-bash") {
|
|
185
193
|
const command = part.input?.script?.trim() ?? "";
|
|
186
|
-
if (failed) return
|
|
194
|
+
if (failed) return described("Command failed", command);
|
|
187
195
|
const verb = working ? "Running" : "Ran";
|
|
188
|
-
return command ?
|
|
196
|
+
return command ? described(verb, command) : described(`${verb} a command`);
|
|
189
197
|
}
|
|
190
|
-
const
|
|
198
|
+
const { action, detail } = (() => {
|
|
191
199
|
switch (part.type) {
|
|
192
|
-
case "tool-read": return
|
|
193
|
-
case "tool-write": return
|
|
194
|
-
case "tool-edit": return
|
|
195
|
-
case "tool-delete": return
|
|
200
|
+
case "tool-read": return described(working ? "Reading" : "Read", basename(part.input?.path) ?? "a file");
|
|
201
|
+
case "tool-write": return described(working ? "Writing" : "Wrote", basename(part.input?.path) ?? "a file");
|
|
202
|
+
case "tool-edit": return described(working ? "Editing" : "Edited", basename(part.input?.path) ?? "a file");
|
|
203
|
+
case "tool-delete": return described(working ? "Deleting" : "Deleted", part.input?.path || "a file");
|
|
196
204
|
case "tool-list": {
|
|
197
205
|
const path = part.input?.path;
|
|
198
|
-
return
|
|
206
|
+
return described(working ? "Listing" : "Listed", path && path !== "/" ? path : "files");
|
|
199
207
|
}
|
|
200
|
-
case "tool-find": return
|
|
201
|
-
case "tool-grep": return
|
|
208
|
+
case "tool-find": return described(working ? "Searching" : "Searched", `for ${part.input?.pattern || "files"}`);
|
|
209
|
+
case "tool-grep": return described(working ? "Searching" : "Searched", `for ${part.input?.query || "text"}`);
|
|
202
210
|
}
|
|
203
211
|
})();
|
|
204
|
-
return failed ? `${
|
|
212
|
+
return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
|
|
205
213
|
}
|
|
206
214
|
function describeSkillToolPart(part) {
|
|
207
215
|
const working = isPartWorking(part);
|
|
208
216
|
const failed = isPartFailed(part);
|
|
209
|
-
const
|
|
217
|
+
const { action, detail } = (() => {
|
|
210
218
|
switch (part.type) {
|
|
211
219
|
case "tool-activate_skill": {
|
|
212
220
|
const name = part.input?.name;
|
|
213
|
-
return
|
|
221
|
+
return described(working ? "Using" : "Used", name ? `the ${name} skill` : "a skill");
|
|
214
222
|
}
|
|
215
|
-
case "tool-read_skill_resource": return
|
|
216
|
-
case "tool-run_skill_script": return
|
|
223
|
+
case "tool-read_skill_resource": return described(working ? "Reading" : "Read", part.input?.path ?? "a skill resource");
|
|
224
|
+
case "tool-run_skill_script": return described(working ? "Running" : "Ran", part.input?.path ?? "a skill script");
|
|
217
225
|
}
|
|
218
226
|
})();
|
|
219
|
-
return failed ? `${
|
|
227
|
+
return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
|
|
220
228
|
}
|
|
221
229
|
function describeSessionContextToolPart(part) {
|
|
222
230
|
const working = isPartWorking(part);
|
|
223
231
|
const failed = isSessionContextToolFailure(part);
|
|
224
|
-
const
|
|
232
|
+
const { action, detail } = (() => {
|
|
225
233
|
switch (part.type) {
|
|
226
|
-
case "tool-set_context":
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
case "tool-
|
|
231
|
-
case "tool-unload_context": return `${working ? "Unloading" : "Unloaded"} ${part.input?.key ?? "context"}`;
|
|
232
|
-
case "tool-search_context": return `${working ? "Searching" : "Searched"} ${part.input?.label ?? "context"}`;
|
|
233
|
-
case "tool-session_search": return `${working ? "Searching" : "Searched"} conversations`;
|
|
234
|
+
case "tool-set_context": return described(working ? "Updating" : "Updated", part.input?.label || "context");
|
|
235
|
+
case "tool-load_context": return described(working ? "Loading" : "Loaded", part.input?.key ?? "context");
|
|
236
|
+
case "tool-unload_context": return described(working ? "Unloading" : "Unloaded", part.input?.key ?? "context");
|
|
237
|
+
case "tool-search_context": return described(working ? "Searching" : "Searched", part.input?.label ?? "context");
|
|
238
|
+
case "tool-session_search": return described(working ? "Searching" : "Searched", "conversations");
|
|
234
239
|
}
|
|
235
240
|
})();
|
|
236
|
-
return failed ? `${
|
|
241
|
+
return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
|
|
237
242
|
}
|
|
238
243
|
function describeBrowserToolPart(part) {
|
|
239
244
|
const working = isPartWorking(part);
|
|
240
245
|
const failed = isPartFailed(part);
|
|
241
246
|
if (part.type === "tool-browser_execute") {
|
|
242
247
|
const output = part.state === "output-available" ? part.output : void 0;
|
|
243
|
-
if (failed || output?.status === "error") return "Browser automation failed";
|
|
244
|
-
if (output?.status === "paused") return isHumanWaitPause(output) ? "Browser waiting for human" : "Browser waiting for approval";
|
|
245
|
-
return working ? "Using the browser" : "Used the browser";
|
|
248
|
+
if (failed || output?.status === "error") return described("Browser automation failed");
|
|
249
|
+
if (output?.status === "paused") return described(isHumanWaitPause(output) ? "Browser waiting for human" : "Browser waiting for approval");
|
|
250
|
+
return described(working ? "Using the browser" : "Used the browser");
|
|
246
251
|
}
|
|
247
252
|
const page = displayUrl(part.input?.url) || "a page";
|
|
248
|
-
const
|
|
253
|
+
const { action, detail } = (() => {
|
|
249
254
|
switch (part.type) {
|
|
250
|
-
case "tool-browser_extract": return
|
|
251
|
-
case "tool-browser_links": return
|
|
252
|
-
case "tool-browser_scrape": return
|
|
253
|
-
default: return
|
|
255
|
+
case "tool-browser_extract": return described(working ? "Extracting data" : "Extracted data", `from ${page}`);
|
|
256
|
+
case "tool-browser_links": return described(working ? "Listing links" : "Listed links", `on ${page}`);
|
|
257
|
+
case "tool-browser_scrape": return described(working ? "Scraping" : "Scraped", page);
|
|
258
|
+
default: return described(working ? "Browsing" : "Browsed", page);
|
|
254
259
|
}
|
|
255
260
|
})();
|
|
256
|
-
return failed ? `${
|
|
261
|
+
return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
|
|
257
262
|
}
|
|
258
263
|
function describeExecuteToolPart(part) {
|
|
259
264
|
const output = part.state === "output-available" ? part.output : void 0;
|
|
260
|
-
if (output?.status === "paused") return isHumanWaitPause(output) ? "Code waiting for human" : "Code waiting for approval";
|
|
265
|
+
if (output?.status === "paused") return described(isHumanWaitPause(output) ? "Code waiting for human" : "Code waiting for approval");
|
|
261
266
|
const explicitSummary = part.input ? Reflect.get(part.input, "summary") : void 0;
|
|
262
267
|
const summary = typeof explicitSummary === "string" ? summarizeToolInput({ summary: explicitSummary }) : null;
|
|
263
|
-
if (summary) return summary;
|
|
264
|
-
if (isPartFailed(part) || output?.status === "error") return "Code failed";
|
|
265
|
-
|
|
266
|
-
const snippet = summarizeToolInput(part.input);
|
|
267
|
-
return snippet ? `${label} · ${snippet}` : label;
|
|
268
|
+
if (summary) return described(summary);
|
|
269
|
+
if (isPartFailed(part) || output?.status === "error") return described("Code failed");
|
|
270
|
+
return described(isPartWorking(part) ? "Running code" : "Ran code", summarizeToolInput(part.input));
|
|
268
271
|
}
|
|
269
272
|
function summarizeReasoningTitle(text) {
|
|
270
273
|
const line = text.split("\n").find((candidate) => candidate.trim())?.trim();
|
|
@@ -279,9 +282,9 @@ function isHumanWaitPause(output) {
|
|
|
279
282
|
function describeFetchToolPart(part) {
|
|
280
283
|
const target = part.input?.url ?? part.input?.path ?? "";
|
|
281
284
|
const output = part.state === "output-available" ? part.output : void 0;
|
|
282
|
-
if (isPartFailed(part) || output?.ok === false) return
|
|
285
|
+
if (isPartFailed(part) || output?.ok === false) return described("Fetch failed", target);
|
|
283
286
|
const verb = isPartWorking(part) ? "Fetching" : "Fetched";
|
|
284
|
-
return target ?
|
|
287
|
+
return target ? described(verb, target) : described(`${verb} a URL`);
|
|
285
288
|
}
|
|
286
289
|
function summarizeActivitySteps(parts) {
|
|
287
290
|
const byTool = /* @__PURE__ */ new Map();
|
|
@@ -344,38 +347,38 @@ function summarizeActivitySteps(parts) {
|
|
|
344
347
|
}
|
|
345
348
|
/** Derive the serializable collapsed header from persisted AI SDK message parts. */
|
|
346
349
|
function deriveThinkChatActivityHeader(parts, options = {}) {
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
return
|
|
350
|
-
|
|
350
|
+
const steps = parts.flatMap((part) => {
|
|
351
|
+
const description = describeThinkChatActivityPart(part, options.toolDescribers);
|
|
352
|
+
return description ? [{
|
|
353
|
+
description,
|
|
351
354
|
part
|
|
352
355
|
}] : [];
|
|
353
356
|
});
|
|
354
|
-
if (
|
|
357
|
+
if (steps.length === 0) return null;
|
|
355
358
|
if (options.isStreaming ?? parts.some(isPartWorking)) {
|
|
356
|
-
const latest =
|
|
359
|
+
const latest = steps.at(-1);
|
|
357
360
|
const workspaceDestination = activityPartWorkspaceDestination(latest.part);
|
|
358
361
|
return boundedActivityHeader({
|
|
359
|
-
|
|
362
|
+
...latest.description,
|
|
360
363
|
iconKind: activityPartIconKind(latest.part),
|
|
361
364
|
...activityPartUrl(latest.part) ? { url: activityPartUrl(latest.part) } : {},
|
|
362
365
|
...workspaceDestination ? { workspaceDestination } : {}
|
|
363
366
|
});
|
|
364
367
|
}
|
|
365
368
|
if (parts.some((part) => isToolUIPart(part) && isPartFailed(part))) return boundedActivityHeader({
|
|
366
|
-
|
|
369
|
+
action: summarizeActivitySteps(parts),
|
|
367
370
|
iconKind: "approval"
|
|
368
371
|
});
|
|
369
372
|
const workspaceRepresentative = parts.find((part) => activityPartIconKind(part) === "edit" && activityPartWorkspaceDestination(part)) ?? parts.find((part) => activityPartWorkspaceDestination(part));
|
|
370
373
|
const workspaceDestination = workspaceRepresentative ? activityPartWorkspaceDestination(workspaceRepresentative) : null;
|
|
371
374
|
const representative = parts.find((part) => activityPartIconKind(part) === "edit") ?? parts.find((part) => activityPartUrl(part)) ?? parts.find((part) => describeThinkChatActivityPart(part));
|
|
372
375
|
if (!representative) return boundedActivityHeader({
|
|
373
|
-
|
|
376
|
+
action: summarizeActivitySteps(parts),
|
|
374
377
|
iconKind: "tool"
|
|
375
378
|
});
|
|
376
379
|
const url = activityPartUrl(representative);
|
|
377
380
|
return boundedActivityHeader({
|
|
378
|
-
|
|
381
|
+
action: summarizeActivitySteps(parts),
|
|
379
382
|
iconKind: activityPartIconKind(representative),
|
|
380
383
|
...url ? { url } : {},
|
|
381
384
|
...workspaceDestination ? { workspaceDestination } : {}
|
|
@@ -387,14 +390,14 @@ function deriveThinkChatActivityHeader(parts, options = {}) {
|
|
|
387
390
|
*/
|
|
388
391
|
function deriveThinkChatToolLifecycleHeader(snapshot) {
|
|
389
392
|
if (snapshot.state === "approval-required") return boundedActivityHeader({
|
|
390
|
-
|
|
393
|
+
action: "Approval needed",
|
|
391
394
|
iconKind: "approval"
|
|
392
395
|
});
|
|
393
396
|
const part = lifecycleSnapshotToToolPart(snapshot);
|
|
394
397
|
const url = activityPartUrl(part);
|
|
395
398
|
const workspaceDestination = activityPartWorkspaceDestination(part);
|
|
396
399
|
return boundedActivityHeader({
|
|
397
|
-
|
|
400
|
+
...describeThinkChatActivityPart(part) ?? described("Used a tool"),
|
|
398
401
|
iconKind: activityPartIconKind(part),
|
|
399
402
|
...url ? { url } : {},
|
|
400
403
|
...workspaceDestination ? { workspaceDestination } : {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "./Activity.js";
|
|
2
2
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
3
3
|
import { Tabs } from "./Tabs.js";
|
|
4
|
-
import { t as CodeBlock } from "../CodeBlock-
|
|
4
|
+
import { t as CodeBlock } from "../CodeBlock-Cp67Njo3.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as FileIcon, O as InfoIcon, W as RefreshIcon, Z as TerminalIcon, d as CheckIcon, n as ArrowDownIcon, tt as XIcon } from "../icons-ua6f_GH3.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
5
5
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
@@ -38,7 +38,7 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
38
38
|
defaultOpen: true,
|
|
39
39
|
children: [/* @__PURE__ */ jsx(ActivityTrigger, {
|
|
40
40
|
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
41
|
-
|
|
41
|
+
action: "Activity"
|
|
42
42
|
}), /* @__PURE__ */ jsxs(ActivityContent, { children: [
|
|
43
43
|
/* @__PURE__ */ jsx(ActivityItem, {
|
|
44
44
|
icon: /* @__PURE__ */ jsx(ArrowDownIcon, {}),
|
|
@@ -54,7 +54,7 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
54
54
|
}) : null,
|
|
55
55
|
error ? /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
56
56
|
icon: /* @__PURE__ */ jsx(XIcon, {}),
|
|
57
|
-
|
|
57
|
+
action: "Failure",
|
|
58
58
|
children: /* @__PURE__ */ jsx(ActivityPanel, {
|
|
59
59
|
label: "Error",
|
|
60
60
|
text: error,
|
|
@@ -64,12 +64,12 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
64
64
|
}) : null,
|
|
65
65
|
run.metadata ? /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
66
66
|
icon: /* @__PURE__ */ jsx(InfoIcon, {}),
|
|
67
|
-
|
|
67
|
+
action: "Metadata",
|
|
68
68
|
children: /* @__PURE__ */ jsx(ActivityOutput, { children: formatJson(run.metadata) })
|
|
69
69
|
}) : null,
|
|
70
70
|
/* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
71
71
|
icon: /* @__PURE__ */ jsx(FileIcon, {}),
|
|
72
|
-
|
|
72
|
+
action: "Raw record",
|
|
73
73
|
children: /* @__PURE__ */ jsx(ActivityOutput, { children: formatJson(run) })
|
|
74
74
|
})
|
|
75
75
|
] })]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { O as InfoIcon, d as CheckIcon, q as SpinnerIcon, tt as XIcon, z as PauseIcon } from "../icons-ua6f_GH3.js";
|
|
3
3
|
import { Tooltip } from "./Tooltip.js";
|
|
4
4
|
import { formatThinkExecutionStatus, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone } from "./ThinkExecutionRun.js";
|
|
5
5
|
import "react";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { buttonVariants } from "./Button.js";
|
|
3
|
+
import { W as RefreshIcon, b as EllipsisIcon } from "../icons-ua6f_GH3.js";
|
|
3
4
|
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { IconButton } from "./IconButton.js";
|
|
6
|
+
import { EmptyState } from "./EmptyState.js";
|
|
6
7
|
import { Menu } from "./Menu.js";
|
|
7
8
|
import { AppTopBar } from "./AppTopBar.js";
|
|
8
9
|
import { formatThinkExecutionRunProgress, getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isSameThinkExecutionRun, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
@@ -31,24 +32,17 @@ function RunActions({ busy, onAction, run, source }) {
|
|
|
31
32
|
const statusTone = getThinkExecutionRunStatusTone(run);
|
|
32
33
|
const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
|
|
33
34
|
const action = (key, callback) => () => onAction(key, callback);
|
|
34
|
-
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
46
|
-
})
|
|
47
|
-
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
48
|
-
side: "top",
|
|
49
|
-
sideOffset: 6,
|
|
50
|
-
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: "Run actions" })
|
|
51
|
-
}) })] }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
35
|
+
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
36
|
+
label: `Actions for ${kind} ${id}`,
|
|
37
|
+
tooltip: "Run actions",
|
|
38
|
+
render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
|
|
39
|
+
variant: "ghost",
|
|
40
|
+
color: "neutral",
|
|
41
|
+
size: "sm",
|
|
42
|
+
className: "think-execution-workbench__run-actions",
|
|
43
|
+
disabled: busy,
|
|
44
|
+
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
45
|
+
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
52
46
|
align: "end",
|
|
53
47
|
children: /* @__PURE__ */ jsx(Menu.Popup, { children: isThinkSubmissionRun(run) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54
48
|
isSubmissionCancelable(run.status) ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
@@ -188,13 +182,13 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
188
182
|
id: runsId,
|
|
189
183
|
children: "Runs"
|
|
190
184
|
})
|
|
191
|
-
}), runsQuery.isPending && runs.length === 0 ? /* @__PURE__ */ jsx(
|
|
185
|
+
}), runsQuery.isPending && runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
192
186
|
className: "think-execution-workbench__empty",
|
|
193
187
|
role: "status",
|
|
194
|
-
|
|
195
|
-
}) : runs.length === 0 ? /* @__PURE__ */ jsx(
|
|
188
|
+
description: "Loading runs..."
|
|
189
|
+
}) : runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
196
190
|
className: "think-execution-workbench__empty",
|
|
197
|
-
|
|
191
|
+
description: "No runs yet."
|
|
198
192
|
}) : /* @__PURE__ */ jsx("ul", {
|
|
199
193
|
className: "think-execution-workbench__list",
|
|
200
194
|
role: "list",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../WorkspaceLink-O-EBKUJ8.js";
|
|
2
|
-
import { r as WorkspaceFileAssetResolver } from "../WorkspaceFile-
|
|
3
|
-
import { a as WorkspaceSource } from "../Workspace-
|
|
2
|
+
import { r as WorkspaceFileAssetResolver } from "../WorkspaceFile-DMtRMwVv.js";
|
|
3
|
+
import { a as WorkspaceSource } from "../Workspace-CIycQ4xE.js";
|
|
4
4
|
import { ThinkChatMessagesProps } from "./ThinkChat.js";
|
|
5
5
|
import { t as ThinkAgent } from "../think-agent-Cip5KAPj.js";
|
|
6
|
+
import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
|
|
6
7
|
import { t as ThinkExecutionRun } from "../ThinkExecutionRun-ChhWhOoU.js";
|
|
7
8
|
import { ThinkExecutionWorkbenchProps } from "./ThinkExecutionWorkbench.js";
|
|
8
9
|
import { ThinkFullAppView } from "./ThinkFullAppViewSwitch.js";
|
|
@@ -16,7 +17,7 @@ import { useAgent } from "agents/react";
|
|
|
16
17
|
//#region src/components/ThinkFullApp.d.ts
|
|
17
18
|
type ThinkFullAppMobileView = "chat" | "workbench";
|
|
18
19
|
type ThinkFullAppAgent<State = unknown> = ThinkAgent<State>;
|
|
19
|
-
type ThinkFullAppWorkbenchView = "files" | "execution" | (string & {});
|
|
20
|
+
type ThinkFullAppWorkbenchView = "files" | "execution" | "plugins" | (string & {});
|
|
20
21
|
interface ThinkFullAppWorkspaceConfig {
|
|
21
22
|
source: WorkspaceSource;
|
|
22
23
|
/**
|
|
@@ -49,6 +50,8 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
|
|
|
49
50
|
chat: ReturnType<typeof useAgentChat<State, MessageT>>;
|
|
50
51
|
/** Atomic workspace source, navigation, media, and header configuration. */
|
|
51
52
|
workspace?: ThinkFullAppWorkspaceConfig;
|
|
53
|
+
/** Plugin directory backed by the host's live Agents MCP state and connection callbacks. */
|
|
54
|
+
plugins?: McpPluginCatalogProps;
|
|
52
55
|
/** Product-specific actions rendered in the application top bar. */
|
|
53
56
|
appBarActions?: React.ReactNode;
|
|
54
57
|
/** Product-specific navigation rendered after the built-in sidebar control. */
|
|
@@ -76,7 +79,7 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
|
|
|
76
79
|
renderExecutionRunLink: ThinkExecutionWorkbenchProps["renderRunLink"];
|
|
77
80
|
/** Message rendering labels and approval overrides for ThinkChat. */
|
|
78
81
|
messages?: ThinkChatMessagesProps<MessageT>;
|
|
79
|
-
/** Extra workbench panels appended after the built-in
|
|
82
|
+
/** Extra workbench panels appended after the enabled built-in panels. */
|
|
80
83
|
workbenchPanels?: readonly ThinkFullAppPanel<AgentT, State, MessageT>[];
|
|
81
84
|
/** Show retained Agent Tool runs from the parent connection. Defaults to true. */
|
|
82
85
|
showAgentTools?: boolean;
|
|
@@ -126,6 +129,7 @@ declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = u
|
|
|
126
129
|
onMobileViewChange,
|
|
127
130
|
onThreadSidebarOpenChange,
|
|
128
131
|
onWorkbenchViewChange,
|
|
132
|
+
plugins,
|
|
129
133
|
ref,
|
|
130
134
|
renderAgentToolRunLink,
|
|
131
135
|
renderExecutionRunLink,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, X as TerminalIcon, d as ChevronDownIcon } from "../icons-DyOM0EJs.js";
|
|
3
2
|
import { Button } from "./Button.js";
|
|
3
|
+
import { C as FileIcon, Z as TerminalIcon, c as BoxIcon, f as ChevronDownIcon } from "../icons-ua6f_GH3.js";
|
|
4
4
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../WorkspaceLink-BYYeTQLf.js";
|
|
5
5
|
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
6
6
|
import { AppTopBar } from "./AppTopBar.js";
|
|
7
7
|
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-E_HrfH76.js";
|
|
8
8
|
import { useWorkspace } from "./Workspace.js";
|
|
9
9
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
10
|
+
import { ScrollArea } from "./ScrollArea.js";
|
|
11
|
+
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
10
12
|
import { n as runViewTransition } from "../view-transitions-DyUP0lSg.js";
|
|
11
13
|
import { ResizableSidePanel } from "./ResizableSidePanel.js";
|
|
12
14
|
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
@@ -38,8 +40,14 @@ function WorkspacePanel({ config }) {
|
|
|
38
40
|
actions: config.actions
|
|
39
41
|
});
|
|
40
42
|
}
|
|
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(McpPluginCatalog, { ...config }) }), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
41
49
|
/** Combines ThinkChat with an optional resizable workbench shell. */
|
|
42
|
-
function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat, className, defaultMobileView, defaultWorkbenchView, defaultThreadSidebarOpen, hideAppBarInWorkbench = false, messages, mobileView, onMobileViewChange, onThreadSidebarOpenChange, onWorkbenchViewChange, ref, renderAgentToolRunLink, renderExecutionRunLink, selectedExecutionRun, showAgentTools = true, showExecutionWorkbench = true, showMobileViewSwitch = true, sourceKey, style, threadSidebar, threadSidebarOpen, threadStatusSummary, workbenchPanels, workbenchView, workspace, ...props }) {
|
|
50
|
+
function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat, className, defaultMobileView, defaultWorkbenchView, defaultThreadSidebarOpen, hideAppBarInWorkbench = false, messages, mobileView, onMobileViewChange, onThreadSidebarOpenChange, onWorkbenchViewChange, plugins, ref, renderAgentToolRunLink, renderExecutionRunLink, selectedExecutionRun, showAgentTools = true, showExecutionWorkbench = true, showMobileViewSwitch = true, sourceKey, style, threadSidebar, threadSidebarOpen, threadStatusSummary, workbenchPanels, workbenchView, workspace, ...props }) {
|
|
43
51
|
const appRef = React.useRef(null);
|
|
44
52
|
const viewScopeRef = React.useRef(null);
|
|
45
53
|
const workbenchPanelRef = React.useRef(null);
|
|
@@ -116,6 +124,12 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
116
124
|
renderRunLink: renderExecutionRunLink
|
|
117
125
|
})
|
|
118
126
|
});
|
|
127
|
+
if (plugins) availableWorkbenchPanels.push({
|
|
128
|
+
id: "plugins",
|
|
129
|
+
label: "Plugins",
|
|
130
|
+
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
131
|
+
render: () => /* @__PURE__ */ jsx(PluginsPanel, { config: plugins })
|
|
132
|
+
});
|
|
119
133
|
if (workbenchPanels) availableWorkbenchPanels.push(...workbenchPanels);
|
|
120
134
|
const activePanel = availableWorkbenchPanels.find((panel) => panel.id === requestedWorkbenchView) ?? availableWorkbenchPanels[0];
|
|
121
135
|
const activeWorkbenchView = activePanel?.id;
|
|
@@ -219,6 +233,7 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
219
233
|
/* @__PURE__ */ jsxs("div", {
|
|
220
234
|
ref: viewScopeRef,
|
|
221
235
|
className: "think-full-app__view-scope",
|
|
236
|
+
"data-recipe": "application-plane",
|
|
222
237
|
children: [/* @__PURE__ */ jsx("section", {
|
|
223
238
|
className: "think-full-app__chat-surface",
|
|
224
239
|
"data-workspace-restoration-scope": "chat",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { V as PlusIcon } from "../icons-DyOM0EJs.js";
|
|
3
|
-
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
2
|
import { buttonVariants } from "./Button.js";
|
|
3
|
+
import { H as PlusIcon } from "../icons-ua6f_GH3.js";
|
|
4
|
+
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
5
5
|
import { Tooltip } from "./Tooltip.js";
|
|
6
6
|
import { t as capitalize } from "../format-S6uWyoSb.js";
|
|
7
7
|
import { SearchField } from "./SearchField.js";
|
|
@@ -36,6 +36,7 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
|
|
|
36
36
|
/* @__PURE__ */ jsxs("div", {
|
|
37
37
|
className: "think-routine-library__browser-toolbar",
|
|
38
38
|
children: [/* @__PURE__ */ jsx(ToggleGroup.Root, {
|
|
39
|
+
segmented: true,
|
|
39
40
|
className: "think-routine-library__filters",
|
|
40
41
|
size: "sm",
|
|
41
42
|
"aria-label": "Filter schedules",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon } from "../icons-DyOM0EJs.js";
|
|
3
|
-
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
2
|
import { Button, buttonVariants } from "./Button.js";
|
|
3
|
+
import { q as SpinnerIcon } from "../icons-ua6f_GH3.js";
|
|
4
|
+
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
5
|
+
import { Select } from "./Select.js";
|
|
5
6
|
import { Field } from "./Field.js";
|
|
6
7
|
import { Form } from "./Form.js";
|
|
7
8
|
import { Textarea } from "./Textarea.js";
|
|
8
|
-
import { Select } from "./Select.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/ThinkRoutineForm.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlayIcon, K as SpinnerIcon, Q as WarningIcon, d as ChevronDownIcon, y as EllipsisIcon } from "../icons-DyOM0EJs.js";
|
|
3
|
-
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
2
|
import { Button, buttonVariants } from "./Button.js";
|
|
3
|
+
import { $ as WarningIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIcon, q as SpinnerIcon } from "../icons-ua6f_GH3.js";
|
|
4
|
+
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
5
5
|
import { Menu } from "./Menu.js";
|
|
6
6
|
import { AppTopBar } from "./AppTopBar.js";
|
|
7
7
|
import { AlertDialog } from "./AlertDialog.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
3
2
|
import { buttonVariants } from "./Button.js";
|
|
3
|
+
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
|
+
import { EmptyState } from "./EmptyState.js";
|
|
4
5
|
import { Badge } from "./Badge.js";
|
|
5
6
|
import { formatThinkExecutionShortTimestamp, getThinkExecutionRunId, getThinkExecutionRunStatus, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
6
7
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
@@ -65,9 +66,9 @@ function ThinkRoutineRuns({ className, runs, title = "Recent runs", emptyState =
|
|
|
65
66
|
})
|
|
66
67
|
}, `${kind}:${getThinkExecutionRunId(run)}`);
|
|
67
68
|
})
|
|
68
|
-
}) : /* @__PURE__ */ jsx(
|
|
69
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
69
70
|
className: "think-routine-library__empty-runs",
|
|
70
|
-
|
|
71
|
+
description: emptyState
|
|
71
72
|
})]
|
|
72
73
|
});
|
|
73
74
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, Q as WarningIcon, V as PlusIcon, _ as DotIcon, t as ArchiveIcon } from "../icons-DyOM0EJs.js";
|
|
3
|
-
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
2
|
import { Button, buttonVariants } from "./Button.js";
|
|
3
|
+
import { $ as WarningIcon, H as PlusIcon, q as SpinnerIcon, t as ArchiveIcon, v as DotIcon } from "../icons-ua6f_GH3.js";
|
|
4
|
+
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
5
|
+
import { EmptyState } from "./EmptyState.js";
|
|
5
6
|
import { SearchField } from "./SearchField.js";
|
|
6
7
|
import { AlertDialog } from "./AlertDialog.js";
|
|
7
8
|
import { ScrollArea } from "./ScrollArea.js";
|
|
@@ -247,9 +248,9 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onDelete, clas
|
|
|
247
248
|
}) : null]
|
|
248
249
|
}, thread.id);
|
|
249
250
|
})
|
|
250
|
-
}) : /* @__PURE__ */ jsx(
|
|
251
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
251
252
|
className: "think-thread-picker__empty",
|
|
252
|
-
|
|
253
|
+
description: threads.length ? "No matching threads." : "No threads yet."
|
|
253
254
|
})
|
|
254
255
|
}), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
255
256
|
orientation: "vertical",
|
|
@@ -33,7 +33,15 @@ interface ToastActionProps extends React.ComponentPropsWithoutRef<typeof Toast$1
|
|
|
33
33
|
/**
|
|
34
34
|
* Props for the Toast.Close component.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
type BaseToastCloseProps = React.ComponentPropsWithoutRef<typeof Toast$1.Close>;
|
|
37
|
+
interface ToastCloseProps extends Omit<BaseToastCloseProps, "aria-label" | "children" | "className" | "nativeButton" | "render"> {
|
|
38
|
+
/** Additional class names for close-button layout. */
|
|
39
|
+
className?: string;
|
|
40
|
+
/** Accessible name for the icon-only close button. */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** Decorative close glyph. Defaults to the design-system close icon. */
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}
|
|
37
45
|
/**
|
|
38
46
|
* Container for displaying toasts.
|
|
39
47
|
*/
|
|
@@ -100,6 +108,8 @@ declare function ToastAction({
|
|
|
100
108
|
*/
|
|
101
109
|
declare function ToastClose({
|
|
102
110
|
className,
|
|
111
|
+
label,
|
|
112
|
+
children,
|
|
103
113
|
ref,
|
|
104
114
|
...props
|
|
105
115
|
}: ToastCloseProps & {
|
|
@@ -133,7 +143,7 @@ declare function ToastClose({
|
|
|
133
143
|
* <Toast.Title>{toast.title}</Toast.Title>
|
|
134
144
|
* <Toast.Description>{toast.description}</Toast.Description>
|
|
135
145
|
* </Toast.Content>
|
|
136
|
-
* <Toast.Close
|
|
146
|
+
* <Toast.Close />
|
|
137
147
|
* </Toast.Root>
|
|
138
148
|
* ))}
|
|
139
149
|
* </Toast.Viewport>
|