@mcp-b/react-components 0.49.1 → 0.50.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/{AgentChatQueue-v5890eA1.d.ts → AgentChatQueue-MrHhV901.d.ts} +1 -1
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +46 -0
- package/dist/AppTopBar-CVkLRdk7.d.ts +99 -0
- package/dist/{CodeBlock-g8sADidM.js → CodeBlock-BMK6CW9D.js} +1 -1
- package/dist/Dialog-88GF7_Th.d.ts +107 -0
- package/dist/{FileTree-DruTQ-oa.js → FileTree-okaLnS5j.js} +1 -1
- package/dist/Form-CM7GNTwR.d.ts +91 -0
- package/dist/ManagerOffice-5pEFpoV3.js +1146 -0
- package/dist/McpConnectorForm--HB0MEGC.d.ts +39 -0
- package/dist/Popover-CgHG5DtS.d.ts +220 -0
- package/dist/{PromptInput-4kCz3T9P.d.ts → PromptInput-DGPrCTPl.d.ts} +2 -1
- package/dist/ResponsiveSidebarShell-CAmmtQTR.d.ts +128 -0
- package/dist/SessionCompaction-CmTJFpzj.d.ts +89 -0
- package/dist/SetupChecklist-O6qmgwz4.js +77 -0
- package/dist/ThinkChatActivity-DENkintt.d.ts +77 -0
- package/dist/ThinkChatContext-COIgzkYp.d.ts +28 -0
- package/dist/ThinkRoutine-Cb1DdaHa.d.ts +30 -0
- package/dist/ThinkThreadPicker-yetGX_s5.d.ts +91 -0
- package/dist/{WorkspaceFileView-DYPtRVpM.js → WorkspaceFileView-ncZuIWhC.js} +2 -2
- package/dist/WorkspaceMessageResponse-8lOSAbw_.d.ts +48 -0
- package/dist/codex-model-catalog-BBN_gWcc.d.ts +155 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +8 -8
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- 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/DiscordConnectionDialog.d.ts +20 -0
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +65 -0
- package/dist/components/agents-sdk/EmployeeApp.d.ts +49 -0
- package/dist/components/agents-sdk/EmployeeApp.js +57 -0
- package/dist/components/agents-sdk/EmployeeChat.d.ts +63 -0
- package/dist/components/agents-sdk/EmployeeChat.js +84 -0
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +10 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +26 -16
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +24 -0
- package/dist/components/agents-sdk/EmployeeSchedules.js +105 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +43 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.js +133 -0
- package/dist/components/agents-sdk/ManagerAccountActions.d.ts +29 -0
- package/dist/components/agents-sdk/ManagerAccountActions.js +62 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1145
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +49 -0
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +198 -0
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +3 -3
- package/dist/components/agents-sdk/McpPluginCatalog.js +4 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +3 -3
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.d.ts +31 -0
- package/dist/components/agents-sdk/ModelEndpointDialog.js +118 -0
- package/dist/components/agents-sdk/ModelSelector.d.ts +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SessionCompaction.d.ts +1 -88
- package/dist/components/agents-sdk/SlackConnectionDialog.d.ts +18 -0
- package/dist/components/agents-sdk/SlackConnectionDialog.js +48 -0
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +6 -6
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -76
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +1 -27
- 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.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -29
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkRoutineActions.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +6 -6
- package/dist/components/agents-sdk/WorkspaceExecution.js +7 -7
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -47
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
- package/dist/components/agents-sdk/WorkspaceUserScript.js +4 -4
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +1 -45
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.js +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.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +3 -3
- package/dist/components/ai-sdk/Context.d.ts +1 -1
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +7 -7
- 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.d.ts +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/Dialog.d.ts +1 -106
- package/dist/components/foundations/Form.d.ts +1 -90
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.d.ts +1 -219
- 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.js +1 -1
- package/dist/components/general-purpose/AccountSignInDialog.d.ts +26 -0
- package/dist/components/general-purpose/AccountSignInDialog.js +25 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -98
- 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/NotificationPrompt.d.ts +13 -0
- package/dist/components/general-purpose/NotificationPrompt.js +18 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -127
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +124 -72
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +2 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -76
- package/dist/components/general-purpose/StatusScreen.d.ts +10 -0
- package/dist/components/general-purpose/StatusScreen.js +13 -0
- 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 +4 -4
- package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
- package/dist/mcp-server-catalog-D9p4gGeJ.d.ts +1112 -0
- package/dist/styles/employee-app.css +29 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/manager-work.css +93 -0
- package/dist/utils/codex-model-catalog.d.ts +1 -154
- package/dist/utils/mcp-server-catalog.d.ts +1 -1111
- package/dist/{workspace-assets-Bg7XhPsk.js → workspace-assets-wW_lQLYK.js} +2 -2
- package/package.json +2 -2
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -1,89 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/components/agents-sdk/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
|
-
* Session's own estimate for the history this frame describes, or null when
|
|
11
|
-
* the frame omits it or carries a non-finite value. Not provider-reported
|
|
12
|
-
* usage — never render it as an exact token count, and never feed it to the
|
|
13
|
-
* `Context` ring, which reads `metadata.usage`.
|
|
14
|
-
*/
|
|
15
|
-
tokenEstimate: number | null;
|
|
16
|
-
/**
|
|
17
|
-
* The same estimate taken before the compaction this frame reports, from its
|
|
18
|
-
* `compacted` payload. Null on every other frame. Both numbers come from one
|
|
19
|
-
* estimator over one history, so their difference is a meaningful size even
|
|
20
|
-
* though neither is exact.
|
|
21
|
-
*/
|
|
22
|
-
tokensBefore: number | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
26
|
-
* Returns null for every other frame on the connection.
|
|
27
|
-
*/
|
|
28
|
-
declare function parseSessionStatusFrame(data: unknown): SessionStatusFrame | null;
|
|
29
|
-
/**
|
|
30
|
-
* Parse a raw websocket payload as a `cf_agent_session_error` frame,
|
|
31
|
-
* returning its error text. Null for every other frame on the connection.
|
|
32
|
-
*/
|
|
33
|
-
declare function parseSessionErrorFrame(data: unknown): string | null;
|
|
34
|
-
/** The message-frame surface of a `useAgent` connection. */
|
|
35
|
-
interface SessionFrameSource {
|
|
36
|
-
addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
37
|
-
removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
38
|
-
}
|
|
39
|
-
interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
40
|
-
/** The conversation agent's `useAgent` connection. */
|
|
41
|
-
agent: SessionFrameSource;
|
|
42
|
-
/** The conversation's `useAgentChat` value (status + local view setter). */
|
|
43
|
-
chat: {
|
|
44
|
-
status: ChatStatus;
|
|
45
|
-
setMessages: (messages: MessageT[]) => void;
|
|
46
|
-
};
|
|
47
|
-
/** Server read used to reload the transcript after a compaction lands. */
|
|
48
|
-
getMessages: () => Promise<MessageT[]>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* How much a landed compaction shortened the history, per Session's own
|
|
52
|
-
* estimator. A UI may show the difference as an approximate size; it must not
|
|
53
|
-
* present either number as exact usage.
|
|
54
|
-
*/
|
|
55
|
-
interface SessionCompactionSize {
|
|
56
|
-
tokensBefore: number;
|
|
57
|
-
tokensAfter: number;
|
|
58
|
-
}
|
|
59
|
-
interface UseSessionCompactionResult {
|
|
60
|
-
compacting: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Size of the compaction that landed most recently on this connection, or
|
|
63
|
-
* null when none has landed or the frames carried no usable estimates. A new
|
|
64
|
-
* object per compaction, so a consumer can dismiss one acknowledgement by
|
|
65
|
-
* identity and still show the next. Cleared when the next compaction starts.
|
|
66
|
-
*/
|
|
67
|
-
lastCompaction: SessionCompactionSize | null;
|
|
68
|
-
/**
|
|
69
|
-
* Set when the post-compaction transcript reload rejected — the local view
|
|
70
|
-
* is stale relative to the server until a retry succeeds. Surface it
|
|
71
|
-
* ("Transcript may be out of date"); the hook retries on the next status
|
|
72
|
-
* transition to `"ready"`.
|
|
73
|
-
*/
|
|
74
|
-
reloadError: unknown;
|
|
75
|
-
/**
|
|
76
|
-
* Error text from the last `cf_agent_session_error` frame — the only signal
|
|
77
|
-
* a user who ran /compact gets when the server-side compaction itself fails
|
|
78
|
-
* (the phase just flips back to idle with no `compacted` payload). Cleared
|
|
79
|
-
* when the next compaction starts.
|
|
80
|
-
*/
|
|
81
|
-
sessionError: string | null;
|
|
82
|
-
}
|
|
83
|
-
declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
84
|
-
agent,
|
|
85
|
-
chat,
|
|
86
|
-
getMessages
|
|
87
|
-
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
88
|
-
//#endregion
|
|
1
|
+
import { a as UseSessionCompactionOptions, c as parseSessionStatusFrame, i as SessionStatusPhase, l as useSessionCompaction, n as SessionFrameSource, o as UseSessionCompactionResult, r as SessionStatusFrame, s as parseSessionErrorFrame, t as SessionCompactionSize } from "../../SessionCompaction-CmTJFpzj.js";
|
|
89
2
|
export { SessionCompactionSize, SessionFrameSource, SessionStatusFrame, SessionStatusPhase, UseSessionCompactionOptions, UseSessionCompactionResult, parseSessionErrorFrame, parseSessionStatusFrame, useSessionCompaction };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SettingsFormDialogProps } from "../general-purpose/SettingsFormDialog.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/agents-sdk/SlackConnectionDialog.d.ts
|
|
4
|
+
interface SlackConnectionDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: SettingsFormDialogProps["onOpenChange"];
|
|
7
|
+
onSubmit: SettingsFormDialogProps["onFormSubmit"];
|
|
8
|
+
onRemove?: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/** Shared connection form; the host owns validation, credentials and persistence. */
|
|
11
|
+
declare function SlackConnectionDialog({
|
|
12
|
+
open,
|
|
13
|
+
onOpenChange,
|
|
14
|
+
onSubmit,
|
|
15
|
+
onRemove
|
|
16
|
+
}: SlackConnectionDialogProps): import("react").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { SlackConnectionDialog, SlackConnectionDialogProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Field } from "../foundations/Field.js";
|
|
2
|
+
import { SettingsFormDialog } from "../general-purpose/SettingsFormDialog.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/agents-sdk/SlackConnectionDialog.tsx
|
|
5
|
+
/** Shared connection form; the host owns validation, credentials and persistence. */
|
|
6
|
+
function SlackConnectionDialog({ open, onOpenChange, onSubmit, onRemove }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(SettingsFormDialog, {
|
|
8
|
+
open,
|
|
9
|
+
onOpenChange,
|
|
10
|
+
title: "Slack app",
|
|
11
|
+
description: "Talk to your employee from Slack. Create an app at api.slack.com/apps, enable Socket Mode (an app-level token with connections:write), subscribe to message events, install it to the workspace, and paste both tokens. Mentions and DMs get replies; each Slack thread becomes its own conversation here.",
|
|
12
|
+
submitLabel: "Connect",
|
|
13
|
+
removeLabel: onRemove ? "Disconnect" : void 0,
|
|
14
|
+
onFormSubmit: onSubmit,
|
|
15
|
+
onRemove,
|
|
16
|
+
children: [/* @__PURE__ */ jsxs(Field.Root, {
|
|
17
|
+
name: "botToken",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Bot token (xoxb-…)" }),
|
|
20
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
21
|
+
type: "password",
|
|
22
|
+
autoComplete: "off",
|
|
23
|
+
required: true
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
26
|
+
match: "valueMissing",
|
|
27
|
+
children: "Bot token is required."
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}), /* @__PURE__ */ jsxs(Field.Root, {
|
|
31
|
+
name: "appToken",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "App token (xapp-…)" }),
|
|
34
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
35
|
+
type: "password",
|
|
36
|
+
autoComplete: "off",
|
|
37
|
+
required: true
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
40
|
+
match: "valueMissing",
|
|
41
|
+
children: "App token is required."
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { SlackConnectionDialog };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-
|
|
2
|
+
import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { r as firstLine, s as textLines } from "../../format-COCyV98Z.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createExpansionStore } from "../ai-sdk/ExpansionState.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
|
+
import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList, QueueSection, QueueSectionActions, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger } from "../ai-sdk/Queue.js";
|
|
3
4
|
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
4
5
|
import { useOptionalAgentChatQueue } from "./AgentChatQueue.js";
|
|
5
|
-
import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList, QueueSection, QueueSectionActions, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger } from "../ai-sdk/Queue.js";
|
|
6
6
|
import { AgentChatNotice, AgentChatPromptTray } from "./AgentChat.js";
|
|
7
7
|
import { SubagentRunSelector } from "./SubagentRunSelector.js";
|
|
8
8
|
import * as React from "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 { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
5
4
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
|
+
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/SubagentRunSelector.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { J as PromptInputMessage } from "../../PromptInput-
|
|
2
|
-
import { AgentMessageRenderPartContext } from "
|
|
1
|
+
import { J as PromptInputMessage } from "../../PromptInput-DGPrCTPl.js";
|
|
2
|
+
import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
|
|
3
3
|
import { AgentChatMessageContentProps, AgentChatRootProps } from "./AgentChat.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-DENkintt.js";
|
|
5
|
+
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
6
|
+
import { n as WorkspaceFileRenderer } from "../../WorkspaceMessageResponse-8lOSAbw_.js";
|
|
7
|
+
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { ChatStatus, UIMessage } from "ai";
|
|
10
10
|
import { DataTag, UndefinedInitialDataOptions } from "@tanstack/react-query";
|
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AgentChatMessageContentProps } from "./AgentChat.js";
|
|
3
|
-
import { n as AgentToolRunValue } from "../../AgentToolRunsContext-GMe_hSnD.js";
|
|
4
|
-
import { l as ThinkChatPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
5
|
-
import { t as ThinkChatActivityDescription } from "../../ThinkChatActivitySummary-BtBQgMg6.js";
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
8
|
-
|
|
9
|
-
//#region src/components/agents-sdk/ThinkChatActivity.d.ts
|
|
10
|
-
/**
|
|
11
|
-
* Bespoke rendering for one tool inside the activity log. Both hooks fall
|
|
12
|
-
* through to the built-in families when they return `undefined`, so an
|
|
13
|
-
* override can adjust just the action or just the panel.
|
|
14
|
-
*/
|
|
15
|
-
interface ThinkChatToolRenderer {
|
|
16
|
-
/** One-line step action. `null` hides the step from the log. */
|
|
17
|
-
describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
|
|
18
|
-
/** Expanded detail under the step. `null` keeps the step a plain row. */
|
|
19
|
-
panel?: (part: ToolUIPart | DynamicToolUIPart) => React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
type ThinkChatToolRenderers = Record<string, ThinkChatToolRenderer>;
|
|
22
|
-
interface ThinkChatActivityRendererOptions<MessageT extends UIMessage = UIMessage> {
|
|
23
|
-
/**
|
|
24
|
-
* Tool names to keep out of activity folding entirely — the run splits
|
|
25
|
-
* around them and they fall through to your own renderPart / AgentChat's
|
|
26
|
-
* generic standalone activity row. For tools that should stay in the log
|
|
27
|
-
* with custom UI, use `toolRenderers` instead.
|
|
28
|
-
*/
|
|
29
|
-
excludeTools?: readonly string[];
|
|
30
|
-
/** Per-tool action/panel overrides inside the activity log, keyed by tool name. */
|
|
31
|
-
toolRenderers?: ThinkChatToolRenderers;
|
|
32
|
-
/** App-authored TanStack Router Link for each retained child destination. */
|
|
33
|
-
renderAgentToolRunLink?: (run: AgentToolRunValue<MessageT["parts"][number]>) => React.ReactElement;
|
|
34
|
-
}
|
|
35
|
-
interface ThinkChatActivityProps {
|
|
36
|
-
/** Render with the log expanded. */
|
|
37
|
-
defaultOpen?: boolean;
|
|
38
|
-
parts: readonly ThinkChatPart[];
|
|
39
|
-
/** Defaults to deriving from part states (reasoning streaming, tool awaiting output). */
|
|
40
|
-
isStreaming?: boolean;
|
|
41
|
-
/** Per-tool action/panel overrides, keyed by tool name. */
|
|
42
|
-
toolRenderers?: ThinkChatToolRenderers;
|
|
43
|
-
/** Replaces the summary action after the activity settles. */
|
|
44
|
-
settledAction?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Uniquely identifies this run across the whole transcript for persisted
|
|
47
|
-
* disclosure state (the activity renderer passes `${message.id}:${runStart}`).
|
|
48
|
-
* Required because any derivable fallback collides for reasoning-led runs
|
|
49
|
-
* in different messages, bleeding open/closed state across virtualization
|
|
50
|
-
* remounts.
|
|
51
|
-
*/
|
|
52
|
-
stateKey: string;
|
|
53
|
-
}
|
|
54
|
-
declare function ThinkChatActivity({
|
|
55
|
-
parts,
|
|
56
|
-
defaultOpen,
|
|
57
|
-
isStreaming,
|
|
58
|
-
toolRenderers,
|
|
59
|
-
settledAction,
|
|
60
|
-
stateKey
|
|
61
|
-
}: ThinkChatActivityProps): React.JSX.Element | null;
|
|
62
|
-
/**
|
|
63
|
-
* Builds a renderPart handler that folds every run of consecutive activity
|
|
64
|
-
* parts (reasoning + tool calls) into one collapsed Activity box. Everything
|
|
65
|
-
* is derived from the UIMessage stream: part order, tool states, reasoning
|
|
66
|
-
* state. Excluded tools split the run and return undefined so your own
|
|
67
|
-
* renderPart (or AgentChat's generic activity row) takes over for them.
|
|
68
|
-
*/
|
|
69
|
-
declare function createThinkChatActivityRenderer<MessageT extends UIMessage = UIMessage>({
|
|
70
|
-
excludeTools,
|
|
71
|
-
renderAgentToolRunLink,
|
|
72
|
-
toolRenderers
|
|
73
|
-
}?: ThinkChatActivityRendererOptions<MessageT>): NonNullable<AgentChatMessageContentProps<MessageT>["renderPart"]>;
|
|
74
|
-
/** Default activity renderer — `createThinkChatActivityRenderer()` with no overrides. */
|
|
75
|
-
declare const renderThinkChatActivityPart: (context: AgentMessageRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
|
|
76
|
-
//#endregion
|
|
1
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-DENkintt.js";
|
|
77
2
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
2
1
|
import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
3
2
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
3
|
import { Button } from "../foundations/Button.js";
|
|
5
4
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
6
|
-
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
7
|
-
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
8
5
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
+
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
7
|
+
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
8
|
+
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
9
9
|
import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
|
|
10
10
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
11
11
|
import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { UIMessage } from "ai";
|
|
3
|
-
import { useAgentChat } from "@cloudflare/think/react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/agents-sdk/ThinkChatContext.d.ts
|
|
6
|
-
/** The complete upstream Think chat hook value, preserving app state and message extensions. */
|
|
7
|
-
type ThinkChatValue<State = unknown, MessageT extends UIMessage = UIMessage> = ReturnType<typeof useAgentChat<State, MessageT>>;
|
|
8
|
-
/**
|
|
9
|
-
* React contexts cannot bind provider-specific generics. Keep the stored value
|
|
10
|
-
* opaque and restore the complete upstream hook type through the typed accessors.
|
|
11
|
-
*/
|
|
12
|
-
declare const ThinkChatContext: React.Context<unknown>;
|
|
13
|
-
declare function useOptionalThinkChatContext<State = unknown, MessageT extends UIMessage = UIMessage>(): ThinkChatValue<State, MessageT> | null;
|
|
14
|
-
declare function useThinkChatContext<State = unknown, MessageT extends UIMessage = UIMessage>(component: string): ThinkChatValue<State, MessageT>;
|
|
15
|
-
/**
|
|
16
|
-
* The two live-chat facts transcript rows actually need. Kept separate from
|
|
17
|
-
* the full chat value (whose identity changes every stream delta) so memoized
|
|
18
|
-
* rows subscribed here only re-render when the run starts, ends, or moves to
|
|
19
|
-
* a new message.
|
|
20
|
-
*/
|
|
21
|
-
interface ThinkChatLiveValue {
|
|
22
|
-
isStreaming: boolean;
|
|
23
|
-
lastMessageId: string | undefined;
|
|
24
|
-
}
|
|
25
|
-
declare const ThinkChatLiveContext: React.Context<ThinkChatLiveValue | null>;
|
|
26
|
-
declare function useOptionalThinkChatLive(): ThinkChatLiveValue | null;
|
|
27
|
-
//#endregion
|
|
1
|
+
import { a as useOptionalThinkChatContext, i as ThinkChatValue, n as ThinkChatLiveContext, o as useOptionalThinkChatLive, r as ThinkChatLiveValue, s as useThinkChatContext, t as ThinkChatContext } from "../../ThinkChatContext-COIgzkYp.js";
|
|
28
2
|
export { ThinkChatContext, ThinkChatLiveContext, ThinkChatLiveValue, ThinkChatValue, useOptionalThinkChatContext, useOptionalThinkChatLive, useThinkChatContext };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
|
-
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
3
2
|
import { Tabs } from "../foundations/Tabs.js";
|
|
3
|
+
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
4
|
+
import { i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-BMK6CW9D.js";
|
|
4
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
|
-
import { i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-g8sADidM.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
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-CeGfXO21.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 { EmptyState } from "../foundations/EmptyState.js";
|
|
6
5
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
7
|
import { formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
8
8
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
9
9
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon } from "../../icons-CeGfXO21.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,5 +1,5 @@
|
|
|
1
|
+
import { t as AppTopBar } from "../../AppTopBar-CVkLRdk7.js";
|
|
1
2
|
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
|
|
2
|
-
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { H as RefreshIcon, et as WarningIcon, y as EllipsisIcon } from "../../icons-
|
|
2
|
+
import { H as RefreshIcon, et as WarningIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
+
import { Menu } from "../foundations/Menu.js";
|
|
4
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
6
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
|
-
import { Menu } from "../foundations/Menu.js";
|
|
7
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
7
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
|
+
import { EmptyState } from "../foundations/EmptyState.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
2
1
|
import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
|
|
2
|
+
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/agents-sdk/ThinkRecoveryNotice.tsx
|
|
5
5
|
function connectionReason(error) {
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { ThinkScheduledTask } from "@cloudflare/think";
|
|
3
|
-
import { Schedule } from "agents";
|
|
4
|
-
|
|
5
|
-
//#region src/components/agents-sdk/ThinkRoutine.d.ts
|
|
6
|
-
/** App-owned identity for the Think agent that owns a routine. */
|
|
7
|
-
interface ThinkRoutineOwner {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* App-level routine descriptor. Scheduling and execution records remain whole
|
|
13
|
-
* upstream Think/Agents SDK values; only library identity and enabled state are
|
|
14
|
-
* app-owned because neither SDK provides a cross-agent routine catalog.
|
|
15
|
-
*/
|
|
16
|
-
interface ThinkRoutine {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
owner: ThinkRoutineOwner;
|
|
22
|
-
task: ThinkScheduledTask;
|
|
23
|
-
schedule?: Schedule<unknown> | null;
|
|
24
|
-
runs: readonly ThinkExecutionRun[];
|
|
25
|
-
}
|
|
26
|
-
/** Preserves an app-enriched native execution type carried by a routine subtype. */
|
|
27
|
-
type ThinkRoutineRunOf<TRoutine extends ThinkRoutine = ThinkRoutine> = TRoutine["runs"][number];
|
|
28
|
-
declare function getThinkRoutineNextRun(routine: ThinkRoutine): string | null;
|
|
29
|
-
//#endregion
|
|
1
|
+
import { i as getThinkRoutineNextRun, n as ThinkRoutineOwner, r as ThinkRoutineRunOf, t as ThinkRoutine } from "../../ThinkRoutine-Cb1DdaHa.js";
|
|
30
2
|
export { ThinkRoutine, ThinkRoutineOwner, ThinkRoutineRunOf, getThinkRoutineNextRun };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as AppTopBar } from "../../AppTopBar-CVkLRdk7.js";
|
|
2
|
+
import { t as ThinkRoutine } from "../../ThinkRoutine-Cb1DdaHa.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/ThinkRoutineActions.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as SpinnerIcon, Q as TrashIcon, z as PlayIcon } from "../../icons-
|
|
1
|
+
import { K as SpinnerIcon, Q as TrashIcon, z as PlayIcon } from "../../icons-CeGfXO21.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
4
4
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon } from "../../icons-
|
|
2
|
+
import { B as PlusIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { t as capitalize } from "../../format-COCyV98Z.js";
|
|
6
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
6
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
9
|
-
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
10
9
|
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
10
|
+
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/agents-sdk/ThinkRoutineBrowser.tsx
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, r as ArrowLeftIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, r as ArrowLeftIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
4
|
import { Field } from "../foundations/Field.js";
|
|
6
5
|
import { Form } from "../foundations/Form.js";
|
|
7
6
|
import { Textarea } from "../foundations/Textarea.js";
|
|
8
|
-
import {
|
|
9
|
-
import { Fieldset } from "../foundations/Fieldset.js";
|
|
7
|
+
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
10
8
|
import { Select } from "../foundations/Select.js";
|
|
11
9
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
12
10
|
import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
|
|
13
11
|
import { Combobox } from "../foundations/Combobox.js";
|
|
12
|
+
import { Fieldset } from "../foundations/Fieldset.js";
|
|
14
13
|
import { NumberField } from "../foundations/NumberField.js";
|
|
14
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/agents-sdk/ThinkRoutineForm.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
4
3
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
5
5
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
6
6
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,91 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//#region src/components/agents-sdk/ThinkThreadPicker.d.ts
|
|
4
|
-
interface ThinkThreadItem {
|
|
5
|
-
/** Stable child-agent/thread id used by the app-authored link's route params. */
|
|
6
|
-
id: string;
|
|
7
|
-
/** Human-readable thread title, usually generated by the parent Think agent. */
|
|
8
|
-
title: string;
|
|
9
|
-
/** Optional parent-owned preview for apps that render their own richer sidebar. */
|
|
10
|
-
lastMessagePreview?: string;
|
|
11
|
-
/** Timestamp from the parent registry or metadata row. `updatedAt` wins over `createdAt`. */
|
|
12
|
-
createdAt?: Date | number;
|
|
13
|
-
/** Timestamp from parent-owned thread metadata when available. */
|
|
14
|
-
updatedAt?: Date | number;
|
|
15
|
-
/** Preformatted timestamp label when the app already has one, such as "14m". */
|
|
16
|
-
updatedAtLabel?: string;
|
|
17
|
-
/** Optional upstream/app status string. The picker only displays it; it does not derive it. */
|
|
18
|
-
status?: string;
|
|
19
|
-
/** Human label for `status` when the raw upstream value is not user-facing. */
|
|
20
|
-
statusLabel?: string;
|
|
21
|
-
}
|
|
22
|
-
interface ThinkThreadStatusSummary {
|
|
23
|
-
/** Threads currently processing a turn. */
|
|
24
|
-
running: number;
|
|
25
|
-
/** Completed or interrupted background threads that have not been reviewed. */
|
|
26
|
-
attention: number;
|
|
27
|
-
/** Threads whose latest turn failed. */
|
|
28
|
-
failed: number;
|
|
29
|
-
}
|
|
30
|
-
interface ThinkThreadStatusIndicatorsProps {
|
|
31
|
-
summary: ThinkThreadStatusSummary;
|
|
32
|
-
className?: string;
|
|
33
|
-
}
|
|
34
|
-
interface ThinkThreadPickerProps<Thread extends ThinkThreadItem = ThinkThreadItem> extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect" | "title"> {
|
|
35
|
-
/** Threads from the parent agent, already sorted in the order the app wants to show. */
|
|
36
|
-
threads: readonly Thread[];
|
|
37
|
-
/**
|
|
38
|
-
* Renders the application-owned TanStack Router Link for a thread.
|
|
39
|
-
*
|
|
40
|
-
* Put `to`, `params`, `search`, and active state on this element so they stay
|
|
41
|
-
* inferred from the consuming application's registered route tree.
|
|
42
|
-
*/
|
|
43
|
-
renderThreadLink: (thread: Thread) => React.ReactElement;
|
|
44
|
-
/**
|
|
45
|
-
* App-authored TanStack Router Link to the new-thread screen. A thread
|
|
46
|
-
* created on click is an empty thread until someone writes in it.
|
|
47
|
-
*/
|
|
48
|
-
createThreadLink?: React.ReactElement;
|
|
49
|
-
/**
|
|
50
|
-
* Notified on unmodified primary activation. The link still navigates — the
|
|
51
|
-
* route is the selection — so this is for side effects such as closing a
|
|
52
|
-
* compact drawer, never for performing the selection itself.
|
|
53
|
-
*/
|
|
54
|
-
onSelect?: (thread: Thread) => void;
|
|
55
|
-
/** Optional parent-agent delete action, usually `parent.stub.deleteThread(thread.id)`. */
|
|
56
|
-
onDelete?: (thread: Thread) => void | Promise<void>;
|
|
57
|
-
/** Visible heading for the roster. */
|
|
58
|
-
title?: React.ReactNode;
|
|
59
|
-
/** Accessible label for the list navigation. */
|
|
60
|
-
"aria-label"?: string;
|
|
61
|
-
}
|
|
62
|
-
declare function summarizeThinkThreads(threads: readonly Pick<ThinkThreadItem, "status">[]): ThinkThreadStatusSummary;
|
|
63
|
-
declare function ThinkThreadStatusIndicators({
|
|
64
|
-
summary,
|
|
65
|
-
className
|
|
66
|
-
}: ThinkThreadStatusIndicatorsProps): React.JSX.Element | null;
|
|
67
|
-
/**
|
|
68
|
-
* Thread roster UI for sub-agent chat apps.
|
|
69
|
-
*
|
|
70
|
-
* This component does not call Think or Cloudflare RPC methods directly. Feed
|
|
71
|
-
* it from the parent agent's roster method, then render app-owned route links
|
|
72
|
-
* that select the child `useAgent({ sub: [...] })` name. Keep backend contract
|
|
73
|
-
* notes beside the parent Think agent because
|
|
74
|
-
* `listThreads()`/`createThread()`/`deleteThread()` are app-owned.
|
|
75
|
-
*/
|
|
76
|
-
declare function ThinkThreadPicker<Thread extends ThinkThreadItem>({
|
|
77
|
-
threads,
|
|
78
|
-
renderThreadLink,
|
|
79
|
-
createThreadLink,
|
|
80
|
-
onSelect,
|
|
81
|
-
onDelete,
|
|
82
|
-
className,
|
|
83
|
-
title,
|
|
84
|
-
"aria-label": ariaLabel,
|
|
85
|
-
ref,
|
|
86
|
-
...props
|
|
87
|
-
}: ThinkThreadPickerProps<Thread> & {
|
|
88
|
-
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
|
|
89
|
-
}): React.JSX.Element;
|
|
90
|
-
//#endregion
|
|
1
|
+
import { a as ThinkThreadStatusIndicatorsProps, i as ThinkThreadStatusIndicators, n as ThinkThreadPicker, o as ThinkThreadStatusSummary, r as ThinkThreadPickerProps, s as summarizeThinkThreads, t as ThinkThreadItem } from "../../ThinkThreadPicker-yetGX_s5.js";
|
|
91
2
|
export { ThinkThreadItem, ThinkThreadPicker, ThinkThreadPickerProps, ThinkThreadStatusIndicators, ThinkThreadStatusIndicatorsProps, ThinkThreadStatusSummary, summarizeThinkThreads };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon, K as SpinnerIcon, _ as DotIcon, et as WarningIcon, t as ArchiveIcon } from "../../icons-
|
|
2
|
+
import { B as PlusIcon, K as SpinnerIcon, _ as DotIcon, et as WarningIcon, t as ArchiveIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
6
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
7
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
8
|
-
import {
|
|
8
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
9
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
10
|
import { SearchField } from "../foundations/SearchField.js";
|
|
11
11
|
import * as React from "react";
|