@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,9 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Activity, ActivityContent,
|
|
2
|
+
import { S as FileIcon, T as InfoIcon } from "../../icons-CVFSeTJn.js";
|
|
3
|
+
import { Activity, ActivityContent, ActivityItemGroup, ActivityOutput, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
4
|
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
5
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
5
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
|
-
import {
|
|
7
|
+
import { formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
7
8
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
8
9
|
import "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,6 +17,7 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
16
17
|
if (!run) return /* @__PURE__ */ jsx("section", {
|
|
17
18
|
ref,
|
|
18
19
|
className: cx("think-execution-detail", "think-execution-detail--empty", className),
|
|
20
|
+
"data-recipe": "page",
|
|
19
21
|
role: "status",
|
|
20
22
|
...props,
|
|
21
23
|
children: /* @__PURE__ */ jsx(EmptyState, { description: emptyState })
|
|
@@ -26,53 +28,53 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
26
28
|
return /* @__PURE__ */ jsxs("section", {
|
|
27
29
|
ref,
|
|
28
30
|
className: cx("think-execution-detail", className),
|
|
31
|
+
"data-recipe": "page",
|
|
29
32
|
...props,
|
|
30
|
-
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
run.metadata ? /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("header", {
|
|
35
|
+
className: "think-execution-detail__header",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("p", {
|
|
38
|
+
className: "think-execution-detail__eyebrow",
|
|
39
|
+
children: getThinkExecutionRunKindLabel(run)
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "think-execution-detail__heading",
|
|
43
|
+
children: [/* @__PURE__ */ jsx("h3", { children: getThinkExecutionRunTitle(run) }), /* @__PURE__ */ jsx(ThinkExecutionStatus, { run })]
|
|
44
|
+
}),
|
|
45
|
+
!isThinkSubmissionRun(run) ? /* @__PURE__ */ jsx("code", { children: id }) : null
|
|
46
|
+
]
|
|
47
|
+
}),
|
|
48
|
+
error ? /* @__PURE__ */ jsx("p", {
|
|
49
|
+
className: "think-execution-detail__error",
|
|
50
|
+
role: "alert",
|
|
51
|
+
children: error
|
|
52
|
+
}) : null,
|
|
53
|
+
/* @__PURE__ */ jsxs(DescriptionList.Root, {
|
|
54
|
+
variant: "divided",
|
|
55
|
+
className: "think-execution-detail__facts",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Created" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: formatThinkExecutionTimestamp(run.createdAt) })] }),
|
|
58
|
+
progressedAt ? /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: getThinkExecutionRunProgressedLabel(run) }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: formatThinkExecutionTimestamp(progressedAt) })] }) : null,
|
|
59
|
+
run.completedAt ? /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Finished" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: formatThinkExecutionTimestamp(run.completedAt) })] }) : null
|
|
60
|
+
]
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsxs(Activity, {
|
|
63
|
+
defaultOpen: true,
|
|
64
|
+
children: [/* @__PURE__ */ jsx(ActivityTrigger, {
|
|
65
|
+
icon: /* @__PURE__ */ jsx(FileIcon, {}),
|
|
66
|
+
action: "Record"
|
|
67
|
+
}), /* @__PURE__ */ jsxs(ActivityContent, { children: [run.metadata ? /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
65
68
|
icon: /* @__PURE__ */ jsx(InfoIcon, {}),
|
|
66
69
|
action: "Metadata",
|
|
67
70
|
children: /* @__PURE__ */ jsx(ActivityOutput, { children: formatJson(run.metadata) })
|
|
68
|
-
}) : null,
|
|
69
|
-
/* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
71
|
+
}) : null, /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
70
72
|
icon: /* @__PURE__ */ jsx(FileIcon, {}),
|
|
71
73
|
action: "Raw record",
|
|
72
74
|
children: /* @__PURE__ */ jsx(ActivityOutput, { children: formatJson(run) })
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
})] })]
|
|
76
|
+
})
|
|
77
|
+
]
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as isThinkSubmissionRun, a as formatThinkExecutionStatus, c as getThinkExecutionRunError, d as
|
|
2
|
-
export { ThinkExecutionRun, ThinkExecutionStatusTone, formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle,
|
|
1
|
+
import { _ as isThinkSubmissionRun, a as formatThinkExecutionStatus, c as getThinkExecutionRunError, d as getThinkExecutionRunProgressedAt, f as getThinkExecutionRunProgressedLabel, g as getThinkExecutionRunTitle, h as getThinkExecutionRunSubtitle, i as formatThinkExecutionShortTimestamp, l as getThinkExecutionRunId, m as getThinkExecutionRunStatusTone, n as ThinkExecutionStatusTone, o as formatThinkExecutionTimestamp, p as getThinkExecutionRunStatus, r as formatThinkExecutionRunProgress, s as getThinkExecutionRunAccessibleName, t as ThinkExecutionRun, u as getThinkExecutionRunKindLabel } from "../../ThinkExecutionRun-k8bpyXqt.js";
|
|
2
|
+
export { ThinkExecutionRun, ThinkExecutionStatusTone, formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isThinkSubmissionRun };
|
|
@@ -10,6 +10,9 @@ function getThinkExecutionRunId(run) {
|
|
|
10
10
|
function getThinkExecutionRunTitle(run) {
|
|
11
11
|
return isThinkSubmissionRun(run) ? run.submissionId : run.workflowName;
|
|
12
12
|
}
|
|
13
|
+
function getThinkExecutionRunKindLabel(run) {
|
|
14
|
+
return isThinkSubmissionRun(run) ? "Submission" : "Workflow";
|
|
15
|
+
}
|
|
13
16
|
function getThinkExecutionRunSubtitle(run) {
|
|
14
17
|
return isThinkSubmissionRun(run) ? void 0 : run.workflowId;
|
|
15
18
|
}
|
|
@@ -31,7 +34,7 @@ function getThinkExecutionRunStatusTone(run) {
|
|
|
31
34
|
const status = getThinkExecutionRunStatus(run);
|
|
32
35
|
if (status === "completed" || status === "complete") return "success";
|
|
33
36
|
if (status === "error" || status === "errored" || status === "terminated") return "danger";
|
|
34
|
-
if (status === "aborted" || status === "skipped" || status === "paused" || status === "waiting") return "
|
|
37
|
+
if (status === "aborted" || status === "skipped" || status === "paused" || status === "waiting") return "paused";
|
|
35
38
|
if (status === "running" || status === "pending" || status === "queued" || status === "waitingForPause" || status === "rollingBack") return "primary";
|
|
36
39
|
return "neutral";
|
|
37
40
|
}
|
|
@@ -64,9 +67,5 @@ function getThinkExecutionRunAccessibleName(run) {
|
|
|
64
67
|
function getThinkExecutionRunError(run) {
|
|
65
68
|
return isThinkSubmissionRun(run) ? run.error : run.error ? `${run.error.name}: ${run.error.message}` : void 0;
|
|
66
69
|
}
|
|
67
|
-
function isSameThinkExecutionRun(first, second) {
|
|
68
|
-
if (!first || isThinkSubmissionRun(first) !== isThinkSubmissionRun(second)) return false;
|
|
69
|
-
return getThinkExecutionRunId(first) === getThinkExecutionRunId(second);
|
|
70
|
-
}
|
|
71
70
|
//#endregion
|
|
72
|
-
export { formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle,
|
|
71
|
+
export { formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isThinkSubmissionRun };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, tt as XIcon } from "../../icons-CVFSeTJn.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone,
|
|
4
|
+
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunKindLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/agents-sdk/ThinkExecutionStatus.tsx
|
|
8
8
|
function statusIcon(tone) {
|
|
9
9
|
if (tone === "success") return /* @__PURE__ */ jsx(CheckIcon, {});
|
|
10
10
|
if (tone === "danger") return /* @__PURE__ */ jsx(XIcon, {});
|
|
11
|
-
if (tone === "
|
|
11
|
+
if (tone === "paused") return /* @__PURE__ */ jsx(PauseIcon, {});
|
|
12
12
|
if (tone === "primary") return /* @__PURE__ */ jsx(SpinnerIcon, {});
|
|
13
13
|
return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
14
14
|
}
|
|
@@ -34,7 +34,6 @@ function ThinkExecutionStatus({ className, label, run, ref, ...props }) {
|
|
|
34
34
|
}
|
|
35
35
|
/** Shared identity, status, and progress summary for a whole Think execution record. */
|
|
36
36
|
function ThinkExecutionRunSummary({ className, run, ref, ...props }) {
|
|
37
|
-
const subtitle = getThinkExecutionRunSubtitle(run);
|
|
38
37
|
return /* @__PURE__ */ jsxs("span", {
|
|
39
38
|
ref,
|
|
40
39
|
"data-slot": "think-execution-run-summary",
|
|
@@ -42,15 +41,12 @@ function ThinkExecutionRunSummary({ className, run, ref, ...props }) {
|
|
|
42
41
|
...props,
|
|
43
42
|
children: [/* @__PURE__ */ jsx(ThinkExecutionStatus, { run }), /* @__PURE__ */ jsxs("span", {
|
|
44
43
|
className: "think-execution-run-summary__copy",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
46
|
-
className: "think-execution-run-
|
|
47
|
-
children:
|
|
48
|
-
className: "think-execution-run-summary__title sigvelo-truncate",
|
|
49
|
-
children: getThinkExecutionRunTitle(run)
|
|
50
|
-
}), subtitle ? /* @__PURE__ */ jsx("code", { children: subtitle }) : null]
|
|
44
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: "think-execution-run-summary__title sigvelo-truncate",
|
|
46
|
+
children: getThinkExecutionRunTitle(run)
|
|
51
47
|
}), /* @__PURE__ */ jsx("span", {
|
|
52
|
-
className: "think-execution-run-
|
|
53
|
-
children: formatThinkExecutionRunProgress(run)
|
|
48
|
+
className: "think-execution-run-summary__meta sigvelo-truncate",
|
|
49
|
+
children: `${getThinkExecutionRunKindLabel(run)} · ${formatThinkExecutionStatus(getThinkExecutionRunStatus(run))} · ${formatThinkExecutionRunProgress(run)}`
|
|
54
50
|
})]
|
|
55
51
|
})]
|
|
56
52
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-
|
|
1
|
+
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
4
4
|
import { Think, ThinkSubmissionInspection } from "@cloudflare/think";
|
|
@@ -21,6 +21,12 @@ interface ThinkExecutionWorkbenchProps extends Omit<React.HTMLAttributes<HTMLDiv
|
|
|
21
21
|
selectedRun: ThinkExecutionRun | null;
|
|
22
22
|
/** Returns an application-authored TanStack Router Link for the run. */
|
|
23
23
|
renderRunLink: (run: ThinkExecutionRun) => React.ReactElement;
|
|
24
|
+
/**
|
|
25
|
+
* Returns an application-authored TanStack Router Link back to the run
|
|
26
|
+
* list. A selected run replaces the list — the workspace drill-in pattern —
|
|
27
|
+
* so this link is the way back out.
|
|
28
|
+
*/
|
|
29
|
+
renderRunsLink: () => React.ReactElement;
|
|
24
30
|
}
|
|
25
31
|
interface ThinkExecutionRunsData {
|
|
26
32
|
submissions: readonly ThinkSubmissionInspection[];
|
|
@@ -48,6 +54,7 @@ declare function ThinkExecutionWorkbench({
|
|
|
48
54
|
pageSize,
|
|
49
55
|
ref,
|
|
50
56
|
renderRunLink,
|
|
57
|
+
renderRunsLink,
|
|
51
58
|
selectedRun,
|
|
52
59
|
source,
|
|
53
60
|
sourceKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as WarningIcon, H as RefreshIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CVFSeTJn.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
@@ -7,7 +7,7 @@ import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
|
7
7
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
8
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
|
-
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone,
|
|
10
|
+
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
11
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
12
|
import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
|
|
13
13
|
import * as React from "react";
|
|
@@ -117,7 +117,7 @@ function thinkExecutionRunsQueryOptions(source, sourceKey, pageSize = executionP
|
|
|
117
117
|
* not normalize execution records or own workflow authoring. Its first
|
|
118
118
|
* uncached list read suspends to the consuming route's Suspense boundary.
|
|
119
119
|
*/
|
|
120
|
-
function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPanelPageSize, ref, renderRunLink, selectedRun, source, sourceKey, title = "Execution", ...props }) {
|
|
120
|
+
function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPanelPageSize, ref, renderRunLink, renderRunsLink, selectedRun, source, sourceKey, title = "Execution", ...props }) {
|
|
121
121
|
const runsId = React.useId();
|
|
122
122
|
const runsOptions = thinkExecutionRunsQueryOptions(source, sourceKey, pageSize);
|
|
123
123
|
const runsQueryKey = thinkExecutionRunsScopeQueryKey(sourceKey);
|
|
@@ -142,18 +142,29 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
142
142
|
return /* @__PURE__ */ jsxs("div", {
|
|
143
143
|
ref,
|
|
144
144
|
className: cx("think-execution-workbench", className),
|
|
145
|
+
"data-recipe": "fill-host",
|
|
145
146
|
...props,
|
|
146
147
|
children: [
|
|
147
148
|
/* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
148
149
|
className: "think-execution-workbench__header",
|
|
150
|
+
titleAlign: "start",
|
|
149
151
|
"aria-label": "Run controls",
|
|
150
152
|
children: [
|
|
151
|
-
/* @__PURE__ */ jsx(AppTopBar.Leading, { children:
|
|
153
|
+
/* @__PURE__ */ jsx(AppTopBar.Leading, { children: selectedRun ? /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
154
|
+
label: "Back to runs",
|
|
155
|
+
render: renderRunsLink(),
|
|
156
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, { "aria-hidden": "true" })
|
|
157
|
+
}) : backButton }),
|
|
152
158
|
/* @__PURE__ */ jsx(AppTopBar.Title, { children: /* @__PURE__ */ jsx("h2", {
|
|
153
159
|
className: "think-execution-workbench__title",
|
|
154
160
|
children: title
|
|
155
161
|
}) }),
|
|
156
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [selectedRun ? /* @__PURE__ */ jsx(RunActions, {
|
|
163
|
+
busy: actionIsPending,
|
|
164
|
+
run: selectedRun,
|
|
165
|
+
source,
|
|
166
|
+
onAction: runAction
|
|
167
|
+
}) : null, /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
157
168
|
label: "Refresh runs",
|
|
158
169
|
disabled: busyAction !== null,
|
|
159
170
|
onClick: () => {
|
|
@@ -161,18 +172,22 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
161
172
|
runsQuery.refetch();
|
|
162
173
|
},
|
|
163
174
|
children: /* @__PURE__ */ jsx(RefreshIcon, {})
|
|
164
|
-
}) })
|
|
175
|
+
})] })
|
|
165
176
|
]
|
|
166
177
|
}),
|
|
167
|
-
error ? /* @__PURE__ */
|
|
178
|
+
error ? /* @__PURE__ */ jsxs("div", {
|
|
168
179
|
className: "think-execution-workbench__error",
|
|
169
180
|
role: "alert",
|
|
170
|
-
children: formatErrorMessage(error)
|
|
181
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
|
|
171
182
|
}) : null,
|
|
172
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ jsx("div", {
|
|
173
184
|
className: "think-execution-workbench__content",
|
|
174
185
|
"aria-busy": busyAction !== null,
|
|
175
|
-
children:
|
|
186
|
+
children: selectedRun ? /* @__PURE__ */ jsx("section", {
|
|
187
|
+
className: "think-execution-workbench__detail",
|
|
188
|
+
"aria-label": "Run detail",
|
|
189
|
+
children: /* @__PURE__ */ jsx(ThinkExecutionDetail, { run: selectedRun })
|
|
190
|
+
}) : /* @__PURE__ */ jsxs("section", {
|
|
176
191
|
className: "think-execution-workbench__run-list",
|
|
177
192
|
"aria-labelledby": runsId,
|
|
178
193
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -190,35 +205,26 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
190
205
|
children: runs.map((run) => {
|
|
191
206
|
const id = getThinkExecutionRunId(run);
|
|
192
207
|
const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"data-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
run,
|
|
211
|
-
source,
|
|
212
|
-
onAction: runAction
|
|
213
|
-
})]
|
|
214
|
-
}, `${kind}:${id}`);
|
|
208
|
+
return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx(NavigationLink, {
|
|
209
|
+
render: renderRunLink(run),
|
|
210
|
+
"data-slot": "button",
|
|
211
|
+
className: buttonVariants({
|
|
212
|
+
variant: "ghost",
|
|
213
|
+
color: "neutral",
|
|
214
|
+
size: "sm",
|
|
215
|
+
className: "think-execution-workbench__run"
|
|
216
|
+
}),
|
|
217
|
+
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
218
|
+
children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
|
|
219
|
+
}), /* @__PURE__ */ jsx(RunActions, {
|
|
220
|
+
busy: actionIsPending,
|
|
221
|
+
run,
|
|
222
|
+
source,
|
|
223
|
+
onAction: runAction
|
|
224
|
+
})] }, `${kind}:${id}`);
|
|
215
225
|
})
|
|
216
226
|
})]
|
|
217
|
-
})
|
|
218
|
-
className: "think-execution-workbench__detail",
|
|
219
|
-
"aria-label": "Run detail",
|
|
220
|
-
children: /* @__PURE__ */ jsx(ThinkExecutionDetail, { run: selectedRun })
|
|
221
|
-
})]
|
|
227
|
+
})
|
|
222
228
|
})
|
|
223
229
|
]
|
|
224
230
|
});
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
-
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-
|
|
2
|
+
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-daY67hFM.js";
|
|
3
3
|
import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
|
|
4
4
|
import { ThinkChatMessagesProps } from "./ThinkChat.js";
|
|
5
|
-
import {
|
|
6
|
-
import { ThinkExecutionWorkbenchProps } from "./ThinkExecutionWorkbench.js";
|
|
7
|
-
import { ThinkFullAppView } from "./ThinkFullAppViewSwitch.js";
|
|
5
|
+
import { AppBarSlots, ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
8
6
|
import { ThinkThreadStatusSummary } from "./ThinkThreadPicker.js";
|
|
9
|
-
import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
10
7
|
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-BLaFmMrt.js";
|
|
11
8
|
import { WorkspaceSource } from "./Workspace.js";
|
|
12
9
|
import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
|
|
@@ -16,9 +13,15 @@ import { useAgentChat } from "@cloudflare/think/react";
|
|
|
16
13
|
import { useAgent } from "agents/react";
|
|
17
14
|
|
|
18
15
|
//#region src/components/agents-sdk/ThinkFullApp.d.ts
|
|
19
|
-
type ThinkFullAppMobileView = "chat" | "workbench";
|
|
20
16
|
type ThinkFullAppAgent<State = unknown> = ThinkAgent<State>;
|
|
21
|
-
type ThinkFullAppWorkbenchView = "files" | "
|
|
17
|
+
type ThinkFullAppWorkbenchView = "files" | "plugins" | (string & {});
|
|
18
|
+
/**
|
|
19
|
+
* The one view axis: the conversation alone, or the conversation with a named
|
|
20
|
+
* workbench panel raised beside it (leading at narrow widths). Apps that make
|
|
21
|
+
* views durable derive this from validated route search state and pass
|
|
22
|
+
* `onViewChange` back into their router.
|
|
23
|
+
*/
|
|
24
|
+
type ThinkFullAppView = "chat" | ThinkFullAppWorkbenchView;
|
|
22
25
|
interface ThinkFullAppWorkspaceConfig {
|
|
23
26
|
source: WorkspaceSource;
|
|
24
27
|
/**
|
|
@@ -34,13 +37,15 @@ interface ThinkFullAppWorkspaceConfig {
|
|
|
34
37
|
leading?: React.ReactNode;
|
|
35
38
|
actions?: React.ReactNode;
|
|
36
39
|
}
|
|
37
|
-
interface ThinkFullAppPanel
|
|
38
|
-
/** Unique panel id used by `
|
|
40
|
+
interface ThinkFullAppPanel {
|
|
41
|
+
/** Unique panel id used by `view`; custom panels should not reuse built-in ids. */
|
|
39
42
|
id: ThinkFullAppWorkbenchView;
|
|
43
|
+
label: string;
|
|
44
|
+
icon: React.ReactNode;
|
|
40
45
|
/** Panels are app-authored, so anything one needs is already in its scope. */
|
|
41
46
|
render: () => React.ReactNode;
|
|
42
47
|
}
|
|
43
|
-
/** The live conversation the chat lane
|
|
48
|
+
/** The live conversation the chat lane and approvals belong to. */
|
|
44
49
|
interface ThinkFullAppConversation<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> {
|
|
45
50
|
/** The `useAgent` value from `agents/react`; its stub drives approvals and execution records. */
|
|
46
51
|
agent: ReturnType<typeof useAgent<AgentT, State>>;
|
|
@@ -57,39 +62,25 @@ interface ThinkFullAppConversation<AgentT extends ThinkFullAppAgent<State>, Stat
|
|
|
57
62
|
interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> extends React.HTMLAttributes<HTMLDivElement> {
|
|
58
63
|
/**
|
|
59
64
|
* Omit it and supply `messages.draft` for the first turn of a conversation
|
|
60
|
-
* that does not exist yet. The approvals
|
|
61
|
-
*
|
|
65
|
+
* that does not exist yet. The approvals and background-agent surfaces wait
|
|
66
|
+
* for a conversation to belong to; everything else is unchanged.
|
|
62
67
|
*/
|
|
63
68
|
conversation?: ThinkFullAppConversation<AgentT, State, MessageT>;
|
|
64
69
|
/** Atomic workspace source, navigation, media, and header configuration. */
|
|
65
70
|
workspace?: ThinkFullAppWorkspaceConfig;
|
|
66
71
|
/** Plugin directory backed by the host's live Agents MCP state and connection callbacks. */
|
|
67
72
|
plugins?: McpPluginCatalogProps;
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
/** Product-specific navigation rendered after the built-in sidebar control. */
|
|
71
|
-
appBarLeading?: React.ReactNode;
|
|
72
|
-
/** Active conversation or page title rendered in the application top bar. */
|
|
73
|
-
appBarTitle?: React.ReactNode;
|
|
73
|
+
/** Application bar slots: back control, leading navigation, title, actions. */
|
|
74
|
+
bar?: AppBarSlots;
|
|
74
75
|
/** Aggregate thread activity rendered beside the compact thread-title disclosure. */
|
|
75
76
|
threadStatusSummary?: ThinkThreadStatusSummary;
|
|
76
|
-
/** Whether narrow layouts render the built-in chat/workbench switch. Defaults to true. */
|
|
77
|
-
showMobileViewSwitch?: boolean;
|
|
78
|
-
/** Whether desktop layouts render the built-in workbench switch. Defaults to true. */
|
|
79
|
-
showWorkbenchViewSwitch?: boolean;
|
|
80
|
-
/** Hide the thread app bar when a narrow workbench supplies its own navigation. */
|
|
81
|
-
hideAppBarInWorkbench?: boolean;
|
|
82
|
-
/** Whole native execution selected by the application route. */
|
|
83
|
-
selectedExecutionRun?: ThinkExecutionRun | null;
|
|
84
77
|
/**
|
|
85
|
-
* Stable, non-secret identity for the remote Think agent used by approvals
|
|
86
|
-
*
|
|
78
|
+
* Stable, non-secret identity for the remote Think agent used by approvals.
|
|
79
|
+
* Include endpoint, account or tenant scope, and
|
|
87
80
|
* agent path so two sources cannot share cached data. The optional workspace
|
|
88
81
|
* has its own source identity.
|
|
89
82
|
*/
|
|
90
83
|
sourceKey: string;
|
|
91
|
-
/** Returns an application-authored TanStack Router Link and enables the Execution workbench. */
|
|
92
|
-
renderExecutionRunLink?: ThinkExecutionWorkbenchProps["renderRunLink"];
|
|
93
84
|
/** Message rendering labels and approval overrides for ThinkChat. */
|
|
94
85
|
messages?: ThinkChatMessagesProps<MessageT>;
|
|
95
86
|
/** Extra workbench panels appended after the enabled built-in panels. */
|
|
@@ -100,72 +91,45 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
|
|
|
100
91
|
* Optional parent-owned thread picker/sidebar rendered beside the selected child app.
|
|
101
92
|
* Use the render form to close the compact drawer after selecting a thread.
|
|
102
93
|
*/
|
|
103
|
-
threadSidebar?: React.ComponentProps<typeof
|
|
104
|
-
/** Whether the thread sidebar is open. Omit for internal state. */
|
|
105
|
-
threadSidebarOpen?: boolean;
|
|
106
|
-
/** Initial thread sidebar state when `threadSidebarOpen` is uncontrolled. */
|
|
107
|
-
defaultThreadSidebarOpen?: boolean;
|
|
108
|
-
/** Called when the thread sidebar is opened or closed. */
|
|
109
|
-
onThreadSidebarOpenChange?: (open: boolean) => void;
|
|
110
|
-
/** Visible surface at narrow widths. Omit for internal state. */
|
|
111
|
-
mobileView?: ThinkFullAppMobileView;
|
|
112
|
-
/** Initial narrow-width surface when `mobileView` is uncontrolled. */
|
|
113
|
-
defaultMobileView?: ThinkFullAppMobileView;
|
|
114
|
-
/** Called when narrow layouts switch between chat and the workbench. */
|
|
115
|
-
onMobileViewChange?: (view: ThinkFullAppMobileView) => void;
|
|
94
|
+
threadSidebar?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
|
|
116
95
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
96
|
+
* Visible surface. Omit for internal state. A controlled `view` naming a
|
|
97
|
+
* panel that does not exist renders the conversation alone — it is never
|
|
98
|
+
* silently substituted with another panel.
|
|
119
99
|
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
|
|
129
|
-
/** Called when toolbar or resize input opens or closes the workbench. */
|
|
130
|
-
onWorkbenchOpenChange?: (open: boolean) => void;
|
|
100
|
+
view?: ThinkFullAppView;
|
|
101
|
+
/**
|
|
102
|
+
* Uncontrolled starting view. Ignored when `view` is set. Omit it to open
|
|
103
|
+
* Files beside the conversation on a wide app when a workspace exists, and
|
|
104
|
+
* to stay on chat at compact (extension) widths.
|
|
105
|
+
*/
|
|
106
|
+
defaultView?: ThinkFullAppView;
|
|
107
|
+
/** Called when the built-in switch (or a collapse) asks for another view. */
|
|
108
|
+
onViewChange?: (view: ThinkFullAppView) => void;
|
|
131
109
|
}
|
|
132
|
-
/** Combines ThinkChat with
|
|
110
|
+
/** Combines ThinkChat with a resizable workbench. Wide apps with a workspace
|
|
111
|
+
* open Files beside the conversation; compact (extension) widths stay on chat
|
|
112
|
+
* until a view is selected. */
|
|
133
113
|
declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
134
|
-
|
|
135
|
-
appBarLeading,
|
|
136
|
-
appBarTitle,
|
|
114
|
+
bar,
|
|
137
115
|
className,
|
|
138
116
|
conversation,
|
|
139
|
-
|
|
140
|
-
defaultWorkbenchOpen,
|
|
141
|
-
defaultWorkbenchView,
|
|
142
|
-
defaultThreadSidebarOpen,
|
|
143
|
-
hideAppBarInWorkbench,
|
|
117
|
+
defaultView: defaultViewProp,
|
|
144
118
|
messages,
|
|
145
|
-
|
|
146
|
-
onMobileViewChange,
|
|
147
|
-
onThreadSidebarOpenChange,
|
|
148
|
-
onWorkbenchOpenChange,
|
|
149
|
-
onWorkbenchViewChange,
|
|
119
|
+
onViewChange,
|
|
150
120
|
plugins,
|
|
151
121
|
ref,
|
|
152
122
|
renderAgentToolRunLink,
|
|
153
|
-
renderExecutionRunLink,
|
|
154
|
-
selectedExecutionRun,
|
|
155
|
-
showMobileViewSwitch,
|
|
156
|
-
showWorkbenchViewSwitch,
|
|
157
123
|
sourceKey,
|
|
158
124
|
style,
|
|
159
125
|
threadSidebar,
|
|
160
|
-
threadSidebarOpen,
|
|
161
126
|
threadStatusSummary,
|
|
162
|
-
|
|
127
|
+
view,
|
|
163
128
|
workbenchPanels,
|
|
164
|
-
workbenchView,
|
|
165
129
|
workspace,
|
|
166
130
|
...props
|
|
167
131
|
}: ThinkFullAppProps<AgentT, State, MessageT> & {
|
|
168
132
|
ref?: React.Ref<HTMLDivElement>;
|
|
169
133
|
}): React.JSX.Element;
|
|
170
134
|
//#endregion
|
|
171
|
-
export { ThinkFullApp, ThinkFullAppAgent, ThinkFullAppConversation,
|
|
135
|
+
export { ThinkFullApp, ThinkFullAppAgent, ThinkFullAppConversation, ThinkFullAppPanel, ThinkFullAppProps, ThinkFullAppView, ThinkFullAppWorkbenchView, ThinkFullAppWorkspaceConfig };
|