@mcp-b/react-components 0.34.0 → 0.35.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-CV-GuYA6.d.ts → AgentChat-mpacmRU1.d.ts} +21 -2
- package/dist/{ModelSelector-DzdEs2fX.js → ModelSelector-DtBxWqRn.js} +1 -1
- package/dist/{ThinkChat-en0UbkVv.js → ThinkChat-DbzqSTBt.js} +14 -5
- package/dist/{ThinkChatActivity-CgqpROz_.d.ts → ThinkChatActivity-BZyN5MBg.d.ts} +1 -1
- package/dist/{Workspace-EhvvlHOB.d.ts → Workspace-GTlqvcIn.d.ts} +1 -1
- package/dist/{WorkspaceExplorer-DygQnEyi.d.ts → WorkspaceExplorer-Cu044amt.d.ts} +1 -1
- package/dist/{WorkspaceFile-C8Riev9j.d.ts → WorkspaceFile-CVAzjTt6.d.ts} +17 -1
- package/dist/{WorkspaceFileView-BtzVKAed.js → WorkspaceFileView-BmxSbhRu.js} +2 -2
- package/dist/components/agents-sdk/AgentChat.d.ts +2 -2
- package/dist/components/agents-sdk/AgentChat.js +20 -5
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +1 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +18 -5
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -7
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +5 -3
- package/dist/components/agents-sdk/ThinkExecutionRun.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkFullApp.js +6 -4
- package/dist/components/agents-sdk/ThinkPendingApproval.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +5 -4
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +10 -14
- package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +3 -3
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +41 -4
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/ai-sdk/Approval.d.ts +1 -2
- package/dist/components/ai-sdk/Approval.js +4 -7
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/Message.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +1 -1
- package/dist/components/ai-sdk/ToolInvocation.js +2 -2
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/EmptyState.d.ts +5 -2
- package/dist/components/foundations/EmptyState.js +11 -7
- package/dist/components/general-purpose/ResizableSidePanel.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +1 -1
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -3
- package/dist/components/nanites/AgentToolDetail.js +12 -3
- package/dist/{format-CmopcfqJ.js → format-DB2mX9DA.js} +16 -1
- package/dist/{progress-ring-Dz_ztrW2.js → progress-ring-BEocM1e3.js} +1 -1
- package/dist/styles/agent-chat.css +16 -0
- package/dist/styles/field.css +2 -2
- package/dist/styles/think-execution-workbench.css +9 -13
- package/dist/styles/think-routine-library.css +2 -30
- package/package.json +2 -2
|
@@ -8,6 +8,13 @@ import { AgentStub } from "agents/client";
|
|
|
8
8
|
import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
9
9
|
|
|
10
10
|
//#region src/components/agents-sdk/AgentChat.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* The affordance for a compaction that is running right now, for the `notice`
|
|
13
|
+
* slot. Exported because Think's session frames report the same state from
|
|
14
|
+
* outside this component's own `/compact` lifecycle, and one running
|
|
15
|
+
* compaction must not read two ways.
|
|
16
|
+
*/
|
|
17
|
+
declare const compactingNotice: React.JSX.Element;
|
|
11
18
|
interface AgentChatRenderMessageContext<MessageT extends UIMessage = UIMessage> {
|
|
12
19
|
message: MessageT;
|
|
13
20
|
messageIndex: number;
|
|
@@ -87,6 +94,17 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
87
94
|
disabled?: boolean;
|
|
88
95
|
/** Rendered in place of the transcript while `messages` is empty. */
|
|
89
96
|
emptyState?: React.ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* Renders the transcript region as loading and holds the composer inert.
|
|
99
|
+
* This is the transcript of a conversation that exists and has not arrived —
|
|
100
|
+
* distinct from `emptyState`, which describes one that has no messages — so
|
|
101
|
+
* it also withholds the start screen's invitation to begin a first turn.
|
|
102
|
+
*
|
|
103
|
+
* A host's Suspense fallback uses it to keep the surrounding shell mounted
|
|
104
|
+
* and interactive: a transcript read that never resolves then leaves every
|
|
105
|
+
* exit reachable instead of replacing the app with a spinner.
|
|
106
|
+
*/
|
|
107
|
+
loading?: boolean;
|
|
90
108
|
/**
|
|
91
109
|
* First-turn composition that places the live composer between a welcoming
|
|
92
110
|
* heading and app-authored starter descriptors. It is the default when
|
|
@@ -273,8 +291,9 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
273
291
|
onStop,
|
|
274
292
|
onPromptQueued,
|
|
275
293
|
placeholder,
|
|
276
|
-
disabled,
|
|
294
|
+
disabled: composerDisabled,
|
|
277
295
|
emptyState,
|
|
296
|
+
loading,
|
|
278
297
|
startScreen,
|
|
279
298
|
composerHeader,
|
|
280
299
|
composerTray,
|
|
@@ -305,4 +324,4 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
305
324
|
ref?: React.Ref<HTMLDivElement>;
|
|
306
325
|
}): React.JSX.Element;
|
|
307
326
|
//#endregion
|
|
308
|
-
export { PermissionModeControl as a, AgentChatRenderMessageContext as i, AgentChatComposerDraft as n, AgentChatProps as r, AgentChat as t };
|
|
327
|
+
export { PermissionModeControl as a, AgentChatRenderMessageContext as i, AgentChatComposerDraft as n, compactingNotice as o, AgentChatProps as r, AgentChat as t };
|
|
@@ -2,7 +2,7 @@ import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { G as SearchIcon, f as ChevronDownIcon } from "./icons-B1Qw05te.js";
|
|
3
3
|
import { Button } from "./components/foundations/Button.js";
|
|
4
4
|
import { Dialog } from "./components/foundations/Dialog.js";
|
|
5
|
-
import {
|
|
5
|
+
import { o as titleCase } from "./format-DB2mX9DA.js";
|
|
6
6
|
import { Separator } from "./components/foundations/Separator.js";
|
|
7
7
|
import { EmptyState } from "./components/foundations/EmptyState.js";
|
|
8
8
|
import { Input } from "./components/foundations/Input.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { J as SpinnerIcon } from "./icons-B1Qw05te.js";
|
|
2
1
|
import { TransitionSurface } from "./components/foundations/TransitionSurface.js";
|
|
3
|
-
import { AgentChat } from "./components/agents-sdk/AgentChat.js";
|
|
2
|
+
import { AgentChat, compactingNotice } from "./components/agents-sdk/AgentChat.js";
|
|
4
3
|
import { AgentToolRunsProvider, useOptionalAgentToolRuns, useSourceScopedAgentToolEvents } from "./components/agents-sdk/AgentToolRunsContext.js";
|
|
5
4
|
import { SubagentRunList } from "./components/agents-sdk/SubagentRunList.js";
|
|
6
5
|
import { ThinkChatContext, ThinkChatLiveContext, useOptionalThinkChatContext, useThinkChatContext } from "./components/agents-sdk/ThinkChatContext.js";
|
|
@@ -198,7 +197,7 @@ const ThinkChatApprovalsContext = React.createContext(null);
|
|
|
198
197
|
* inside the log) or `excludeTools` + your own `renderPart` (standalone
|
|
199
198
|
* card) — see README "App-specific tools" and the Custom Tool Panel story.
|
|
200
199
|
*/
|
|
201
|
-
function ThinkChatMessages({ composerHeader, draft, renderPart, excludeTools, renderAgentToolRunLink, toolRenderers, thinkStub, onExecutionSettled, pendingApprovals, notice, sessionCompaction, ...props }) {
|
|
200
|
+
function ThinkChatMessages({ composerHeader, draft, loading, renderPart, excludeTools, renderAgentToolRunLink, toolRenderers, thinkStub, onExecutionSettled, pendingApprovals, notice, sessionCompaction, ...props }) {
|
|
202
201
|
const chat = useOptionalThinkChatContext();
|
|
203
202
|
const agentTools = useOptionalAgentToolRuns();
|
|
204
203
|
const approvals = React.useContext(ThinkChatApprovalsContext);
|
|
@@ -244,7 +243,7 @@ function ThinkChatMessages({ composerHeader, draft, renderPart, excludeTools, re
|
|
|
244
243
|
const defaultNotice = chat ? /* @__PURE__ */ jsx(ThinkRecoveryNotice, { chat }) : null;
|
|
245
244
|
const [dismissedCompaction, setDismissedCompaction] = React.useState(null);
|
|
246
245
|
const landedCompaction = sessionCompaction?.lastCompaction && sessionCompaction.lastCompaction !== dismissedCompaction ? sessionCompaction.lastCompaction : null;
|
|
247
|
-
const sessionCompactionNotice = sessionCompaction?.compacting ?
|
|
246
|
+
const sessionCompactionNotice = sessionCompaction?.compacting ? compactingNotice : sessionCompaction?.sessionError ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
248
247
|
className: "think-recovery-notice",
|
|
249
248
|
"data-tone": "danger",
|
|
250
249
|
children: ["Compaction failed: ", sessionCompaction.sessionError]
|
|
@@ -279,8 +278,18 @@ function ThinkChatMessages({ composerHeader, draft, renderPart, excludeTools, re
|
|
|
279
278
|
files
|
|
280
279
|
});
|
|
281
280
|
};
|
|
281
|
+
if (loading) return /* @__PURE__ */ jsx(AgentChat, {
|
|
282
|
+
showComposer: true,
|
|
283
|
+
...props,
|
|
284
|
+
renderPart: resolvedRenderPart,
|
|
285
|
+
messages: EMPTY_DRAFT_MESSAGES,
|
|
286
|
+
status: "ready",
|
|
287
|
+
notice,
|
|
288
|
+
composerHeader: resolvedComposerHeader,
|
|
289
|
+
loading: true
|
|
290
|
+
});
|
|
282
291
|
if (!chat) {
|
|
283
|
-
if (!draft) throw new Error("ThinkChat.Messages must be used inside <ThinkChat.Provider> or <ThinkChat.Root>, or given a `draft
|
|
292
|
+
if (!draft) throw new Error("ThinkChat.Messages must be used inside <ThinkChat.Provider> or <ThinkChat.Root>, or given a `draft`, or set `loading` while one hydrates.");
|
|
284
293
|
return /* @__PURE__ */ jsx(AgentChat, {
|
|
285
294
|
...props,
|
|
286
295
|
renderPart: resolvedRenderPart,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-C7L-Mv9U.js";
|
|
2
|
-
import { r as AgentChatProps } from "./AgentChat-
|
|
2
|
+
import { r as AgentChatProps } from "./AgentChat-mpacmRU1.js";
|
|
3
3
|
import { l as ThinkChatPart } from "./ThinkChatToolParts-D4qcnnxt.js";
|
|
4
4
|
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-teRjrPxW.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-CVAzjTt6.js";
|
|
2
2
|
import { WorkspaceLike } from "@cloudflare/think";
|
|
3
3
|
import { FileInfo, Workspace } from "@cloudflare/shell";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-DQogVe8E.js";
|
|
2
|
-
import { o as WorkspaceState } from "./Workspace-
|
|
2
|
+
import { o as WorkspaceState } from "./Workspace-GTlqvcIn.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/WorkspaceExplorer.d.ts
|
|
@@ -97,10 +97,26 @@ declare function isWorkspaceSkillPath(path: string): boolean;
|
|
|
97
97
|
* that report generic values such as `application/octet-stream`.
|
|
98
98
|
*/
|
|
99
99
|
declare function inferWorkspaceMedia(path: string, mimeType?: string | null): WorkspaceMediaInfo | null;
|
|
100
|
+
/**
|
|
101
|
+
* The mime type this vocabulary fixes for a file name, or `null` where it has
|
|
102
|
+
* no opinion and the caller's own answer stands.
|
|
103
|
+
*
|
|
104
|
+
* A workspace that derives mime types from names needs this for the reason
|
|
105
|
+
* `inferWorkspaceMedia` distrusts them: the platform registries call `.ts`
|
|
106
|
+
* MPEG-2 transport stream, and every downstream media check believes it. Media
|
|
107
|
+
* extensions answer their canonical type here too, so a host has one call
|
|
108
|
+
* instead of a copy of the table this module already keeps.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* const mimeType = inferWorkspaceMimeType(name) ?? lookup(name) ?? "application/octet-stream";
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
declare function inferWorkspaceMimeType(path: string): string | null;
|
|
100
116
|
declare function isWorkspaceMediaPath(path: string, mimeType?: string | null): boolean;
|
|
101
117
|
/** Parse and validate a workspace skill with the canonical Agent Skills SDK. */
|
|
102
118
|
declare function parseWorkspaceSkill(content: string): WorkspaceSkillDocument;
|
|
103
119
|
/** Best-effort syntax-highlighting language from a file path; unknown extensions render as plain text. */
|
|
104
120
|
declare function inferWorkspaceLanguage(path: string): CodeBlockLanguage;
|
|
105
121
|
//#endregion
|
|
106
|
-
export { WorkspaceMediaInfo as a, WorkspaceMediaTrackKind as c, inferWorkspaceLanguage as d, inferWorkspaceMedia as f,
|
|
122
|
+
export { parseWorkspaceSkill as _, WorkspaceMediaInfo as a, WorkspaceMediaTrackKind as c, inferWorkspaceLanguage as d, inferWorkspaceMedia as f, isWorkspaceSkillPath as g, isWorkspaceMediaPath as h, WorkspaceFileState as i, WorkspaceSkillDocument as l, isWorkspaceMarkdownPath as m, WorkspaceFileAssetRequest as n, WorkspaceMediaKind as o, inferWorkspaceMimeType as p, WorkspaceFileAssetResolver as r, WorkspaceMediaTrack as s, WorkspaceFileAsset as t, getWorkspaceBasename as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as MaximizeIcon, d as CheckIcon, h as CodeIcon, r as ArrowLeftIcon, tt as WarningIcon, x as EyeIcon, y as DownloadIcon } from "./icons-B1Qw05te.js";
|
|
2
|
-
import { r as formatClock } from "./format-
|
|
2
|
+
import { r as formatClock } from "./format-DB2mX9DA.js";
|
|
3
3
|
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-CM5gfmdq.js";
|
|
4
4
|
import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/agents-sdk/WorkspaceFile.js";
|
|
5
5
|
import { c as useWorkspaceNavigationContext, s as useWorkspaceNavigationRestoration } from "./WorkspaceLink-DZeLe_jN.js";
|
|
@@ -245,7 +245,7 @@ function WorkspaceImagePreview({ asset, fileName, media, url }) {
|
|
|
245
245
|
onError: () => setLoadFailed(true)
|
|
246
246
|
})
|
|
247
247
|
}), /* @__PURE__ */ jsx("div", {
|
|
248
|
-
className: "
|
|
248
|
+
className: "sigvelo-visually-hidden",
|
|
249
249
|
role: "status",
|
|
250
250
|
"aria-live": "polite",
|
|
251
251
|
"aria-atomic": "true",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, r as AgentChatProps, t as AgentChat } from "../../AgentChat-
|
|
2
|
-
export { AgentChat, AgentChatComposerDraft, AgentChatProps, AgentChatRenderMessageContext, PermissionModeControl };
|
|
1
|
+
import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, o as compactingNotice, r as AgentChatProps, t as AgentChat } from "../../AgentChat-mpacmRU1.js";
|
|
2
|
+
export { AgentChat, AgentChatComposerDraft, AgentChatProps, AgentChatRenderMessageContext, PermissionModeControl, compactingNotice };
|
|
@@ -43,10 +43,17 @@ const COMPACT_SLASH_COMMAND = {
|
|
|
43
43
|
group: "Conversation",
|
|
44
44
|
meta: "Built in"
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* The affordance for a compaction that is running right now, for the `notice`
|
|
48
|
+
* slot. Exported because Think's session frames report the same state from
|
|
49
|
+
* outside this component's own `/compact` lifecycle, and one running
|
|
50
|
+
* compaction must not read two ways.
|
|
51
|
+
*/
|
|
52
|
+
const compactingNotice = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), "Compacting context…"] });
|
|
46
53
|
const COMPACTION_NOTICES = {
|
|
47
54
|
compacted: "Context compacted. Context usage updates after your next message.",
|
|
48
55
|
failed: "Compaction failed — run /compact to try again.",
|
|
49
|
-
pending:
|
|
56
|
+
pending: compactingNotice,
|
|
50
57
|
unchanged: "No context was compacted. Recent context is already protected."
|
|
51
58
|
};
|
|
52
59
|
function observeAgentChatComposer(element) {
|
|
@@ -240,7 +247,8 @@ const AgentChatTranscriptRowBody = React.memo(AgentChatTranscriptRowBodyImpl);
|
|
|
240
247
|
* announce re-inserted old rows as new); announce new messages from a
|
|
241
248
|
* host-owned live region if that matters.
|
|
242
249
|
*/
|
|
243
|
-
function AgentChat({ className, messages, status = "ready", onSubmit, showComposer = onSubmit !== void 0, onStop, onPromptQueued, placeholder = "Ask anything...", disabled, emptyState, startScreen, composerHeader, composerTray, composerTools, slashCommands, onCompact, mentionCommands, contextSelector, composerEndTools, voiceInput, beforeVoiceStart, composerAddMenuItems, notice, onRegenerate, onEditAndResend, onApprovalResponse, thinkStub, approvalsEnabled = true, permissionModeControl, onExecutionSettled, pendingApprovals: durableApprovals = EMPTY_PENDING_APPROVALS, contextWindow, renderPart, renderMessageAfter, showAssistantActions, ref }) {
|
|
250
|
+
function AgentChat({ className, messages, status = "ready", onSubmit, showComposer = onSubmit !== void 0, onStop, onPromptQueued, placeholder = "Ask anything...", disabled: composerDisabled, emptyState, loading, startScreen, composerHeader, composerTray, composerTools, slashCommands, onCompact, mentionCommands, contextSelector, composerEndTools, voiceInput, beforeVoiceStart, composerAddMenuItems, notice, onRegenerate, onEditAndResend, onApprovalResponse, thinkStub, approvalsEnabled = true, permissionModeControl, onExecutionSettled, pendingApprovals: durableApprovals = EMPTY_PENDING_APPROVALS, contextWindow, renderPart, renderMessageAfter, showAssistantActions, ref }) {
|
|
251
|
+
const disabled = composerDisabled || loading;
|
|
244
252
|
const [copyAnnouncement, setCopyAnnouncement] = React.useState("");
|
|
245
253
|
const [composerDraft, setComposerDraft] = React.useState("");
|
|
246
254
|
const [composerReferences, setComposerReferences] = React.useState([]);
|
|
@@ -638,7 +646,7 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
638
646
|
title: "Start a conversation",
|
|
639
647
|
description: "Ask the agent to inspect, plan, or build."
|
|
640
648
|
});
|
|
641
|
-
const showsStartScreen = messages.length === 0 && showComposer && startScreen !== false && (startScreen !== void 0 || emptyState === void 0);
|
|
649
|
+
const showsStartScreen = !loading && messages.length === 0 && showComposer && startScreen !== false && (startScreen !== void 0 || emptyState === void 0);
|
|
642
650
|
const startScreenProps = startScreen && typeof startScreen === "object" ? startScreen : void 0;
|
|
643
651
|
return /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
644
652
|
ref,
|
|
@@ -652,7 +660,14 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
652
660
|
"aria-atomic": "true",
|
|
653
661
|
children: copyAnnouncement
|
|
654
662
|
}),
|
|
655
|
-
|
|
663
|
+
loading ? /* @__PURE__ */ jsxs("div", {
|
|
664
|
+
className: "agent-chat__transcript-loading",
|
|
665
|
+
role: "status",
|
|
666
|
+
children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
667
|
+
className: "sigvelo-visually-hidden",
|
|
668
|
+
children: "Loading conversation"
|
|
669
|
+
})]
|
|
670
|
+
}) : showsStartScreen ? /* @__PURE__ */ jsx(AgentChatStartScreen, {
|
|
656
671
|
...startScreenProps,
|
|
657
672
|
composer
|
|
658
673
|
}) : /* @__PURE__ */ jsx(ExpansionStateProvider, { children: /* @__PURE__ */ jsx(VirtualMessageScroller, {
|
|
@@ -678,4 +693,4 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
678
693
|
});
|
|
679
694
|
}
|
|
680
695
|
//#endregion
|
|
681
|
-
export { AgentChat };
|
|
696
|
+
export { AgentChat, compactingNotice };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { V as PlayIcon, z as PauseIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
|
-
import { r as formatClock } from "../../format-
|
|
4
|
+
import { r as formatClock } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
6
|
import { Slider } from "../foundations/Slider.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -2,7 +2,7 @@ import { getMcpServerEntry, getMcpServerRuntimeState } from "../../utils/mcp-ser
|
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
3
|
import { J as SpinnerIcon, d as CheckIcon, j as McpIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
|
|
4
4
|
import { Button } from "../foundations/Button.js";
|
|
5
|
-
import { i as formatErrorMessage } from "../../format-
|
|
5
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
6
6
|
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
7
7
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
8
|
import { n as getMcpServerConnectionKind } from "../../mcp-server-U71zhxFF.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { i as formatErrorMessage } from "../../format-
|
|
4
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import { Field } from "../foundations/Field.js";
|
|
6
6
|
import { Form } from "../foundations/Form.js";
|
|
7
7
|
import { Fieldset } from "../foundations/Fieldset.js";
|
|
@@ -5,7 +5,7 @@ import { AppIcon } from "../foundations/AppIcon.js";
|
|
|
5
5
|
import { Button } from "../foundations/Button.js";
|
|
6
6
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
7
|
import { Dialog } from "../foundations/Dialog.js";
|
|
8
|
-
import { i as formatErrorMessage } from "../../format-
|
|
8
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
9
9
|
import { Separator } from "../foundations/Separator.js";
|
|
10
10
|
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
11
11
|
import { n as getMcpServerConnectionKind, t as McpServerIcon } from "../../mcp-server-U71zhxFF.js";
|
|
@@ -3,7 +3,7 @@ import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
|
3
3
|
import { J as SpinnerIcon, P as MinusIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
|
|
4
4
|
import { buttonVariants } from "../foundations/Button.js";
|
|
5
5
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
|
-
import { i as formatErrorMessage } from "../../format-
|
|
6
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
7
7
|
import { Menu } from "../foundations/Menu.js";
|
|
8
8
|
import { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger } from "../ai-sdk/PromptInput.js";
|
|
9
9
|
import { n as getMcpServerConnectionKind, t as McpServerIcon } from "../../mcp-server-U71zhxFF.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorSource, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../../ModelSelector-
|
|
1
|
+
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorSource, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../../ModelSelector-DtBxWqRn.js";
|
|
2
2
|
export { CloudflareModelSelector, ModelSelector, ModelSelectorContent, ModelSelectorDialog, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorInput, ModelSelectorItem, ModelSelectorList, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName, ModelSelectorSeparator, ModelSelectorSource, ModelSelectorTrigger, formatCloudflareModelProvider, getCloudflareModelProvider, isCloudflareRunnableModelId, listCloudflareModelSelectorOptions, normalizeCloudflareModelSelectorModels, readCloudflareModelId };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { n as clamp } from "../../format-
|
|
2
|
+
import { n as clamp } from "../../format-DB2mX9DA.js";
|
|
3
3
|
import { Progress } from "../foundations/Progress.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
|
|
2
2
|
import { ct as PromptInputMessage } from "../../PromptInput-DOyee1kM.js";
|
|
3
|
-
import { r as AgentChatProps } from "../../AgentChat-
|
|
3
|
+
import { r as AgentChatProps } from "../../AgentChat-mpacmRU1.js";
|
|
4
4
|
import { a as useOptionalAgentToolRuns, i as AgentToolRunsProviderProps, n as AgentToolEventsValue, o as useSourceScopedAgentToolEvents, r as AgentToolRunsProvider, t as AgentToolEventSource } from "../../AgentToolRunsContext-BCVqCtJ1.js";
|
|
5
5
|
import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../../BrowserLiveView-tJTWkoyu.js";
|
|
6
6
|
import { n as BrowserReplayProps, t as BrowserReplay } from "../../BrowserReplay-B0BQZr-N.js";
|
|
7
7
|
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
8
8
|
import { x as isThinkChatActivityPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
9
9
|
import { u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
|
|
10
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-
|
|
10
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-BZyN5MBg.js";
|
|
11
11
|
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
12
12
|
import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
|
|
13
|
-
import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../../WorkspaceFile-
|
|
14
|
-
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "../../Workspace-
|
|
15
|
-
import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../../WorkspaceExplorer-
|
|
13
|
+
import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../../WorkspaceFile-CVAzjTt6.js";
|
|
14
|
+
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "../../Workspace-GTlqvcIn.js";
|
|
15
|
+
import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../../WorkspaceExplorer-Cu044amt.js";
|
|
16
16
|
import * as React from "react";
|
|
17
17
|
import { UIMessage } from "ai";
|
|
18
18
|
import { UseAgentOptions } from "agents/react";
|
|
@@ -76,6 +76,18 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
|
|
|
76
76
|
showComposer?: AgentChatProps<MessageT>["showComposer"];
|
|
77
77
|
/** Shown in place of the list while there are no messages. */
|
|
78
78
|
emptyState?: React.ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* Renders the transcript lane as loading, with neither a chat provider nor a
|
|
81
|
+
* `draft`. This is what a host's Suspense fallback renders while an existing
|
|
82
|
+
* conversation hydrates: the surrounding shell stays mounted and interactive,
|
|
83
|
+
* so a transcript read that never resolves still leaves every exit reachable
|
|
84
|
+
* instead of replacing the whole app with a spinner.
|
|
85
|
+
*
|
|
86
|
+
* The composer stays visible but inert. This lane is a conversation that
|
|
87
|
+
* exists and has not arrived, so it keeps its shape, offers no start screen,
|
|
88
|
+
* and cannot begin a second conversation.
|
|
89
|
+
*/
|
|
90
|
+
loading?: boolean;
|
|
79
91
|
/** Welcoming first-turn layout with the live composer centered above starter actions. */
|
|
80
92
|
startScreen?: AgentChatProps<MessageT>["startScreen"];
|
|
81
93
|
/** Extra controls rendered inside the composer, next to the send button. */
|
|
@@ -202,6 +214,7 @@ declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIM
|
|
|
202
214
|
declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
203
215
|
composerHeader,
|
|
204
216
|
draft,
|
|
217
|
+
loading,
|
|
205
218
|
renderPart,
|
|
206
219
|
excludeTools,
|
|
207
220
|
renderAgentToolRunLink,
|
|
@@ -6,7 +6,7 @@ import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
|
|
|
6
6
|
import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
7
7
|
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
|
|
8
8
|
import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
|
|
9
|
-
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
9
|
+
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DbzqSTBt.js";
|
|
10
10
|
import { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions } from "./Workspace.js";
|
|
11
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
12
12
|
export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, thinkPendingExecutionApprovalsQueryOptions, useOptionalAgentToolRuns, useSourceScopedAgentToolEvents, useThinkChat, useThinkPendingExecutionApprovals, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { x as isThinkChatActivityPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
2
2
|
import { u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
|
|
3
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-
|
|
3
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-BZyN5MBg.js";
|
|
4
4
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as capitalize } from "../../format-
|
|
1
|
+
import { t as capitalize } from "../../format-DB2mX9DA.js";
|
|
2
2
|
import { getToolDisplayName } from "../ai-sdk/ToolPart.js";
|
|
3
3
|
import { t as summarizeToolInput } from "../../summarize-tool-input-CqTcGRYy.js";
|
|
4
4
|
import { displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
|
+
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
2
3
|
import { Tabs } from "../foundations/Tabs.js";
|
|
3
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
4
5
|
import { t as CodeBlock } from "../../CodeBlock-CM5gfmdq.js";
|
|
@@ -320,13 +321,7 @@ function formatToolCall(call) {
|
|
|
320
321
|
return `${target}(${call.args === void 0 ? "…" : formatAuditValue(call.args)})`;
|
|
321
322
|
}
|
|
322
323
|
function formatAuditValue(value) {
|
|
323
|
-
|
|
324
|
-
if (typeof value === "string") formatted = value;
|
|
325
|
-
else try {
|
|
326
|
-
formatted = JSON.stringify(value, (_, item) => typeof item === "bigint" ? `${item}n` : item) ?? String(value);
|
|
327
|
-
} catch {
|
|
328
|
-
formatted = String(value);
|
|
329
|
-
}
|
|
324
|
+
const formatted = formatUnknownValue(value);
|
|
330
325
|
const maxLength = 240;
|
|
331
326
|
return formatted.length > maxLength ? `${formatted.slice(0, maxLength - 1)}…` : formatted;
|
|
332
327
|
}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { $ as TerminalIcon, C as FileIcon, O as InfoIcon, W as RefreshIcon, d as CheckIcon, n as ArrowDownIcon, rt as XIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
|
+
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
5
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
4
6
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
5
7
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
6
8
|
import "react";
|
|
7
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
10
|
//#region src/components/agents-sdk/ThinkExecutionDetail.tsx
|
|
9
11
|
function formatJson(value) {
|
|
10
|
-
return
|
|
12
|
+
return formatUnknownValue(value, 2);
|
|
11
13
|
}
|
|
12
14
|
/** Native Think submission or Agents Workflow detail, reusable outside the execution workbench. */
|
|
13
15
|
function ThinkExecutionDetail({ className, emptyState = "Select a run to view its activity.", ref, run, ...props }) {
|
|
14
16
|
if (!run) return /* @__PURE__ */ jsx("section", {
|
|
15
17
|
ref,
|
|
16
|
-
className: cx("think-execution-detail", "think-execution-
|
|
18
|
+
className: cx("think-execution-detail", "think-execution-detail--empty", className),
|
|
17
19
|
role: "status",
|
|
18
20
|
...props,
|
|
19
|
-
children: /* @__PURE__ */ jsx(
|
|
21
|
+
children: /* @__PURE__ */ jsx(EmptyState, { description: emptyState })
|
|
20
22
|
});
|
|
21
23
|
const id = getThinkExecutionRunId(run);
|
|
22
24
|
const progressedAt = getThinkExecutionRunProgressedAt(run);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as capitalize } from "../../format-
|
|
1
|
+
import { t as capitalize } from "../../format-DB2mX9DA.js";
|
|
2
2
|
//#region src/components/agents-sdk/ThinkExecutionRun.ts
|
|
3
3
|
/** Narrows the direct upstream execution union without wrapping either record. */
|
|
4
4
|
function isThinkSubmissionRun(run) {
|
|
@@ -3,7 +3,7 @@ import { W as RefreshIcon, b as EllipsisIcon } from "../../icons-B1Qw05te.js";
|
|
|
3
3
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
4
|
import { buttonVariants } from "../foundations/Button.js";
|
|
5
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
|
-
import { i as formatErrorMessage } from "../../format-
|
|
6
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
7
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { Menu } from "../foundations/Menu.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-DQogVe8E.js";
|
|
2
2
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
|
|
3
3
|
import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
|
|
4
|
-
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-
|
|
5
|
-
import { a as WorkspaceSource } from "../../Workspace-
|
|
4
|
+
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-CVAzjTt6.js";
|
|
5
|
+
import { a as WorkspaceSource } from "../../Workspace-GTlqvcIn.js";
|
|
6
6
|
import { ThinkChatMessagesProps } from "./ThinkChat.js";
|
|
7
7
|
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
8
8
|
import { ThinkExecutionWorkbenchProps } from "./ThinkExecutionWorkbench.js";
|
|
@@ -5,7 +5,7 @@ import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
|
5
5
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
6
|
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
7
7
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DZeLe_jN.js";
|
|
8
|
-
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
8
|
+
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DbzqSTBt.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
10
|
import { useWorkspace } from "./Workspace.js";
|
|
11
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
@@ -119,11 +119,13 @@ function ThinkFullApp({ appBarActions, appBarLeading, appBarTitle, className, co
|
|
|
119
119
|
label: "Execution",
|
|
120
120
|
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
121
121
|
render: () => /* @__PURE__ */ jsx(React.Suspense, {
|
|
122
|
-
fallback: /* @__PURE__ */
|
|
122
|
+
fallback: /* @__PURE__ */ jsxs("div", {
|
|
123
123
|
className: "think-full-app__workbench",
|
|
124
124
|
role: "status",
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
126
|
+
className: "sigvelo-visually-hidden",
|
|
127
|
+
children: "Loading execution"
|
|
128
|
+
})]
|
|
127
129
|
}),
|
|
128
130
|
children: /* @__PURE__ */ jsx(ThinkExecutionWorkbench, {
|
|
129
131
|
source: agent.stub,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as titleCase } from "../../format-
|
|
2
|
-
import { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion
|
|
1
|
+
import { a as formatUnknownValue, o as titleCase } from "../../format-DB2mX9DA.js";
|
|
2
|
+
import { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion } from "../ai-sdk/Approval.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { getToolName } from "ai";
|
|
@@ -77,7 +77,7 @@ function ThinkExecutionApproval({ className, count, onSettled, onSkip, part, que
|
|
|
77
77
|
/* @__PURE__ */ jsxs(ApprovalHeader, { children: [/* @__PURE__ */ jsx(ApprovalQuestion, { children: question ?? /* @__PURE__ */ jsx(Fragment, { children: "The agent's code is paused on these calls. Allow it to continue?" }) }), count && count > 1 ? /* @__PURE__ */ jsxs(ApprovalCount, { children: ["1 of ", count] }) : null] }),
|
|
78
78
|
/* @__PURE__ */ jsx(ApprovalPreview, { children: paused.pending.map((action) => /* @__PURE__ */ jsx(ApprovalPreviewRow, {
|
|
79
79
|
label: `${action.connector}.${action.method}`,
|
|
80
|
-
children: action.args === void 0 ? null :
|
|
80
|
+
children: action.args === void 0 ? null : formatUnknownValue(action.args)
|
|
81
81
|
}, action.seq)) }),
|
|
82
82
|
/* @__PURE__ */ jsx(ApprovalDecision, {
|
|
83
83
|
subject: toolName,
|
|
@@ -3,7 +3,8 @@ import { H as PlusIcon } from "../../icons-B1Qw05te.js";
|
|
|
3
3
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
4
|
import { buttonVariants } from "../foundations/Button.js";
|
|
5
5
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
6
|
-
import { t as capitalize } from "../../format-
|
|
6
|
+
import { t as capitalize } from "../../format-DB2mX9DA.js";
|
|
7
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
8
9
|
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
9
10
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
@@ -139,9 +140,9 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
|
|
|
139
140
|
})
|
|
140
141
|
}, routine.id);
|
|
141
142
|
})
|
|
142
|
-
}) : /* @__PURE__ */
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
144
|
+
title: "No matching schedules",
|
|
145
|
+
description: "Try another search or filter."
|
|
145
146
|
})
|
|
146
147
|
]
|
|
147
148
|
});
|
|
@@ -2,7 +2,8 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { J as SpinnerIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
4
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
5
|
-
import { i as formatErrorMessage } from "../../format-
|
|
5
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
6
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
7
|
import { Menu } from "../foundations/Menu.js";
|
|
7
8
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
9
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
@@ -175,20 +176,15 @@ function ThinkRoutineLibrary({ appBarActions, appBarLeading, className, createRo
|
|
|
175
176
|
}) : /* @__PURE__ */ jsx(ThinkRoutineDetail, {
|
|
176
177
|
...detailProps,
|
|
177
178
|
showOwner
|
|
178
|
-
}) }, detailProps.routine.id) : /* @__PURE__ */
|
|
179
|
+
}) }, detailProps.routine.id) : /* @__PURE__ */ jsx(EmptyState, {
|
|
179
180
|
className: "think-routine-library__empty-detail",
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
className: "think-routine-library__empty-action"
|
|
188
|
-
}),
|
|
189
|
-
children: "Create schedule"
|
|
190
|
-
}) : null
|
|
191
|
-
]
|
|
181
|
+
title: selectedRoutineId ? "Schedule unavailable" : routines.length ? "Select a schedule" : "No schedules yet",
|
|
182
|
+
description: routines.length ? "Select an available schedule." : "Create a schedule to run recurring Think prompts.",
|
|
183
|
+
children: !routines.length && createRoutineLink ? /* @__PURE__ */ jsx(NavigationLink, {
|
|
184
|
+
render: createRoutineLink,
|
|
185
|
+
className: buttonVariants({ color: "primary" }),
|
|
186
|
+
children: "Create schedule"
|
|
187
|
+
}) : null
|
|
192
188
|
})
|
|
193
189
|
})
|
|
194
190
|
}),
|
|
@@ -2,7 +2,7 @@ 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-B1Qw05te.js";
|
|
3
3
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
4
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
5
|
-
import { i as formatErrorMessage } from "../../format-
|
|
5
|
+
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
6
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
7
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
8
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "../../Workspace-
|
|
1
|
+
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "../../Workspace-GTlqvcIn.js";
|
|
2
2
|
export { UseWorkspaceOptions, WorkspaceFileReadTarget, WorkspaceInfo, WorkspaceQueryKey, WorkspaceSource, WorkspaceState, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|