@mcp-b/react-components 0.27.0 → 0.29.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-B6sgfQ_q.d.ts → AgentChat-Dy3cKCd-.d.ts} +13 -5
- package/dist/{AgentChatStartScreen-DDZ25aax.d.ts → AgentChatStartScreen-DXZ0hAX0.d.ts} +23 -5
- package/dist/{PromptInput-CES0WO4u.d.ts → PromptInput-B75Np5VB.d.ts} +7 -1
- package/dist/SessionCompaction-DMa1vv6Y.d.ts +59 -0
- package/dist/{ThinkChat-DVhCEjq-.js → ThinkChat-Bp-nAnoW.js} +14 -2
- package/dist/{ThinkChatActivity-DawPYgga.d.ts → ThinkChatActivity-Dq0lOAgw.d.ts} +3 -3
- package/dist/{ThinkChatActivitySummary-kr5fE0wg.d.ts → ThinkChatActivitySummary-F062wneC.d.ts} +1 -1
- package/dist/{ThinkChatToolParts-CSzVwMXf.d.ts → ThinkChatToolParts-BfroXQ4F.d.ts} +19 -1
- package/dist/{Workspace-CIycQ4xE.d.ts → Workspace-Bn6In4wi.d.ts} +5 -1
- package/dist/{WorkspaceExplorer-BCipn7Vd.d.ts → WorkspaceExplorer-D0aiscG6.d.ts} +1 -1
- package/dist/components/ActionGuide.d.ts +23 -5
- package/dist/components/ActionGuide.js +18 -4
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +24 -11
- package/dist/components/AgentChatStartScreen.d.ts +2 -2
- package/dist/components/AgentChatStartScreen.js +16 -5
- package/dist/components/AgentConnection.d.ts +1 -1
- package/dist/components/AgentToolDetail.js +1 -1
- package/dist/components/ChatGptSignInScreen.d.ts +9 -1
- package/dist/components/ChatGptSignInScreen.js +15 -4
- package/dist/components/ConversationTabPicker.d.ts +31 -0
- package/dist/components/ConversationTabPicker.js +117 -0
- package/dist/components/Goal.d.ts +28 -1
- package/dist/components/Goal.js +76 -3
- package/dist/components/McpConnectionRequest.d.ts +11 -5
- package/dist/components/McpConnectionRequest.js +22 -16
- package/dist/components/McpPluginCatalog.d.ts +1 -1
- package/dist/components/McpServerPicker.d.ts +18 -3
- package/dist/components/McpServerPicker.js +38 -23
- package/dist/components/Plan.d.ts +18 -1
- package/dist/components/Plan.js +17 -1
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +43 -5
- package/dist/components/SessionCompaction.d.ts +1 -58
- package/dist/components/SettingsFormDialog.d.ts +43 -0
- package/dist/components/SettingsFormDialog.js +110 -0
- package/dist/components/ThinkChat.d.ts +13 -7
- package/dist/components/ThinkChat.js +3 -3
- package/dist/components/ThinkChatActivity.d.ts +3 -3
- package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkChatToolParts.d.ts +1 -1
- package/dist/components/ThinkFullApp.d.ts +6 -12
- package/dist/components/ThinkFullApp.js +4 -4
- package/dist/components/ThinkThreadPicker.d.ts +4 -1
- package/dist/components/ThinkThreadPicker.js +6 -1
- package/dist/components/Workspace.d.ts +2 -2
- package/dist/components/Workspace.js +10 -6
- package/dist/components/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/WorkspaceExplorer.d.ts +3 -3
- package/dist/components/WorkspaceExplorer.js +2 -2
- package/dist/components/WorkspaceMountManager.d.ts +32 -0
- package/dist/components/WorkspaceMountManager.js +89 -0
- package/dist/{mcp-server-catalog-BewjV7Eq.d.ts → mcp-server-catalog-CO7GAl1f.d.ts} +1 -1
- package/dist/styles/chatgpt-sign-in-screen.css +10 -1
- package/dist/styles/conversation-tab-picker.css +24 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/workspace-mount-manager.css +24 -0
- package/dist/utils/mcp-server-catalog.d.ts +1 -1
- package/dist/utils/mcp-server-catalog.js +1 -1
- package/package.json +13 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-
|
|
3
|
-
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-
|
|
2
|
+
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-DXZ0hAX0.js";
|
|
3
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-B75Np5VB.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
|
|
6
6
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
@@ -76,15 +76,22 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
76
76
|
showComposer?: boolean;
|
|
77
77
|
/** Called when the user hits stop while `status` is streaming/submitted. */
|
|
78
78
|
onStop?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Called when a submission lands in the pending queue instead of going out
|
|
81
|
+
* (the composer was busy). Hosts with an autonomous continuation mode (goal
|
|
82
|
+
* mode) pause it here: a user who queues a message expects it to run next,
|
|
83
|
+
* not to race the loop's own next turn.
|
|
84
|
+
*/
|
|
85
|
+
onPromptQueued?: () => void;
|
|
79
86
|
placeholder?: string;
|
|
80
87
|
disabled?: boolean;
|
|
81
88
|
/** Rendered in place of the transcript while `messages` is empty. */
|
|
82
89
|
emptyState?: React.ReactNode;
|
|
83
90
|
/**
|
|
84
91
|
* First-turn composition that places the live composer between a welcoming
|
|
85
|
-
* heading and app-authored starter
|
|
86
|
-
* are empty and no legacy `emptyState` is supplied. Pass `false` to
|
|
87
|
-
* the transcript-style empty row.
|
|
92
|
+
* heading and app-authored starter descriptors. It is the default when
|
|
93
|
+
* messages are empty and no legacy `emptyState` is supplied. Pass `false` to
|
|
94
|
+
* retain the transcript-style empty row.
|
|
88
95
|
*/
|
|
89
96
|
startScreen?: Omit<AgentChatStartScreenProps, "composer" | "className" | "aria-labelledby"> | false;
|
|
90
97
|
/** Extra controls rendered in the composer toolbar. */
|
|
@@ -254,6 +261,7 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
254
261
|
onSubmit,
|
|
255
262
|
showComposer,
|
|
256
263
|
onStop,
|
|
264
|
+
onPromptQueued,
|
|
257
265
|
placeholder,
|
|
258
266
|
disabled,
|
|
259
267
|
emptyState,
|
|
@@ -2,6 +2,22 @@ import { r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/AgentChatStartScreen.d.ts
|
|
5
|
+
interface AgentChatStarterItem {
|
|
6
|
+
id: string;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
muted?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Accessible label for this suggestion's optional dismiss action. */
|
|
12
|
+
dismissLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AgentChatStarterListProps extends Omit<React.ComponentPropsWithoutRef<"ul">, "children" | "onDismiss" | "onSelect"> {
|
|
15
|
+
/** Complete starter data from a host-owned suggestion query. */
|
|
16
|
+
items: readonly AgentChatStarterItem[];
|
|
17
|
+
onSelect: (item: AgentChatStarterItem) => void;
|
|
18
|
+
/** Enables dismiss actions for items that provide `dismissLabel`. */
|
|
19
|
+
onDismiss?: (item: AgentChatStarterItem) => void;
|
|
20
|
+
}
|
|
5
21
|
interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<"section">, "children" | "title"> {
|
|
6
22
|
/** The prompt that orients the user before their first message. */
|
|
7
23
|
heading?: React.ReactNode;
|
|
@@ -9,8 +25,8 @@ interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<
|
|
|
9
25
|
composer: React.ReactNode;
|
|
10
26
|
/** App-authored content for the utility tray beneath the first-turn composer. */
|
|
11
27
|
composerTray?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
|
|
28
|
+
/** Host-authored starter data and callables rendered below the composer. */
|
|
29
|
+
starters?: AgentChatStarterListProps;
|
|
14
30
|
}
|
|
15
31
|
/**
|
|
16
32
|
* Welcoming first-turn layout for `AgentChat` and `ThinkChat`.
|
|
@@ -23,15 +39,17 @@ declare function AgentChatStartScreen({
|
|
|
23
39
|
heading,
|
|
24
40
|
composer,
|
|
25
41
|
composerTray,
|
|
26
|
-
|
|
42
|
+
starters,
|
|
27
43
|
className,
|
|
28
44
|
"aria-label": ariaLabel,
|
|
29
45
|
"aria-labelledby": ariaLabelledBy,
|
|
30
46
|
...props
|
|
31
47
|
}: AgentChatStartScreenProps): React.JSX.Element;
|
|
32
|
-
interface AgentChatStarterListProps extends React.ComponentPropsWithoutRef<"ul"> {}
|
|
33
48
|
/** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
|
|
34
49
|
declare function AgentChatStarterList({
|
|
50
|
+
items,
|
|
51
|
+
onSelect,
|
|
52
|
+
onDismiss,
|
|
35
53
|
className,
|
|
36
54
|
...props
|
|
37
55
|
}: AgentChatStarterListProps): React.JSX.Element;
|
|
@@ -57,4 +75,4 @@ declare function AgentChatStarter({
|
|
|
57
75
|
...props
|
|
58
76
|
}: AgentChatStarterProps): React.JSX.Element;
|
|
59
77
|
//#endregion
|
|
60
|
-
export {
|
|
78
|
+
export { AgentChatStarterList as a, AgentChatStarterItem as i, AgentChatStartScreenProps as n, AgentChatStarterListProps as o, AgentChatStarter as r, AgentChatStarterProps as s, AgentChatStartScreen as t };
|
|
@@ -8,6 +8,8 @@ import { ChatAddToolApproveResponseFunction, ChatStatus, DynamicToolUIPart, File
|
|
|
8
8
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
9
9
|
import { AgentStub } from "agents/client";
|
|
10
10
|
import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
11
|
+
import { MCPServersState } from "agents";
|
|
12
|
+
import { SkillDescriptor } from "agents/skills";
|
|
11
13
|
|
|
12
14
|
//#region src/components/PromptInput.d.ts
|
|
13
15
|
/** The payload produced when the prompt input is submitted. */
|
|
@@ -785,6 +787,10 @@ interface PromptInputCommandDefinition {
|
|
|
785
787
|
/** Quiet trailing provenance such as a workspace, server, or installation scope. */
|
|
786
788
|
meta?: React.ReactNode;
|
|
787
789
|
}
|
|
790
|
+
/** Project whole upstream Agents MCP state into composer mention commands. */
|
|
791
|
+
declare function mcpPromptInputCommands(mcp: MCPServersState): PromptInputCommandDefinition[];
|
|
792
|
+
/** Project whole upstream skill descriptors into composer slash commands. */
|
|
793
|
+
declare function skillPromptInputCommands(skills: readonly SkillDescriptor[]): PromptInputCommandDefinition[];
|
|
788
794
|
type PromptInputCommandTrigger = "/" | "@";
|
|
789
795
|
interface PromptInputReference {
|
|
790
796
|
id: string;
|
|
@@ -866,4 +872,4 @@ declare function PromptInputContextSelector({
|
|
|
866
872
|
action
|
|
867
873
|
}: PromptInputContextSelectorProps): React.JSX.Element;
|
|
868
874
|
//#endregion
|
|
869
|
-
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B, TextInputContext as Bt, PromptInputBodyProps as C, PromptInputTab as Ct, PromptInputCommand as D, PromptInputTabItemProps as Dt, PromptInputButtonTooltip as E, PromptInputTabItem as Et, PromptInputCommandGroupLabelProps as F, PromptInputTools as Ft, PromptInputCommandSeparatorProps as G,
|
|
875
|
+
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B, TextInputContext as Bt, PromptInputBodyProps as C, PromptInputTab as Ct, PromptInputCommand as D, PromptInputTabItemProps as Dt, PromptInputButtonTooltip as E, PromptInputTabItem as Et, PromptInputCommandGroupLabelProps as F, PromptInputTools as Ft, PromptInputCommandSeparatorProps as G, mcpPromptInputCommands as Gt, PromptInputCommandListProps as H, getApprovalRequestId as Ht, PromptInputCommandGroupProps as I, PromptInputToolsProps as It, PromptInputContextItem as J, usePromptInputController as Jt, PromptInputCommandTrigger as K, skillPromptInputCommands as Kt, PromptInputCommandInput as L, PromptInputTooltipConfig as Lt, PromptInputCommandEmptyProps as M, PromptInputTabsListProps as Mt, PromptInputCommandGroup as N, PromptInputTextarea as Nt, PromptInputCommandComposer as O, PromptInputTabLabel as Ot, PromptInputCommandGroupLabel as P, PromptInputTextareaProps as Pt, PromptInputDictation as Q, PromptInputCommandInputProps as R, PromptInputTray as Rt, PromptInputBody as S, PromptInputSubmitProps as St, PromptInputButtonProps as T, PromptInputTabBodyProps as Tt, PromptInputCommandProps as U, getApprovalStateKey as Ut, PromptInputCommandList as V, TooltipSide as Vt, PromptInputCommandSeparator as W, getPendingToolApprovals as Wt, PromptInputContextSelectorProps as X, PromptInputContextSelector as Y, useProviderAttachments as Yt, PromptInputControllerProps as Z, PromptInputApprovalProps as _, PromptInputReferences as _t, PromptInputActionAddAttachmentsProps as a, PromptInputHoverCardContent as at, PromptInputAttachments as b, PromptInputSelectProps as bt, PromptInputActionMenu as c, PromptInputHoverCardTrigger as ct, PromptInputActionMenuItem as d, PromptInputPermissionSelector as dt, PromptInputFooter as et, PromptInputActionMenuItemProps as f, PromptInputPermissionSelectorProps as ft, PromptInputApproval as g, PromptInputReference as gt, PromptInputActionMenuTriggerProps as h, PromptInputProviderProps as ht, PromptInputActionAddAttachments as i, PromptInputHoverCard as it, PromptInputCommandEmpty as j, PromptInputTabsList as jt, PromptInputCommandComposerProps as k, PromptInputTabLabelProps as kt, PromptInputActionMenuContent as l, PromptInputHoverCardTriggerProps as lt, PromptInputActionMenuTrigger as m, PromptInputProvider as mt, PermissionMode as n, PromptInputHeader as nt, PromptInputActionAddScreenshot as o, PromptInputHoverCardContentProps as ot, PromptInputActionMenuProps as p, PromptInputProps as pt, PromptInputContextAction as q, usePromptInputAttachments as qt, PromptInput as r, PromptInputHeaderProps as rt, PromptInputActionAddScreenshotProps as s, PromptInputHoverCardProps as st, AttachmentsContext as t, PromptInputFooterProps as tt, PromptInputActionMenuContentProps as u, PromptInputMessage as ut, PromptInputAttachment as v, PromptInputReferencesProps as vt, PromptInputButton as w, PromptInputTabBody as wt, PromptInputAttachmentsProps as x, PromptInputSubmit as xt, PromptInputAttachmentProps as y, PromptInputSelect as yt, PromptInputCommandItem as z, PromptInputTrayProps as zt };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
2
|
+
|
|
3
|
+
//#region src/components/SessionCompaction.d.ts
|
|
4
|
+
type SessionStatusPhase = "idle" | "compacting";
|
|
5
|
+
interface SessionStatusFrame {
|
|
6
|
+
phase: SessionStatusPhase;
|
|
7
|
+
/** Present on the idle frame that follows a successful compaction. */
|
|
8
|
+
compacted: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
12
|
+
* Returns null for every other frame on the connection.
|
|
13
|
+
*/
|
|
14
|
+
declare function parseSessionStatusFrame(data: unknown): SessionStatusFrame | null;
|
|
15
|
+
/**
|
|
16
|
+
* Parse a raw websocket payload as a `cf_agent_session_error` frame,
|
|
17
|
+
* returning its error text. Null for every other frame on the connection.
|
|
18
|
+
*/
|
|
19
|
+
declare function parseSessionErrorFrame(data: unknown): string | null;
|
|
20
|
+
/** The message-frame surface of a `useAgent` connection. */
|
|
21
|
+
interface SessionFrameSource {
|
|
22
|
+
addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
23
|
+
removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
24
|
+
}
|
|
25
|
+
interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
26
|
+
/** The conversation agent's `useAgent` connection. */
|
|
27
|
+
agent: SessionFrameSource;
|
|
28
|
+
/** The conversation's `useAgentChat` value (status + local view setter). */
|
|
29
|
+
chat: {
|
|
30
|
+
status: ChatStatus;
|
|
31
|
+
setMessages: (messages: MessageT[]) => void;
|
|
32
|
+
};
|
|
33
|
+
/** Server read used to reload the transcript after a compaction lands. */
|
|
34
|
+
getMessages: () => Promise<MessageT[]>;
|
|
35
|
+
}
|
|
36
|
+
interface UseSessionCompactionResult {
|
|
37
|
+
compacting: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Set when the post-compaction transcript reload rejected — the local view
|
|
40
|
+
* is stale relative to the server until a retry succeeds. Surface it
|
|
41
|
+
* ("Transcript may be out of date"); the hook retries on the next status
|
|
42
|
+
* transition to `"ready"`.
|
|
43
|
+
*/
|
|
44
|
+
reloadError: unknown;
|
|
45
|
+
/**
|
|
46
|
+
* Error text from the last `cf_agent_session_error` frame — the only signal
|
|
47
|
+
* a user who ran /compact gets when the server-side compaction itself fails
|
|
48
|
+
* (the phase just flips back to idle with no `compacted` payload). Cleared
|
|
49
|
+
* when the next compaction starts.
|
|
50
|
+
*/
|
|
51
|
+
sessionError: string | null;
|
|
52
|
+
}
|
|
53
|
+
declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
54
|
+
agent,
|
|
55
|
+
chat,
|
|
56
|
+
getMessages
|
|
57
|
+
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { UseSessionCompactionResult as a, useSessionCompaction as c, UseSessionCompactionOptions as i, SessionStatusFrame as n, parseSessionErrorFrame as o, SessionStatusPhase as r, parseSessionStatusFrame as s, SessionFrameSource as t };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { J as SpinnerIcon } from "./icons-B4mGvCvc.js";
|
|
2
|
+
import { TransitionSurface } from "./components/TransitionSurface.js";
|
|
1
3
|
import { AgentChat } from "./components/AgentChat.js";
|
|
2
4
|
import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./components/AgentToolRunsContext.js";
|
|
3
5
|
import { SubagentRunList } from "./components/SubagentRunList.js";
|
|
@@ -182,7 +184,7 @@ const ThinkChatApprovalsContext = React.createContext(null);
|
|
|
182
184
|
* inside the log) or `excludeTools` + your own `renderPart` (standalone
|
|
183
185
|
* card) — see README "App-specific tools" and the Custom Tool Panel story.
|
|
184
186
|
*/
|
|
185
|
-
function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAgentToolRunLink, toolRenderers, thinkStub, onExecutionSettled, pendingApprovals, notice, ...props }) {
|
|
187
|
+
function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAgentToolRunLink, toolRenderers, thinkStub, onExecutionSettled, pendingApprovals, notice, sessionCompaction, ...props }) {
|
|
186
188
|
const chat = useThinkChatContext("ThinkChat.Messages");
|
|
187
189
|
const agentTools = useOptionalAgentToolRuns();
|
|
188
190
|
const approvals = React.useContext(ThinkChatApprovalsContext);
|
|
@@ -217,6 +219,16 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
217
219
|
return custom === void 0 ? renderBuiltIn() : custom;
|
|
218
220
|
} : defaultRenderPart, [defaultRenderPart, renderPart]);
|
|
219
221
|
const defaultNotice = /* @__PURE__ */ jsx(ThinkRecoveryNotice, { chat });
|
|
222
|
+
const sessionCompactionNotice = sessionCompaction?.compacting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), "Compacting context…"] }) : sessionCompaction?.sessionError ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
223
|
+
className: "think-recovery-notice",
|
|
224
|
+
"data-tone": "danger",
|
|
225
|
+
children: ["Compaction failed: ", sessionCompaction.sessionError]
|
|
226
|
+
}) : sessionCompaction?.reloadError ? /* @__PURE__ */ jsx(TransitionSurface, {
|
|
227
|
+
className: "think-recovery-notice",
|
|
228
|
+
"data-tone": "danger",
|
|
229
|
+
children: "Transcript may be out of date. The next completed turn will retry the refresh."
|
|
230
|
+
}) : null;
|
|
231
|
+
const recoveryActive = chat.isRecovering || chat.connectionError || chat.error;
|
|
220
232
|
const backgroundRuns = renderAgentToolRunLink ? agentTools?.unboundRuns : void 0;
|
|
221
233
|
const resolvedComposerHeader = composerHeader || backgroundRuns?.length ? /* @__PURE__ */ jsxs(Fragment, { children: [composerHeader, backgroundRuns?.length && renderAgentToolRunLink ? /* @__PURE__ */ jsxs("div", {
|
|
222
234
|
className: "subagent-run__tray",
|
|
@@ -240,7 +252,7 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
240
252
|
thinkStub: resolvedApprovals.thinkStub,
|
|
241
253
|
onExecutionSettled: resolvedApprovals.onExecutionSettled,
|
|
242
254
|
pendingApprovals: resolvedApprovals.pendingApprovals,
|
|
243
|
-
notice: notice ?? defaultNotice,
|
|
255
|
+
notice: notice ?? (recoveryActive ? defaultNotice : sessionCompactionNotice),
|
|
244
256
|
composerHeader: resolvedComposerHeader,
|
|
245
257
|
onRegenerate: (messageId) => void chat.regenerate({ messageId }),
|
|
246
258
|
onSubmit: ({ text, files, references }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { r as AgentChatProps } from "./AgentChat-
|
|
3
|
-
import { l as ThinkChatPart } from "./ThinkChatToolParts-
|
|
4
|
-
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-
|
|
2
|
+
import { r as AgentChatProps } from "./AgentChat-Dy3cKCd-.js";
|
|
3
|
+
import { l as ThinkChatPart } from "./ThinkChatToolParts-BfroXQ4F.js";
|
|
4
|
+
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-F062wneC.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
7
7
|
import { AgentToolRunState } from "agents/agent-tools";
|
package/dist/{ThinkChatActivitySummary-kr5fE0wg.d.ts → ThinkChatActivitySummary-F062wneC.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-D3OvrC02.js";
|
|
2
|
-
import { l as ThinkChatPart } from "./ThinkChatToolParts-
|
|
2
|
+
import { l as ThinkChatPart } from "./ThinkChatToolParts-BfroXQ4F.js";
|
|
3
3
|
import { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ThinkChatActivitySummary.d.ts
|
|
@@ -22,7 +22,25 @@ type ThinkWorkspaceToolName = keyof WorkspaceUITools;
|
|
|
22
22
|
type ThinkBashToolPart = Extract<WorkspaceToolPart, {
|
|
23
23
|
type: "tool-bash";
|
|
24
24
|
}>;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Runtime result returned by Think 0.15's `dist/tools/workspace.js`
|
|
27
|
+
* `createBashTool`. Its public declaration currently widens the tool to
|
|
28
|
+
* unparameterized `Tool`, so keep only the emitted fields the panel reads.
|
|
29
|
+
*/
|
|
30
|
+
interface ThinkBashToolOutput {
|
|
31
|
+
stdout: string;
|
|
32
|
+
stderr: string;
|
|
33
|
+
exitCode: number;
|
|
34
|
+
errors?: string[];
|
|
35
|
+
skippedFiles?: string[];
|
|
36
|
+
changedFiles: {
|
|
37
|
+
created: string[];
|
|
38
|
+
updated: string[];
|
|
39
|
+
deleted: string[];
|
|
40
|
+
directoriesCreated: string[];
|
|
41
|
+
directoriesDeleted: string[];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
26
44
|
declare function isWorkspaceToolPart(part: ThinkChatPart): part is WorkspaceToolPart;
|
|
27
45
|
type SkillUITools = {
|
|
28
46
|
activate_skill: {
|
|
@@ -71,6 +71,10 @@ interface WorkspaceFileReadTarget {
|
|
|
71
71
|
*/
|
|
72
72
|
declare function workspaceQueryKey(sourceKey: string, root: string): readonly ["workspace", string, string];
|
|
73
73
|
type WorkspaceQueryKey = ReturnType<typeof workspaceQueryKey>;
|
|
74
|
+
/** Directory-listing prefix for targeted cache invalidation. */
|
|
75
|
+
declare function workspaceDirectoryQueryPrefix(sourceKey: string, root: string): readonly ["workspace", string, string, "directory"];
|
|
76
|
+
/** Exact directory-listing key shared by query options and live hosts. */
|
|
77
|
+
declare function workspaceDirectoryQueryKey(sourceKey: string, root: string, path: string): readonly ["workspace", string, string, "directory", string];
|
|
74
78
|
/** Shared directory options for workspace components and route loaders. */
|
|
75
79
|
declare function workspaceDirectoryQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, path: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<readonly FileInfo[], Error, readonly FileInfo[], readonly ["workspace", string, string, "directory", string]>, "queryFn"> & {
|
|
76
80
|
queryFn?: import("@tanstack/react-query").QueryFunction<readonly FileInfo[], readonly ["workspace", string, string, "directory", string], never> | undefined;
|
|
@@ -271,4 +275,4 @@ declare function useWorkspace({
|
|
|
271
275
|
maxInlineAssetBytes
|
|
272
276
|
}: UseWorkspaceOptions): WorkspaceState;
|
|
273
277
|
//#endregion
|
|
274
|
-
export { WorkspaceSource as a, workspaceBinaryFileQueryOptions as c,
|
|
278
|
+
export { WorkspaceSource as a, workspaceBinaryFileQueryOptions as c, workspaceDirectoryQueryPrefix as d, workspaceFileAssetQueryOptions as f, workspaceTextFileQueryOptions as g, workspaceQueryKey as h, WorkspaceQueryKey as i, workspaceDirectoryQueryKey as l, workspaceInfoQueryOptions as m, WorkspaceFileReadTarget as n, WorkspaceState as o, workspaceFileStatQueryOptions as p, WorkspaceInfo as r, useWorkspace as s, UseWorkspaceOptions as t, workspaceDirectoryQueryOptions as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-O-EBKUJ8.js";
|
|
2
|
-
import { o as WorkspaceState } from "./Workspace-
|
|
2
|
+
import { o as WorkspaceState } from "./Workspace-Bn6In4wi.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/WorkspaceExplorer.d.ts
|
|
@@ -4,16 +4,33 @@ import * as React from "react";
|
|
|
4
4
|
//#region src/components/ActionGuide.d.ts
|
|
5
5
|
type ActionGuideHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
6
6
|
type ActionGuideListLayout = "compact" | "cards" | "list";
|
|
7
|
-
interface
|
|
7
|
+
interface ActionGuideActionItem {
|
|
8
|
+
id: string;
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
variant?: "surface" | "ghost";
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ActionGuideSectionItem {
|
|
15
|
+
id: string;
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
layout?: ActionGuideListLayout;
|
|
18
|
+
actions: readonly ActionGuideActionItem[];
|
|
19
|
+
}
|
|
20
|
+
interface ActionGuideProps extends Omit<React.ComponentPropsWithoutRef<"article">, "children" | "title"> {
|
|
8
21
|
/** Short, task-oriented introduction to the guide. */
|
|
9
22
|
title: React.ReactNode;
|
|
10
23
|
/** Optional sentence that explains what the guide helps the user do. */
|
|
11
24
|
description?: React.ReactNode;
|
|
12
25
|
/** Semantic heading level for the guide title. */
|
|
13
26
|
headingLevel?: ActionGuideHeadingLevel;
|
|
27
|
+
/** Complete section/action data; product copy and availability remain host-owned. */
|
|
28
|
+
sections: readonly ActionGuideSectionItem[];
|
|
29
|
+
/** Central action policy for data-driven sections. */
|
|
30
|
+
onAction: (action: ActionGuideActionItem) => void;
|
|
14
31
|
}
|
|
15
32
|
/**
|
|
16
|
-
*
|
|
33
|
+
* App-agnostic guide hydrated from product-owned sections and actions.
|
|
17
34
|
*
|
|
18
35
|
* Product code owns the copy, icons, availability, and click behavior. This
|
|
19
36
|
* component owns only the shared article rhythm and responsive layout.
|
|
@@ -22,7 +39,8 @@ declare function ActionGuide({
|
|
|
22
39
|
title,
|
|
23
40
|
description,
|
|
24
41
|
headingLevel,
|
|
25
|
-
|
|
42
|
+
sections,
|
|
43
|
+
onAction,
|
|
26
44
|
className,
|
|
27
45
|
"aria-label": ariaLabel,
|
|
28
46
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -37,7 +55,7 @@ interface ActionGuideSectionProps extends Omit<React.ComponentPropsWithoutRef<"s
|
|
|
37
55
|
/** Semantic heading level for the section title. */
|
|
38
56
|
headingLevel?: ActionGuideHeadingLevel;
|
|
39
57
|
}
|
|
40
|
-
/** A labelled group
|
|
58
|
+
/** A labelled action group for custom guide compositions. */
|
|
41
59
|
declare function ActionGuideSection({
|
|
42
60
|
title,
|
|
43
61
|
headingLevel,
|
|
@@ -82,4 +100,4 @@ declare function ActionGuideAction({
|
|
|
82
100
|
ref?: React.Ref<HTMLButtonElement>;
|
|
83
101
|
}): React.JSX.Element;
|
|
84
102
|
//#endregion
|
|
85
|
-
export { ActionGuide, ActionGuideAction, ActionGuideActionProps, ActionGuideHeadingLevel, ActionGuideList, ActionGuideListLayout, ActionGuideListProps, ActionGuideProps, ActionGuideSection, ActionGuideSectionProps };
|
|
103
|
+
export { ActionGuide, ActionGuideAction, ActionGuideActionItem, ActionGuideActionProps, ActionGuideHeadingLevel, ActionGuideList, ActionGuideListLayout, ActionGuideListProps, ActionGuideProps, ActionGuideSection, ActionGuideSectionItem, ActionGuideSectionProps };
|
|
@@ -4,14 +4,15 @@ import * as React from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ActionGuide.tsx
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* App-agnostic guide hydrated from product-owned sections and actions.
|
|
8
8
|
*
|
|
9
9
|
* Product code owns the copy, icons, availability, and click behavior. This
|
|
10
10
|
* component owns only the shared article rhythm and responsive layout.
|
|
11
11
|
*/
|
|
12
|
-
function ActionGuide({ title, description, headingLevel = 2,
|
|
12
|
+
function ActionGuide({ title, description, headingLevel = 2, sections, onAction, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
|
|
13
13
|
const titleId = React.useId();
|
|
14
14
|
const Title = `h${headingLevel}`;
|
|
15
|
+
const sectionHeadingLevel = Math.min(headingLevel + 1, 6);
|
|
15
16
|
return /* @__PURE__ */ jsxs("article", {
|
|
16
17
|
ref,
|
|
17
18
|
"data-slot": "action-guide",
|
|
@@ -33,10 +34,23 @@ function ActionGuide({ title, description, headingLevel = 2, children, className
|
|
|
33
34
|
className: "action-guide__description",
|
|
34
35
|
children: description
|
|
35
36
|
}) : null]
|
|
36
|
-
}),
|
|
37
|
+
}), sections.map((section) => /* @__PURE__ */ jsx(ActionGuideSection, {
|
|
38
|
+
title: section.title,
|
|
39
|
+
headingLevel: sectionHeadingLevel,
|
|
40
|
+
children: /* @__PURE__ */ jsx(ActionGuideList, {
|
|
41
|
+
layout: section.layout,
|
|
42
|
+
children: section.actions.map((action) => /* @__PURE__ */ jsx(ActionGuideAction, {
|
|
43
|
+
icon: action.icon,
|
|
44
|
+
variant: action.variant,
|
|
45
|
+
disabled: action.disabled,
|
|
46
|
+
onClick: () => onAction(action),
|
|
47
|
+
children: action.label
|
|
48
|
+
}, action.id))
|
|
49
|
+
})
|
|
50
|
+
}, section.id))]
|
|
37
51
|
});
|
|
38
52
|
}
|
|
39
|
-
/** A labelled group
|
|
53
|
+
/** A labelled action group for custom guide compositions. */
|
|
40
54
|
function ActionGuideSection({ title, headingLevel = 3, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...props }) {
|
|
41
55
|
const titleId = React.useId();
|
|
42
56
|
const Title = `h${headingLevel}`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, r as AgentChatProps, t as AgentChat } from "../AgentChat-
|
|
1
|
+
import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, r as AgentChatProps, t as AgentChat } from "../AgentChat-Dy3cKCd-.js";
|
|
2
2
|
export { AgentChat, AgentChatComposerDraft, AgentChatProps, AgentChatRenderMessageContext, PermissionModeControl };
|
|
@@ -22,7 +22,7 @@ import { isTextUIPart } from "ai";
|
|
|
22
22
|
//#region src/components/AgentChat.tsx
|
|
23
23
|
/**
|
|
24
24
|
* Agents exports this helper from `agents/sessions` after cloudflare/agents#1896;
|
|
25
|
-
* the current 0.
|
|
25
|
+
* the current 0.19.0 release still publishes it from the experimental path.
|
|
26
26
|
* It checks the canonical `compaction_` id prefix used when Session history
|
|
27
27
|
* materializes a summary overlay. `UIMessage` is structurally compatible with
|
|
28
28
|
* the `SessionMessage` fields it reads, so use the upstream helper directly
|
|
@@ -210,11 +210,12 @@ const AgentChatTranscriptRowBody = React.memo(AgentChatTranscriptRowBodyImpl);
|
|
|
210
210
|
* announce re-inserted old rows as new); announce new messages from a
|
|
211
211
|
* host-owned live region if that matters.
|
|
212
212
|
*/
|
|
213
|
-
function AgentChat({ className, messages, status = "ready", onSubmit, showComposer = onSubmit !== void 0, onStop, 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 }) {
|
|
213
|
+
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 }) {
|
|
214
214
|
const [copyAnnouncement, setCopyAnnouncement] = React.useState("");
|
|
215
215
|
const [composerDraft, setComposerDraft] = React.useState("");
|
|
216
216
|
const [composerReferences, setComposerReferences] = React.useState([]);
|
|
217
217
|
const [pendingPrompts, setPendingPrompts] = React.useState([]);
|
|
218
|
+
const [queueHeld, setQueueHeld] = React.useState(false);
|
|
218
219
|
const busy = status === "submitted" || status === "streaming";
|
|
219
220
|
const wasBusy = React.useRef(busy);
|
|
220
221
|
const addComposerReference = React.useCallback((reference) => {
|
|
@@ -240,30 +241,42 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
240
241
|
...message,
|
|
241
242
|
...composerReferences.length ? { references: composerReferences } : {}
|
|
242
243
|
};
|
|
243
|
-
|
|
244
|
-
id: crypto.randomUUID(),
|
|
245
|
-
message: prompt
|
|
246
|
-
}]) : onSubmit?.(prompt);
|
|
244
|
+
setQueueHeld(false);
|
|
247
245
|
setComposerDraft("");
|
|
248
246
|
setComposerReferences([]);
|
|
249
|
-
|
|
247
|
+
if (busy || pendingPrompts.length && !queueHeld) {
|
|
248
|
+
setPendingPrompts((current) => [...current, {
|
|
249
|
+
id: crypto.randomUUID(),
|
|
250
|
+
message: prompt
|
|
251
|
+
}]);
|
|
252
|
+
onPromptQueued?.();
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
return onSubmit?.(prompt);
|
|
250
256
|
}, [
|
|
251
257
|
busy,
|
|
252
258
|
composerReferences,
|
|
259
|
+
onPromptQueued,
|
|
253
260
|
onSubmit,
|
|
254
|
-
pendingPrompts.length
|
|
261
|
+
pendingPrompts.length,
|
|
262
|
+
queueHeld
|
|
255
263
|
]);
|
|
264
|
+
const handleStop = React.useMemo(() => onStop ? () => {
|
|
265
|
+
setQueueHeld(true);
|
|
266
|
+
onStop();
|
|
267
|
+
} : void 0, [onStop]);
|
|
256
268
|
React.useEffect(() => {
|
|
257
269
|
const becameReady = wasBusy.current && !busy;
|
|
258
270
|
wasBusy.current = busy;
|
|
259
271
|
const next = pendingPrompts[0];
|
|
260
|
-
if (!becameReady || !next || !onSubmit) return;
|
|
272
|
+
if (!becameReady || queueHeld || !next || !onSubmit) return;
|
|
261
273
|
setPendingPrompts((current) => current.slice(1));
|
|
262
274
|
onSubmit(next.message);
|
|
263
275
|
}, [
|
|
264
276
|
busy,
|
|
265
277
|
onSubmit,
|
|
266
|
-
pendingPrompts
|
|
278
|
+
pendingPrompts,
|
|
279
|
+
queueHeld
|
|
267
280
|
]);
|
|
268
281
|
const [compactionNotice, setCompactionNotice] = React.useState(null);
|
|
269
282
|
const compactionInFlight = React.useRef(false);
|
|
@@ -558,7 +571,7 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
|
|
|
558
571
|
}) : null,
|
|
559
572
|
/* @__PURE__ */ jsx(AgentChatSubmitAction, {
|
|
560
573
|
status,
|
|
561
|
-
onStop,
|
|
574
|
+
onStop: handleStop,
|
|
562
575
|
disabled,
|
|
563
576
|
hasDraft: Boolean(composerDraft.trim() || composerReferences.length)
|
|
564
577
|
})
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { AgentChatStartScreen, AgentChatStartScreenProps, AgentChatStarter, AgentChatStarterList, AgentChatStarterListProps, AgentChatStarterProps };
|
|
1
|
+
import { a as AgentChatStarterList, i as AgentChatStarterItem, n as AgentChatStartScreenProps, o as AgentChatStarterListProps, r as AgentChatStarter, s as AgentChatStarterProps, t as AgentChatStartScreen } from "../AgentChatStartScreen-DXZ0hAX0.js";
|
|
2
|
+
export { AgentChatStartScreen, AgentChatStartScreenProps, AgentChatStarter, AgentChatStarterItem, AgentChatStarterList, AgentChatStarterListProps, AgentChatStarterProps };
|
|
@@ -13,7 +13,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* the same live composer moves from the center of the empty view to the pinned
|
|
14
14
|
* transcript position after the first message.
|
|
15
15
|
*/
|
|
16
|
-
function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray,
|
|
16
|
+
function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray, starters, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
|
|
17
17
|
const headingId = React.useId();
|
|
18
18
|
return /* @__PURE__ */ jsx("section", {
|
|
19
19
|
"data-slot": "agent-chat-start-screen",
|
|
@@ -37,20 +37,31 @@ function AgentChatStartScreen({ heading = "What should we work on?", composer, c
|
|
|
37
37
|
children: composerTray
|
|
38
38
|
}) : null]
|
|
39
39
|
})]
|
|
40
|
-
}),
|
|
40
|
+
}), starters?.items.length ? /* @__PURE__ */ jsx("div", {
|
|
41
41
|
className: "agent-chat-start-screen__starters",
|
|
42
|
-
children
|
|
42
|
+
children: /* @__PURE__ */ jsx(AgentChatStarterList, { ...starters })
|
|
43
43
|
}) : null]
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
/** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
|
|
48
|
-
function AgentChatStarterList({ className, ...props }) {
|
|
48
|
+
function AgentChatStarterList({ items, onSelect, onDismiss, className, ...props }) {
|
|
49
49
|
return /* @__PURE__ */ jsx("ul", {
|
|
50
50
|
"data-slot": "agent-chat-starter-list",
|
|
51
51
|
role: "list",
|
|
52
52
|
className: cx("agent-chat-starter-list", className),
|
|
53
|
-
...props
|
|
53
|
+
...props,
|
|
54
|
+
children: items.map((item) => /* @__PURE__ */ jsx(AgentChatStarter, {
|
|
55
|
+
icon: item.icon,
|
|
56
|
+
muted: item.muted,
|
|
57
|
+
disabled: item.disabled,
|
|
58
|
+
dismissLabel: item.dismissLabel,
|
|
59
|
+
onDismiss: item.dismissLabel && onDismiss ? () => {
|
|
60
|
+
onDismiss(item);
|
|
61
|
+
} : void 0,
|
|
62
|
+
onClick: () => onSelect(item),
|
|
63
|
+
children: item.label
|
|
64
|
+
}, item.id))
|
|
54
65
|
});
|
|
55
66
|
}
|
|
56
67
|
/** One full-width, keyboard-native starter prompt. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as McpServerSetupAuthFieldName, l as McpServerSetupAuth } from "../mcp-server-catalog-
|
|
1
|
+
import { d as McpServerSetupAuthFieldName, l as McpServerSetupAuth } from "../mcp-server-catalog-CO7GAl1f.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/AgentConnection.d.ts
|
|
@@ -5,7 +5,7 @@ import { AppTopBar } from "./AppTopBar.js";
|
|
|
5
5
|
import { NaniteMark } from "./NaniteScene.js";
|
|
6
6
|
import { SubagentRunIndicator, getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
7
7
|
import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "./SubagentRunDetails.js";
|
|
8
|
-
import { t as ThinkChat } from "../ThinkChat-
|
|
8
|
+
import { t as ThinkChat } from "../ThinkChat-Bp-nAnoW.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useAgentChat } from "@cloudflare/think/react";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/ChatGptSignInScreen.d.ts
|
|
4
|
+
interface ChatGptSignInSecondaryAction {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
4
9
|
interface ChatGptSignInScreenProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
10
|
/** Whether the sign-in request is currently opening ChatGPT. */
|
|
6
11
|
busy?: boolean;
|
|
@@ -16,6 +21,8 @@ interface ChatGptSignInScreenProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
16
21
|
brandLogo?: React.ReactNode;
|
|
17
22
|
/** Called when the user clicks the sign-in action. */
|
|
18
23
|
onSignIn?: () => void;
|
|
24
|
+
/** Optional app-owned alternative rendered in the shared full-screen layout. */
|
|
25
|
+
secondaryAction?: ChatGptSignInSecondaryAction;
|
|
19
26
|
}
|
|
20
27
|
/** Full-screen ChatGPT authentication prompt for MCP-B onboarding. */
|
|
21
28
|
declare function ChatGptSignInScreen({
|
|
@@ -29,10 +36,11 @@ declare function ChatGptSignInScreen({
|
|
|
29
36
|
onPointerLeave,
|
|
30
37
|
onPointerMove,
|
|
31
38
|
onSignIn,
|
|
39
|
+
secondaryAction,
|
|
32
40
|
ref,
|
|
33
41
|
...props
|
|
34
42
|
}: ChatGptSignInScreenProps & {
|
|
35
43
|
ref?: React.Ref<HTMLElement>;
|
|
36
44
|
}): React.JSX.Element;
|
|
37
45
|
//#endregion
|
|
38
|
-
export { ChatGptSignInScreen, ChatGptSignInScreenProps };
|
|
46
|
+
export { ChatGptSignInScreen, ChatGptSignInScreenProps, ChatGptSignInSecondaryAction };
|