@mcp-use/inspector 7.0.0-canary.19 → 7.0.0-canary.21
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/cdn/inspector.js +17561 -17408
- package/dist/client/components/chat/AssistantMessage.d.ts.map +1 -1
- package/dist/client/components/chat/CopyButton.d.ts +10 -0
- package/dist/client/components/chat/CopyButton.d.ts.map +1 -0
- package/dist/client/components/chat/UserMessage.d.ts.map +1 -1
- package/dist/client/index.js +140 -133
- package/dist/web/assets/{index-B-zLLT7Z.js → index-53RzvJuE.js} +117 -117
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -16919,10 +16919,10 @@ function ConfigureEmptyState({
|
|
|
16919
16919
|
// src/client/components/chat/MessageList.tsx
|
|
16920
16920
|
import { memo as memo4, useCallback as useCallback21, useEffect as useEffect26, useRef as useRef17 } from "react";
|
|
16921
16921
|
|
|
16922
|
-
// src/client/components/chat/
|
|
16922
|
+
// src/client/components/chat/CopyButton.tsx
|
|
16923
16923
|
import { Check as Check10, Copy as Copy13 } from "lucide-react";
|
|
16924
16924
|
import { useState as useState29 } from "react";
|
|
16925
|
-
import { jsx as jsx79
|
|
16925
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
16926
16926
|
function CopyButton({ text }) {
|
|
16927
16927
|
const [isCopied, setIsCopied] = useState29(false);
|
|
16928
16928
|
const handleCopy = async () => {
|
|
@@ -16936,10 +16936,14 @@ function CopyButton({ text }) {
|
|
|
16936
16936
|
className: "opacity-0 group-hover/message:opacity-100 transition-opacity text-muted-foreground hover:text-foreground text-xs flex items-center gap-1",
|
|
16937
16937
|
onClick: handleCopy,
|
|
16938
16938
|
title: "Copy message content",
|
|
16939
|
+
"data-testid": "copy-button",
|
|
16939
16940
|
children: isCopied ? /* @__PURE__ */ jsx79(Check10, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx79(Copy13, { className: "h-3.5 w-3.5" })
|
|
16940
16941
|
}
|
|
16941
16942
|
);
|
|
16942
16943
|
}
|
|
16944
|
+
|
|
16945
|
+
// src/client/components/chat/AssistantMessage.tsx
|
|
16946
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16943
16947
|
function AssistantMessage({
|
|
16944
16948
|
content,
|
|
16945
16949
|
timestamp,
|
|
@@ -16948,23 +16952,23 @@ function AssistantMessage({
|
|
|
16948
16952
|
if (!content || content.length === 0) {
|
|
16949
16953
|
return null;
|
|
16950
16954
|
}
|
|
16951
|
-
return /* @__PURE__ */
|
|
16955
|
+
return /* @__PURE__ */ jsx80(
|
|
16952
16956
|
"div",
|
|
16953
16957
|
{
|
|
16954
16958
|
className: "flex items-start gap-6 group/message relative",
|
|
16955
16959
|
"data-testid": "chat-message-assistant",
|
|
16956
16960
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex-1 min-w-0", children: [
|
|
16957
|
-
/* @__PURE__ */
|
|
16961
|
+
/* @__PURE__ */ jsx80("div", { className: "wrap-break-word", children: /* @__PURE__ */ jsx80(
|
|
16958
16962
|
"div",
|
|
16959
16963
|
{
|
|
16960
16964
|
className: "text-base leading-7 font-sans text-start wrap-break-word transition-all duration-300 ease-in-out",
|
|
16961
16965
|
"data-testid": "chat-message-content",
|
|
16962
|
-
children: /* @__PURE__ */
|
|
16966
|
+
children: /* @__PURE__ */ jsx80(MarkdownRenderer, { content })
|
|
16963
16967
|
}
|
|
16964
16968
|
) }),
|
|
16965
16969
|
timestamp && /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between mt-2", children: [
|
|
16966
|
-
/* @__PURE__ */
|
|
16967
|
-
/* @__PURE__ */
|
|
16970
|
+
/* @__PURE__ */ jsx80("span", { className: "text-xs text-muted-foreground", children: new Date(timestamp).toLocaleTimeString() }),
|
|
16971
|
+
/* @__PURE__ */ jsx80(CopyButton, { text: content })
|
|
16968
16972
|
] })
|
|
16969
16973
|
] })
|
|
16970
16974
|
}
|
|
@@ -16973,7 +16977,7 @@ function AssistantMessage({
|
|
|
16973
16977
|
|
|
16974
16978
|
// src/client/components/chat/ToolCallDisplay.tsx
|
|
16975
16979
|
import { Check as Check11, Copy as Copy14, Loader2 as Loader24, Wrench as Wrench4, X as X8 } from "lucide-react";
|
|
16976
|
-
import { jsx as
|
|
16980
|
+
import { jsx as jsx81, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16977
16981
|
function ToolCallDisplay({
|
|
16978
16982
|
toolName,
|
|
16979
16983
|
args,
|
|
@@ -16985,13 +16989,13 @@ function ToolCallDisplay({
|
|
|
16985
16989
|
const getStatusIcon = () => {
|
|
16986
16990
|
switch (state) {
|
|
16987
16991
|
case "call":
|
|
16988
|
-
return /* @__PURE__ */
|
|
16992
|
+
return /* @__PURE__ */ jsx81(Loader24, { className: "h-4 w-4 animate-spin text-blue-500 dark:text-blue-400" });
|
|
16989
16993
|
case "result":
|
|
16990
|
-
return /* @__PURE__ */
|
|
16994
|
+
return /* @__PURE__ */ jsx81(Check11, { className: "h-4 w-4 text-emerald-800 dark:text-emerald-400" });
|
|
16991
16995
|
case "error":
|
|
16992
|
-
return /* @__PURE__ */
|
|
16996
|
+
return /* @__PURE__ */ jsx81(X8, { className: "h-4 w-4 text-red-500 dark:text-red-400" });
|
|
16993
16997
|
default:
|
|
16994
|
-
return /* @__PURE__ */
|
|
16998
|
+
return /* @__PURE__ */ jsx81(Check11, { className: "h-4 w-4 text-emerald-800 dark:text-emerald-400" });
|
|
16995
16999
|
}
|
|
16996
17000
|
};
|
|
16997
17001
|
const getStatusBg = () => {
|
|
@@ -17014,14 +17018,14 @@ function ToolCallDisplay({
|
|
|
17014
17018
|
return String(content);
|
|
17015
17019
|
};
|
|
17016
17020
|
return /* @__PURE__ */ jsxs53(Sheet, { children: [
|
|
17017
|
-
/* @__PURE__ */
|
|
17021
|
+
/* @__PURE__ */ jsx81(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs53(
|
|
17018
17022
|
"div",
|
|
17019
17023
|
{
|
|
17020
17024
|
className: "flex max-w-min items-center gap-3 p-1 rounded-full border bg-card hover:bg-accent/50 transition-colors cursor-pointer my-4",
|
|
17021
17025
|
"data-testid": `chat-tool-call-${toolName}`,
|
|
17022
17026
|
children: [
|
|
17023
|
-
/* @__PURE__ */
|
|
17024
|
-
/* @__PURE__ */
|
|
17027
|
+
/* @__PURE__ */ jsx81("div", { className: "w-8 h-8 rounded-full bg-zinc-100 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx81(Wrench4, { className: "size-4 text-muted-foreground" }) }),
|
|
17028
|
+
/* @__PURE__ */ jsx81("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx81("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs53("span", { className: "text-sm font-medium truncate", children: [
|
|
17025
17029
|
toolName,
|
|
17026
17030
|
"(",
|
|
17027
17031
|
Object.keys(displayArgs).length > 0 ? /* @__PURE__ */ jsxs53("span", { className: "bg-muted-foreground/20 rounded-full px-1.5 mx-1 py-0.5 text-xs", children: [
|
|
@@ -17030,7 +17034,7 @@ function ToolCallDisplay({
|
|
|
17030
17034
|
] }) : "",
|
|
17031
17035
|
")"
|
|
17032
17036
|
] }) }) }),
|
|
17033
|
-
/* @__PURE__ */
|
|
17037
|
+
/* @__PURE__ */ jsx81(
|
|
17034
17038
|
"div",
|
|
17035
17039
|
{
|
|
17036
17040
|
className: cn(
|
|
@@ -17053,7 +17057,7 @@ function ToolCallDisplay({
|
|
|
17053
17057
|
children: [
|
|
17054
17058
|
/* @__PURE__ */ jsxs53(SheetHeader, { children: [
|
|
17055
17059
|
/* @__PURE__ */ jsxs53(SheetTitle, { className: "flex items-center gap-2", children: [
|
|
17056
|
-
/* @__PURE__ */
|
|
17060
|
+
/* @__PURE__ */ jsx81(Wrench4, { className: "h-5 w-5" }),
|
|
17057
17061
|
"Tool Call Details"
|
|
17058
17062
|
] }),
|
|
17059
17063
|
/* @__PURE__ */ jsxs53(SheetDescription, { className: "flex items-center gap-2", children: [
|
|
@@ -17061,17 +17065,17 @@ function ToolCallDisplay({
|
|
|
17061
17065
|
" \u2014 ",
|
|
17062
17066
|
state,
|
|
17063
17067
|
state === "call" && /* @__PURE__ */ jsxs53("span", { className: "flex items-center gap-1 text-blue-500 dark:text-blue-400", children: [
|
|
17064
|
-
/* @__PURE__ */
|
|
17068
|
+
/* @__PURE__ */ jsx81(Loader24, { className: "h-3 w-3 animate-spin" }),
|
|
17065
17069
|
"streaming\u2026"
|
|
17066
17070
|
] })
|
|
17067
17071
|
] })
|
|
17068
17072
|
] }),
|
|
17069
17073
|
/* @__PURE__ */ jsxs53("div", { className: "flex flex-col gap-6 py-4", children: [
|
|
17070
17074
|
/* @__PURE__ */ jsxs53("div", { children: [
|
|
17071
|
-
/* @__PURE__ */
|
|
17075
|
+
/* @__PURE__ */ jsx81("h3", { className: "text-sm font-medium mb-2", children: "Arguments" }),
|
|
17072
17076
|
/* @__PURE__ */ jsxs53("div", { className: "relative", "data-testid": "chat-tool-drawer-args", children: [
|
|
17073
|
-
/* @__PURE__ */
|
|
17074
|
-
/* @__PURE__ */
|
|
17077
|
+
/* @__PURE__ */ jsx81("pre", { className: "text-xs bg-muted/50 rounded-lg p-3 overflow-x-auto border font-mono leading-relaxed max-h-48 whitespace-pre-wrap break-words", children: formatContent(displayArgs) }),
|
|
17078
|
+
/* @__PURE__ */ jsx81(
|
|
17075
17079
|
Button,
|
|
17076
17080
|
{
|
|
17077
17081
|
variant: "ghost",
|
|
@@ -17079,14 +17083,14 @@ function ToolCallDisplay({
|
|
|
17079
17083
|
onClick: () => copyToClipboard(formatContent(displayArgs)),
|
|
17080
17084
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
17081
17085
|
title: "Copy arguments",
|
|
17082
|
-
children: /* @__PURE__ */
|
|
17086
|
+
children: /* @__PURE__ */ jsx81(Copy14, { className: "h-3 w-3" })
|
|
17083
17087
|
}
|
|
17084
17088
|
)
|
|
17085
17089
|
] })
|
|
17086
17090
|
] }),
|
|
17087
17091
|
result && /* @__PURE__ */ jsxs53("div", { children: [
|
|
17088
|
-
/* @__PURE__ */
|
|
17089
|
-
/* @__PURE__ */
|
|
17092
|
+
/* @__PURE__ */ jsx81("h3", { className: "text-sm font-medium mb-2", children: "Result" }),
|
|
17093
|
+
/* @__PURE__ */ jsx81("div", { className: "relative", "data-testid": "chat-tool-drawer-result", children: typeof result === "string" ? /* @__PURE__ */ jsxs53(
|
|
17090
17094
|
"div",
|
|
17091
17095
|
{
|
|
17092
17096
|
className: cn(
|
|
@@ -17095,10 +17099,10 @@ function ToolCallDisplay({
|
|
|
17095
17099
|
),
|
|
17096
17100
|
children: [
|
|
17097
17101
|
result.startsWith("Error") ? /* @__PURE__ */ jsxs53("div", { className: "font-mono", children: [
|
|
17098
|
-
/* @__PURE__ */
|
|
17099
|
-
/* @__PURE__ */
|
|
17100
|
-
] }) : /* @__PURE__ */
|
|
17101
|
-
/* @__PURE__ */
|
|
17102
|
+
/* @__PURE__ */ jsx81("div", { className: "font-semibold text-destructive mb-1", children: "Error:" }),
|
|
17103
|
+
/* @__PURE__ */ jsx81("div", { className: "whitespace-pre-wrap break-words", children: result.replace(/^Error:\s*/, "") })
|
|
17104
|
+
] }) : /* @__PURE__ */ jsx81("div", { className: "whitespace-pre-wrap font-mono break-words", children: result }),
|
|
17105
|
+
/* @__PURE__ */ jsx81(
|
|
17102
17106
|
Button,
|
|
17103
17107
|
{
|
|
17104
17108
|
variant: "ghost",
|
|
@@ -17106,7 +17110,7 @@ function ToolCallDisplay({
|
|
|
17106
17110
|
onClick: () => copyToClipboard(result),
|
|
17107
17111
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
17108
17112
|
title: "Copy result",
|
|
17109
|
-
children: /* @__PURE__ */
|
|
17113
|
+
children: /* @__PURE__ */ jsx81(Copy14, { className: "h-3 w-3" })
|
|
17110
17114
|
}
|
|
17111
17115
|
)
|
|
17112
17116
|
]
|
|
@@ -17119,14 +17123,14 @@ function ToolCallDisplay({
|
|
|
17119
17123
|
state === "error" ? "bg-destructive/10 border-destructive/20 text-destructive-foreground" : "bg-muted/30 border-border"
|
|
17120
17124
|
),
|
|
17121
17125
|
children: [
|
|
17122
|
-
/* @__PURE__ */
|
|
17126
|
+
/* @__PURE__ */ jsx81(
|
|
17123
17127
|
JSONDisplay,
|
|
17124
17128
|
{
|
|
17125
17129
|
data: result,
|
|
17126
17130
|
filename: `tool-call-${toolName}-result-${Date.now()}.json`
|
|
17127
17131
|
}
|
|
17128
17132
|
),
|
|
17129
|
-
/* @__PURE__ */
|
|
17133
|
+
/* @__PURE__ */ jsx81(
|
|
17130
17134
|
Button,
|
|
17131
17135
|
{
|
|
17132
17136
|
variant: "ghost",
|
|
@@ -17134,7 +17138,7 @@ function ToolCallDisplay({
|
|
|
17134
17138
|
onClick: () => copyToClipboard(JSON.stringify(result, null, 2)),
|
|
17135
17139
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
17136
17140
|
title: "Copy result",
|
|
17137
|
-
children: /* @__PURE__ */
|
|
17141
|
+
children: /* @__PURE__ */ jsx81(Copy14, { className: "h-3 w-3" })
|
|
17138
17142
|
}
|
|
17139
17143
|
)
|
|
17140
17144
|
]
|
|
@@ -17149,7 +17153,7 @@ function ToolCallDisplay({
|
|
|
17149
17153
|
}
|
|
17150
17154
|
|
|
17151
17155
|
// src/client/components/chat/UserMessage.tsx
|
|
17152
|
-
import { jsx as
|
|
17156
|
+
import { jsx as jsx82, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
17153
17157
|
function UserMessage({
|
|
17154
17158
|
content,
|
|
17155
17159
|
timestamp,
|
|
@@ -17158,7 +17162,7 @@ function UserMessage({
|
|
|
17158
17162
|
if ((!content || content.length === 0) && (!attachments || attachments.length === 0)) {
|
|
17159
17163
|
return null;
|
|
17160
17164
|
}
|
|
17161
|
-
return /* @__PURE__ */
|
|
17165
|
+
return /* @__PURE__ */ jsx82(
|
|
17162
17166
|
"div",
|
|
17163
17167
|
{
|
|
17164
17168
|
className: "flex items-start gap-3 justify-end group/user-message",
|
|
@@ -17170,11 +17174,11 @@ function UserMessage({
|
|
|
17170
17174
|
className: "bg-zinc-200 dark:bg-zinc-800 text-primary rounded-3xl px-4 py-2 max-w-[80%] break-words",
|
|
17171
17175
|
"data-testid": "chat-message-content",
|
|
17172
17176
|
children: [
|
|
17173
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
17177
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ jsx82("div", { className: "flex flex-wrap gap-2 mb-2", children: attachments.map((attachment, index) => /* @__PURE__ */ jsx82(
|
|
17174
17178
|
"div",
|
|
17175
17179
|
{
|
|
17176
17180
|
className: "rounded-lg overflow-hidden border border-zinc-300 dark:border-zinc-700",
|
|
17177
|
-
children: /* @__PURE__ */
|
|
17181
|
+
children: /* @__PURE__ */ jsx82(
|
|
17178
17182
|
"img",
|
|
17179
17183
|
{
|
|
17180
17184
|
src: `data:${attachment.mimeType};base64,${attachment.data}`,
|
|
@@ -17185,11 +17189,14 @@ function UserMessage({
|
|
|
17185
17189
|
},
|
|
17186
17190
|
index
|
|
17187
17191
|
)) }),
|
|
17188
|
-
content && content.length > 0 && /* @__PURE__ */
|
|
17192
|
+
content && content.length > 0 && /* @__PURE__ */ jsx82("p", { className: "text-base leading-7 font-sans text-start break-words", children: content })
|
|
17189
17193
|
]
|
|
17190
17194
|
}
|
|
17191
17195
|
),
|
|
17192
|
-
timestamp && /* @__PURE__ */
|
|
17196
|
+
timestamp && /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2 mt-2", children: [
|
|
17197
|
+
/* @__PURE__ */ jsx82(CopyButton, { text: content }),
|
|
17198
|
+
/* @__PURE__ */ jsx82("span", { className: "text-xs text-muted-foreground", children: new Date(timestamp).toLocaleTimeString() })
|
|
17199
|
+
] })
|
|
17193
17200
|
] })
|
|
17194
17201
|
}
|
|
17195
17202
|
);
|
|
@@ -17222,7 +17229,7 @@ function getMultiSelectChoices(field) {
|
|
|
17222
17229
|
}
|
|
17223
17230
|
|
|
17224
17231
|
// src/client/components/elicitation/shared/ElicitationFormFields.tsx
|
|
17225
|
-
import { Fragment as Fragment16, jsx as
|
|
17232
|
+
import { Fragment as Fragment16, jsx as jsx83, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17226
17233
|
function ElicitationFormFields({
|
|
17227
17234
|
request,
|
|
17228
17235
|
formData,
|
|
@@ -17238,11 +17245,11 @@ function ElicitationFormFields({
|
|
|
17238
17245
|
if (!("requestedSchema" in request.request)) return null;
|
|
17239
17246
|
const schema = request.request.requestedSchema;
|
|
17240
17247
|
if (!schema || schema.type !== "object" || !schema.properties) {
|
|
17241
|
-
return emptyFallback ?? /* @__PURE__ */
|
|
17248
|
+
return emptyFallback ?? /* @__PURE__ */ jsx83("p", { className: "text-sm text-muted-foreground", children: "No form schema available" });
|
|
17242
17249
|
}
|
|
17243
17250
|
const properties = schema.properties;
|
|
17244
17251
|
const required = schema.required || [];
|
|
17245
|
-
return /* @__PURE__ */
|
|
17252
|
+
return /* @__PURE__ */ jsx83("div", { className: "space-y-4", children: Object.entries(properties).map(([fieldName, fieldSchema]) => {
|
|
17246
17253
|
const field = fieldSchema;
|
|
17247
17254
|
const isRequired = required.includes(fieldName);
|
|
17248
17255
|
const fieldType = field.type || "string";
|
|
@@ -17261,11 +17268,11 @@ function ElicitationFormFields({
|
|
|
17261
17268
|
return /* @__PURE__ */ jsxs55("div", { className: fieldContainerClassName, children: [
|
|
17262
17269
|
showTopLabel && /* @__PURE__ */ jsxs55(Label2, { htmlFor: inputId, children: [
|
|
17263
17270
|
fieldLabel,
|
|
17264
|
-
isRequired && /* @__PURE__ */
|
|
17271
|
+
isRequired && /* @__PURE__ */ jsx83("span", { className: "text-red-500 ml-1", children: "*" })
|
|
17265
17272
|
] }),
|
|
17266
|
-
fieldDescription && /* @__PURE__ */
|
|
17273
|
+
fieldDescription && /* @__PURE__ */ jsx83("p", { className: "text-xs text-muted-foreground", children: fieldDescription }),
|
|
17267
17274
|
fieldType === "boolean" ? /* @__PURE__ */ jsxs55("div", { className: "flex items-center space-x-2", children: [
|
|
17268
|
-
/* @__PURE__ */
|
|
17275
|
+
/* @__PURE__ */ jsx83(
|
|
17269
17276
|
Checkbox,
|
|
17270
17277
|
{
|
|
17271
17278
|
id: inputId,
|
|
@@ -17281,11 +17288,11 @@ function ElicitationFormFields({
|
|
|
17281
17288
|
className: "text-sm font-normal cursor-pointer",
|
|
17282
17289
|
children: [
|
|
17283
17290
|
fieldLabel,
|
|
17284
|
-
!showOuterLabelForBoolean && isRequired && /* @__PURE__ */
|
|
17291
|
+
!showOuterLabelForBoolean && isRequired && /* @__PURE__ */ jsx83("span", { className: "text-red-500 ml-1", children: "*" })
|
|
17285
17292
|
]
|
|
17286
17293
|
}
|
|
17287
17294
|
)
|
|
17288
|
-
] }) : fieldType === "number" || fieldType === "integer" ? /* @__PURE__ */
|
|
17295
|
+
] }) : fieldType === "number" || fieldType === "integer" ? /* @__PURE__ */ jsx83(
|
|
17289
17296
|
Input,
|
|
17290
17297
|
{
|
|
17291
17298
|
id: inputId,
|
|
@@ -17307,8 +17314,8 @@ function ElicitationFormFields({
|
|
|
17307
17314
|
onChange: (e) => onFieldChange(fieldName, e.target.value),
|
|
17308
17315
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
17309
17316
|
children: [
|
|
17310
|
-
/* @__PURE__ */
|
|
17311
|
-
singleSelectChoices.map((choice) => /* @__PURE__ */
|
|
17317
|
+
/* @__PURE__ */ jsx83("option", { value: "", children: "Select..." }),
|
|
17318
|
+
singleSelectChoices.map((choice) => /* @__PURE__ */ jsx83("option", { value: choice.const, children: choice.title || choice.const }, choice.const))
|
|
17312
17319
|
]
|
|
17313
17320
|
}
|
|
17314
17321
|
) : isEnumField ? /* @__PURE__ */ jsxs55(
|
|
@@ -17320,15 +17327,15 @@ function ElicitationFormFields({
|
|
|
17320
17327
|
onChange: (e) => onFieldChange(fieldName, e.target.value),
|
|
17321
17328
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
17322
17329
|
children: [
|
|
17323
|
-
/* @__PURE__ */
|
|
17324
|
-
field.enum.map((option, index) => /* @__PURE__ */
|
|
17330
|
+
/* @__PURE__ */ jsx83("option", { value: "", children: "Select..." }),
|
|
17331
|
+
field.enum.map((option, index) => /* @__PURE__ */ jsx83("option", { value: option, children: field.enumNames?.[index] || option }, option))
|
|
17325
17332
|
]
|
|
17326
17333
|
}
|
|
17327
|
-
) : isUntitledMultiSelectField ? /* @__PURE__ */
|
|
17334
|
+
) : isUntitledMultiSelectField ? /* @__PURE__ */ jsx83("div", { className: "space-y-2", "data-testid": testId, children: field.items.enum.map((option) => {
|
|
17328
17335
|
const checkboxId = `${inputId}-${option}`;
|
|
17329
17336
|
const checked = selectedMultiValues.includes(option);
|
|
17330
17337
|
return /* @__PURE__ */ jsxs55("div", { className: "flex items-center space-x-2", children: [
|
|
17331
|
-
/* @__PURE__ */
|
|
17338
|
+
/* @__PURE__ */ jsx83(
|
|
17332
17339
|
Checkbox,
|
|
17333
17340
|
{
|
|
17334
17341
|
id: checkboxId,
|
|
@@ -17341,7 +17348,7 @@ function ElicitationFormFields({
|
|
|
17341
17348
|
}
|
|
17342
17349
|
}
|
|
17343
17350
|
),
|
|
17344
|
-
/* @__PURE__ */
|
|
17351
|
+
/* @__PURE__ */ jsx83(
|
|
17345
17352
|
Label2,
|
|
17346
17353
|
{
|
|
17347
17354
|
htmlFor: checkboxId,
|
|
@@ -17350,7 +17357,7 @@ function ElicitationFormFields({
|
|
|
17350
17357
|
}
|
|
17351
17358
|
)
|
|
17352
17359
|
] }, option);
|
|
17353
|
-
}) }) : isTitledMultiSelectField ? /* @__PURE__ */
|
|
17360
|
+
}) }) : isTitledMultiSelectField ? /* @__PURE__ */ jsx83("div", { className: "space-y-2", "data-testid": testId, children: multiSelectChoices.map((choice) => {
|
|
17354
17361
|
const checkboxId = `${inputId}-${choice.const}`;
|
|
17355
17362
|
const checked = selectedMultiValues.includes(choice.const);
|
|
17356
17363
|
return /* @__PURE__ */ jsxs55(
|
|
@@ -17358,7 +17365,7 @@ function ElicitationFormFields({
|
|
|
17358
17365
|
{
|
|
17359
17366
|
className: "flex items-center space-x-2",
|
|
17360
17367
|
children: [
|
|
17361
|
-
/* @__PURE__ */
|
|
17368
|
+
/* @__PURE__ */ jsx83(
|
|
17362
17369
|
Checkbox,
|
|
17363
17370
|
{
|
|
17364
17371
|
id: checkboxId,
|
|
@@ -17371,7 +17378,7 @@ function ElicitationFormFields({
|
|
|
17371
17378
|
}
|
|
17372
17379
|
}
|
|
17373
17380
|
),
|
|
17374
|
-
/* @__PURE__ */
|
|
17381
|
+
/* @__PURE__ */ jsx83(
|
|
17375
17382
|
Label2,
|
|
17376
17383
|
{
|
|
17377
17384
|
htmlFor: checkboxId,
|
|
@@ -17383,7 +17390,7 @@ function ElicitationFormFields({
|
|
|
17383
17390
|
},
|
|
17384
17391
|
choice.const
|
|
17385
17392
|
);
|
|
17386
|
-
}) }) : fieldType === "string" && (field.format === "textarea" || field.maxLength > 100) ? /* @__PURE__ */
|
|
17393
|
+
}) }) : fieldType === "string" && (field.format === "textarea" || field.maxLength > 100) ? /* @__PURE__ */ jsx83(
|
|
17387
17394
|
Textarea,
|
|
17388
17395
|
{
|
|
17389
17396
|
id: inputId,
|
|
@@ -17393,7 +17400,7 @@ function ElicitationFormFields({
|
|
|
17393
17400
|
placeholder: field.default || "",
|
|
17394
17401
|
rows: textareaRows
|
|
17395
17402
|
}
|
|
17396
|
-
) : /* @__PURE__ */
|
|
17403
|
+
) : /* @__PURE__ */ jsx83(
|
|
17397
17404
|
Input,
|
|
17398
17405
|
{
|
|
17399
17406
|
id: inputId,
|
|
@@ -17417,7 +17424,7 @@ function ElicitationFormFields({
|
|
|
17417
17424
|
showOuterLabelForBoolean,
|
|
17418
17425
|
emptyFallback
|
|
17419
17426
|
]);
|
|
17420
|
-
return /* @__PURE__ */
|
|
17427
|
+
return /* @__PURE__ */ jsx83(Fragment16, { children: rendered });
|
|
17421
17428
|
}
|
|
17422
17429
|
|
|
17423
17430
|
// src/client/components/elicitation/shared/useElicitationForm.ts
|
|
@@ -17480,7 +17487,7 @@ function useElicitationForm(request) {
|
|
|
17480
17487
|
}
|
|
17481
17488
|
|
|
17482
17489
|
// src/client/components/chat/InlineElicitationCard.tsx
|
|
17483
|
-
import { jsx as
|
|
17490
|
+
import { jsx as jsx84, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
17484
17491
|
function InlineElicitationCard({
|
|
17485
17492
|
request,
|
|
17486
17493
|
onApprove,
|
|
@@ -17539,8 +17546,8 @@ function InlineElicitationCard({
|
|
|
17539
17546
|
}
|
|
17540
17547
|
return /* @__PURE__ */ jsxs56("div", { className: "rounded-lg border bg-card shadow-sm p-4 space-y-4 max-w-2xl", children: [
|
|
17541
17548
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
17542
|
-
/* @__PURE__ */
|
|
17543
|
-
/* @__PURE__ */
|
|
17549
|
+
/* @__PURE__ */ jsx84("span", { className: "font-medium text-sm text-card-foreground", children: "Elicitation Request" }),
|
|
17550
|
+
/* @__PURE__ */ jsx84(
|
|
17544
17551
|
Badge,
|
|
17545
17552
|
{
|
|
17546
17553
|
variant: "outline",
|
|
@@ -17548,12 +17555,12 @@ function InlineElicitationCard({
|
|
|
17548
17555
|
children: mode
|
|
17549
17556
|
}
|
|
17550
17557
|
),
|
|
17551
|
-
/* @__PURE__ */
|
|
17558
|
+
/* @__PURE__ */ jsx84("span", { className: "text-xs text-muted-foreground", children: request.serverName })
|
|
17552
17559
|
] }),
|
|
17553
|
-
/* @__PURE__ */
|
|
17560
|
+
/* @__PURE__ */ jsx84("p", { className: "text-sm text-card-foreground", children: request.request.message }),
|
|
17554
17561
|
isUrlMode && "url" in request.request && /* @__PURE__ */ jsxs56("div", { className: "space-y-3", children: [
|
|
17555
17562
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 p-2 bg-muted rounded border", children: [
|
|
17556
|
-
/* @__PURE__ */
|
|
17563
|
+
/* @__PURE__ */ jsx84("code", { className: "flex-1 text-xs font-mono break-all", children: urlModeUrl }),
|
|
17557
17564
|
/* @__PURE__ */ jsxs56(
|
|
17558
17565
|
Button,
|
|
17559
17566
|
{
|
|
@@ -17564,14 +17571,14 @@ function InlineElicitationCard({
|
|
|
17564
17571
|
setUrlCompleted(true);
|
|
17565
17572
|
},
|
|
17566
17573
|
children: [
|
|
17567
|
-
/* @__PURE__ */
|
|
17574
|
+
/* @__PURE__ */ jsx84(ExternalLink, { className: "h-3 w-3 mr-1" }),
|
|
17568
17575
|
"Open"
|
|
17569
17576
|
]
|
|
17570
17577
|
}
|
|
17571
17578
|
)
|
|
17572
17579
|
] }),
|
|
17573
17580
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center space-x-2", children: [
|
|
17574
|
-
/* @__PURE__ */
|
|
17581
|
+
/* @__PURE__ */ jsx84(
|
|
17575
17582
|
Checkbox,
|
|
17576
17583
|
{
|
|
17577
17584
|
id: `inline-url-done-${request.id}`,
|
|
@@ -17579,7 +17586,7 @@ function InlineElicitationCard({
|
|
|
17579
17586
|
onCheckedChange: (c) => setUrlCompleted(!!c)
|
|
17580
17587
|
}
|
|
17581
17588
|
),
|
|
17582
|
-
/* @__PURE__ */
|
|
17589
|
+
/* @__PURE__ */ jsx84(
|
|
17583
17590
|
Label2,
|
|
17584
17591
|
{
|
|
17585
17592
|
htmlFor: `inline-url-done-${request.id}`,
|
|
@@ -17589,7 +17596,7 @@ function InlineElicitationCard({
|
|
|
17589
17596
|
)
|
|
17590
17597
|
] })
|
|
17591
17598
|
] }),
|
|
17592
|
-
isFormMode && /* @__PURE__ */
|
|
17599
|
+
isFormMode && /* @__PURE__ */ jsx84(
|
|
17593
17600
|
ElicitationFormFields,
|
|
17594
17601
|
{
|
|
17595
17602
|
request,
|
|
@@ -17600,11 +17607,11 @@ function InlineElicitationCard({
|
|
|
17600
17607
|
fieldContainerClassName: "space-y-1.5",
|
|
17601
17608
|
textareaRows: 3,
|
|
17602
17609
|
showOuterLabelForBoolean: false,
|
|
17603
|
-
emptyFallback: /* @__PURE__ */
|
|
17610
|
+
emptyFallback: /* @__PURE__ */ jsx84("p", { className: "text-sm text-muted-foreground", children: "No form schema provided." })
|
|
17604
17611
|
}
|
|
17605
17612
|
),
|
|
17606
17613
|
/* @__PURE__ */ jsxs56("div", { className: "flex gap-2 pt-1", children: [
|
|
17607
|
-
/* @__PURE__ */
|
|
17614
|
+
/* @__PURE__ */ jsx84(
|
|
17608
17615
|
Button,
|
|
17609
17616
|
{
|
|
17610
17617
|
size: "sm",
|
|
@@ -17614,7 +17621,7 @@ function InlineElicitationCard({
|
|
|
17614
17621
|
children: "Accept"
|
|
17615
17622
|
}
|
|
17616
17623
|
),
|
|
17617
|
-
/* @__PURE__ */
|
|
17624
|
+
/* @__PURE__ */ jsx84(
|
|
17618
17625
|
Button,
|
|
17619
17626
|
{
|
|
17620
17627
|
size: "sm",
|
|
@@ -17624,7 +17631,7 @@ function InlineElicitationCard({
|
|
|
17624
17631
|
children: "Decline"
|
|
17625
17632
|
}
|
|
17626
17633
|
),
|
|
17627
|
-
/* @__PURE__ */
|
|
17634
|
+
/* @__PURE__ */ jsx84(
|
|
17628
17635
|
Button,
|
|
17629
17636
|
{
|
|
17630
17637
|
size: "sm",
|
|
@@ -17639,7 +17646,7 @@ function InlineElicitationCard({
|
|
|
17639
17646
|
}
|
|
17640
17647
|
|
|
17641
17648
|
// src/client/components/chat/MessageList.tsx
|
|
17642
|
-
import { Fragment as Fragment17, jsx as
|
|
17649
|
+
import { Fragment as Fragment17, jsx as jsx85, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
17643
17650
|
var MessageList = memo4(
|
|
17644
17651
|
({
|
|
17645
17652
|
messages,
|
|
@@ -17716,7 +17723,7 @@ var MessageList = memo4(
|
|
|
17716
17723
|
(item) => typeof item === "string" ? item : item.text || JSON.stringify(item)
|
|
17717
17724
|
).join("") : JSON.stringify(message.content);
|
|
17718
17725
|
if (message.role === "user") {
|
|
17719
|
-
return /* @__PURE__ */
|
|
17726
|
+
return /* @__PURE__ */ jsx85(
|
|
17720
17727
|
UserMessage,
|
|
17721
17728
|
{
|
|
17722
17729
|
content: contentStr,
|
|
@@ -17727,10 +17734,10 @@ var MessageList = memo4(
|
|
|
17727
17734
|
);
|
|
17728
17735
|
}
|
|
17729
17736
|
if (message.role === "assistant") {
|
|
17730
|
-
return /* @__PURE__ */
|
|
17737
|
+
return /* @__PURE__ */ jsx85("div", { className: "space-y-4", children: message.parts && message.parts.length > 0 ? message.parts.map((part, partIndex) => {
|
|
17731
17738
|
const partKey = part.type === "text" ? `${message.id}-text-${partIndex}-${part.text?.slice(0, 20)}` : `${message.id}-tool-${part.toolInvocation?.toolName}-${partIndex}`;
|
|
17732
17739
|
if (part.type === "text") {
|
|
17733
|
-
return /* @__PURE__ */
|
|
17740
|
+
return /* @__PURE__ */ jsx85(
|
|
17734
17741
|
AssistantMessage,
|
|
17735
17742
|
{
|
|
17736
17743
|
content: part.text || "",
|
|
@@ -17741,7 +17748,7 @@ var MessageList = memo4(
|
|
|
17741
17748
|
);
|
|
17742
17749
|
} else if (part.type === "tool-invocation" && part.toolInvocation) {
|
|
17743
17750
|
return /* @__PURE__ */ jsxs57("div", { children: [
|
|
17744
|
-
/* @__PURE__ */
|
|
17751
|
+
/* @__PURE__ */ jsx85(
|
|
17745
17752
|
ToolCallDisplay,
|
|
17746
17753
|
{
|
|
17747
17754
|
toolName: part.toolInvocation.toolName,
|
|
@@ -17751,11 +17758,11 @@ var MessageList = memo4(
|
|
|
17751
17758
|
partialArgs: part.toolInvocation.partialArgs
|
|
17752
17759
|
}
|
|
17753
17760
|
),
|
|
17754
|
-
(part.toolInvocation.result || part.toolInvocation.state === "streaming" || isWidgetTool(part.toolInvocation.toolName)) && /* @__PURE__ */
|
|
17761
|
+
(part.toolInvocation.result || part.toolInvocation.state === "streaming" || isWidgetTool(part.toolInvocation.toolName)) && /* @__PURE__ */ jsx85(
|
|
17755
17762
|
"div",
|
|
17756
17763
|
{
|
|
17757
17764
|
"data-tool-call-id": `${message.id}-${part.toolInvocation.toolName}-${partIndex}`,
|
|
17758
|
-
children: /* @__PURE__ */
|
|
17765
|
+
children: /* @__PURE__ */ jsx85(
|
|
17759
17766
|
ToolResultRenderer,
|
|
17760
17767
|
{
|
|
17761
17768
|
toolName: part.toolInvocation.toolName,
|
|
@@ -17778,7 +17785,7 @@ var MessageList = memo4(
|
|
|
17778
17785
|
}
|
|
17779
17786
|
return null;
|
|
17780
17787
|
}) : /* @__PURE__ */ jsxs57(Fragment17, { children: [
|
|
17781
|
-
/* @__PURE__ */
|
|
17788
|
+
/* @__PURE__ */ jsx85(
|
|
17782
17789
|
AssistantMessage,
|
|
17783
17790
|
{
|
|
17784
17791
|
content: contentStr,
|
|
@@ -17786,10 +17793,10 @@ var MessageList = memo4(
|
|
|
17786
17793
|
_isStreaming: isMessageStreaming(message)
|
|
17787
17794
|
}
|
|
17788
17795
|
),
|
|
17789
|
-
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */
|
|
17796
|
+
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */ jsx85("div", { className: "space-y-2", children: message.toolCalls.map((toolCall) => {
|
|
17790
17797
|
const toolCallKey = `${message.id}-${toolCall.toolName}-${JSON.stringify(toolCall.args).slice(0, 50)}`;
|
|
17791
17798
|
return /* @__PURE__ */ jsxs57("div", { children: [
|
|
17792
|
-
/* @__PURE__ */
|
|
17799
|
+
/* @__PURE__ */ jsx85(
|
|
17793
17800
|
ToolCallDisplay,
|
|
17794
17801
|
{
|
|
17795
17802
|
toolName: toolCall.toolName,
|
|
@@ -17798,7 +17805,7 @@ var MessageList = memo4(
|
|
|
17798
17805
|
state: toolCall.result ? "result" : "call"
|
|
17799
17806
|
}
|
|
17800
17807
|
),
|
|
17801
|
-
(toolCall.result || isWidgetTool(toolCall.toolName)) && /* @__PURE__ */
|
|
17808
|
+
(toolCall.result || isWidgetTool(toolCall.toolName)) && /* @__PURE__ */ jsx85("div", { "data-tool-call-id": toolCallKey, children: /* @__PURE__ */ jsx85(
|
|
17802
17809
|
ToolResultRenderer,
|
|
17803
17810
|
{
|
|
17804
17811
|
toolName: toolCall.toolName,
|
|
@@ -17817,7 +17824,7 @@ var MessageList = memo4(
|
|
|
17817
17824
|
}
|
|
17818
17825
|
return null;
|
|
17819
17826
|
}),
|
|
17820
|
-
pendingElicitationRequests && pendingElicitationRequests.length > 0 && onApproveElicitation && onRejectElicitation && /* @__PURE__ */
|
|
17827
|
+
pendingElicitationRequests && pendingElicitationRequests.length > 0 && onApproveElicitation && onRejectElicitation && /* @__PURE__ */ jsx85("div", { className: "space-y-3", children: pendingElicitationRequests.map((req) => /* @__PURE__ */ jsx85(
|
|
17821
17828
|
InlineElicitationCard,
|
|
17822
17829
|
{
|
|
17823
17830
|
request: req,
|
|
@@ -17826,8 +17833,8 @@ var MessageList = memo4(
|
|
|
17826
17833
|
},
|
|
17827
17834
|
req.id
|
|
17828
17835
|
)) }),
|
|
17829
|
-
isThinking && /* @__PURE__ */
|
|
17830
|
-
/* @__PURE__ */
|
|
17836
|
+
isThinking && /* @__PURE__ */ jsx85("div", { className: "flex items-start gap-3", children: /* @__PURE__ */ jsx85("div", { className: "flex-1", children: /* @__PURE__ */ jsx85("div", { className: "rounded-lg p-4 max-w-fit", children: /* @__PURE__ */ jsx85("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx85("span", { className: "text-sm", children: /* @__PURE__ */ jsx85(TextShimmer, { duration: 2, spread: 1, children: "Thinking..." }) }) }) }) }) }),
|
|
17837
|
+
/* @__PURE__ */ jsx85("div", { ref: messagesEndRef })
|
|
17831
17838
|
] });
|
|
17832
17839
|
}
|
|
17833
17840
|
);
|
|
@@ -18830,7 +18837,7 @@ ${widgetParts.join("\n")}`,
|
|
|
18830
18837
|
// src/client/components/chat/McpReconnectBanner.tsx
|
|
18831
18838
|
import { AlertCircle, RefreshCw as RefreshCw3 } from "lucide-react";
|
|
18832
18839
|
import { useCallback as useCallback24, useState as useState34 } from "react";
|
|
18833
|
-
import { jsx as
|
|
18840
|
+
import { jsx as jsx86, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
18834
18841
|
function McpReconnectBanner({
|
|
18835
18842
|
serverName,
|
|
18836
18843
|
serverUrl,
|
|
@@ -18855,19 +18862,19 @@ function McpReconnectBanner({
|
|
|
18855
18862
|
label = serverUrl;
|
|
18856
18863
|
}
|
|
18857
18864
|
}
|
|
18858
|
-
return /* @__PURE__ */
|
|
18865
|
+
return /* @__PURE__ */ jsx86("div", { className: "w-full flex justify-center items-center px-2 sm:px-4 mb-2", children: /* @__PURE__ */ jsxs58(
|
|
18859
18866
|
"div",
|
|
18860
18867
|
{
|
|
18861
18868
|
role: "alert",
|
|
18862
18869
|
className: "w-full max-w-3xl flex items-start gap-3 rounded-md border border-amber-300/60 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-100",
|
|
18863
18870
|
children: [
|
|
18864
|
-
/* @__PURE__ */
|
|
18871
|
+
/* @__PURE__ */ jsx86(AlertCircle, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": true }),
|
|
18865
18872
|
/* @__PURE__ */ jsxs58("div", { className: "flex-1 min-w-0", children: [
|
|
18866
18873
|
/* @__PURE__ */ jsxs58("div", { className: "font-medium", children: [
|
|
18867
18874
|
"Reconnect to ",
|
|
18868
|
-
/* @__PURE__ */
|
|
18875
|
+
/* @__PURE__ */ jsx86("span", { className: "font-semibold", children: label })
|
|
18869
18876
|
] }),
|
|
18870
|
-
/* @__PURE__ */
|
|
18877
|
+
/* @__PURE__ */ jsx86("div", { className: "text-xs opacity-90", children: message ?? "The MCP server rejected your credentials. Reconnect to refresh them." })
|
|
18871
18878
|
] }),
|
|
18872
18879
|
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-1", children: [
|
|
18873
18880
|
/* @__PURE__ */ jsxs58(
|
|
@@ -18878,7 +18885,7 @@ function McpReconnectBanner({
|
|
|
18878
18885
|
onClick: handleClick,
|
|
18879
18886
|
disabled: isReconnecting,
|
|
18880
18887
|
children: [
|
|
18881
|
-
/* @__PURE__ */
|
|
18888
|
+
/* @__PURE__ */ jsx86(
|
|
18882
18889
|
RefreshCw3,
|
|
18883
18890
|
{
|
|
18884
18891
|
className: `size-3.5 ${isReconnecting ? "animate-spin" : ""}`,
|
|
@@ -18889,7 +18896,7 @@ function McpReconnectBanner({
|
|
|
18889
18896
|
]
|
|
18890
18897
|
}
|
|
18891
18898
|
),
|
|
18892
|
-
onDismiss && /* @__PURE__ */
|
|
18899
|
+
onDismiss && /* @__PURE__ */ jsx86(
|
|
18893
18900
|
Button,
|
|
18894
18901
|
{
|
|
18895
18902
|
size: "sm",
|
|
@@ -18908,7 +18915,7 @@ function McpReconnectBanner({
|
|
|
18908
18915
|
// src/client/components/LoginModal.tsx
|
|
18909
18916
|
import { useCallback as useCallback25, useState as useState35 } from "react";
|
|
18910
18917
|
import { AlertCircle as AlertCircle2, Eye as Eye2, EyeOff as EyeOff2 } from "lucide-react";
|
|
18911
|
-
import { Fragment as Fragment18, jsx as
|
|
18918
|
+
import { Fragment as Fragment18, jsx as jsx87, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
18912
18919
|
function GoogleIcon({ className }) {
|
|
18913
18920
|
return /* @__PURE__ */ jsxs59(
|
|
18914
18921
|
"svg",
|
|
@@ -18917,28 +18924,28 @@ function GoogleIcon({ className }) {
|
|
|
18917
18924
|
className,
|
|
18918
18925
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18919
18926
|
children: [
|
|
18920
|
-
/* @__PURE__ */
|
|
18927
|
+
/* @__PURE__ */ jsx87(
|
|
18921
18928
|
"path",
|
|
18922
18929
|
{
|
|
18923
18930
|
d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",
|
|
18924
18931
|
fill: "#4285F4"
|
|
18925
18932
|
}
|
|
18926
18933
|
),
|
|
18927
|
-
/* @__PURE__ */
|
|
18934
|
+
/* @__PURE__ */ jsx87(
|
|
18928
18935
|
"path",
|
|
18929
18936
|
{
|
|
18930
18937
|
d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",
|
|
18931
18938
|
fill: "#34A853"
|
|
18932
18939
|
}
|
|
18933
18940
|
),
|
|
18934
|
-
/* @__PURE__ */
|
|
18941
|
+
/* @__PURE__ */ jsx87(
|
|
18935
18942
|
"path",
|
|
18936
18943
|
{
|
|
18937
18944
|
d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",
|
|
18938
18945
|
fill: "#FBBC05"
|
|
18939
18946
|
}
|
|
18940
18947
|
),
|
|
18941
|
-
/* @__PURE__ */
|
|
18948
|
+
/* @__PURE__ */ jsx87(
|
|
18942
18949
|
"path",
|
|
18943
18950
|
{
|
|
18944
18951
|
d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",
|
|
@@ -18950,22 +18957,22 @@ function GoogleIcon({ className }) {
|
|
|
18950
18957
|
);
|
|
18951
18958
|
}
|
|
18952
18959
|
function GitHubIcon({ className }) {
|
|
18953
|
-
return /* @__PURE__ */
|
|
18960
|
+
return /* @__PURE__ */ jsx87(
|
|
18954
18961
|
"svg",
|
|
18955
18962
|
{
|
|
18956
18963
|
viewBox: "0 0 24 24",
|
|
18957
18964
|
className,
|
|
18958
18965
|
fill: "currentColor",
|
|
18959
18966
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18960
|
-
children: /* @__PURE__ */
|
|
18967
|
+
children: /* @__PURE__ */ jsx87("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
|
|
18961
18968
|
}
|
|
18962
18969
|
);
|
|
18963
18970
|
}
|
|
18964
18971
|
function Divider({ text }) {
|
|
18965
18972
|
return /* @__PURE__ */ jsxs59("div", { className: "relative flex items-center", children: [
|
|
18966
|
-
/* @__PURE__ */
|
|
18967
|
-
/* @__PURE__ */
|
|
18968
|
-
/* @__PURE__ */
|
|
18973
|
+
/* @__PURE__ */ jsx87("div", { className: "flex-grow border-t border-border" }),
|
|
18974
|
+
/* @__PURE__ */ jsx87("span", { className: "mx-3 flex-shrink text-xs text-muted-foreground", children: text }),
|
|
18975
|
+
/* @__PURE__ */ jsx87("div", { className: "flex-grow border-t border-border" })
|
|
18969
18976
|
] });
|
|
18970
18977
|
}
|
|
18971
18978
|
function LoginModal({
|
|
@@ -19070,7 +19077,7 @@ function LoginModal({
|
|
|
19070
19077
|
});
|
|
19071
19078
|
};
|
|
19072
19079
|
const isLoading = loading !== null;
|
|
19073
|
-
return /* @__PURE__ */
|
|
19080
|
+
return /* @__PURE__ */ jsx87(
|
|
19074
19081
|
Dialog,
|
|
19075
19082
|
{
|
|
19076
19083
|
open: true,
|
|
@@ -19079,13 +19086,13 @@ function LoginModal({
|
|
|
19079
19086
|
},
|
|
19080
19087
|
children: /* @__PURE__ */ jsxs59(DialogContent, { className: "max-w-sm", children: [
|
|
19081
19088
|
/* @__PURE__ */ jsxs59(DialogHeader, { children: [
|
|
19082
|
-
/* @__PURE__ */
|
|
19083
|
-
/* @__PURE__ */
|
|
19089
|
+
/* @__PURE__ */ jsx87(DialogTitle, { children: "Sign in to Manufact" }),
|
|
19090
|
+
/* @__PURE__ */ jsx87(DialogDescription, { children: "Sign in to unlock generous usage limits on the Manufact free tier." })
|
|
19084
19091
|
] }),
|
|
19085
19092
|
/* @__PURE__ */ jsxs59("form", { onSubmit: handleEmailSignIn, className: "space-y-3", children: [
|
|
19086
19093
|
/* @__PURE__ */ jsxs59("div", { className: "space-y-1.5", children: [
|
|
19087
|
-
/* @__PURE__ */
|
|
19088
|
-
/* @__PURE__ */
|
|
19094
|
+
/* @__PURE__ */ jsx87(Label2, { htmlFor: "lm-email", children: "Email" }),
|
|
19095
|
+
/* @__PURE__ */ jsx87(
|
|
19089
19096
|
Input,
|
|
19090
19097
|
{
|
|
19091
19098
|
id: "lm-email",
|
|
@@ -19103,9 +19110,9 @@ function LoginModal({
|
|
|
19103
19110
|
)
|
|
19104
19111
|
] }),
|
|
19105
19112
|
/* @__PURE__ */ jsxs59("div", { className: "space-y-1.5", children: [
|
|
19106
|
-
/* @__PURE__ */
|
|
19113
|
+
/* @__PURE__ */ jsx87(Label2, { htmlFor: "lm-password", children: "Password" }),
|
|
19107
19114
|
/* @__PURE__ */ jsxs59("div", { className: "relative", children: [
|
|
19108
|
-
/* @__PURE__ */
|
|
19115
|
+
/* @__PURE__ */ jsx87(
|
|
19109
19116
|
Input,
|
|
19110
19117
|
{
|
|
19111
19118
|
id: "lm-password",
|
|
@@ -19122,7 +19129,7 @@ function LoginModal({
|
|
|
19122
19129
|
className: "pr-10"
|
|
19123
19130
|
}
|
|
19124
19131
|
),
|
|
19125
|
-
/* @__PURE__ */
|
|
19132
|
+
/* @__PURE__ */ jsx87(
|
|
19126
19133
|
"button",
|
|
19127
19134
|
{
|
|
19128
19135
|
type: "button",
|
|
@@ -19130,21 +19137,21 @@ function LoginModal({
|
|
|
19130
19137
|
onClick: () => setShowPassword((v) => !v),
|
|
19131
19138
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
19132
19139
|
tabIndex: -1,
|
|
19133
|
-
children: showPassword ? /* @__PURE__ */
|
|
19140
|
+
children: showPassword ? /* @__PURE__ */ jsx87(EyeOff2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx87(Eye2, { className: "h-4 w-4" })
|
|
19134
19141
|
}
|
|
19135
19142
|
)
|
|
19136
19143
|
] })
|
|
19137
19144
|
] }),
|
|
19138
19145
|
error && /* @__PURE__ */ jsxs59("p", { className: "text-sm text-destructive flex items-center gap-1.5", children: [
|
|
19139
|
-
/* @__PURE__ */
|
|
19146
|
+
/* @__PURE__ */ jsx87(AlertCircle2, { className: "h-4 w-4 shrink-0" }),
|
|
19140
19147
|
error
|
|
19141
19148
|
] }),
|
|
19142
|
-
/* @__PURE__ */
|
|
19143
|
-
/* @__PURE__ */
|
|
19149
|
+
/* @__PURE__ */ jsx87(Button, { type: "submit", disabled: isLoading, className: "w-full", children: loading === "email" ? /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
19150
|
+
/* @__PURE__ */ jsx87(Spinner, { className: "mr-2" }),
|
|
19144
19151
|
"Signing in\u2026"
|
|
19145
19152
|
] }) : "Sign in" })
|
|
19146
19153
|
] }),
|
|
19147
|
-
/* @__PURE__ */
|
|
19154
|
+
/* @__PURE__ */ jsx87(Divider, { text: "Or continue with" }),
|
|
19148
19155
|
/* @__PURE__ */ jsxs59("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
19149
19156
|
/* @__PURE__ */ jsxs59(
|
|
19150
19157
|
Button,
|
|
@@ -19154,7 +19161,7 @@ function LoginModal({
|
|
|
19154
19161
|
disabled: isLoading,
|
|
19155
19162
|
onClick: () => handleOAuth("google"),
|
|
19156
19163
|
children: [
|
|
19157
|
-
loading === "google" ? /* @__PURE__ */
|
|
19164
|
+
loading === "google" ? /* @__PURE__ */ jsx87(Spinner, { className: "mr-2" }) : /* @__PURE__ */ jsx87(GoogleIcon, { className: cn("mr-2 h-4 w-4") }),
|
|
19158
19165
|
"Google"
|
|
19159
19166
|
]
|
|
19160
19167
|
}
|
|
@@ -19167,15 +19174,15 @@ function LoginModal({
|
|
|
19167
19174
|
disabled: isLoading,
|
|
19168
19175
|
onClick: () => handleOAuth("github"),
|
|
19169
19176
|
children: [
|
|
19170
|
-
loading === "github" ? /* @__PURE__ */
|
|
19177
|
+
loading === "github" ? /* @__PURE__ */ jsx87(Spinner, { className: "mr-2" }) : /* @__PURE__ */ jsx87(GitHubIcon, { className: cn("mr-2 h-4 w-4") }),
|
|
19171
19178
|
"GitHub"
|
|
19172
19179
|
]
|
|
19173
19180
|
}
|
|
19174
19181
|
)
|
|
19175
19182
|
] }),
|
|
19176
19183
|
onUseApiKey && /* @__PURE__ */ jsxs59(Fragment18, { children: [
|
|
19177
|
-
/* @__PURE__ */
|
|
19178
|
-
/* @__PURE__ */
|
|
19184
|
+
/* @__PURE__ */ jsx87(Divider, { text: "or" }),
|
|
19185
|
+
/* @__PURE__ */ jsx87(
|
|
19179
19186
|
"button",
|
|
19180
19187
|
{
|
|
19181
19188
|
type: "button",
|
|
@@ -19189,7 +19196,7 @@ function LoginModal({
|
|
|
19189
19196
|
/* @__PURE__ */ jsxs59("p", { className: "text-xs text-center text-muted-foreground pt-1", children: [
|
|
19190
19197
|
"By signing in you agree to our",
|
|
19191
19198
|
" ",
|
|
19192
|
-
/* @__PURE__ */
|
|
19199
|
+
/* @__PURE__ */ jsx87(
|
|
19193
19200
|
"a",
|
|
19194
19201
|
{
|
|
19195
19202
|
href: "https://manufact.com/terms",
|
|
@@ -19202,7 +19209,7 @@ function LoginModal({
|
|
|
19202
19209
|
" ",
|
|
19203
19210
|
"and",
|
|
19204
19211
|
" ",
|
|
19205
|
-
/* @__PURE__ */
|
|
19212
|
+
/* @__PURE__ */ jsx87(
|
|
19206
19213
|
"a",
|
|
19207
19214
|
{
|
|
19208
19215
|
href: "https://manufact.com/privacy",
|
|
@@ -19219,7 +19226,7 @@ function LoginModal({
|
|
|
19219
19226
|
}
|
|
19220
19227
|
|
|
19221
19228
|
// src/client/components/ChatTab.tsx
|
|
19222
|
-
import { jsx as
|
|
19229
|
+
import { jsx as jsx88, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
19223
19230
|
var PROMPT_TRIGGER_REGEX = /(?:^\/$|\s+\/$)/;
|
|
19224
19231
|
var PROMPT_ARROW_KEYS = ["ArrowDown", "ArrowUp", "Escape", "Enter"];
|
|
19225
19232
|
function ChatTab({
|
|
@@ -19344,7 +19351,7 @@ function ChatTab({
|
|
|
19344
19351
|
}
|
|
19345
19352
|
clearMcpServerAuthRequired?.();
|
|
19346
19353
|
}, [connection, clearMcpServerAuthRequired]);
|
|
19347
|
-
const reconnectBannerNode = mcpServerAuthRequired ? /* @__PURE__ */
|
|
19354
|
+
const reconnectBannerNode = mcpServerAuthRequired ? /* @__PURE__ */ jsx88(
|
|
19348
19355
|
McpReconnectBanner,
|
|
19349
19356
|
{
|
|
19350
19357
|
serverName: connection.name,
|
|
@@ -19961,7 +19968,7 @@ ${sections.join("\n\n")}`;
|
|
|
19961
19968
|
},
|
|
19962
19969
|
[postBridgeEvent, sendMessage, llmConfig, isConnected]
|
|
19963
19970
|
);
|
|
19964
|
-
const loginModalNode = (rateLimitInfo || showLoginModal) && chatApiUrl ? /* @__PURE__ */
|
|
19971
|
+
const loginModalNode = (rateLimitInfo || showLoginModal) && chatApiUrl ? /* @__PURE__ */ jsx88(
|
|
19965
19972
|
LoginModal,
|
|
19966
19973
|
{
|
|
19967
19974
|
authOrigin: new URL(chatApiUrl).origin,
|
|
@@ -19974,7 +19981,7 @@ ${sections.join("\n\n")}`;
|
|
|
19974
19981
|
) : null;
|
|
19975
19982
|
if (llmConfig && messages.length === 0) {
|
|
19976
19983
|
return /* @__PURE__ */ jsxs60("div", { className: "flex flex-col h-full", children: [
|
|
19977
|
-
/* @__PURE__ */
|
|
19984
|
+
/* @__PURE__ */ jsx88("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsx88(
|
|
19978
19985
|
ConfigurationDialog,
|
|
19979
19986
|
{
|
|
19980
19987
|
open: configDialogOpen,
|
|
@@ -19994,7 +20001,7 @@ ${sections.join("\n\n")}`;
|
|
|
19994
20001
|
freeTierInfo
|
|
19995
20002
|
}
|
|
19996
20003
|
) }),
|
|
19997
|
-
/* @__PURE__ */
|
|
20004
|
+
/* @__PURE__ */ jsx88(
|
|
19998
20005
|
ChatLandingForm,
|
|
19999
20006
|
{
|
|
20000
20007
|
mcpServerUrl: connection.url,
|
|
@@ -20037,7 +20044,7 @@ ${sections.join("\n\n")}`;
|
|
|
20037
20044
|
] });
|
|
20038
20045
|
}
|
|
20039
20046
|
return /* @__PURE__ */ jsxs60("div", { className: "flex flex-col h-full relative", children: [
|
|
20040
|
-
/* @__PURE__ */
|
|
20047
|
+
/* @__PURE__ */ jsx88(
|
|
20041
20048
|
ChatHeader,
|
|
20042
20049
|
{
|
|
20043
20050
|
llmConfig,
|
|
@@ -20067,17 +20074,17 @@ ${sections.join("\n\n")}`;
|
|
|
20067
20074
|
hideClearButton
|
|
20068
20075
|
}
|
|
20069
20076
|
),
|
|
20070
|
-
/* @__PURE__ */
|
|
20077
|
+
/* @__PURE__ */ jsx88(
|
|
20071
20078
|
"div",
|
|
20072
20079
|
{
|
|
20073
20080
|
ref: messagesAreaRef,
|
|
20074
20081
|
className: "flex-1 overflow-y-auto p-2 sm:p-4 pt-[80px] sm:pt-[100px]",
|
|
20075
|
-
children: !llmConfig ? /* @__PURE__ */
|
|
20082
|
+
children: !llmConfig ? /* @__PURE__ */ jsx88(
|
|
20076
20083
|
ConfigureEmptyState,
|
|
20077
20084
|
{
|
|
20078
20085
|
onConfigureClick: () => setConfigDialogOpen(true)
|
|
20079
20086
|
}
|
|
20080
|
-
) : /* @__PURE__ */
|
|
20087
|
+
) : /* @__PURE__ */ jsx88(
|
|
20081
20088
|
MessageList,
|
|
20082
20089
|
{
|
|
20083
20090
|
messages,
|
|
@@ -20096,7 +20103,7 @@ ${sections.join("\n\n")}`;
|
|
|
20096
20103
|
),
|
|
20097
20104
|
loginModalNode,
|
|
20098
20105
|
reconnectBannerNode,
|
|
20099
|
-
llmConfig && /* @__PURE__ */
|
|
20106
|
+
llmConfig && /* @__PURE__ */ jsx88(
|
|
20100
20107
|
ChatInputArea,
|
|
20101
20108
|
{
|
|
20102
20109
|
inputValue,
|