@mcp-b/react-components 0.46.6 → 0.47.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/{CodeBlock-BpooTofO.js → CodeBlock-DMHZiw86.js} +1 -1
- package/dist/{FileTree-CAXWXH63.js → FileTree-BHebfvkK.js} +1 -1
- package/dist/{SetupChecklist-DyPZWzK2.js → SetupChecklist-CwRjIDH4.js} +1 -1
- package/dist/ThinkChat-CwMdEum8.d.ts +185 -0
- package/dist/{ThinkChat-qztQ6Clo.js → ThinkChat-DLDta57t.js} +16 -16
- package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +91 -0
- package/dist/{Workspace-DZusrEeP.d.ts → Workspace-C_zHq9KZ.d.ts} +1 -1
- package/dist/{WorkspaceFileView-BvDbKM2c.js → WorkspaceFileView-ChIJz-fl.js} +4 -4
- package/dist/{WorkspaceLink-DtH66bAY.js → WorkspaceLink-B1d2GIGl.js} +7 -2
- package/dist/WorkspaceLive-DLGhtIly.d.ts +49 -0
- package/dist/{WorkspaceMessageResponse-CJCmGvTx.js → WorkspaceMessageResponse-Dg_aNpoj.js} +76 -40
- package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +48 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +22 -18
- package/dist/components/agents-sdk/AgentEvent.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -180
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +13 -4
- package/dist/components/agents-sdk/ThinkFullApp.js +11 -4
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +20 -5
- package/dist/components/agents-sdk/ThinkSidepanel.js +56 -44
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
- package/dist/components/agents-sdk/ThinkThreadPicker.js +4 -4
- package/dist/components/agents-sdk/Workspace.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +44 -0
- package/dist/components/agents-sdk/WorkspaceConcept.js +42 -0
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +100 -0
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +429 -0
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +106 -0
- package/dist/components/agents-sdk/WorkspaceExecution.js +393 -0
- 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/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceLive.js +85 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +2 -2
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +93 -0
- package/dist/components/agents-sdk/WorkspaceProject.js +201 -0
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +47 -0
- package/dist/components/agents-sdk/WorkspaceUserScript.js +146 -0
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- 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/ComposerLink.d.ts +4 -1
- package/dist/components/ai-sdk/ComposerLink.js +4 -3
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +22 -2
- package/dist/components/ai-sdk/ConnectedAppCards.js +50 -43
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +5 -5
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- 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 +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +5 -5
- package/dist/{copy-button-D7ySsRRo.js → copy-button-CSDuDfdP.js} +1 -1
- package/dist/{icons-D0Pd2P9v.d.ts → icons-CCZGYUwU.d.ts} +6 -6
- package/dist/{icons-BNEY4gO5.js → icons-cuEtsgj9.js} +4 -4
- package/dist/styles/agent-chat.css +33 -13
- package/dist/styles/connected-app-card.css +8 -0
- package/dist/styles/description-list.css +3 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/workspace-concepts.css +28 -0
- package/dist/workspace-assets-CxpEHsac.js +154 -0
- package/package.json +2 -2
- package/dist/WorkspaceMessageResponse-D66ty4FO.d.ts +0 -24
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { E as MessageResponseProps } from "./Message-D_vCVEGB.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/WorkspaceMessageResponse.d.ts
|
|
5
|
+
interface WorkspaceFileRenderInput {
|
|
6
|
+
label: string;
|
|
7
|
+
path: string;
|
|
8
|
+
/** Shared workspace link element; hosts pass it through to the preview unchanged. */
|
|
9
|
+
sourceLink: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Host callback for one standalone workspace file link in an assistant
|
|
13
|
+
* paragraph. Return a node to replace the link, or `null` to keep it.
|
|
14
|
+
*/
|
|
15
|
+
type WorkspaceFileRenderer = (file: WorkspaceFileRenderInput) => React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Ambient workspace-file renderer for every `WorkspaceMessageResponse` below,
|
|
18
|
+
* and the only way to supply one. The value is read inside the promoted
|
|
19
|
+
* paragraph, not by the response component, so a host handing down a fresh
|
|
20
|
+
* callback every render re-renders only the paragraphs — the memoized Markdown
|
|
21
|
+
* pipeline is untouched and promoted cards keep their state.
|
|
22
|
+
* `ThinkChat.Messages` provides it from its `renderWorkspaceFile` prop; hosts
|
|
23
|
+
* composing `WorkspaceMessageResponse` directly provide it once at their
|
|
24
|
+
* conversation root.
|
|
25
|
+
*/
|
|
26
|
+
declare function WorkspaceFileRendererProvider({
|
|
27
|
+
children,
|
|
28
|
+
renderWorkspaceFile
|
|
29
|
+
}: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
renderWorkspaceFile: WorkspaceFileRenderer | undefined;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
interface WorkspaceMessageResponseProps extends MessageResponseProps {
|
|
34
|
+
/**
|
|
35
|
+
* Whether standalone workspace file links may be promoted. `ThinkChat`
|
|
36
|
+
* passes `false` for user messages: user links remain ordinary navigation.
|
|
37
|
+
*/
|
|
38
|
+
promoteWorkspaceFiles?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Adds workspace-aware Markdown links when rendered inside a workspace provider. */
|
|
41
|
+
declare const WorkspaceMessageResponse: React.MemoExoticComponent<({
|
|
42
|
+
components,
|
|
43
|
+
rehypePlugins,
|
|
44
|
+
promoteWorkspaceFiles,
|
|
45
|
+
...props
|
|
46
|
+
}: WorkspaceMessageResponseProps) => React.JSX.Element>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { WorkspaceMessageResponseProps as a, WorkspaceMessageResponse as i, WorkspaceFileRenderer as n, WorkspaceFileRendererProvider as r, WorkspaceFileRenderInput as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canRequestFavicon, inferFaviconUrl } from "../../utils/favicon.js";
|
|
2
|
-
import { D as LinkIcon, P as MonitorIcon,
|
|
2
|
+
import { D as LinkIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WarningIcon, tt as WrenchIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/agents-sdk/AgentActivity.tsx
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { replaceComposerTrigger } from "../../utils/composer-link.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
+
import { B as PlusIcon, H as RefreshIcon, K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, V as QueueIcon, t as ArchiveIcon } from "../../icons-cuEtsgj9.js";
|
|
3
4
|
import { ExpansionStateProvider } from "../ai-sdk/ExpansionState.js";
|
|
4
|
-
import { $ as TrashIcon, H as QueueIcon, I as MoveToFrontIcon, U as RefreshIcon, V as PlusIcon, q as SpinnerIcon, t as ArchiveIcon, z as PencilIcon } from "../../icons-BNEY4gO5.js";
|
|
5
5
|
import { Button } from "../foundations/Button.js";
|
|
6
|
-
import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
|
|
7
6
|
import { IconButton } from "../foundations/IconButton.js";
|
|
8
|
-
import { Menu } from "../foundations/Menu.js";
|
|
9
|
-
import { PromptInput, PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommandComposer, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputPermissionSelector, PromptInputSubmit, PromptInputTextarea, PromptInputTools, PromptInputTray, composerLinksToReferences, usePromptInputAttachments } from "../ai-sdk/PromptInput.js";
|
|
10
|
-
import { AgentChatStartScreen } from "../ai-sdk/AgentChatStartScreen.js";
|
|
11
7
|
import { Message, MessageAction, MessageActions, MessageMeta, MessageTimestamp } from "../ai-sdk/Message.js";
|
|
8
|
+
import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
|
|
12
9
|
import { AgentMessageParts } from "../ai-sdk/AgentMessageParts.js";
|
|
13
|
-
import { Marker, MarkerContent } from "../foundations/Marker.js";
|
|
14
|
-
import { t as CopyButton } from "../../copy-button-D7ySsRRo.js";
|
|
15
10
|
import { Context, ContextContent, ContextContentBody, ContextContentHeader, ContextTrigger, getContextUsage, getContextUsedTokens } from "../ai-sdk/Context.js";
|
|
11
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
16
12
|
import { VirtualMessageScroller } from "../ai-sdk/MessageScrollerVirtual.js";
|
|
17
13
|
import { QueueItem, QueueItemActions, QueueItemContent } from "../ai-sdk/Queue.js";
|
|
18
|
-
import {
|
|
14
|
+
import { Menu } from "../foundations/Menu.js";
|
|
15
|
+
import { PromptInput, PromptInputActionAddAttachments, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommandComposer, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputPermissionSelector, PromptInputSubmit, PromptInputTextarea, PromptInputTools, PromptInputTray, composerLinksToReferences, usePromptInputAttachments } from "../ai-sdk/PromptInput.js";
|
|
16
|
+
import { AgentChatStartScreen } from "../ai-sdk/AgentChatStartScreen.js";
|
|
17
|
+
import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
|
|
18
|
+
import { Marker, MarkerContent } from "../foundations/Marker.js";
|
|
19
19
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
20
|
-
import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
|
|
21
20
|
import { PromptInputApproval, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
|
|
21
|
+
import { t as CopyButton } from "../../copy-button-CSDuDfdP.js";
|
|
22
22
|
import * as React from "react";
|
|
23
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { isTextUIPart } from "ai";
|
|
25
24
|
import { isCompactionMessage } from "agents/experimental/memory/utils";
|
|
25
|
+
import { isTextUIPart } from "ai";
|
|
26
26
|
//#region src/components/agents-sdk/AgentChat.tsx
|
|
27
27
|
/**
|
|
28
28
|
* Agents exports this helper from `agents/sessions` after cloudflare/agents#1896;
|
|
@@ -353,10 +353,10 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
353
353
|
pendingPrompts.length,
|
|
354
354
|
queueHeld
|
|
355
355
|
]);
|
|
356
|
-
const handleStop =
|
|
356
|
+
const handleStop = onStop ? () => {
|
|
357
357
|
setQueueHeld(true);
|
|
358
358
|
onStop();
|
|
359
|
-
} : void 0
|
|
359
|
+
} : void 0;
|
|
360
360
|
React.useEffect(() => {
|
|
361
361
|
const becameReady = wasBusy.current && !busy;
|
|
362
362
|
wasBusy.current = busy;
|
|
@@ -577,21 +577,25 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
577
577
|
}),
|
|
578
578
|
/* @__PURE__ */ jsxs(QueueItemActions, {
|
|
579
579
|
className: "agent-chat__queued-actions",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [busy && onStop ? /* @__PURE__ */ jsx(Button, {
|
|
581
581
|
className: "agent-chat__queued-action",
|
|
582
|
-
"aria-label": `
|
|
582
|
+
"aria-label": `Steer queued message: ${messageText}`,
|
|
583
583
|
color: "neutral",
|
|
584
584
|
size: "xs",
|
|
585
585
|
variant: "ghost",
|
|
586
|
-
onClick: () =>
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
onClick: () => {
|
|
587
|
+
setPendingPrompts((current) => [pending, ...current.filter((item) => item.id !== pending.id)]);
|
|
588
|
+
setQueueHeld(false);
|
|
589
|
+
onStop();
|
|
590
|
+
},
|
|
591
|
+
children: "Steer"
|
|
592
|
+
}) : null, /* @__PURE__ */ jsx(IconButton, {
|
|
589
593
|
className: "agent-chat__queued-action agent-chat__queued-remove",
|
|
590
594
|
color: "neutral",
|
|
591
595
|
label: `Remove queued message: ${messageText}`,
|
|
592
596
|
size: "xs",
|
|
593
597
|
variant: "ghost",
|
|
594
|
-
onClick: () => setPendingPrompts((current) => current.filter((item) => item !== pending)),
|
|
598
|
+
onClick: () => setPendingPrompts((current) => current.filter((item) => item.id !== pending.id)),
|
|
595
599
|
children: /* @__PURE__ */ jsx(TrashIcon, {})
|
|
596
600
|
})]
|
|
597
601
|
})
|
|
@@ -2,9 +2,9 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
3
3
|
import { r as firstLine } from "../../format-COCyV98Z.js";
|
|
4
4
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
5
|
+
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
5
6
|
import { NaniteMark } from "../nanites/NaniteScene.js";
|
|
6
7
|
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
7
|
-
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { isTextUIPart } from "ai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as KeyboardIcon,
|
|
1
|
+
import { E as KeyboardIcon, H as RefreshIcon, r as ArrowLeftIcon } from "../../icons-cuEtsgj9.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { WebPreviewNavigationButton } from "../general-purpose/WebPreview.js";
|
|
4
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon, _ as DotIcon, k as MaximizeIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
5
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { L as PauseIcon, z as PlayIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { i as formatClock } from "../../format-COCyV98Z.js";
|
|
5
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon, nt as XIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Tabs } from "../foundations/Tabs.js";
|
|
4
4
|
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "../general-purpose/WebPreview.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
+
import { B as PlusIcon, C as FolderIcon, D as LinkIcon, H as RefreshIcon, K as SpinnerIcon, L as PauseIcon, P as MonitorIcon, R as PencilIcon, T as InfoIcon, _ as DotIcon, a as ArrowUpIcon, b as EyeIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, n as ArrowDownIcon, nt as XIcon, p as ChevronRightIcon, u as CalendarIcon, v as DownloadIcon, z as PlayIcon } from "../../icons-cuEtsgj9.js";
|
|
3
4
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
4
|
-
import { B as PlayIcon, C as FolderIcon, D as LinkIcon, P as MonitorIcon, R as PauseIcon, T as InfoIcon, U as RefreshIcon, V as PlusIcon, _ as DotIcon, a as ArrowUpIcon, b as EyeIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, j as MessageSquareIcon, n as ArrowDownIcon, nt as XIcon, p as ChevronRightIcon, q as SpinnerIcon, u as CalendarIcon, v as DownloadIcon, z as PencilIcon } from "../../icons-BNEY4gO5.js";
|
|
5
5
|
import { Button } from "../foundations/Button.js";
|
|
6
|
-
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
7
6
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
8
|
-
import { Menu } from "../foundations/Menu.js";
|
|
9
7
|
import { Avatar } from "../foundations/Avatar.js";
|
|
10
8
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
11
9
|
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
12
|
-
import { Select } from "../foundations/Select.js";
|
|
13
10
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
11
|
+
import { Menu } from "../foundations/Menu.js";
|
|
12
|
+
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
14
13
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
14
|
+
import { Select } from "../foundations/Select.js";
|
|
15
15
|
import "../foundations/icons.js";
|
|
16
16
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
17
17
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
5
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
5
|
import { r as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-7NR24ASj.js";
|
|
6
|
+
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
7
7
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
4
5
|
import { Field } from "../foundations/Field.js";
|
|
5
6
|
import { Form } from "../foundations/Form.js";
|
|
6
|
-
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
7
|
import { Fieldset } from "../foundations/Fieldset.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
-
import {
|
|
3
|
+
import { B as PlusIcon, K as SpinnerIcon, et as WarningIcon, nt as XIcon, o as ArrowUpRightIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
|
|
4
4
|
import { Button } from "../foundations/Button.js";
|
|
5
|
-
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
6
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
6
|
import { Dialog } from "../foundations/Dialog.js";
|
|
8
7
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
9
8
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
9
|
import { r as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-7NR24ASj.js";
|
|
11
10
|
import { Separator } from "../foundations/Separator.js";
|
|
11
|
+
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
12
12
|
import { SearchField } from "../foundations/SearchField.js";
|
|
13
13
|
import { McpServerSetupDialog } from "./McpServerPicker.js";
|
|
14
14
|
import * as React from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { N as MinusIcon, d as CheckIcon, et as WarningIcon
|
|
2
|
+
import { K as SpinnerIcon, N as MinusIcon, d as CheckIcon, et as WarningIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
-
import { Menu } from "../foundations/Menu.js";
|
|
5
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
6
|
import { r as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-7NR24ASj.js";
|
|
7
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
8
|
import { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger } from "../ai-sdk/PromptInput.js";
|
|
9
9
|
import { McpConnectorForm } from "./McpConnectorForm.js";
|
|
10
10
|
import * as React from "react";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
5
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
5
|
import { c as titleCase } from "../../format-COCyV98Z.js";
|
|
7
6
|
import { Separator } from "../foundations/Separator.js";
|
|
7
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
9
|
+
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
9
10
|
import { t as ProviderLogo } from "../../provider-logos-DWYY8wNz.js";
|
|
10
|
-
import { EmptyState } from "../foundations/EmptyState.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ToolApproval } from "../ai-sdk/ToolApproval.js";
|
|
3
2
|
import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
|
|
3
|
+
import { ToolApproval } from "../ai-sdk/ToolApproval.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { isToolUIPart } from "ai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { composerLinkHref } from "../../utils/composer-link.js";
|
|
2
2
|
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
-
import { A as McpIcon, c as BoxIcon } from "../../icons-
|
|
3
|
+
import { A as McpIcon, c as BoxIcon } from "../../icons-cuEtsgj9.js";
|
|
4
4
|
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/agents-sdk/PromptInputCommands.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { r as firstLine, s as textLines } from "../../format-COCyV98Z.js";
|
|
4
4
|
import { NaniteMark } from "../nanites/NaniteScene.js";
|
|
5
5
|
import "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
4
|
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
5
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/SubagentRunSelector.tsx
|
|
@@ -1,181 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { K as PromptInputMessage } from "../../PromptInput-DtJHyp0S.js";
|
|
3
|
-
import { r as AgentChatProps } from "../../AgentChat-BLmQghkt.js";
|
|
4
|
-
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
|
|
5
|
-
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
6
|
-
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-B3lGVS-6.js";
|
|
7
|
-
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
8
|
-
import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
|
|
9
|
-
import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-D66ty4FO.js";
|
|
10
|
-
import * as React from "react";
|
|
11
|
-
import { UIMessage } from "ai";
|
|
12
|
-
import { UseAgentOptions } from "agents/react";
|
|
13
|
-
import { DataTag, UndefinedInitialDataOptions } from "@tanstack/react-query";
|
|
14
|
-
import { PendingApproval, Think } from "@cloudflare/think";
|
|
15
|
-
import { AgentStub } from "agents/client";
|
|
16
|
-
|
|
17
|
-
//#region src/components/agents-sdk/ThinkChat.d.ts
|
|
18
|
-
type ThinkPendingExecutionApprovalsQueryKey = readonly ["think", sourceKey: string, "pending-approvals"];
|
|
19
|
-
type ThinkPendingExecutionApprovalsQueryOptions = UndefinedInitialDataOptions<readonly PendingApproval[], Error, readonly PendingApproval[], ThinkPendingExecutionApprovalsQueryKey> & {
|
|
20
|
-
queryKey: DataTag<ThinkPendingExecutionApprovalsQueryKey, readonly PendingApproval[], Error>;
|
|
21
|
-
};
|
|
22
|
-
interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
|
|
23
|
-
/** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
|
|
24
|
-
chat: ThinkChatValue<State, MessageT>;
|
|
25
|
-
/** Optional whole `useAgentToolEvents` result when the app owns the parent connection. */
|
|
26
|
-
agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
}
|
|
29
|
-
interface ThinkChatRootProps<State = unknown> {
|
|
30
|
-
/** Agent to connect to: a kebab-case class name, or full `useAgent` options. */
|
|
31
|
-
agent: string | UseAgentOptions<State>;
|
|
32
|
-
/** Disable durable pending-approval discovery. Also disable it on `ThinkChat.Messages`. */
|
|
33
|
-
approvalsEnabled?: boolean;
|
|
34
|
-
/** Instance name (e.g. a session or room id). Wins over `agent.name`. */
|
|
35
|
-
name?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Stable, non-secret identity for the remote Think agent. Include endpoint,
|
|
38
|
-
* account or tenant scope, and agent path so sources cannot share cached data.
|
|
39
|
-
*/
|
|
40
|
-
sourceKey: string;
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* The first-turn surface with no conversation behind it. Supply this instead of
|
|
45
|
-
* a chat provider when the composer's submission is what creates the
|
|
46
|
-
* conversation: connecting early is what leaves empty threads behind.
|
|
47
|
-
*/
|
|
48
|
-
interface ThinkChatDraft<MessageT extends UIMessage = UIMessage> {
|
|
49
|
-
/** Client-only transcript rows, such as a locally rendered guide. */
|
|
50
|
-
messages?: readonly MessageT[];
|
|
51
|
-
/** Receives the first message, normalized the same way a live thread's is. */
|
|
52
|
-
onSubmit: (message: {
|
|
53
|
-
text: string;
|
|
54
|
-
files: PromptInputMessage["files"];
|
|
55
|
-
}) => void | Promise<void>;
|
|
56
|
-
/** Set while the app is creating the conversation, so the composer reads busy. */
|
|
57
|
-
status?: AgentChatProps<MessageT>["status"];
|
|
58
|
-
}
|
|
59
|
-
type ThinkChatManagedAgentChatProp = "messages" | "onApprovalResponse" | "onRegenerate" | "onStop" | "onSubmit" | "status";
|
|
60
|
-
/**
|
|
61
|
-
* The AgentChat composition surface, minus the live values ThinkChat supplies
|
|
62
|
-
* from `useAgentChat`. Think-specific activity and draft/session inputs extend
|
|
63
|
-
* that owner instead of mirroring every AgentChat prop here.
|
|
64
|
-
*/
|
|
65
|
-
type ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> = Omit<AgentChatProps<MessageT>, ThinkChatManagedAgentChatProp> & ThinkChatActivityRendererOptions<MessageT> & {
|
|
66
|
-
/**
|
|
67
|
-
* Renders without a chat provider, for the first turn of a conversation
|
|
68
|
-
* that does not exist yet.
|
|
69
|
-
*/
|
|
70
|
-
draft?: ThinkChatDraft<MessageT>; /** Whole `useSessionCompaction` result for built-in progress and error notices. */
|
|
71
|
-
sessionCompaction?: UseSessionCompactionResult; /** Promotes assistant-authored workspace HTML links through a host runtime hydrator. */
|
|
72
|
-
renderWorkspaceHtmlArtifact?: WorkspaceHtmlArtifactRenderer;
|
|
73
|
-
};
|
|
74
|
-
/** Shared pending-approval options for components and TanStack Router loaders. */
|
|
75
|
-
declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
|
|
76
|
-
declare function useThinkPendingExecutionApprovals(stub: AgentStub<Think>, sourceKey: string, refreshSignal?: unknown, enabled?: boolean): {
|
|
77
|
-
pendingApprovals: readonly PendingApproval[];
|
|
78
|
-
refreshPendingApprovals: () => Promise<void>;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Chat UI for Cloudflare Think agents. Provide a `useAgentChat` value (or let
|
|
82
|
-
* `ThinkChat.Root` create one) and `ThinkChat.Messages` renders the message
|
|
83
|
-
* stream with agent work folded into collapsed Activity blocks.
|
|
84
|
-
*/
|
|
85
|
-
declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
86
|
-
agentTools,
|
|
87
|
-
chat,
|
|
88
|
-
children
|
|
89
|
-
}: ThinkChatProviderProps<State, MessageT>): React.JSX.Element;
|
|
90
|
-
/**
|
|
91
|
-
* Batteries-included root: connects to the named Think agent (upstream's
|
|
92
|
-
* `useAgent` + `useAgentChat`) and provides the live chat to everything
|
|
93
|
-
* inside. Render it beneath the app's `QueryClientProvider`. If the app
|
|
94
|
-
* already owns the chat hook, use `ThinkChat.Provider`.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```tsx
|
|
98
|
-
* <QueryClientProvider client={queryClient}>
|
|
99
|
-
* <ThinkChat.Root
|
|
100
|
-
* agent="my-agent"
|
|
101
|
-
* name="session-1"
|
|
102
|
-
* sourceKey="api.example.com:account:acme:agent:session-1"
|
|
103
|
-
* >
|
|
104
|
-
* <ThinkChat.Messages />
|
|
105
|
-
* </ThinkChat.Root>
|
|
106
|
-
* </QueryClientProvider>
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
110
|
-
agent: agentOption,
|
|
111
|
-
approvalsEnabled,
|
|
112
|
-
name,
|
|
113
|
-
sourceKey,
|
|
114
|
-
children
|
|
115
|
-
}: ThinkChatRootProps<State>): React.JSX.Element;
|
|
116
|
-
/**
|
|
117
|
-
* The full conversation surface — message list plus composer — with the
|
|
118
|
-
* activity renderer as the default `renderPart`: runs of reasoning/tool parts
|
|
119
|
-
* fold into one collapsed Activity block with derived labels and per-tool
|
|
120
|
-
* panels. Session-generated context/load/search tools are recognized from
|
|
121
|
-
* their upstream runtime schemas and keep their recorded inputs and outputs
|
|
122
|
-
* inspectable. Extend for app-specific tools with `toolRenderers` (label/panel
|
|
123
|
-
* inside the log) or `excludeTools` + your own `renderPart` (standalone
|
|
124
|
-
* card) — see README "App-specific tools" and the Custom Tool Panel story.
|
|
125
|
-
*/
|
|
126
|
-
declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
127
|
-
draft,
|
|
128
|
-
loading,
|
|
129
|
-
renderPart,
|
|
130
|
-
excludeTools,
|
|
131
|
-
renderAgentToolRunLink,
|
|
132
|
-
renderWorkspaceHtmlArtifact,
|
|
133
|
-
toolRenderers,
|
|
134
|
-
thinkStub,
|
|
135
|
-
onExecutionSettled,
|
|
136
|
-
pendingApprovals,
|
|
137
|
-
notice,
|
|
138
|
-
sessionCompaction,
|
|
139
|
-
...props
|
|
140
|
-
}: ThinkChatMessagesProps<MessageT>): React.JSX.Element;
|
|
141
|
-
/**
|
|
142
|
-
* The ambient chat value from `ThinkChat.Root`/`Provider` — for custom tool
|
|
143
|
-
* panels, cards, or composer actions that need `messages`, `status`, or
|
|
144
|
-
* `sendMessage`. Throws outside a provider.
|
|
145
|
-
*/
|
|
146
|
-
declare function useThinkChat<State = unknown, MessageT extends UIMessage = UIMessage>(): Omit<import("@ai-sdk/react").UseChatHelpers<MessageT>, "addToolOutput"> & {
|
|
147
|
-
clearHistory: () => void;
|
|
148
|
-
addToolOutput: (opts: {
|
|
149
|
-
toolCallId: string;
|
|
150
|
-
toolName?: string;
|
|
151
|
-
output?: unknown;
|
|
152
|
-
state?: "output-available" | "output-error";
|
|
153
|
-
errorText?: string;
|
|
154
|
-
}) => void;
|
|
155
|
-
isServerStreaming: boolean;
|
|
156
|
-
isStreaming: boolean;
|
|
157
|
-
isRecovering: boolean;
|
|
158
|
-
isToolContinuation: boolean;
|
|
159
|
-
connectionError: (Error & {
|
|
160
|
-
code: number;
|
|
161
|
-
reason: string;
|
|
162
|
-
wasClean: boolean;
|
|
163
|
-
}) | null;
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Namespace entry point. `Root` + `Messages` is the standard surface;
|
|
167
|
-
* `Provider` + `useThinkChat` when the app owns the chat hook; `Activity`,
|
|
168
|
-
* `renderActivityPart`, and `createActivityRenderer` for custom layouts and
|
|
169
|
-
* app-specific tools.
|
|
170
|
-
*/
|
|
171
|
-
declare const ThinkChat: {
|
|
172
|
-
Provider: typeof ThinkChatProvider;
|
|
173
|
-
Root: typeof ThinkChatRoot;
|
|
174
|
-
Messages: typeof ThinkChatMessages;
|
|
175
|
-
Activity: typeof ThinkChatActivity;
|
|
176
|
-
RecoveryNotice: typeof ThinkRecoveryNotice;
|
|
177
|
-
renderActivityPart: (context: AgentMessageRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
|
|
178
|
-
createActivityRenderer: typeof createThinkChatActivityRenderer;
|
|
179
|
-
};
|
|
180
|
-
//#endregion
|
|
1
|
+
import { a as ThinkChatProvider, c as ThinkChatRootProps, d as thinkPendingExecutionApprovalsQueryOptions, f as useThinkChat, i as ThinkChatMessagesProps, l as ThinkPendingExecutionApprovalsQueryKey, n as ThinkChatDraft, o as ThinkChatProviderProps, p as useThinkPendingExecutionApprovals, r as ThinkChatMessages, s as ThinkChatRoot, t as ThinkChat, u as ThinkPendingExecutionApprovalsQueryOptions } from "../../ThinkChat-CwMdEum8.js";
|
|
181
2
|
export { ThinkChat, ThinkChatDraft, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, ThinkPendingExecutionApprovalsQueryKey, ThinkPendingExecutionApprovalsQueryOptions, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
|
|
@@ -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-DLDta57t.js";
|
|
2
2
|
export { ThinkChat, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
1
2
|
import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
2
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
3
4
|
import { Button } from "../foundations/Button.js";
|
|
4
5
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
5
6
|
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
6
|
-
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
7
7
|
import { SubagentRunList } from "./SubagentRunList.js";
|
|
8
8
|
import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
|
|
9
9
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
|
-
import { Tabs } from "../foundations/Tabs.js";
|
|
3
2
|
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
4
|
-
import {
|
|
3
|
+
import { Tabs } from "../foundations/Tabs.js";
|
|
5
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
|
+
import { t as CodeBlock } from "../../CodeBlock-DMHZiw86.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, T as InfoIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, T as InfoIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItemGroup, ActivityOutput, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
4
|
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
5
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
6
|
import { formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
7
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
8
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
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, nt as XIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunKindLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
|
|
5
5
|
import "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { H as RefreshIcon, et as WarningIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
-
import { Menu } from "../foundations/Menu.js";
|
|
6
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
10
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
11
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
@@ -2,15 +2,16 @@ import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js
|
|
|
2
2
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
|
|
3
3
|
import { n as ResponsiveSidebarShell, t as AppBarSlots } from "../../ResponsiveSidebarShell-BTVPxLJK.js";
|
|
4
4
|
import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-3qWu8oK1.js";
|
|
5
|
-
import { ThinkChatMessagesProps } from "
|
|
6
|
-
import { ThinkThreadStatusSummary } from "
|
|
5
|
+
import { i as ThinkChatMessagesProps } from "../../ThinkChat-CwMdEum8.js";
|
|
6
|
+
import { o as ThinkThreadStatusSummary } from "../../ThinkThreadPicker-yFz4vvIf.js";
|
|
7
7
|
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Dq-GC0_T.js";
|
|
8
|
-
import {
|
|
8
|
+
import { y as WorkspaceSource } from "../../Workspace-C_zHq9KZ.js";
|
|
9
|
+
import { r as WorkspaceChangeSource } from "../../WorkspaceLive-DLGhtIly.js";
|
|
9
10
|
import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
|
|
10
11
|
import * as React from "react";
|
|
11
12
|
import { UIMessage } from "ai";
|
|
12
|
-
import { useAgentChat } from "@cloudflare/think/react";
|
|
13
13
|
import { useAgent } from "agents/react";
|
|
14
|
+
import { useAgentChat } from "@cloudflare/think/react";
|
|
14
15
|
|
|
15
16
|
//#region src/components/agents-sdk/ThinkFullApp.d.ts
|
|
16
17
|
type ThinkFullAppAgent<State = unknown> = ThinkAgent<State>;
|
|
@@ -47,6 +48,14 @@ interface ThinkFullAppWorkspaceConfig {
|
|
|
47
48
|
navigation: WorkspaceNavigationAdapter;
|
|
48
49
|
resolveFileAsset?: WorkspaceFileAssetResolver;
|
|
49
50
|
maxInlineAssetBytes?: number;
|
|
51
|
+
/** Optional native change stream; the design system owns Query invalidation. */
|
|
52
|
+
changes?: WorkspaceChangeSource;
|
|
53
|
+
/**
|
|
54
|
+
* Disposable freshness tick for hosts without native observation, such as a
|
|
55
|
+
* serialization of settled-turn state. Each change invalidates the concept
|
|
56
|
+
* queries under `sourceKey`; it never enters query identity.
|
|
57
|
+
*/
|
|
58
|
+
revision?: string;
|
|
50
59
|
/** Leading workspace control, such as a host-owned Back to chat button. */
|
|
51
60
|
leading?: React.ReactNode;
|
|
52
61
|
actions?: React.ReactNode;
|