@mcp-b/react-components 0.37.0 → 0.39.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-SP1WfLDW.d.ts → AgentActivity-Cc_oDYum.d.ts} +1 -1
- package/dist/Message-DBsHHhcM.d.ts +228 -0
- package/dist/{ThinkChat-DQh59CeC.js → ThinkChat-BES_3Mb-.js} +9 -4
- package/dist/{ThinkChatActivity-Dkmm2pIj.d.ts → ThinkChatActivity-D6-_5Phw.d.ts} +1 -1
- package/dist/{ThinkChatActivitySummary-teRjrPxW.d.ts → ThinkChatActivitySummary-BtBQgMg6.d.ts} +1 -1
- package/dist/{ToggleGroup-_pQMyHGM.d.ts → ToggleGroup-BrQZOQn_.d.ts} +1 -1
- package/dist/{WorkspaceFileView-Cu_ZG6HJ.js → WorkspaceFileView-D0r7xnq5.js} +3 -3
- package/dist/{WorkspaceLink-DQogVe8E.d.ts → WorkspaceLink-Bh9-Jo1r.d.ts} +1 -1
- package/dist/{WorkspaceLink-DZeLe_jN.js → WorkspaceLink-DtH66bAY.js} +4 -3
- package/dist/{WorkspaceMessageResponse-BWbkIELl.js → WorkspaceMessageResponse-CJCmGvTx.js} +64 -7
- package/dist/WorkspaceMessageResponse-Cy28WGSz.d.ts +24 -0
- package/dist/components/agents-sdk/AgentActivity.d.ts +1 -1
- package/dist/components/agents-sdk/AgentActivityPreview.d.ts +2 -2
- package/dist/components/agents-sdk/AgentActivityPreview.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +5 -5
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +73 -25
- package/dist/components/agents-sdk/BrowserLiveView.js +95 -65
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +5 -2
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +11 -10
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -12
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/ai-sdk/Artifact.d.ts +44 -1
- package/dist/components/ai-sdk/Artifact.js +79 -3
- package/dist/components/ai-sdk/Message.d.ts +1 -227
- package/dist/components/foundations/EmptyState.d.ts +10 -0
- package/dist/components/foundations/EmptyState.js +10 -0
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- package/dist/components/nanites/AgentToolDetail.js +3 -3
- package/dist/styles/agent-chat.css +2 -2
- package/dist/styles/artifact.css +65 -0
- package/dist/styles/base.css +4 -0
- package/dist/styles/browser-live-view.css +45 -0
- package/dist/styles/think-full-app.css +6 -0
- package/package.json +2 -2
|
@@ -2,12 +2,19 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { A as MaximizeIcon, J as SpinnerIcon } from "../../icons-B4mGvCvc.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
|
-
import { StatusPill } from "../foundations/StatusPill.js";
|
|
6
5
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
6
|
+
import { StatusPill } from "../foundations/StatusPill.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/agents-sdk/BrowserLiveView.tsx
|
|
10
10
|
const FRAME_LOAD_TIMEOUT_MS = 15e3;
|
|
11
|
+
const PHASE_TEXT = {
|
|
12
|
+
connecting: "Connecting live view…",
|
|
13
|
+
streaming: "Live",
|
|
14
|
+
reconnecting: "Reconnecting live view…",
|
|
15
|
+
idle: "Live view ended",
|
|
16
|
+
failed: "Live view unavailable"
|
|
17
|
+
};
|
|
11
18
|
function EndedState({ title, detail }) {
|
|
12
19
|
return /* @__PURE__ */ jsxs("div", {
|
|
13
20
|
className: "browser-live-view__ended",
|
|
@@ -21,12 +28,29 @@ function EndedState({ title, detail }) {
|
|
|
21
28
|
});
|
|
22
29
|
}
|
|
23
30
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
31
|
+
* A live, interactive view of an agent's browser session.
|
|
32
|
+
*
|
|
33
|
+
* It takes the session either way round. Give it `source` — a Browser Run
|
|
34
|
+
* `BrowserLiveViewUrl` — and it embeds the hosted viewer, expiring the frame
|
|
35
|
+
* on its own once `expiresInMs` passes. Give it `renderMedia` and a `phase`
|
|
36
|
+
* instead and the host draws the picture on its own transport while this keeps
|
|
37
|
+
* the frame around it. The Live badge, the connecting overlay, the ended
|
|
38
|
+
* state, and the fullscreen expand are the same either way, because to the
|
|
39
|
+
* person watching it is the same thing.
|
|
40
|
+
*
|
|
41
|
+
* `fill` drops the card treatment for a view that is the whole surface rather
|
|
42
|
+
* than a block on one — the phone's screen, or a panel that already sizes
|
|
43
|
+
* itself. Everything else about the frame is unchanged.
|
|
44
|
+
*
|
|
45
|
+
* A host-drawn view keeps its own input surface, because coordinate mapping
|
|
46
|
+
* and key handling depend on what the host's input API expects — a screencast
|
|
47
|
+
* wants CSS pixels offset by its viewport, and nothing generic here could know
|
|
48
|
+
* that. This component owns the frame; the host owns the picture and control.
|
|
49
|
+
*
|
|
50
|
+
* The two sources differ in what the host must trust. A hosted URL embeds a
|
|
51
|
+
* third-party origin and runs its script; the iframe is unsandboxed by design
|
|
52
|
+
* because the viewer needs scripts and its own origin to stream the session,
|
|
53
|
+
* so only pass trusted Live View URLs. Host-drawn media embeds no origin.
|
|
30
54
|
*
|
|
31
55
|
* Where URLs come from (upstream: `agents/browser` in
|
|
32
56
|
* github.com/cloudflare/agents — `BrowserLiveViewUrl`): the model calls
|
|
@@ -36,22 +60,21 @@ function EndedState({ title, detail }) {
|
|
|
36
60
|
*
|
|
37
61
|
* Styling rides `@mcp-b/react-components/styles` (browser-live-view.css),
|
|
38
62
|
* which think-chat consumers load anyway.
|
|
39
|
-
*
|
|
40
|
-
* The iframe is unsandboxed by design: the hosted Live View UI needs scripts
|
|
41
|
-
* and its own origin to stream the session. Only pass trusted Live View URLs.
|
|
42
63
|
*/
|
|
43
|
-
function BrowserLiveView(
|
|
44
|
-
const
|
|
64
|
+
function BrowserLiveView(props) {
|
|
65
|
+
const { source, receivedAt, renderMedia, phase, pageTitle, statusLabel, fallback, expandable = true, fill, className, ...rest } = props;
|
|
66
|
+
const [expired, setExpired] = React.useState(() => source !== void 0 && receivedAt !== void 0 && receivedAt + source.expiresInMs <= Date.now());
|
|
45
67
|
const [reportedFrameState, setReportedFrameState] = React.useState(() => ({
|
|
46
|
-
url: source
|
|
68
|
+
url: source?.url ?? "",
|
|
47
69
|
value: "loading"
|
|
48
70
|
}));
|
|
49
|
-
if (reportedFrameState.url !== source.url) setReportedFrameState({
|
|
71
|
+
if (source && reportedFrameState.url !== source.url) setReportedFrameState({
|
|
50
72
|
url: source.url,
|
|
51
73
|
value: "loading"
|
|
52
74
|
});
|
|
53
|
-
const frameState = reportedFrameState.url === source.url ? reportedFrameState.value : "loading";
|
|
75
|
+
const frameState = source && reportedFrameState.url === source.url ? reportedFrameState.value : "loading";
|
|
54
76
|
React.useEffect(() => {
|
|
77
|
+
if (!source) return;
|
|
55
78
|
const remaining = (receivedAt ?? Date.now()) + source.expiresInMs - Date.now();
|
|
56
79
|
if (remaining <= 0) {
|
|
57
80
|
setExpired(true);
|
|
@@ -60,57 +83,71 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
60
83
|
setExpired(false);
|
|
61
84
|
const timer = setTimeout(() => setExpired(true), remaining);
|
|
62
85
|
return () => clearTimeout(timer);
|
|
63
|
-
}, [
|
|
64
|
-
receivedAt,
|
|
65
|
-
source.expiresInMs,
|
|
66
|
-
source.targetId,
|
|
67
|
-
source.url
|
|
68
|
-
]);
|
|
86
|
+
}, [receivedAt, source]);
|
|
69
87
|
React.useEffect(() => {
|
|
70
|
-
if (frameState !== "loading") return;
|
|
88
|
+
if (!source || frameState !== "loading") return;
|
|
71
89
|
const url = source.url;
|
|
72
90
|
const timer = setTimeout(() => setReportedFrameState({
|
|
73
91
|
url,
|
|
74
92
|
value: "failed"
|
|
75
93
|
}), FRAME_LOAD_TIMEOUT_MS);
|
|
76
94
|
return () => clearTimeout(timer);
|
|
77
|
-
}, [frameState, source
|
|
78
|
-
const
|
|
79
|
-
const live =
|
|
95
|
+
}, [frameState, source]);
|
|
96
|
+
const activePhase = source ? expired ? "idle" : frameState === "failed" ? "failed" : frameState === "loading" ? "connecting" : "streaming" : phase ?? "connecting";
|
|
97
|
+
const live = activePhase === "streaming";
|
|
98
|
+
const connecting = activePhase === "connecting" || activePhase === "reconnecting";
|
|
80
99
|
const frameTitle = pageTitle ? `Live browser view — ${pageTitle}` : "Live browser view";
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
const statusId = React.useId();
|
|
101
|
+
const renderView = (placement) => {
|
|
102
|
+
const placementStatusId = `${statusId}-${placement}`;
|
|
103
|
+
if (!live && !connecting) return fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
104
|
+
title: statusLabel ?? PHASE_TEXT[activePhase],
|
|
105
|
+
detail: pageTitle
|
|
106
|
+
});
|
|
107
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
live && placement === "inline" ? /* @__PURE__ */ jsx(StatusPill, {
|
|
109
|
+
busy: true,
|
|
110
|
+
size: "sm",
|
|
111
|
+
color: "destructive",
|
|
112
|
+
className: "browser-live-view__badge",
|
|
113
|
+
children: "Live"
|
|
114
|
+
}) : null,
|
|
115
|
+
source ? placement === "dialog" ? /* @__PURE__ */ jsx("iframe", {
|
|
116
|
+
src: source.url,
|
|
117
|
+
title: frameTitle,
|
|
118
|
+
allow: "clipboard-read; clipboard-write"
|
|
119
|
+
}) : /* @__PURE__ */ jsx("iframe", {
|
|
120
|
+
className: "browser-live-view__frame",
|
|
121
|
+
src: source.url,
|
|
122
|
+
title: frameTitle,
|
|
123
|
+
allow: "clipboard-read; clipboard-write",
|
|
124
|
+
onLoad: () => setReportedFrameState({
|
|
125
|
+
url: source.url,
|
|
126
|
+
value: "ready"
|
|
127
|
+
})
|
|
128
|
+
}, source.url) : renderMedia?.(placement, placementStatusId),
|
|
129
|
+
connecting ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
130
|
+
className: "browser-live-view__state",
|
|
131
|
+
id: placementStatusId,
|
|
132
|
+
role: "status",
|
|
133
|
+
children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), statusLabel ?? PHASE_TEXT[activePhase]]
|
|
134
|
+
}) : null,
|
|
135
|
+
live && statusLabel ? /* @__PURE__ */ jsx("p", {
|
|
136
|
+
className: "browser-live-view__notice",
|
|
137
|
+
id: placementStatusId,
|
|
138
|
+
role: "status",
|
|
139
|
+
children: statusLabel
|
|
140
|
+
}) : null
|
|
141
|
+
] });
|
|
142
|
+
};
|
|
108
143
|
return /* @__PURE__ */ jsxs("div", {
|
|
109
|
-
...
|
|
144
|
+
...rest,
|
|
110
145
|
className: cx("browser-live-view", className),
|
|
111
|
-
"data-expired":
|
|
112
|
-
"data-
|
|
113
|
-
|
|
146
|
+
"data-expired": activePhase === "idle" || activePhase === "failed" || void 0,
|
|
147
|
+
"data-fill": fill || void 0,
|
|
148
|
+
"data-frame-state": source ? frameState : void 0,
|
|
149
|
+
"data-phase": activePhase,
|
|
150
|
+
children: [renderView("inline"), expandable ? /* @__PURE__ */ jsxs(Dialog.Root, { children: [/* @__PURE__ */ jsx(Dialog.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
114
151
|
variant: "ghost",
|
|
115
152
|
color: "neutral",
|
|
116
153
|
size: "sm",
|
|
@@ -126,16 +163,9 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
126
163
|
children: frameTitle
|
|
127
164
|
}), /* @__PURE__ */ jsx("div", {
|
|
128
165
|
className: "browser-live-view__dialog-body",
|
|
129
|
-
children:
|
|
130
|
-
src: source.url,
|
|
131
|
-
title: frameTitle,
|
|
132
|
-
allow: "clipboard-read; clipboard-write"
|
|
133
|
-
}) : fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
134
|
-
title: failed ? "Live view unavailable" : "Live view ended",
|
|
135
|
-
detail: pageTitle
|
|
136
|
-
})
|
|
166
|
+
children: renderView("dialog")
|
|
137
167
|
})]
|
|
138
|
-
}) })] })] })]
|
|
168
|
+
}) })] })] }) : null]
|
|
139
169
|
});
|
|
140
170
|
}
|
|
141
171
|
//#endregion
|
|
@@ -2,8 +2,8 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { J as SpinnerIcon, rt as XIcon } from "../../icons-B4mGvCvc.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Tabs } from "../foundations/Tabs.js";
|
|
5
|
-
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "../general-purpose/WebPreview.js";
|
|
6
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
6
|
+
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "../general-purpose/WebPreview.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/agents-sdk/BrowserRunPanel.tsx
|
|
@@ -7,8 +7,8 @@ import { Dialog } from "../foundations/Dialog.js";
|
|
|
7
7
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
8
8
|
import { Separator } from "../foundations/Separator.js";
|
|
9
9
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
|
-
import { SearchField } from "../foundations/SearchField.js";
|
|
11
10
|
import { n as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-SD_S-IpB.js";
|
|
11
|
+
import { SearchField } from "../foundations/SearchField.js";
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/agents-sdk/McpPluginCatalog.tsx
|
|
@@ -6,8 +6,8 @@ import { Dialog } from "../foundations/Dialog.js";
|
|
|
6
6
|
import { o as titleCase } from "../../format-DB2mX9DA.js";
|
|
7
7
|
import { Separator } from "../foundations/Separator.js";
|
|
8
8
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
9
|
-
import { t as ProviderLogo } from "../../provider-logos-zjZycgV6.js";
|
|
10
9
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
10
|
+
import { t as ProviderLogo } from "../../provider-logos-zjZycgV6.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { createPortal } from "react-dom";
|
|
@@ -3,9 +3,10 @@ import { K as PromptInputMessage } from "../../PromptInput-BRX7FhjH.js";
|
|
|
3
3
|
import { r as AgentChatProps } from "../../AgentChat-CVO7xyLC.js";
|
|
4
4
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
|
|
5
5
|
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
6
|
-
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-
|
|
6
|
+
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
|
|
7
7
|
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
8
8
|
import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
|
|
9
|
+
import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-Cy28WGSz.js";
|
|
9
10
|
import * as React from "react";
|
|
10
11
|
import { UIMessage } from "ai";
|
|
11
12
|
import { UseAgentOptions } from "agents/react";
|
|
@@ -67,7 +68,8 @@ type ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> = Omit<Agent
|
|
|
67
68
|
* that does not exist yet.
|
|
68
69
|
*/
|
|
69
70
|
draft?: ThinkChatDraft<MessageT>; /** Whole `useSessionCompaction` result for built-in progress and error notices. */
|
|
70
|
-
sessionCompaction?: UseSessionCompactionResult;
|
|
71
|
+
sessionCompaction?: UseSessionCompactionResult; /** Promotes assistant-authored workspace HTML links through a host runtime hydrator. */
|
|
72
|
+
renderWorkspaceHtmlArtifact?: WorkspaceHtmlArtifactRenderer;
|
|
71
73
|
};
|
|
72
74
|
/** Shared pending-approval options for components and TanStack Router loaders. */
|
|
73
75
|
declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
|
|
@@ -128,6 +130,7 @@ declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage =
|
|
|
128
130
|
renderPart,
|
|
129
131
|
excludeTools,
|
|
130
132
|
renderAgentToolRunLink,
|
|
133
|
+
renderWorkspaceHtmlArtifact,
|
|
131
134
|
toolRenderers,
|
|
132
135
|
thinkStub,
|
|
133
136
|
onExecutionSettled,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
1
|
+
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-BES_3Mb-.js";
|
|
2
2
|
export { ThinkChat, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-
|
|
1
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
|
|
2
2
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
|
|
@@ -2,9 +2,9 @@ import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
|
2
2
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
5
|
+
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
5
6
|
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
6
7
|
import { SubagentRunList } from "./SubagentRunList.js";
|
|
7
|
-
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
8
8
|
import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
|
|
9
9
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
10
10
|
import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-
|
|
1
|
+
import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-BtBQgMg6.js";
|
|
2
2
|
export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
|
|
@@ -4,12 +4,12 @@ import { buttonVariants } from "../foundations/Button.js";
|
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
6
6
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
7
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
|
-
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
7
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
10
9
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isSameThinkExecutionRun, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
10
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
11
|
import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
|
|
12
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { queryOptions, useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-
|
|
1
|
+
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
2
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
|
|
3
3
|
import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
|
|
4
4
|
import { ThinkChatMessagesProps } from "./ThinkChat.js";
|
|
@@ -3,12 +3,13 @@ import { $ as TerminalIcon, C as FileIcon, J as SpinnerIcon, c as BoxIcon, f as
|
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
5
5
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
|
-
import {
|
|
7
|
-
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
8
|
-
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DZeLe_jN.js";
|
|
9
|
-
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DQh59CeC.js";
|
|
6
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
10
7
|
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
8
|
+
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DtH66bAY.js";
|
|
9
|
+
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-BES_3Mb-.js";
|
|
10
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
11
11
|
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
12
|
+
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
12
13
|
import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
|
|
13
14
|
import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
|
|
14
15
|
import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
@@ -119,13 +120,13 @@ function ThinkFullApp({ appBarActions, appBarLeading, appBarTitle, className, co
|
|
|
119
120
|
label: "Execution",
|
|
120
121
|
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
121
122
|
render: () => /* @__PURE__ */ jsx(React.Suspense, {
|
|
122
|
-
fallback: /* @__PURE__ */
|
|
123
|
-
className: "think-full-app__workbench",
|
|
123
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
124
|
+
className: "think-full-app__workbench think-full-app__workbench--loading",
|
|
124
125
|
role: "status",
|
|
125
|
-
children:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
})
|
|
126
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
127
|
+
icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
|
|
128
|
+
description: "Loading execution"
|
|
129
|
+
})
|
|
129
130
|
}),
|
|
130
131
|
children: /* @__PURE__ */ jsx(ThinkExecutionWorkbench, {
|
|
131
132
|
source: agent.stub,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
3
2
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
|
+
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/agents-sdk/ThinkFullAppViewSwitch.tsx
|
|
@@ -3,10 +3,10 @@ import { H as PlusIcon } from "../../icons-B4mGvCvc.js";
|
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { t as capitalize } from "../../format-DB2mX9DA.js";
|
|
6
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
8
9
|
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
9
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
10
10
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Badge } from "../foundations/Badge.js";
|
|
3
|
-
import { Switch } from "../foundations/Switch.js";
|
|
4
3
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
4
|
+
import { Switch } from "../foundations/Switch.js";
|
|
5
5
|
import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,8 +4,8 @@ import { Button, buttonVariants } from "../foundations/Button.js";
|
|
|
4
4
|
import { Field } from "../foundations/Field.js";
|
|
5
5
|
import { Form } from "../foundations/Form.js";
|
|
6
6
|
import { Textarea } from "../foundations/Textarea.js";
|
|
7
|
-
import { Select } from "../foundations/Select.js";
|
|
8
7
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
|
+
import { Select } from "../foundations/Select.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/agents-sdk/ThinkRoutineForm.tsx
|
|
@@ -3,10 +3,10 @@ import { J as SpinnerIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIco
|
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Menu } from "../foundations/Menu.js";
|
|
5
5
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
6
|
-
import {
|
|
6
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
10
10
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
11
11
|
import { ThinkRoutineBrowser } from "./ThinkRoutineBrowser.js";
|
|
12
12
|
import { ThinkRoutineDetail } from "./ThinkRoutineDetail.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
3
4
|
import { Badge } from "../foundations/Badge.js";
|
|
4
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
5
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
6
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
7
7
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -2,11 +2,11 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { H as PlusIcon, J as SpinnerIcon, t as ArchiveIcon, tt as WarningIcon, v as DotIcon } from "../../icons-B4mGvCvc.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
6
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
|
-
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
7
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/agents-sdk/ThinkThreadPicker.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
|
-
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-
|
|
3
|
+
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
|
|
4
4
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
5
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-D0r7xnq5.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-D0r7xnq5.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as WorkspaceFileLinkProps, c as WorkspaceLinkResolution, d as WorkspaceNavigationProvider, f as WorkspaceNavigationProviderProps, i as WorkspaceFileLink, l as WorkspaceNavigationAdapter, n as WorkspaceDestination, o as WorkspaceInvalidDestination, p as resolveWorkspaceLink, r as WorkspaceExternalDestination, s as WorkspaceLinkBase, t as ResolveWorkspaceLinkOptions, u as WorkspaceNavigationEntry } from "../../WorkspaceLink-
|
|
1
|
+
import { a as WorkspaceFileLinkProps, c as WorkspaceLinkResolution, d as WorkspaceNavigationProvider, f as WorkspaceNavigationProviderProps, i as WorkspaceFileLink, l as WorkspaceNavigationAdapter, n as WorkspaceDestination, o as WorkspaceInvalidDestination, p as resolveWorkspaceLink, r as WorkspaceExternalDestination, s as WorkspaceLinkBase, t as ResolveWorkspaceLinkOptions, u as WorkspaceNavigationEntry } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
2
|
export { ResolveWorkspaceLinkOptions, WorkspaceDestination, WorkspaceExternalDestination, WorkspaceFileLink, WorkspaceFileLinkProps, WorkspaceInvalidDestination, WorkspaceLinkBase, WorkspaceLinkResolution, WorkspaceNavigationAdapter, WorkspaceNavigationEntry, WorkspaceNavigationProvider, WorkspaceNavigationProviderProps, resolveWorkspaceLink };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-
|
|
1
|
+
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DtH66bAY.js";
|
|
2
2
|
export { WorkspaceFileLink, WorkspaceNavigationProvider, resolveWorkspaceLink };
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/components/agents-sdk/WorkspaceMessageResponse.d.ts
|
|
5
|
-
/** Adds workspace-aware Markdown links when rendered inside a workspace provider. */
|
|
6
|
-
declare const WorkspaceMessageResponse: React.MemoExoticComponent<({
|
|
7
|
-
components,
|
|
8
|
-
rehypePlugins,
|
|
9
|
-
...props
|
|
10
|
-
}: MessageResponseProps) => React.JSX.Element>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { WorkspaceMessageResponse };
|
|
1
|
+
import { i as WorkspaceMessageResponseProps, n as WorkspaceHtmlArtifactRenderer, r as WorkspaceMessageResponse, t as WorkspaceHtmlArtifactRenderInput } from "../../WorkspaceMessageResponse-Cy28WGSz.js";
|
|
2
|
+
export { WorkspaceHtmlArtifactRenderInput, WorkspaceHtmlArtifactRenderer, WorkspaceMessageResponse, WorkspaceMessageResponseProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceMessageResponse } from "../../WorkspaceMessageResponse-
|
|
1
|
+
import { t as WorkspaceMessageResponse } from "../../WorkspaceMessageResponse-CJCmGvTx.js";
|
|
2
2
|
export { WorkspaceMessageResponse };
|
|
@@ -118,5 +118,48 @@ declare function ArtifactContent({
|
|
|
118
118
|
}: ArtifactContentProps & {
|
|
119
119
|
ref?: React.Ref<HTMLDivElement>;
|
|
120
120
|
}): React.JSX.Element;
|
|
121
|
+
/** Host error messages render verbatim and must be user-readable rather than raw diagnostics.
|
|
122
|
+
* Sandbox policy is a host concern the preview never mediates: a host that blocks a resource
|
|
123
|
+
* reports it through the error states, so there is no approval state here. */
|
|
124
|
+
type ArtifactPreviewState = {
|
|
125
|
+
status: "loading";
|
|
126
|
+
} | {
|
|
127
|
+
message: string;
|
|
128
|
+
onRetry: () => void;
|
|
129
|
+
status: "error";
|
|
130
|
+
} | {
|
|
131
|
+
content: React.ReactNode;
|
|
132
|
+
status: "ready";
|
|
133
|
+
} | {
|
|
134
|
+
content: React.ReactNode;
|
|
135
|
+
message: string;
|
|
136
|
+
onRetry: () => void;
|
|
137
|
+
status: "runtime-error";
|
|
138
|
+
};
|
|
139
|
+
interface ArtifactPreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
140
|
+
/** Accessible artifact name, usually derived from the source link label. */
|
|
141
|
+
label: string;
|
|
142
|
+
/** Navigation element for the source artifact. */
|
|
143
|
+
sourceLink: React.ReactElement;
|
|
144
|
+
/** Host-resolved artifact lifecycle facts and callables. */
|
|
145
|
+
state: ArtifactPreviewState;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Controlled inline preview for host-hydrated generated UI runtimes.
|
|
149
|
+
*
|
|
150
|
+
* The design system owns artifact chrome, status copy, disclosure, responsive
|
|
151
|
+
* layout, and accessible announcements. The host owns source reads, sandbox
|
|
152
|
+
* policy, runtime messaging, and the rendered content element.
|
|
153
|
+
*/
|
|
154
|
+
declare function ArtifactPreview({
|
|
155
|
+
className,
|
|
156
|
+
label,
|
|
157
|
+
sourceLink,
|
|
158
|
+
state,
|
|
159
|
+
ref,
|
|
160
|
+
...props
|
|
161
|
+
}: ArtifactPreviewProps & {
|
|
162
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
163
|
+
}): React.JSX.Element;
|
|
121
164
|
//#endregion
|
|
122
|
-
export { Artifact, ArtifactAction, ArtifactActionProps, ArtifactActions, ArtifactActionsProps, ArtifactClose, ArtifactCloseProps, ArtifactContent, ArtifactContentProps, ArtifactDescription, ArtifactDescriptionProps, ArtifactHeader, ArtifactHeaderProps, ArtifactProps, ArtifactTitle, ArtifactTitleProps };
|
|
165
|
+
export { Artifact, ArtifactAction, ArtifactActionProps, ArtifactActions, ArtifactActionsProps, ArtifactClose, ArtifactCloseProps, ArtifactContent, ArtifactContentProps, ArtifactDescription, ArtifactDescriptionProps, ArtifactHeader, ArtifactHeaderProps, ArtifactPreview, ArtifactPreviewProps, ArtifactPreviewState, ArtifactProps, ArtifactTitle, ArtifactTitleProps };
|