@mcp-b/react-components 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentChat-Bibfj7u1.d.ts → AgentChat-BLmQghkt.d.ts} +2 -2
- package/dist/{CodeBlock-8K1p1BDU.js → CodeBlock-BpooTofO.js} +1 -1
- package/dist/{FileTree-QTP57Qz4.js → FileTree-CAXWXH63.js} +1 -1
- package/dist/{McpConnectorForm-MRm1r59e.d.ts → McpConnectorForm-BETdVBRk.d.ts} +1 -1
- package/dist/{McpPluginCatalog-mbGw8FTu.d.ts → McpPluginCatalog-C6ip9IvL.d.ts} +2 -2
- package/dist/{PromptInput-BRX7FhjH.d.ts → PromptInput-DtJHyp0S.d.ts} +27 -22
- package/dist/{SetupChecklist-CZeToAbu.js → SetupChecklist-DyPZWzK2.js} +2 -2
- package/dist/{ThinkChat-CWMcl79Q.js → ThinkChat-qztQ6Clo.js} +4 -1
- package/dist/{ThinkChatActivity-CgvmTXXB.d.ts → ThinkChatActivity-B3lGVS-6.d.ts} +1 -1
- package/dist/{WorkspaceFileView-DJ8Oxz57.js → WorkspaceFileView-BvDbKM2c.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChat.js +29 -30
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +2 -1
- package/dist/components/agents-sdk/ManagerOffice.js +28 -10
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +10 -4
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +9 -5
- package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +2 -2
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +5 -2
- package/dist/components/agents-sdk/PromptInputCommands.js +81 -3
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +1 -1
- package/dist/components/agents-sdk/ThinkSidepanel.js +22 -9
- package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- 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/WorkspaceMountManager.js +1 -1
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +1 -1
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.d.ts +27 -0
- package/dist/components/ai-sdk/ComposerLink.js +111 -0
- package/dist/components/ai-sdk/ConnectedAppCards.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 +18 -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.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +65 -59
- package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +31 -0
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +198 -0
- 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 +2 -2
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/AppIcon.js +1 -1
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/icons.d.ts +1 -1
- package/dist/components/foundations/icons.js +1 -1
- 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/PricingPlanCard.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +2 -2
- package/dist/{copy-button-BpA7wQva.js → copy-button-D7ySsRRo.js} +1 -1
- package/dist/{icons-DbrksZyY.js → icons-BNEY4gO5.js} +44 -4
- package/dist/{icons-6ZnyZJiR.d.ts → icons-D0Pd2P9v.d.ts} +9 -4
- package/dist/{mcp-server-SD_S-IpB.js → mcp-server-7NR24ASj.js} +31 -4
- package/dist/{mcp-server-catalog-CCj2ItkV.d.ts → mcp-server-catalog-Cbu483Zb.d.ts} +9 -9
- package/dist/{provider-logos-zjZycgV6.js → provider-logos-DWYY8wNz.js} +31 -6
- package/dist/styles/action-guide.css +4 -0
- package/dist/styles/agent-attention.css +5 -1
- package/dist/styles/agent-chat.css +21 -18
- package/dist/styles/app-icon.css +21 -0
- package/dist/styles/brand-marks.css +22 -0
- package/dist/styles/composer-link.css +99 -0
- package/dist/styles/connected-app-card.css +9 -0
- package/dist/styles/github-motion-mark.css +8 -1
- package/dist/styles/index.css +2 -0
- package/dist/styles/manager-office.css +10 -3
- package/dist/styles/mcp-plugin-catalog.css +4 -0
- package/dist/styles/mcp-server-picker.css +2 -0
- package/dist/styles/prompt-input.css +14 -53
- package/dist/styles/think-sidepanel.css +9 -0
- package/dist/utils/composer-link.d.ts +59 -0
- package/dist/utils/composer-link.js +203 -0
- package/dist/utils/mcp-server-catalog.d.ts +1 -1
- package/dist/utils/mcp-server-catalog.js +9 -9
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { W as SearchIcon, f as ChevronDownIcon } from "../../icons-
|
|
2
|
+
import { W as SearchIcon, f as ChevronDownIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
5
5
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
6
|
import { c as titleCase } from "../../format-COCyV98Z.js";
|
|
7
7
|
import { Separator } from "../foundations/Separator.js";
|
|
8
8
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
9
|
-
import { t as ProviderLogo } from "../../provider-logos-
|
|
9
|
+
import { t as ProviderLogo } from "../../provider-logos-DWYY8wNz.js";
|
|
10
10
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { D as PromptInputCommandDefinition } from "../../PromptInput-
|
|
1
|
+
import { D as PromptInputCommandDefinition } from "../../PromptInput-DtJHyp0S.js";
|
|
2
|
+
import { ConversationTabPickerItem } from "../extension/ConversationTabPicker.js";
|
|
2
3
|
import { MCPServersState } from "agents";
|
|
3
4
|
import { SkillDescriptor } from "agents/skills";
|
|
4
5
|
|
|
@@ -7,5 +8,7 @@ import { SkillDescriptor } from "agents/skills";
|
|
|
7
8
|
declare function mcpPromptInputCommands(mcp: MCPServersState): PromptInputCommandDefinition[];
|
|
8
9
|
/** Project whole upstream skill descriptors into composer slash commands. */
|
|
9
10
|
declare function skillPromptInputCommands(skills: readonly SkillDescriptor[]): PromptInputCommandDefinition[];
|
|
11
|
+
/** Project host-resolved browser tabs into composer `@` mentions. */
|
|
12
|
+
declare function tabPromptInputCommands(tabs: readonly ConversationTabPickerItem[]): PromptInputCommandDefinition[];
|
|
10
13
|
//#endregion
|
|
11
|
-
export { mcpPromptInputCommands, skillPromptInputCommands };
|
|
14
|
+
export { mcpPromptInputCommands, skillPromptInputCommands, tabPromptInputCommands };
|
|
@@ -1,6 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { composerLinkHref } from "../../utils/composer-link.js";
|
|
2
|
+
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
+
import { A as McpIcon, c as BoxIcon } from "../../icons-BNEY4gO5.js";
|
|
4
|
+
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
2
5
|
import { jsx } from "react/jsx-runtime";
|
|
3
6
|
//#region src/components/agents-sdk/PromptInputCommands.tsx
|
|
7
|
+
function mcpServerCommandIcon(server) {
|
|
8
|
+
const card = findCatalogMcpServerCard({
|
|
9
|
+
id: server.name,
|
|
10
|
+
name: server.name,
|
|
11
|
+
url: server.server_url
|
|
12
|
+
});
|
|
13
|
+
const src = card ? getMcpServerIconSrc(card) : void 0;
|
|
14
|
+
if (!src) return /* @__PURE__ */ jsx(McpIcon, {});
|
|
15
|
+
return /* @__PURE__ */ jsx("img", {
|
|
16
|
+
alt: "",
|
|
17
|
+
className: "sigvelo-brand-mark sigvelo-brand-mark--colorful",
|
|
18
|
+
decoding: "async",
|
|
19
|
+
referrerPolicy: "no-referrer",
|
|
20
|
+
src
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function mcpServerIconSrc(server) {
|
|
24
|
+
const card = findCatalogMcpServerCard({
|
|
25
|
+
id: server.name,
|
|
26
|
+
name: server.name,
|
|
27
|
+
url: server.server_url
|
|
28
|
+
});
|
|
29
|
+
return card ? getMcpServerIconSrc(card) : void 0;
|
|
30
|
+
}
|
|
31
|
+
function tabCommandLabel(tab) {
|
|
32
|
+
const title = tab.title?.trim();
|
|
33
|
+
if (title) return title;
|
|
34
|
+
if (!tab.url) return `Tab ${tab.id}`;
|
|
35
|
+
try {
|
|
36
|
+
return new URL(tab.url).hostname.replace(/^www\./, "") || tab.url;
|
|
37
|
+
} catch {
|
|
38
|
+
return tab.url;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
4
41
|
/** Project whole upstream Agents MCP state into composer mention commands. */
|
|
5
42
|
function mcpPromptInputCommands(mcp) {
|
|
6
43
|
return Object.entries(mcp.servers).flatMap(([id, server]) => server.state === "ready" ? [{
|
|
@@ -8,7 +45,14 @@ function mcpPromptInputCommands(mcp) {
|
|
|
8
45
|
value: id,
|
|
9
46
|
label: server.name,
|
|
10
47
|
description: server.server_url,
|
|
11
|
-
icon:
|
|
48
|
+
icon: mcpServerCommandIcon(server),
|
|
49
|
+
iconSrc: mcpServerIconSrc(server),
|
|
50
|
+
href: composerLinkHref({
|
|
51
|
+
kind: "mcp",
|
|
52
|
+
value: id,
|
|
53
|
+
label: server.name,
|
|
54
|
+
iconSrc: mcpServerIconSrc(server)
|
|
55
|
+
}),
|
|
12
56
|
keywords: [id, server.server_url],
|
|
13
57
|
group: "Connected MCP servers",
|
|
14
58
|
meta: "Connected"
|
|
@@ -21,6 +65,11 @@ function skillPromptInputCommands(skills) {
|
|
|
21
65
|
value: skill.name,
|
|
22
66
|
label: skill.name,
|
|
23
67
|
description: skill.description,
|
|
68
|
+
href: composerLinkHref({
|
|
69
|
+
kind: "skill",
|
|
70
|
+
value: skill.name,
|
|
71
|
+
label: skill.name
|
|
72
|
+
}),
|
|
24
73
|
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
25
74
|
...skill.sourceId ? {
|
|
26
75
|
keywords: [skill.sourceId],
|
|
@@ -29,5 +78,34 @@ function skillPromptInputCommands(skills) {
|
|
|
29
78
|
group: "Skills"
|
|
30
79
|
}));
|
|
31
80
|
}
|
|
81
|
+
/** Project host-resolved browser tabs into composer `@` mentions. */
|
|
82
|
+
function tabPromptInputCommands(tabs) {
|
|
83
|
+
return tabs.map((tab) => {
|
|
84
|
+
const label = tabCommandLabel(tab);
|
|
85
|
+
const value = String(tab.id);
|
|
86
|
+
return {
|
|
87
|
+
id: `tab:${value}`,
|
|
88
|
+
value,
|
|
89
|
+
label,
|
|
90
|
+
description: tab.url,
|
|
91
|
+
iconSrc: tab.iconSrc,
|
|
92
|
+
href: composerLinkHref({
|
|
93
|
+
kind: "tab",
|
|
94
|
+
value,
|
|
95
|
+
label,
|
|
96
|
+
iconSrc: tab.iconSrc
|
|
97
|
+
}),
|
|
98
|
+
icon: tab.iconSrc ? /* @__PURE__ */ jsx("img", {
|
|
99
|
+
alt: "",
|
|
100
|
+
className: "sigvelo-brand-mark sigvelo-brand-mark--colorful",
|
|
101
|
+
decoding: "async",
|
|
102
|
+
referrerPolicy: "no-referrer",
|
|
103
|
+
src: tab.iconSrc
|
|
104
|
+
}) : void 0,
|
|
105
|
+
keywords: [tab.url, tab.title].filter((term) => Boolean(term)),
|
|
106
|
+
group: "Tabs"
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
}
|
|
32
110
|
//#endregion
|
|
33
|
-
export { mcpPromptInputCommands, skillPromptInputCommands };
|
|
111
|
+
export { mcpPromptInputCommands, skillPromptInputCommands, tabPromptInputCommands };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Y as StopIcon, d as CheckIcon, et as WarningIcon, q as SpinnerIcon } from "../../icons-
|
|
2
|
+
import { Y as StopIcon, d as CheckIcon, et as WarningIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { r as firstLine, s as textLines } from "../../format-COCyV98Z.js";
|
|
4
4
|
import { NaniteMark } from "../nanites/NaniteScene.js";
|
|
5
5
|
import "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
|
|
2
|
-
import { K as PromptInputMessage } from "../../PromptInput-
|
|
3
|
-
import { r as AgentChatProps } from "../../AgentChat-
|
|
2
|
+
import { K as PromptInputMessage } from "../../PromptInput-DtJHyp0S.js";
|
|
3
|
+
import { r as AgentChatProps } from "../../AgentChat-BLmQghkt.js";
|
|
4
4
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
|
|
5
5
|
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
6
|
-
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-
|
|
6
|
+
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-B3lGVS-6.js";
|
|
7
7
|
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
8
8
|
import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
|
|
9
9
|
import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-D66ty4FO.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
1
|
+
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-qztQ6Clo.js";
|
|
2
2
|
export { ThinkChat, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-B3lGVS-6.js";
|
|
2
2
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
2
|
import { Tabs } from "../foundations/Tabs.js";
|
|
3
3
|
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
4
|
-
import { t as CodeBlock } from "../../CodeBlock-
|
|
4
|
+
import { t as CodeBlock } from "../../CodeBlock-BpooTofO.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
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-BNEY4gO5.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
5
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { R as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-
|
|
2
|
+
import { R as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.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
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { U as RefreshIcon, et as WarningIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-
|
|
2
|
+
import { U as RefreshIcon, et as WarningIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
2
|
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
|
|
3
3
|
import { n as ResponsiveSidebarShell, t as AppBarSlots } from "../../ResponsiveSidebarShell-BTVPxLJK.js";
|
|
4
|
-
import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-
|
|
4
|
+
import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-C6ip9IvL.js";
|
|
5
5
|
import { ThinkChatMessagesProps } from "./ThinkChat.js";
|
|
6
6
|
import { ThinkThreadStatusSummary } from "./ThinkThreadPicker.js";
|
|
7
7
|
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Dq-GC0_T.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, c as BoxIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, c as BoxIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { Menu } from "../foundations/Menu.js";
|
|
5
5
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
6
6
|
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
7
7
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
8
8
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DtH66bAY.js";
|
|
9
|
-
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
9
|
+
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-qztQ6Clo.js";
|
|
10
10
|
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
11
11
|
import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
|
|
12
12
|
import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { V as PlusIcon } from "../../icons-
|
|
2
|
+
import { V as PlusIcon } from "../../icons-BNEY4gO5.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, q as SpinnerIcon, r as ArrowLeftIcon } from "../../icons-
|
|
2
|
+
import { d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, q as SpinnerIcon, r as ArrowLeftIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Field } from "../foundations/Field.js";
|
|
5
5
|
import { Form } from "../foundations/Form.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { $ as TrashIcon, B as PlayIcon, q as SpinnerIcon, z as PencilIcon } from "../../icons-
|
|
2
|
+
import { $ as TrashIcon, B as PlayIcon, q as SpinnerIcon, z as PencilIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
5
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { A as McpIcon, C as FolderIcon, H as QueueIcon, J as SquareIcon, K as SlackIcon, L as PaperclipIcon, Q as TerminalIcon, S as FileIcon, T as InfoIcon, b as EyeIcon, c as BoxIcon, et as WarningIcon, g as DiscordIcon, o as ArrowUpRightIcon, q as SpinnerIcon, r as ArrowLeftIcon, y as EllipsisIcon, z as PencilIcon } from "../../icons-
|
|
2
|
+
import { A as McpIcon, C as FolderIcon, H as QueueIcon, J as SquareIcon, K as SlackIcon, L as PaperclipIcon, Q as TerminalIcon, S as FileIcon, T as InfoIcon, b as EyeIcon, c as BoxIcon, et as WarningIcon, g as DiscordIcon, o as ArrowUpRightIcon, q as SpinnerIcon, r as ArrowLeftIcon, y as EllipsisIcon, z as PencilIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { Menu } from "../foundations/Menu.js";
|
|
6
6
|
import { Dialog } from "../foundations/Dialog.js";
|
|
7
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
|
-
import { ChatGptSignInScreen } from "../extension/ChatGptSignInScreen.js";
|
|
9
7
|
import { Avatar } from "../foundations/Avatar.js";
|
|
10
8
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
9
|
+
import { n as findCatalogMcpServerCard, t as McpServerIcon } from "../../mcp-server-7NR24ASj.js";
|
|
10
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
11
|
+
import { ChatGptSignInScreen } from "../extension/ChatGptSignInScreen.js";
|
|
11
12
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
12
13
|
import { Switch } from "../foundations/Switch.js";
|
|
13
14
|
import { useTheme } from "../foundations/ThemeProvider.js";
|
|
14
15
|
import "../foundations/icons.js";
|
|
15
16
|
import { ActionGuide } from "../general-purpose/ActionGuide.js";
|
|
16
17
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
17
|
-
import { t as SetupChecklistAction } from "../../SetupChecklist-
|
|
18
|
+
import { t as SetupChecklistAction } from "../../SetupChecklist-DyPZWzK2.js";
|
|
18
19
|
import { NaniteMark } from "../nanites/NaniteScene.js";
|
|
19
20
|
import { SubagentRunLabel } from "./SubagentRunIndicator.js";
|
|
20
21
|
import { McpServerPickerAction, McpServerPickerItems } from "./McpServerPicker.js";
|
|
@@ -396,7 +397,7 @@ function StartComposerTray({ plugins, renderLink, start }) {
|
|
|
396
397
|
type: "button",
|
|
397
398
|
variant: "ghost",
|
|
398
399
|
color: "neutral",
|
|
399
|
-
size: "
|
|
400
|
+
size: "sm",
|
|
400
401
|
disabled: start.attachFolderBusy,
|
|
401
402
|
onClick: start.onAttachFolder,
|
|
402
403
|
"aria-label": "Connect a local folder",
|
|
@@ -406,17 +407,17 @@ function StartComposerTray({ plugins, renderLink, start }) {
|
|
|
406
407
|
type: "button",
|
|
407
408
|
variant: "ghost",
|
|
408
409
|
color: "neutral",
|
|
409
|
-
size: "
|
|
410
|
+
size: "sm",
|
|
410
411
|
render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
|
|
411
412
|
"aria-label": "Connect plugins",
|
|
412
413
|
children: [/* @__PURE__ */ jsx("span", { children: "Connect plugins" }), /* @__PURE__ */ jsxs(AppIcon.Stack, {
|
|
413
414
|
"aria-hidden": "true",
|
|
414
415
|
children: [/* @__PURE__ */ jsx(AppIcon.Root, {
|
|
415
|
-
size: "
|
|
416
|
+
size: "xs",
|
|
416
417
|
variant: "surface",
|
|
417
418
|
children: /* @__PURE__ */ jsx(SlackIcon, {})
|
|
418
419
|
}), /* @__PURE__ */ jsx(AppIcon.Root, {
|
|
419
|
-
size: "
|
|
420
|
+
size: "xs",
|
|
420
421
|
variant: "surface",
|
|
421
422
|
children: /* @__PURE__ */ jsx(DiscordIcon, {})
|
|
422
423
|
})]
|
|
@@ -459,6 +460,18 @@ function StartComposerTray({ plugins, renderLink, start }) {
|
|
|
459
460
|
}) })] }) : null
|
|
460
461
|
] });
|
|
461
462
|
}
|
|
463
|
+
function mentionSuggestionIcon(value) {
|
|
464
|
+
const token = value.match(/^@([^\s]+)/)?.[1];
|
|
465
|
+
const card = token ? findCatalogMcpServerCard({
|
|
466
|
+
id: token,
|
|
467
|
+
name: token
|
|
468
|
+
}) : void 0;
|
|
469
|
+
if (!card) return /* @__PURE__ */ jsx(McpIcon, {});
|
|
470
|
+
return /* @__PURE__ */ jsx(McpServerIcon, {
|
|
471
|
+
server: card,
|
|
472
|
+
size: "xs"
|
|
473
|
+
});
|
|
474
|
+
}
|
|
462
475
|
function startStarters(brandName, start, onShowGuide) {
|
|
463
476
|
return {
|
|
464
477
|
"aria-label": "Suggested prompts",
|
|
@@ -478,7 +491,7 @@ function startStarters(brandName, start, onShowGuide) {
|
|
|
478
491
|
...start.suggestions?.map((suggestion, index) => ({
|
|
479
492
|
id: `suggestion:${index}:${suggestion.value}:${suggestion.label}`,
|
|
480
493
|
label: suggestion.label,
|
|
481
|
-
icon: suggestion.value.startsWith("/") ? /* @__PURE__ */ jsx(BoxIcon, {}) : suggestion.value.startsWith("@") ?
|
|
494
|
+
icon: suggestion.value.startsWith("/") ? /* @__PURE__ */ jsx(BoxIcon, {}) : suggestion.value.startsWith("@") ? mentionSuggestionIcon(suggestion.value) : /* @__PURE__ */ jsx(EyeIcon, {})
|
|
482
495
|
})) ?? []
|
|
483
496
|
],
|
|
484
497
|
onSelect: (item) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { V as PlusIcon, _ as DotIcon, et as WarningIcon, q as SpinnerIcon, t as ArchiveIcon } from "../../icons-
|
|
2
|
+
import { V as PlusIcon, _ as DotIcon, et as WarningIcon, q as SpinnerIcon, t as ArchiveIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
5
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchField } from "../foundations/SearchField.js";
|
|
2
|
-
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
2
|
+
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-CAXWXH63.js";
|
|
3
3
|
import { WorkspaceHeader } from "./WorkspaceHeader.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
3
|
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
|
|
4
4
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
5
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-BvDbKM2c.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-BvDbKM2c.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as PaperclipIcon } from "../../icons-
|
|
1
|
+
import { L as PaperclipIcon } from "../../icons-BNEY4gO5.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
4
4
|
import { Popover } from "../foundations/Popover.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
3
|
import { useExpansionState } from "./ExpansionState.js";
|
|
4
|
-
import { p as ChevronRightIcon } from "../../icons-
|
|
4
|
+
import { p as ChevronRightIcon } from "../../icons-BNEY4gO5.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ai-sdk/Activity.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { nt as XIcon } from "../../icons-
|
|
2
|
+
import { nt as XIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { PromptInputTray } from "./PromptInput.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { z as PencilIcon } from "../../icons-
|
|
2
|
+
import { z as PencilIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Kbd } from "../foundations/Kbd.js";
|
|
5
5
|
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { et as WarningIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-
|
|
2
|
+
import { et as WarningIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
2
|
-
import { E as IconProps } from "../../icons-
|
|
2
|
+
import { E as IconProps } from "../../icons-D0Pd2P9v.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ai-sdk/ChainOfThought.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { _ as DotIcon, d as CheckIcon, p as ChevronRightIcon, q as SpinnerIcon } from "../../icons-
|
|
3
|
+
import { _ as DotIcon, d as CheckIcon, p as ChevronRightIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/ChainOfThought.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { s as BookmarkIcon } from "../../icons-
|
|
2
|
+
import { s as BookmarkIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Marker, MarkerIcon } from "../foundations/Marker.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-
|
|
1
|
+
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-BpooTofO.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ParsedComposerLink } from "../../utils/composer-link.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ai-sdk/ComposerLink.d.ts
|
|
5
|
+
interface ComposerLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
6
|
+
href: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function composerLinkIconSrc(parts: ParsedComposerLink | undefined): string | undefined;
|
|
10
|
+
declare function composerLinkUsesCube(parts: ParsedComposerLink | undefined): boolean;
|
|
11
|
+
declare function composerLinkAccent(parts: ParsedComposerLink | undefined): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Inline identity link for composer entities: slash commands, MCP mentions,
|
|
14
|
+
* skills, tabs, and files. The href is the source of truth; the visible node
|
|
15
|
+
* is text plus an optional brand mark, not a button chip.
|
|
16
|
+
*/
|
|
17
|
+
declare function ComposerLink({
|
|
18
|
+
href,
|
|
19
|
+
icon,
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
onClick,
|
|
23
|
+
style,
|
|
24
|
+
...props
|
|
25
|
+
}: ComposerLinkProps): React.JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ComposerLink, ComposerLinkProps, composerLinkAccent, composerLinkIconSrc, composerLinkUsesCube };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { brandHexFromIconSrc, parseComposerHref, sampleImageAccent } from "../../utils/composer-link.js";
|
|
2
|
+
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
4
|
+
import { c as BoxIcon } from "../../icons-BNEY4gO5.js";
|
|
5
|
+
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/ai-sdk/ComposerLink.tsx
|
|
9
|
+
function composerLinkIconSrc(parts) {
|
|
10
|
+
if (!parts) return void 0;
|
|
11
|
+
if (parts.iconSrc) return parts.iconSrc;
|
|
12
|
+
if (parts.kind !== "mcp") return void 0;
|
|
13
|
+
const card = findCatalogMcpServerCard({
|
|
14
|
+
id: parts.value,
|
|
15
|
+
name: parts.value
|
|
16
|
+
});
|
|
17
|
+
return card ? getMcpServerIconSrc(card) : void 0;
|
|
18
|
+
}
|
|
19
|
+
function composerLinkUsesCube(parts) {
|
|
20
|
+
if (!parts) return false;
|
|
21
|
+
if (parts.chromeIcon === "box") return true;
|
|
22
|
+
return !composerLinkIconSrc(parts) && (parts.kind === "command" || parts.kind === "skill");
|
|
23
|
+
}
|
|
24
|
+
function composerLinkAccent(parts) {
|
|
25
|
+
const fromHref = brandHexFromIconSrc(parts?.iconSrc);
|
|
26
|
+
if (fromHref) return fromHref;
|
|
27
|
+
const fromSrc = brandHexFromIconSrc(composerLinkIconSrc(parts));
|
|
28
|
+
if (fromSrc) return fromSrc;
|
|
29
|
+
if (parts?.kind !== "mcp") return void 0;
|
|
30
|
+
const card = findCatalogMcpServerCard({
|
|
31
|
+
id: parts.value,
|
|
32
|
+
name: parts.value
|
|
33
|
+
});
|
|
34
|
+
return card ? brandHexFromIconSrc(getMcpServerIconSrc(card)) : void 0;
|
|
35
|
+
}
|
|
36
|
+
function applyComposerLinkColor(element, color) {
|
|
37
|
+
if (color) element.style.setProperty("--composer-link-color", color);
|
|
38
|
+
}
|
|
39
|
+
function bindSampledIconColor(link, known) {
|
|
40
|
+
if (known) {
|
|
41
|
+
applyComposerLinkColor(link, known);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const image = link.querySelector("img");
|
|
45
|
+
if (!(image instanceof HTMLImageElement)) return;
|
|
46
|
+
const apply = () => {
|
|
47
|
+
const sampled = sampleImageAccent(image);
|
|
48
|
+
if (sampled) applyComposerLinkColor(link, sampled);
|
|
49
|
+
};
|
|
50
|
+
if (image.complete) apply();
|
|
51
|
+
else image.addEventListener("load", apply, { once: true });
|
|
52
|
+
}
|
|
53
|
+
function ComposerLinkIcon({ icon, parts }) {
|
|
54
|
+
if (icon) return /* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "composer-link__icon",
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
children: icon
|
|
58
|
+
});
|
|
59
|
+
const src = composerLinkIconSrc(parts);
|
|
60
|
+
if (src) return /* @__PURE__ */ jsx("img", {
|
|
61
|
+
alt: "",
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: "composer-link__icon",
|
|
64
|
+
decoding: "async",
|
|
65
|
+
draggable: false,
|
|
66
|
+
referrerPolicy: "no-referrer",
|
|
67
|
+
src
|
|
68
|
+
});
|
|
69
|
+
if (composerLinkUsesCube(parts)) return /* @__PURE__ */ jsx(BoxIcon, { className: "composer-link__icon" });
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Inline identity link for composer entities: slash commands, MCP mentions,
|
|
74
|
+
* skills, tabs, and files. The href is the source of truth; the visible node
|
|
75
|
+
* is text plus an optional brand mark, not a button chip.
|
|
76
|
+
*/
|
|
77
|
+
function ComposerLink({ href, icon, className, children, onClick, style, ...props }) {
|
|
78
|
+
const parts = parseComposerHref(href);
|
|
79
|
+
const kind = parts?.kind;
|
|
80
|
+
const accent = composerLinkAccent(parts);
|
|
81
|
+
const linkRef = React.useRef(null);
|
|
82
|
+
React.useLayoutEffect(() => {
|
|
83
|
+
const link = linkRef.current;
|
|
84
|
+
if (link) bindSampledIconColor(link, accent);
|
|
85
|
+
}, [accent, href]);
|
|
86
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
87
|
+
ref: linkRef,
|
|
88
|
+
className: cx("composer-link", className),
|
|
89
|
+
"data-composer-link": kind,
|
|
90
|
+
href,
|
|
91
|
+
rel: "nofollow",
|
|
92
|
+
style: accent ? {
|
|
93
|
+
"--composer-link-color": accent,
|
|
94
|
+
...style
|
|
95
|
+
} : style,
|
|
96
|
+
onClick: (event) => {
|
|
97
|
+
event.preventDefault();
|
|
98
|
+
onClick?.(event);
|
|
99
|
+
},
|
|
100
|
+
...props,
|
|
101
|
+
children: [/* @__PURE__ */ jsx(ComposerLinkIcon, {
|
|
102
|
+
icon,
|
|
103
|
+
parts
|
|
104
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
105
|
+
className: "composer-link__label",
|
|
106
|
+
children
|
|
107
|
+
})]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { ComposerLink, composerLinkAccent, composerLinkIconSrc, composerLinkUsesCube };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SlackIcon, O as MailIcon, _ as DotIcon, d as CheckIcon, nt as XIcon, u as CalendarIcon } from "../../icons-
|
|
2
|
+
import { K as SlackIcon, O as MailIcon, _ as DotIcon, d as CheckIcon, nt as XIcon, u as CalendarIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Field } from "../foundations/Field.js";
|
|
5
5
|
import { Textarea } from "../foundations/Textarea.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { n as ArrowDownIcon, v as DownloadIcon } from "../../icons-
|
|
2
|
+
import { n as ArrowDownIcon, v as DownloadIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { t as assignRef } from "../../merge-refs-DF_7w2x_.js";
|
|
5
5
|
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport } from "./MessageScroller.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { $ as TrashIcon, B as PlayIcon, R as PauseIcon, Z as TargetIcon } from "../../icons-
|
|
2
|
+
import { $ as TrashIcon, B as PlayIcon, R as PauseIcon, Z as TargetIcon } from "../../icons-BNEY4gO5.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
5
|
import * as React from "react";
|