@mcp-b/react-components 0.49.0 → 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-C_Jaw3Ia.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-H8mMg4rV.js → FileTree-okaLnS5j.js} +20 -9
- 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/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- package/dist/Popover-CgHG5DtS.d.ts +220 -0
- package/dist/{PromptInput-C4Mofitz.d.ts → PromptInput-DGPrCTPl.d.ts} +3 -2
- 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 +4 -4
- 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/AgentChatMessageEditor.js +5 -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 +2 -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 +2 -2
- package/dist/components/extension/CodexModelSelector.js +3 -3
- 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.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +3 -2
- package/dist/components/foundations/Dialog.d.ts +1 -106
- package/dist/components/foundations/Form.d.ts +1 -90
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.d.ts +1 -219
- package/dist/components/foundations/PreviewCard.d.ts +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Tooltip.d.ts +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/accessibility.css +20 -0
- package/dist/styles/agent-chat.css +1 -1
- package/dist/styles/base.css +0 -8
- package/dist/styles/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/employee-app.css +29 -0
- package/dist/styles/file-tree.css +5 -1
- package/dist/styles/index.css +2 -0
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/manager-work.css +93 -0
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- package/dist/utils/codex-model-catalog.d.ts +1 -135
- package/dist/utils/codex-model-catalog.js +22 -5
- 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 +3 -3
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
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
|
|
28
|
+
export { useOptionalThinkChatContext as a, ThinkChatValue as i, ThinkChatLiveContext as n, useOptionalThinkChatLive as o, ThinkChatLiveValue as r, useThinkChatContext as s, ThinkChatContext as t };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as ThinkExecutionRun } from "./ThinkExecutionRun-k8bpyXqt.js";
|
|
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
|
|
30
|
+
export { getThinkRoutineNextRun as i, ThinkRoutineOwner as n, ThinkRoutineRunOf as r, ThinkRoutine as t };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as React from "react";
|
|
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
|
|
91
|
+
export { ThinkThreadStatusIndicatorsProps as a, ThinkThreadStatusIndicators as i, ThinkThreadPicker as n, ThinkThreadStatusSummary as o, ThinkThreadPickerProps as r, summarizeThinkThreads as s, ThinkThreadItem as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as EyeIcon, d as CheckIcon, et as WarningIcon, k as MaximizeIcon, m as CodeIcon, r as ArrowLeftIcon, v as DownloadIcon } from "./icons-
|
|
1
|
+
import { b as EyeIcon, d as CheckIcon, et as WarningIcon, k as MaximizeIcon, m as CodeIcon, r as ArrowLeftIcon, v as DownloadIcon } from "./icons-CeGfXO21.js";
|
|
2
2
|
import { i as formatClock } from "./format-COCyV98Z.js";
|
|
3
|
+
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-BMK6CW9D.js";
|
|
3
4
|
import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
|
|
4
|
-
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-g8sADidM.js";
|
|
5
5
|
import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/agents-sdk/WorkspaceFile.js";
|
|
6
6
|
import { i as useWorkspaceNavigationContext } from "./WorkspaceLink-BYZG-V_I.js";
|
|
7
7
|
import { useWorkspaceNavigationRestoration } from "./components/agents-sdk/WorkspaceNavigationRestoration.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { O as MessageResponseProps } from "./Message-DyaTBiV7.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/WorkspaceMessageResponse.d.ts
|
|
5
|
+
interface WorkspaceFileRenderInput {
|
|
6
|
+
label: string;
|
|
7
|
+
path: string;
|
|
8
|
+
/** Shared workspace link element; hosts pass it through to the preview unchanged. */
|
|
9
|
+
sourceLink: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Host callback for one standalone workspace file link in an assistant
|
|
13
|
+
* paragraph. Return a node to replace the link, or `null` to keep it.
|
|
14
|
+
*/
|
|
15
|
+
type WorkspaceFileRenderer = (file: WorkspaceFileRenderInput) => React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Ambient workspace-file renderer for every `WorkspaceMessageResponse` below,
|
|
18
|
+
* and the only way to supply one. The value is read inside the promoted
|
|
19
|
+
* paragraph, not by the response component, so a host handing down a fresh
|
|
20
|
+
* callback every render re-renders only the paragraphs — the memoized Markdown
|
|
21
|
+
* pipeline is untouched and promoted cards keep their state.
|
|
22
|
+
* `ThinkChat.MessageContent` provides it from its `renderWorkspaceFile` prop; hosts
|
|
23
|
+
* composing `WorkspaceMessageResponse` directly provide it once at their
|
|
24
|
+
* conversation root.
|
|
25
|
+
*/
|
|
26
|
+
declare function WorkspaceFileRendererProvider({
|
|
27
|
+
children,
|
|
28
|
+
renderWorkspaceFile
|
|
29
|
+
}: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
renderWorkspaceFile: WorkspaceFileRenderer | undefined;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
interface WorkspaceMessageResponseProps extends MessageResponseProps {
|
|
34
|
+
/**
|
|
35
|
+
* Whether standalone workspace file links may be promoted. `ThinkChat`
|
|
36
|
+
* passes `false` for user messages: user links remain ordinary navigation.
|
|
37
|
+
*/
|
|
38
|
+
promoteWorkspaceFiles?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Adds workspace-aware Markdown links when rendered inside a workspace provider. */
|
|
41
|
+
declare const WorkspaceMessageResponse: React.MemoExoticComponent<({
|
|
42
|
+
components,
|
|
43
|
+
rehypePlugins,
|
|
44
|
+
promoteWorkspaceFiles,
|
|
45
|
+
...props
|
|
46
|
+
}: WorkspaceMessageResponseProps) => React.JSX.Element>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { WorkspaceMessageResponseProps as a, WorkspaceMessageResponse as i, WorkspaceFileRenderer as n, WorkspaceFileRendererProvider as r, WorkspaceFileRenderInput as t };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//#region src/utils/codex-model-catalog.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Codex app-server model catalog types.
|
|
4
|
+
*
|
|
5
|
+
* Upstream generates these types with ts-rs but does not publish them from
|
|
6
|
+
* `@openai/codex-sdk`. Keep the field names and shapes aligned with:
|
|
7
|
+
* https://github.com/openai/codex/tree/main/codex-rs/app-server-protocol/schema/typescript
|
|
8
|
+
*/
|
|
9
|
+
/** Canonical user-input modality tags advertised by a Codex model. */
|
|
10
|
+
type CodexInputModality = "text" | "image";
|
|
11
|
+
/** Codex intentionally keeps this open so new effort levels do not break clients. */
|
|
12
|
+
type CodexReasoningEffort = string;
|
|
13
|
+
type CodexReasoningEffortOption = {
|
|
14
|
+
reasoningEffort: CodexReasoningEffort;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
type CodexModelServiceTier = {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
type CodexModelUpgradeInfo = {
|
|
23
|
+
model: string;
|
|
24
|
+
upgradeCopy: string | null;
|
|
25
|
+
modelLink: string | null;
|
|
26
|
+
migrationMarkdown: string | null;
|
|
27
|
+
};
|
|
28
|
+
type CodexModelAvailabilityNux = {
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
/** Whole upstream `v2/Model` response shape from Codex app-server `model/list`. */
|
|
32
|
+
type CodexModel = {
|
|
33
|
+
id: string;
|
|
34
|
+
model: string;
|
|
35
|
+
upgrade: string | null;
|
|
36
|
+
upgradeInfo: CodexModelUpgradeInfo | null;
|
|
37
|
+
availabilityNux: CodexModelAvailabilityNux | null;
|
|
38
|
+
displayName: string;
|
|
39
|
+
description: string;
|
|
40
|
+
hidden: boolean;
|
|
41
|
+
supportedReasoningEfforts: CodexReasoningEffortOption[];
|
|
42
|
+
defaultReasoningEffort: CodexReasoningEffort;
|
|
43
|
+
inputModalities: CodexInputModality[];
|
|
44
|
+
supportsPersonality: boolean; /** @deprecated Upstream Codex uses `serviceTiers` for structured tier metadata. */
|
|
45
|
+
additionalSpeedTiers: string[];
|
|
46
|
+
serviceTiers: CodexModelServiceTier[];
|
|
47
|
+
defaultServiceTier: string | null;
|
|
48
|
+
isDefault: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** Whole upstream `v2/ModelListResponse` shape. */
|
|
51
|
+
type CodexModelListResponse = {
|
|
52
|
+
data: CodexModel[]; /** Opaque cursor for the next `model/list` request. */
|
|
53
|
+
nextCursor: string | null;
|
|
54
|
+
};
|
|
55
|
+
/** Known visible model ids from upstream Codex and its desktop catalog. */
|
|
56
|
+
declare const CODEX_MODEL_IDS: readonly ["gpt-6-astra", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2"];
|
|
57
|
+
type CodexModelId = (typeof CODEX_MODEL_IDS)[number];
|
|
58
|
+
/** Preserves literal ids and capability values for checked-in Codex catalogs. */
|
|
59
|
+
declare function defineCodexModels<const Models extends readonly CodexModel[]>(models: Models): Models;
|
|
60
|
+
/**
|
|
61
|
+
* Checked-in snapshot of Codex's upstream and desktop model catalogs.
|
|
62
|
+
* Display data for hosts without a live `model/list`; runtime account catalogs
|
|
63
|
+
* remain authoritative because availability differs by account and rollout.
|
|
64
|
+
*/
|
|
65
|
+
declare const CHECKED_IN_CODEX_MODELS: readonly [{
|
|
66
|
+
readonly id: "gpt-6-astra";
|
|
67
|
+
readonly model: "gpt-6-astra";
|
|
68
|
+
readonly displayName: "GPT-6 Astra";
|
|
69
|
+
readonly description: "Our most capable model for complex, demanding work.";
|
|
70
|
+
readonly supportedReasoningEfforts: [...CodexReasoningEffortOption[], CodexReasoningEffortOption, {
|
|
71
|
+
readonly reasoningEffort: "ultra";
|
|
72
|
+
readonly description: "Maximum reasoning with automatic task delegation";
|
|
73
|
+
}];
|
|
74
|
+
readonly defaultReasoningEffort: "medium";
|
|
75
|
+
readonly isDefault: false;
|
|
76
|
+
readonly upgrade: null;
|
|
77
|
+
readonly upgradeInfo: null;
|
|
78
|
+
readonly availabilityNux: null;
|
|
79
|
+
readonly hidden: boolean;
|
|
80
|
+
readonly inputModalities: ("text" | "image")[];
|
|
81
|
+
readonly supportsPersonality: boolean;
|
|
82
|
+
readonly additionalSpeedTiers: never[];
|
|
83
|
+
readonly serviceTiers: never[];
|
|
84
|
+
readonly defaultServiceTier: null;
|
|
85
|
+
}, {
|
|
86
|
+
readonly id: "gpt-5.6-sol";
|
|
87
|
+
readonly model: "gpt-5.6-sol";
|
|
88
|
+
readonly displayName: "GPT-5.6-Sol";
|
|
89
|
+
readonly description: "Fast agentic coding model for responsive everyday work.";
|
|
90
|
+
readonly supportedReasoningEfforts: [...CodexReasoningEffortOption[], CodexReasoningEffortOption];
|
|
91
|
+
readonly defaultReasoningEffort: "low";
|
|
92
|
+
readonly isDefault: false;
|
|
93
|
+
readonly upgrade: null;
|
|
94
|
+
readonly upgradeInfo: null;
|
|
95
|
+
readonly availabilityNux: null;
|
|
96
|
+
readonly hidden: boolean;
|
|
97
|
+
readonly inputModalities: ("text" | "image")[];
|
|
98
|
+
readonly supportsPersonality: boolean;
|
|
99
|
+
readonly additionalSpeedTiers: never[];
|
|
100
|
+
readonly serviceTiers: never[];
|
|
101
|
+
readonly defaultServiceTier: null;
|
|
102
|
+
}, {
|
|
103
|
+
readonly id: "gpt-5.6-terra";
|
|
104
|
+
readonly model: "gpt-5.6-terra";
|
|
105
|
+
readonly displayName: "GPT-5.6-Terra";
|
|
106
|
+
readonly description: "Balanced agentic coding model for everyday work.";
|
|
107
|
+
readonly supportedReasoningEfforts: [...CodexReasoningEffortOption[], CodexReasoningEffortOption];
|
|
108
|
+
readonly defaultReasoningEffort: "medium";
|
|
109
|
+
readonly isDefault: true;
|
|
110
|
+
readonly upgrade: null;
|
|
111
|
+
readonly upgradeInfo: null;
|
|
112
|
+
readonly availabilityNux: null;
|
|
113
|
+
readonly hidden: boolean;
|
|
114
|
+
readonly inputModalities: ("text" | "image")[];
|
|
115
|
+
readonly supportsPersonality: boolean;
|
|
116
|
+
readonly additionalSpeedTiers: never[];
|
|
117
|
+
readonly serviceTiers: never[];
|
|
118
|
+
readonly defaultServiceTier: null;
|
|
119
|
+
}, {
|
|
120
|
+
readonly id: "gpt-5.6-luna";
|
|
121
|
+
readonly model: "gpt-5.6-luna";
|
|
122
|
+
readonly displayName: "GPT-5.6-Luna";
|
|
123
|
+
readonly description: "Agentic coding model tuned for deliberate work.";
|
|
124
|
+
readonly supportedReasoningEfforts: [...CodexReasoningEffortOption[], CodexReasoningEffortOption];
|
|
125
|
+
readonly defaultReasoningEffort: "medium";
|
|
126
|
+
readonly isDefault: false;
|
|
127
|
+
readonly upgrade: null;
|
|
128
|
+
readonly upgradeInfo: null;
|
|
129
|
+
readonly availabilityNux: null;
|
|
130
|
+
readonly hidden: boolean;
|
|
131
|
+
readonly inputModalities: ("text" | "image")[];
|
|
132
|
+
readonly supportsPersonality: boolean;
|
|
133
|
+
readonly additionalSpeedTiers: never[];
|
|
134
|
+
readonly serviceTiers: never[];
|
|
135
|
+
readonly defaultServiceTier: null;
|
|
136
|
+
}, {
|
|
137
|
+
readonly id: "gpt-5.5";
|
|
138
|
+
readonly model: "gpt-5.5";
|
|
139
|
+
readonly displayName: "GPT-5.5";
|
|
140
|
+
readonly description: "Previous-generation agentic coding model.";
|
|
141
|
+
readonly supportedReasoningEfforts: CodexReasoningEffortOption[];
|
|
142
|
+
readonly defaultReasoningEffort: "medium";
|
|
143
|
+
readonly isDefault: false;
|
|
144
|
+
readonly upgrade: null;
|
|
145
|
+
readonly upgradeInfo: null;
|
|
146
|
+
readonly availabilityNux: null;
|
|
147
|
+
readonly hidden: boolean;
|
|
148
|
+
readonly inputModalities: ("text" | "image")[];
|
|
149
|
+
readonly supportsPersonality: boolean;
|
|
150
|
+
readonly additionalSpeedTiers: never[];
|
|
151
|
+
readonly serviceTiers: never[];
|
|
152
|
+
readonly defaultServiceTier: null;
|
|
153
|
+
}];
|
|
154
|
+
//#endregion
|
|
155
|
+
export { CodexModelAvailabilityNux as a, CodexModelServiceTier as c, CodexReasoningEffortOption as d, defineCodexModels as f, CodexModel as i, CodexModelUpgradeInfo as l, CODEX_MODEL_IDS as n, CodexModelId as o, CodexInputModality as r, CodexModelListResponse as s, CHECKED_IN_CODEX_MODELS as t, CodexReasoningEffort as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canRequestFavicon, inferFaviconUrl } from "../../utils/favicon.js";
|
|
2
|
-
import { D as LinkIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WarningIcon, tt as WrenchIcon } from "../../icons-
|
|
2
|
+
import { D as LinkIcon, P as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WarningIcon, tt as WrenchIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/agents-sdk/AgentActivity.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as PromptInputCommandDefinition, J as PromptInputMessage, r as PromptInput, vt as PromptInputTray } from "../../PromptInput-
|
|
2
|
-
import { r as AgentChatQueuedPrompt } from "../../AgentChatQueue-
|
|
3
|
-
import { AgentMessageRenderPartContext } from "
|
|
1
|
+
import { D as PromptInputCommandDefinition, J as PromptInputMessage, r as PromptInput, vt as PromptInputTray } from "../../PromptInput-DGPrCTPl.js";
|
|
2
|
+
import { r as AgentChatQueuedPrompt } from "../../AgentChatQueue-MrHhV901.js";
|
|
3
|
+
import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
|
|
4
4
|
import { i as MessageActions } from "../../Message-DyaTBiV7.js";
|
|
5
5
|
import { t as VirtualMessageScrollAnchor } from "../../MessageScrollerVirtual-D4afYwVB.js";
|
|
6
6
|
import { a as getPendingToolApprovals } from "../../PromptInputApproval-D2hpn54U.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { H as RefreshIcon, K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, t as ArchiveIcon } from "../../icons-cuEtsgj9.js";
|
|
3
2
|
import { ExpansionStateProvider } from "../ai-sdk/ExpansionState.js";
|
|
3
|
+
import { H as RefreshIcon, K as SpinnerIcon, Q as TrashIcon, R as PencilIcon, t as ArchiveIcon } from "../../icons-CeGfXO21.js";
|
|
4
|
+
import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
|
|
5
|
+
import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
|
|
4
6
|
import { Message, MessageAction, MessageActions, MessageCopyAction, MessageMeta, MessageTimestamp } from "../ai-sdk/Message.js";
|
|
5
|
-
import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
|
|
6
|
-
import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
|
|
7
7
|
import { AgentMessageParts } from "../ai-sdk/AgentMessageParts.js";
|
|
8
|
-
import {
|
|
8
|
+
import { Marker, MarkerContent } from "../foundations/Marker.js";
|
|
9
9
|
import { VirtualMessageScroller } from "../ai-sdk/MessageScrollerVirtual.js";
|
|
10
|
-
import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
|
|
11
10
|
import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemIndicator, QueueList } from "../ai-sdk/Queue.js";
|
|
12
|
-
import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
|
|
13
11
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
14
|
-
import { Marker, MarkerContent } from "../foundations/Marker.js";
|
|
15
12
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
13
|
+
import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
|
|
14
|
+
import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
|
|
15
|
+
import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
|
|
16
16
|
import * as React from "react";
|
|
17
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { useRender } from "@base-ui/react/use-render";
|
|
19
19
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
20
|
-
import { isCompactionMessage } from "agents/experimental/memory/utils";
|
|
21
20
|
import { isTextUIPart } from "ai";
|
|
21
|
+
import { isCompactionMessage } from "agents/experimental/memory/utils";
|
|
22
22
|
//#region src/components/agents-sdk/AgentChat.tsx
|
|
23
23
|
function observeAgentChatDock(element) {
|
|
24
24
|
if (!element || typeof ResizeObserver === "undefined") return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as useOptionalAgentChatQueue, n as AgentChatQueueProviderProps, r as AgentChatQueuedPrompt, t as AgentChatQueueProvider } from "../../AgentChatQueue-
|
|
1
|
+
import { i as useOptionalAgentChatQueue, n as AgentChatQueueProviderProps, r as AgentChatQueuedPrompt, t as AgentChatQueueProvider } from "../../AgentChatQueue-MrHhV901.js";
|
|
2
2
|
export { AgentChatQueueProvider, AgentChatQueueProviderProps, AgentChatQueuedPrompt, useOptionalAgentChatQueue };
|
|
@@ -2,9 +2,9 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
3
3
|
import { r as firstLine } from "../../format-COCyV98Z.js";
|
|
4
4
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
5
|
-
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
6
|
-
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
7
5
|
import { NaniteMark } from "../nanites/NaniteScene.js";
|
|
6
|
+
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
7
|
+
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { isTextUIPart } from "ai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as KeyboardIcon, H as RefreshIcon, r as ArrowLeftIcon } from "../../icons-
|
|
1
|
+
import { E as KeyboardIcon, H as RefreshIcon, r as ArrowLeftIcon } from "../../icons-CeGfXO21.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { WebPreviewNavigationButton } from "../general-purpose/WebPreview.js";
|
|
4
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, _ as DotIcon, k as MaximizeIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, _ as DotIcon, k as MaximizeIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
5
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { L as PauseIcon, z as PlayIcon } from "../../icons-
|
|
2
|
+
import { L as PauseIcon, z as PlayIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { i as formatClock } from "../../format-COCyV98Z.js";
|
|
5
5
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, nt as XIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Tabs } from "../foundations/Tabs.js";
|
|
4
4
|
import { WebPreview, WebPreviewEmpty, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl, WebPreviewViewport } from "../general-purpose/WebPreview.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SettingsFormDialogProps } from "../general-purpose/SettingsFormDialog.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/agents-sdk/DiscordConnectionDialog.d.ts
|
|
4
|
+
interface DiscordConnectionDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: SettingsFormDialogProps["onOpenChange"];
|
|
7
|
+
onSubmit: SettingsFormDialogProps["onFormSubmit"];
|
|
8
|
+
onRemove?: () => Promise<void>;
|
|
9
|
+
applicationId?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Shared connection form; the host owns validation, credentials and persistence. */
|
|
12
|
+
declare function DiscordConnectionDialog({
|
|
13
|
+
open,
|
|
14
|
+
onOpenChange,
|
|
15
|
+
onSubmit,
|
|
16
|
+
onRemove,
|
|
17
|
+
applicationId
|
|
18
|
+
}: DiscordConnectionDialogProps): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { DiscordConnectionDialog, DiscordConnectionDialogProps };
|
|
@@ -0,0 +1,65 @@
|
|
|
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/DiscordConnectionDialog.tsx
|
|
5
|
+
/** Shared connection form; the host owns validation, credentials and persistence. */
|
|
6
|
+
function DiscordConnectionDialog({ open, onOpenChange, onSubmit, onRemove, applicationId }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(SettingsFormDialog, {
|
|
8
|
+
open,
|
|
9
|
+
onOpenChange,
|
|
10
|
+
title: "Discord bot",
|
|
11
|
+
description: "Talk to your employee from Discord. Create a bot at discord.com/developers, enable the Message Content intent, and paste its credentials. DMs and @mentions get replies; each Discord thread becomes its own conversation here.",
|
|
12
|
+
submitLabel: "Connect",
|
|
13
|
+
removeLabel: onRemove ? "Disconnect" : void 0,
|
|
14
|
+
onFormSubmit: onSubmit,
|
|
15
|
+
onRemove,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(Field.Root, {
|
|
18
|
+
name: "applicationId",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Application ID" }),
|
|
21
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
22
|
+
autoComplete: "off",
|
|
23
|
+
defaultValue: applicationId,
|
|
24
|
+
required: true
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
27
|
+
match: "valueMissing",
|
|
28
|
+
children: "Application ID is required."
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsxs(Field.Root, {
|
|
33
|
+
name: "botToken",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Bot token" }),
|
|
36
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
37
|
+
type: "password",
|
|
38
|
+
autoComplete: "off",
|
|
39
|
+
required: true
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
42
|
+
match: "valueMissing",
|
|
43
|
+
children: "Bot token is required."
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsxs(Field.Root, {
|
|
48
|
+
name: "publicKey",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Public key" }),
|
|
51
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
52
|
+
autoComplete: "off",
|
|
53
|
+
required: true
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
56
|
+
match: "valueMissing",
|
|
57
|
+
children: "Public key is required."
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { DiscordConnectionDialog };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { EmployeeAgentRun, EmployeeBrand, EmployeeModelSetup, EmployeeShellProps, EmployeeStatus } from "./EmployeeChrome.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/EmployeeApp.d.ts
|
|
5
|
+
interface EmployeeAppProps extends EmployeeShellProps {
|
|
6
|
+
/** Application admission. Gates occupy the entire screen, without navigation. */
|
|
7
|
+
status: EmployeeStatus;
|
|
8
|
+
brand: EmployeeBrand;
|
|
9
|
+
modelSetup?: EmployeeModelSetup;
|
|
10
|
+
connectingLabel?: string;
|
|
11
|
+
/** Transcript hydration does not withdraw the parent's navigation or Stop controls. */
|
|
12
|
+
conversationLoading?: string;
|
|
13
|
+
/** Child transcript state; null means a parent chat, independently of toolbar state. */
|
|
14
|
+
conversationRun: EmployeeAgentRun | null;
|
|
15
|
+
/** Current output pane, or null when the conversation occupies the screen. */
|
|
16
|
+
workbench: React.ReactNode;
|
|
17
|
+
/** Host-bound live browser screen. */
|
|
18
|
+
live: React.ReactNode;
|
|
19
|
+
/** Host-bound schedule screen. */
|
|
20
|
+
schedules: React.ReactNode;
|
|
21
|
+
report?: React.ReactNode;
|
|
22
|
+
/** Render the extension or manager shell from this package using the same chrome state. */
|
|
23
|
+
shell: (props: EmployeeShellProps) => React.ReactNode;
|
|
24
|
+
/** Host-bound conversation. */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Canonical employee screen. Hosts keep chat providers mounted above it and
|
|
30
|
+
* supply live content; this component owns admission, navigation and layout.
|
|
31
|
+
*/
|
|
32
|
+
declare function EmployeeApp({
|
|
33
|
+
status,
|
|
34
|
+
brand,
|
|
35
|
+
modelSetup,
|
|
36
|
+
connectingLabel,
|
|
37
|
+
conversationLoading,
|
|
38
|
+
conversationRun,
|
|
39
|
+
workbench,
|
|
40
|
+
live,
|
|
41
|
+
schedules,
|
|
42
|
+
report,
|
|
43
|
+
shell,
|
|
44
|
+
ref,
|
|
45
|
+
children,
|
|
46
|
+
...chrome
|
|
47
|
+
}: EmployeeAppProps): React.JSX.Element;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { EmployeeApp, EmployeeAppProps };
|