@mcp-b/react-components 0.43.0 → 0.44.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/{CodeBlock-BjELA-_s.js → CodeBlock-Dl7a3Wqo.js} +1 -1
- package/dist/{FileTree-DMYRdT6R.js → FileTree-Uu3ZnW1u.js} +1 -1
- package/dist/{SetupChecklist-H1JRCIIe.js → SetupChecklist-DOp-zqjh.js} +1 -1
- package/dist/{WorkspaceFileView-DWMKxX_u.js → WorkspaceFileView-BublZXky.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +10 -10
- package/dist/components/agents-sdk/BrowserLiveScreen.js +4 -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.js +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- 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.js +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.js +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +3 -2
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -7
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +34 -18
- package/dist/components/agents-sdk/ThinkRoutineForm.js +395 -110
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +4 -4
- package/dist/components/agents-sdk/ThinkSidepanel.js +71 -16
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/ConnectedAppCards.d.ts +106 -0
- package/dist/components/ai-sdk/ConnectedAppCards.js +416 -0
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +1 -1
- 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.js +3 -3
- package/dist/components/ai-sdk/Queue.js +2 -2
- package/dist/components/ai-sdk/Reasoning.js +2 -2
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/ai-sdk/ToolInvocation.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -3
- package/dist/components/extension/ChatGptSignInScreen.js +7 -20
- 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/DescriptionList.d.ts +3 -0
- package/dist/components/foundations/DescriptionList.js +2 -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 +2 -2
- package/dist/components/foundations/icons.js +2 -2
- 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/PricingUsageCalculator.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- 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 +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +1 -1
- package/dist/{copy-button-lys9N_aI.js → copy-button-DHhf-J1d.js} +1 -1
- package/dist/{icons-0corjfxR.d.ts → icons-6ZnyZJiR.d.ts} +6 -1
- package/dist/{icons-CVFSeTJn.js → icons-Dw-im7lg.js} +4 -3
- package/dist/styles/browser-live-screen.css +3 -0
- package/dist/styles/button.css +1 -5
- package/dist/styles/chatgpt-sign-in-screen.css +87 -43
- package/dist/styles/connected-app-card.css +54 -0
- package/dist/styles/description-list.css +25 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/think-routine-library.css +28 -0
- package/package.json +2 -2
|
@@ -0,0 +1,416 @@
|
|
|
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-Dw-im7lg.js";
|
|
3
|
+
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { Field } from "../foundations/Field.js";
|
|
5
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
6
|
+
import { Input } from "../foundations/Input.js";
|
|
7
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
|
+
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/ai-sdk/ConnectedAppCards.tsx
|
|
12
|
+
const STATE_ICON = {
|
|
13
|
+
pending: DotIcon,
|
|
14
|
+
sent: CheckIcon,
|
|
15
|
+
denied: XIcon
|
|
16
|
+
};
|
|
17
|
+
function useDecision(handlers) {
|
|
18
|
+
const [reason, setReason] = React.useState("");
|
|
19
|
+
const [busy, setBusy] = React.useState(false);
|
|
20
|
+
const [errorMessage, setErrorMessage] = React.useState("");
|
|
21
|
+
const run = async (work) => {
|
|
22
|
+
if (busy) return;
|
|
23
|
+
setBusy(true);
|
|
24
|
+
setErrorMessage("");
|
|
25
|
+
try {
|
|
26
|
+
await work();
|
|
27
|
+
} catch (error) {
|
|
28
|
+
setErrorMessage(error instanceof Error && error.message.trim() ? error.message : "The decision could not be submitted. Try again.");
|
|
29
|
+
} finally {
|
|
30
|
+
setBusy(false);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
busy,
|
|
35
|
+
errorMessage,
|
|
36
|
+
reason,
|
|
37
|
+
setReason,
|
|
38
|
+
discard: handlers.onDiscard ? () => run(handlers.onDiscard) : void 0,
|
|
39
|
+
reject: handlers.onReject ? () => run(() => handlers.onReject(reason.trim())) : void 0,
|
|
40
|
+
send: handlers.onSend ? () => run(handlers.onSend) : void 0
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function FieldList({ children, editing, items, onFieldChange }) {
|
|
44
|
+
const fieldId = React.useId();
|
|
45
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [items.length > 0 ? /* @__PURE__ */ jsx(DescriptionList.Root, {
|
|
46
|
+
align: "start",
|
|
47
|
+
variant: "divided",
|
|
48
|
+
children: items.map((item) => {
|
|
49
|
+
const inputId = `${fieldId}-${item.name}`;
|
|
50
|
+
return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: editing ? /* @__PURE__ */ jsx("label", {
|
|
51
|
+
htmlFor: inputId,
|
|
52
|
+
children: item.term
|
|
53
|
+
}) : item.term }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: editing ? /* @__PURE__ */ jsx(Input, {
|
|
54
|
+
id: inputId,
|
|
55
|
+
name: item.name,
|
|
56
|
+
value: item.value,
|
|
57
|
+
autoComplete: "off",
|
|
58
|
+
onChange: (event) => onFieldChange?.(item.name, event.currentTarget.value)
|
|
59
|
+
}) : item.display ?? item.value })] }, item.name);
|
|
60
|
+
})
|
|
61
|
+
}) : null, children] });
|
|
62
|
+
}
|
|
63
|
+
function StateIndicator({ state, labels }) {
|
|
64
|
+
const Icon = STATE_ICON[state];
|
|
65
|
+
return /* @__PURE__ */ jsxs(CardAction, {
|
|
66
|
+
className: "connected-app-card__status",
|
|
67
|
+
"data-state": state,
|
|
68
|
+
children: [/* @__PURE__ */ jsx(Icon, { size: 14 }), labels[state]]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function ConnectedAppCardFrame({ children, className, icon, kind, sendLabel, slot, state = "pending", stateLabels, onDiscard, onReject, onSend, ref, ...props }) {
|
|
72
|
+
const titleId = React.useId();
|
|
73
|
+
const ariaLabel = props["aria-label"];
|
|
74
|
+
const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
|
|
75
|
+
const hasDecision = state === "pending" && Boolean(onSend || onDiscard || onReject);
|
|
76
|
+
const decision = useDecision({
|
|
77
|
+
onDiscard,
|
|
78
|
+
onReject,
|
|
79
|
+
onSend
|
|
80
|
+
});
|
|
81
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
82
|
+
...props,
|
|
83
|
+
ref,
|
|
84
|
+
role: props.role ?? "article",
|
|
85
|
+
"aria-labelledby": ariaLabelledBy,
|
|
86
|
+
"data-slot": slot,
|
|
87
|
+
"data-state": state,
|
|
88
|
+
size: "sm",
|
|
89
|
+
className: cx("connected-app-card", className),
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsxs(CardTitle, {
|
|
92
|
+
id: titleId,
|
|
93
|
+
className: "connected-app-card__title",
|
|
94
|
+
render: /* @__PURE__ */ jsx("h3", {}),
|
|
95
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
96
|
+
className: "connected-app-card__icon",
|
|
97
|
+
"aria-hidden": "true",
|
|
98
|
+
children: icon
|
|
99
|
+
}), kind]
|
|
100
|
+
}), /* @__PURE__ */ jsx(StateIndicator, {
|
|
101
|
+
state,
|
|
102
|
+
labels: stateLabels
|
|
103
|
+
})] }),
|
|
104
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
105
|
+
children,
|
|
106
|
+
hasDecision && decision.reject ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Tell the agent what to do differently" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
107
|
+
name: "reject-reason",
|
|
108
|
+
value: decision.reason,
|
|
109
|
+
disabled: decision.busy,
|
|
110
|
+
autoComplete: "off",
|
|
111
|
+
placeholder: "Shorter, and skip the recap",
|
|
112
|
+
onChange: (event) => decision.setReason(event.currentTarget.value),
|
|
113
|
+
onKeyDown: (event) => {
|
|
114
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
decision.reject?.();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
})] }) : null,
|
|
120
|
+
decision.errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [decision.errorMessage] }) : null,
|
|
121
|
+
/* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: "sigvelo-visually-hidden",
|
|
123
|
+
role: "status",
|
|
124
|
+
"aria-atomic": "true",
|
|
125
|
+
children: decision.errorMessage || (decision.busy ? "Submitting" : "")
|
|
126
|
+
})
|
|
127
|
+
] }),
|
|
128
|
+
hasDecision ? /* @__PURE__ */ jsxs(CardFooter, {
|
|
129
|
+
className: "connected-app-card__footer",
|
|
130
|
+
children: [
|
|
131
|
+
decision.send ? /* @__PURE__ */ jsx(Button, {
|
|
132
|
+
type: "button",
|
|
133
|
+
size: "sm",
|
|
134
|
+
disabled: decision.busy,
|
|
135
|
+
onClick: () => void decision.send?.(),
|
|
136
|
+
children: sendLabel
|
|
137
|
+
}) : null,
|
|
138
|
+
decision.discard ? /* @__PURE__ */ jsx(Button, {
|
|
139
|
+
type: "button",
|
|
140
|
+
size: "sm",
|
|
141
|
+
variant: "outline",
|
|
142
|
+
color: "neutral",
|
|
143
|
+
disabled: decision.busy,
|
|
144
|
+
onClick: () => void decision.discard?.(),
|
|
145
|
+
children: "Discard"
|
|
146
|
+
}) : null,
|
|
147
|
+
decision.reject ? /* @__PURE__ */ jsx(Button, {
|
|
148
|
+
type: "button",
|
|
149
|
+
size: "sm",
|
|
150
|
+
variant: "ghost",
|
|
151
|
+
color: "neutral",
|
|
152
|
+
disabled: decision.busy,
|
|
153
|
+
onClick: () => void decision.reject?.(),
|
|
154
|
+
children: "Send feedback"
|
|
155
|
+
}) : null
|
|
156
|
+
]
|
|
157
|
+
}) : null
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Email draft or result. Pending cards can be edited and released; send,
|
|
163
|
+
* discard, and reject-with-reason stay application-owned.
|
|
164
|
+
*/
|
|
165
|
+
function EmailMessageCard({ body, from, icon, onChange, onDiscard, onReject, onSend, state = "pending", subject, to, ref, ...props }) {
|
|
166
|
+
const editing = state === "pending" && onChange != null;
|
|
167
|
+
const draft = {
|
|
168
|
+
from,
|
|
169
|
+
to,
|
|
170
|
+
subject,
|
|
171
|
+
body
|
|
172
|
+
};
|
|
173
|
+
return /* @__PURE__ */ jsx(ConnectedAppCardFrame, {
|
|
174
|
+
...props,
|
|
175
|
+
ref,
|
|
176
|
+
slot: "email-message-card",
|
|
177
|
+
icon: icon ?? /* @__PURE__ */ jsx(MailIcon, {}),
|
|
178
|
+
kind: "New email",
|
|
179
|
+
sendLabel: "Send email",
|
|
180
|
+
state,
|
|
181
|
+
stateLabels: {
|
|
182
|
+
pending: "Ready to send",
|
|
183
|
+
sent: "Sent",
|
|
184
|
+
denied: "Denied"
|
|
185
|
+
},
|
|
186
|
+
onDiscard,
|
|
187
|
+
onReject,
|
|
188
|
+
onSend,
|
|
189
|
+
children: /* @__PURE__ */ jsx(FieldList, {
|
|
190
|
+
editing,
|
|
191
|
+
onFieldChange: (name, value) => onChange?.({
|
|
192
|
+
...draft,
|
|
193
|
+
[name]: value
|
|
194
|
+
}),
|
|
195
|
+
items: (editing ? [
|
|
196
|
+
{
|
|
197
|
+
name: "from",
|
|
198
|
+
term: "From",
|
|
199
|
+
value: from ?? ""
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "to",
|
|
203
|
+
term: "To",
|
|
204
|
+
value: to ?? ""
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "subject",
|
|
208
|
+
term: "Subject",
|
|
209
|
+
value: subject
|
|
210
|
+
}
|
|
211
|
+
] : [
|
|
212
|
+
from ? {
|
|
213
|
+
name: "from",
|
|
214
|
+
term: "From",
|
|
215
|
+
value: from
|
|
216
|
+
} : null,
|
|
217
|
+
to ? {
|
|
218
|
+
name: "to",
|
|
219
|
+
term: "To",
|
|
220
|
+
value: to
|
|
221
|
+
} : null,
|
|
222
|
+
{
|
|
223
|
+
name: "subject",
|
|
224
|
+
term: "Subject",
|
|
225
|
+
value: subject
|
|
226
|
+
}
|
|
227
|
+
]).filter((item) => item != null),
|
|
228
|
+
children: editing ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Message" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
229
|
+
render: /* @__PURE__ */ jsx(Textarea, {
|
|
230
|
+
name: "body",
|
|
231
|
+
rows: 4,
|
|
232
|
+
resize: "vertical",
|
|
233
|
+
autoComplete: "off"
|
|
234
|
+
}),
|
|
235
|
+
value: body ?? "",
|
|
236
|
+
onChange: (event) => onChange({
|
|
237
|
+
...draft,
|
|
238
|
+
body: event.currentTarget.value
|
|
239
|
+
})
|
|
240
|
+
})] }) : body != null && body !== "" ? /* @__PURE__ */ jsx("p", {
|
|
241
|
+
className: "connected-app-card__body",
|
|
242
|
+
children: body
|
|
243
|
+
}) : null
|
|
244
|
+
})
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/** Slack draft or posted message with workspace, destination, and thread fields. */
|
|
248
|
+
function SlackMessageCard({ icon, message, onChange, onDiscard, onReject, onSend, state = "pending", thread, to, workspace, ref, ...props }) {
|
|
249
|
+
const editing = state === "pending" && onChange != null;
|
|
250
|
+
const draft = {
|
|
251
|
+
workspace,
|
|
252
|
+
to,
|
|
253
|
+
thread,
|
|
254
|
+
message
|
|
255
|
+
};
|
|
256
|
+
return /* @__PURE__ */ jsx(ConnectedAppCardFrame, {
|
|
257
|
+
...props,
|
|
258
|
+
ref,
|
|
259
|
+
slot: "slack-message-card",
|
|
260
|
+
icon: icon ?? /* @__PURE__ */ jsx(SlackIcon, {}),
|
|
261
|
+
kind: "Slack message",
|
|
262
|
+
sendLabel: "Send message",
|
|
263
|
+
state,
|
|
264
|
+
stateLabels: {
|
|
265
|
+
pending: "Ready to send",
|
|
266
|
+
sent: "Sent",
|
|
267
|
+
denied: "Denied"
|
|
268
|
+
},
|
|
269
|
+
onDiscard,
|
|
270
|
+
onReject,
|
|
271
|
+
onSend,
|
|
272
|
+
children: /* @__PURE__ */ jsx(FieldList, {
|
|
273
|
+
editing,
|
|
274
|
+
onFieldChange: (name, value) => onChange?.({
|
|
275
|
+
...draft,
|
|
276
|
+
[name]: value
|
|
277
|
+
}),
|
|
278
|
+
items: (editing ? [
|
|
279
|
+
{
|
|
280
|
+
name: "workspace",
|
|
281
|
+
term: "Workspace",
|
|
282
|
+
value: workspace ?? ""
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "to",
|
|
286
|
+
term: "To",
|
|
287
|
+
value: to
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "thread",
|
|
291
|
+
term: "Thread",
|
|
292
|
+
value: thread ?? ""
|
|
293
|
+
}
|
|
294
|
+
] : [
|
|
295
|
+
workspace ? {
|
|
296
|
+
name: "workspace",
|
|
297
|
+
term: "Workspace",
|
|
298
|
+
value: workspace
|
|
299
|
+
} : null,
|
|
300
|
+
{
|
|
301
|
+
name: "to",
|
|
302
|
+
term: "To",
|
|
303
|
+
value: to
|
|
304
|
+
},
|
|
305
|
+
thread ? {
|
|
306
|
+
name: "thread",
|
|
307
|
+
term: "Thread",
|
|
308
|
+
value: thread
|
|
309
|
+
} : null
|
|
310
|
+
]).filter((item) => item != null),
|
|
311
|
+
children: editing ? /* @__PURE__ */ jsxs(Field.Root, { children: [/* @__PURE__ */ jsx(Field.Label, { children: "Message" }), /* @__PURE__ */ jsx(Field.Control, {
|
|
312
|
+
render: /* @__PURE__ */ jsx(Textarea, {
|
|
313
|
+
name: "message",
|
|
314
|
+
rows: 4,
|
|
315
|
+
resize: "vertical",
|
|
316
|
+
autoComplete: "off"
|
|
317
|
+
}),
|
|
318
|
+
value: message,
|
|
319
|
+
onChange: (event) => onChange({
|
|
320
|
+
...draft,
|
|
321
|
+
message: event.currentTarget.value
|
|
322
|
+
})
|
|
323
|
+
})] }) : /* @__PURE__ */ jsx("p", {
|
|
324
|
+
className: "connected-app-card__body",
|
|
325
|
+
children: message
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Calendar draft or settled event. Pass `whenDateTime` for a semantic `time`
|
|
332
|
+
* element; the application owns locale and timezone formatting.
|
|
333
|
+
*/
|
|
334
|
+
function CalendarEventCard({ attendees, eventTitle, icon, location, onChange, onDiscard, onReject, onSend, state = "pending", when, whenDateTime, ref, ...props }) {
|
|
335
|
+
const editing = state === "pending" && onChange != null;
|
|
336
|
+
const draft = {
|
|
337
|
+
eventTitle,
|
|
338
|
+
when,
|
|
339
|
+
whenDateTime,
|
|
340
|
+
location,
|
|
341
|
+
attendees
|
|
342
|
+
};
|
|
343
|
+
return /* @__PURE__ */ jsx(ConnectedAppCardFrame, {
|
|
344
|
+
...props,
|
|
345
|
+
ref,
|
|
346
|
+
slot: "calendar-event-card",
|
|
347
|
+
icon: icon ?? /* @__PURE__ */ jsx(CalendarIcon, {}),
|
|
348
|
+
kind: "Calendar event",
|
|
349
|
+
sendLabel: "Save event",
|
|
350
|
+
state,
|
|
351
|
+
stateLabels: {
|
|
352
|
+
pending: "Ready to save",
|
|
353
|
+
sent: "Saved",
|
|
354
|
+
denied: "Denied"
|
|
355
|
+
},
|
|
356
|
+
onDiscard,
|
|
357
|
+
onReject,
|
|
358
|
+
onSend,
|
|
359
|
+
children: /* @__PURE__ */ jsx(FieldList, {
|
|
360
|
+
editing,
|
|
361
|
+
onFieldChange: (name, value) => onChange?.({
|
|
362
|
+
...draft,
|
|
363
|
+
[name]: value
|
|
364
|
+
}),
|
|
365
|
+
items: editing ? [
|
|
366
|
+
{
|
|
367
|
+
name: "eventTitle",
|
|
368
|
+
term: "Title",
|
|
369
|
+
value: eventTitle
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: "when",
|
|
373
|
+
term: "When",
|
|
374
|
+
value: when
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: "location",
|
|
378
|
+
term: "Location",
|
|
379
|
+
value: location ?? ""
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: "attendees",
|
|
383
|
+
term: "Attendees",
|
|
384
|
+
value: attendees ?? ""
|
|
385
|
+
}
|
|
386
|
+
] : [
|
|
387
|
+
{
|
|
388
|
+
name: "eventTitle",
|
|
389
|
+
term: "Title",
|
|
390
|
+
value: eventTitle
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "when",
|
|
394
|
+
term: "When",
|
|
395
|
+
value: when,
|
|
396
|
+
display: whenDateTime ? /* @__PURE__ */ jsx("time", {
|
|
397
|
+
dateTime: whenDateTime,
|
|
398
|
+
children: when
|
|
399
|
+
}) : void 0
|
|
400
|
+
},
|
|
401
|
+
...location ? [{
|
|
402
|
+
name: "location",
|
|
403
|
+
term: "Location",
|
|
404
|
+
value: location
|
|
405
|
+
}] : [],
|
|
406
|
+
...attendees ? [{
|
|
407
|
+
name: "attendees",
|
|
408
|
+
term: "Attendees",
|
|
409
|
+
value: attendees
|
|
410
|
+
}] : []
|
|
411
|
+
]
|
|
412
|
+
})
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
//#endregion
|
|
416
|
+
export { CalendarEventCard, EmailMessageCard, SlackMessageCard };
|
|
@@ -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-Dw-im7lg.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 {
|
|
2
|
+
import { $ as TrashIcon, B as PlayIcon, R as PauseIcon, Z as TargetIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
4
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
3
2
|
import { Popover } from "../foundations/Popover.js";
|
|
3
|
+
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/InlineCitation.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { B as PlayIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
4
4
|
import { Card } from "../foundations/Card.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { t as AttachmentPreview } from "../../attachment-preview-1CXJvrmb.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { n as ArrowDownIcon } from "../../icons-
|
|
2
|
+
import { n as ArrowDownIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { t as messageScrollerContract } from "../../message-scroller-C8cplcQO.js";
|
|
5
5
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { n as ArrowDownIcon } from "../../icons-
|
|
2
|
+
import { n as ArrowDownIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { t as messageScrollerContract } from "../../message-scroller-C8cplcQO.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { _ as DotIcon, d as CheckIcon, i as ArrowRightIcon } from "../../icons-
|
|
2
|
+
import { _ as DotIcon, d as CheckIcon, i as ArrowRightIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Popover } from "../foundations/Popover.js";
|
|
4
4
|
import { t as ProgressRing } from "../../progress-ring-BEocM1e3.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as FolderIcon, J as SquareIcon, L as PaperclipIcon, M as MicrophoneIcon, P as MonitorIcon, S as FileIcon, V as PlusIcon, Y as StopIcon, a as ArrowUpIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, nt as XIcon, q as SpinnerIcon, tt as WrenchIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
|
+
import { t as AttachmentPreview } from "../../attachment-preview-1CXJvrmb.js";
|
|
7
|
+
import { i as formatErrorMessage, n as clamp, r as formatClock } from "../../format-DB2mX9DA.js";
|
|
6
8
|
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
7
9
|
import { Kbd } from "../foundations/Kbd.js";
|
|
8
10
|
import { Menu } from "../foundations/Menu.js";
|
|
9
11
|
import { PreviewCard } from "../foundations/PreviewCard.js";
|
|
10
12
|
import { Tabs } from "../foundations/Tabs.js";
|
|
11
|
-
import { t as AttachmentPreview } from "../../attachment-preview-1CXJvrmb.js";
|
|
12
|
-
import { i as formatErrorMessage, n as clamp, r as formatClock } from "../../format-DB2mX9DA.js";
|
|
13
13
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
3
|
-
import { S as FileIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
|
|
2
|
+
import { S as FileIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
|
|
4
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { Collapsible } from "../foundations/Collapsible.js";
|
|
5
5
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
2
|
+
import { q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
|
|
4
3
|
import { MessageResponse } from "./Message.js";
|
|
4
|
+
import { Activity, ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ai-sdk/Reasoning.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { D as LinkIcon, p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { D as LinkIcon, p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/Sources.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { S as FileIcon, W as SearchIcon, p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { S as FileIcon, U as SearchIcon, p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ai-sdk/Task.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Activity, ActivityContent, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
2
1
|
import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
|
|
2
|
+
import { Activity, ActivityContent, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
3
3
|
import { getToolDisplayName, isToolPartFailed, isToolPartWorking } from "./ToolPart.js";
|
|
4
4
|
import { t as summarizeToolInput } from "../../summarize-tool-input-CqTcGRYy.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -31,7 +31,7 @@ interface ChatGptSignInScreenProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
31
31
|
busy?: boolean;
|
|
32
32
|
/** Button label for the sign-in action. */
|
|
33
33
|
label?: string;
|
|
34
|
-
/** Called when the user clicks the sign-in action. */
|
|
34
|
+
/** Called when the user clicks the sign-in action. Omit to hide the built-in action. */
|
|
35
35
|
onSignIn?: () => void;
|
|
36
36
|
}
|
|
37
37
|
/** Full-screen provider authentication prompt for MCP-B onboarding. */
|
|
@@ -44,8 +44,6 @@ declare function ChatGptSignInScreen({
|
|
|
44
44
|
brandName,
|
|
45
45
|
brandLogo,
|
|
46
46
|
className,
|
|
47
|
-
onPointerLeave,
|
|
48
|
-
onPointerMove,
|
|
49
47
|
onSignIn,
|
|
50
48
|
secondaryAction,
|
|
51
49
|
ref,
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { t as ProviderLogo } from "../../provider-logos-zjZycgV6.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/extension/ChatGptSignInScreen.tsx
|
|
8
8
|
/** Full-screen provider authentication prompt for MCP-B onboarding. */
|
|
9
|
-
function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in with ChatGPT", title = "Welcome to MCP-B", brandName = "SigVelo", brandLogo = /* @__PURE__ */ jsx(SigVeloMark, {}), className,
|
|
10
|
-
const handlePointerMove = (event) => {
|
|
11
|
-
onPointerMove?.(event);
|
|
12
|
-
setPointerPosition(event.currentTarget, event, "chatgpt-sign-in-pointer");
|
|
13
|
-
event.currentTarget.dataset.pointerActive = "true";
|
|
14
|
-
};
|
|
15
|
-
const handlePointerLeave = (event) => {
|
|
16
|
-
onPointerLeave?.(event);
|
|
17
|
-
delete event.currentTarget.dataset.pointerActive;
|
|
18
|
-
};
|
|
9
|
+
function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in with ChatGPT", title = "Welcome to MCP-B", brandName = "SigVelo", brandLogo = /* @__PURE__ */ jsx(SigVeloMark, {}), className, onSignIn, secondaryAction, ref, ...props }) {
|
|
19
10
|
return /* @__PURE__ */ jsxs("main", {
|
|
20
11
|
ref,
|
|
21
12
|
className: cx("chatgpt-sign-in", className),
|
|
22
13
|
"aria-label": "ChatGPT authentication",
|
|
23
|
-
onPointerLeave: handlePointerLeave,
|
|
24
|
-
onPointerMove: handlePointerMove,
|
|
25
14
|
...props,
|
|
26
15
|
"data-recipe": "fill-host",
|
|
27
16
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -38,7 +27,7 @@ function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in wi
|
|
|
38
27
|
/* @__PURE__ */ jsx("span", { children: brandName })
|
|
39
28
|
] })]
|
|
40
29
|
}),
|
|
41
|
-
control ?? /* @__PURE__ */ jsxs(Button, {
|
|
30
|
+
control ?? (onSignIn ? /* @__PURE__ */ jsxs(Button, {
|
|
42
31
|
type: "button",
|
|
43
32
|
variant: "normal",
|
|
44
33
|
color: error ? "destructive" : "primary",
|
|
@@ -58,7 +47,7 @@ function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in wi
|
|
|
58
47
|
className: "chatgpt-sign-in__button-label",
|
|
59
48
|
children: label
|
|
60
49
|
})]
|
|
61
|
-
}),
|
|
50
|
+
}) : null),
|
|
62
51
|
error ? /* @__PURE__ */ jsx("p", {
|
|
63
52
|
role: "alert",
|
|
64
53
|
className: "chatgpt-sign-in__error",
|
|
@@ -80,13 +69,11 @@ function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in wi
|
|
|
80
69
|
});
|
|
81
70
|
}
|
|
82
71
|
function handleSignInButtonPointerMove(event) {
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
function setPointerPosition(element, event, name) {
|
|
72
|
+
const element = event.currentTarget;
|
|
86
73
|
const rect = element.getBoundingClientRect();
|
|
87
74
|
if (rect.width === 0 || rect.height === 0) return;
|
|
88
|
-
element.style.setProperty(
|
|
89
|
-
element.style.setProperty(
|
|
75
|
+
element.style.setProperty("--chatgpt-sign-in-button-x", `${(event.clientX - rect.left) / rect.width * 100}%`);
|
|
76
|
+
element.style.setProperty("--chatgpt-sign-in-button-y", `${(event.clientY - rect.top) / rect.height * 100}%`);
|
|
90
77
|
}
|
|
91
78
|
function SigVeloMark() {
|
|
92
79
|
return /* @__PURE__ */ jsxs("svg", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { U as RefreshIcon, d as CheckIcon, f as ChevronDownIcon, l as BrainIcon, p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import { Menu } from "../foundations/Menu.js";
|
|
5
4
|
import { o as titleCase } from "../../format-DB2mX9DA.js";
|
|
5
|
+
import { Menu } from "../foundations/Menu.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/extension/CodexModelSelector.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as WarningIcon } from "../../icons-Dw-im7lg.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
|
-
import { Menu } from "../foundations/Menu.js";
|
|
4
3
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
4
|
+
import { Menu } from "../foundations/Menu.js";
|
|
5
5
|
import { Avatar } from "../foundations/Avatar.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { d as CheckIcon } from "../../icons-
|
|
2
|
+
import { d as CheckIcon } from "../../icons-Dw-im7lg.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
5
5
|
//#region src/components/foundations/Checkbox.tsx
|