@truefoundry/trueforge-ui 0.1.0-rc.0 → 0.1.0-rc.1
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/CHANGELOG.md +8 -0
- package/dist/{ConnectorSettings-CLBEWGQJ.js → ConnectorSettings-ADACLWQI.js} +6 -6
- package/dist/{DockLayout-WRF7EQLD.js → DockLayout-BH5XX2AQ.js} +8 -8
- package/dist/{DrawerLayout-X2UXYTOS.js → DrawerLayout-O2XZQCG4.js} +8 -8
- package/dist/{ModelSettings-IJ55QJQO.js → ModelSettings-LKFJVUYQ.js} +8 -8
- package/dist/{ModelSettings-IJ55QJQO.js.map → ModelSettings-LKFJVUYQ.js.map} +1 -1
- package/dist/OpenUiFenceBlock-A2CWCPOP.js +9 -0
- package/dist/{SandboxSettings-S5XGZWOL.js → SandboxSettings-H5MDAE47.js} +6 -6
- package/dist/{SettingsBuilder-64Y33NP3.js → SettingsBuilder-3JOLC56Z.js} +25 -17
- package/dist/SettingsBuilder-3JOLC56Z.js.map +1 -0
- package/dist/{SidebarLayout-M7HEOZVK.js → SidebarLayout-G6BGD7EY.js} +8 -8
- package/dist/{SkillSettings-MXK4ZEI7.js → SkillSettings-4VB42CVG.js} +6 -6
- package/dist/{WidgetLayout-7MDOKLHU.js → WidgetLayout-ABSXZUSQ.js} +8 -8
- package/dist/{chunk-UXZOL5GO.js → chunk-3PTFNAQK.js} +5 -5
- package/dist/{chunk-NBMP2XNL.js → chunk-EFGSH3MO.js} +7 -7
- package/dist/{chunk-42GF723P.js → chunk-FDBJNXH2.js} +2 -2
- package/dist/{chunk-UHGSHDBM.js → chunk-U5GBGEGN.js} +159 -4
- package/dist/chunk-U5GBGEGN.js.map +1 -0
- package/dist/{chunk-WFC3W4C3.js → chunk-VJTCFZNM.js} +4 -4
- package/dist/chunk-WMRZSULD.js +567 -0
- package/dist/chunk-WMRZSULD.js.map +1 -0
- package/dist/{chunk-XSHXH6EI.js → chunk-Z27F4LBZ.js} +380 -461
- package/dist/chunk-Z27F4LBZ.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +12 -12
- package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +5 -9
- package/dist/plugins/trueforge-agent-server-adapter/index.js +52 -31
- package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/OpenUiFenceBlock-SLLZSTMJ.js +0 -9
- package/dist/SettingsBuilder-64Y33NP3.js.map +0 -1
- package/dist/chunk-UBOFEI77.js +0 -567
- package/dist/chunk-UBOFEI77.js.map +0 -1
- package/dist/chunk-UHGSHDBM.js.map +0 -1
- package/dist/chunk-XSHXH6EI.js.map +0 -1
- /package/dist/{ConnectorSettings-CLBEWGQJ.js.map → ConnectorSettings-ADACLWQI.js.map} +0 -0
- /package/dist/{DockLayout-WRF7EQLD.js.map → DockLayout-BH5XX2AQ.js.map} +0 -0
- /package/dist/{DrawerLayout-X2UXYTOS.js.map → DrawerLayout-O2XZQCG4.js.map} +0 -0
- /package/dist/{OpenUiFenceBlock-SLLZSTMJ.js.map → OpenUiFenceBlock-A2CWCPOP.js.map} +0 -0
- /package/dist/{SandboxSettings-S5XGZWOL.js.map → SandboxSettings-H5MDAE47.js.map} +0 -0
- /package/dist/{SidebarLayout-M7HEOZVK.js.map → SidebarLayout-G6BGD7EY.js.map} +0 -0
- /package/dist/{SkillSettings-MXK4ZEI7.js.map → SkillSettings-4VB42CVG.js.map} +0 -0
- /package/dist/{WidgetLayout-7MDOKLHU.js.map → WidgetLayout-ABSXZUSQ.js.map} +0 -0
- /package/dist/{chunk-UXZOL5GO.js.map → chunk-3PTFNAQK.js.map} +0 -0
- /package/dist/{chunk-NBMP2XNL.js.map → chunk-EFGSH3MO.js.map} +0 -0
- /package/dist/{chunk-42GF723P.js.map → chunk-FDBJNXH2.js.map} +0 -0
- /package/dist/{chunk-WFC3W4C3.js.map → chunk-VJTCFZNM.js.map} +0 -0
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DraftCatalogProvider,
|
|
2
3
|
Icon,
|
|
3
4
|
Spinner,
|
|
4
5
|
auiButtonClass,
|
|
6
|
+
getErrorMessage,
|
|
5
7
|
libraryAgentId,
|
|
6
8
|
useCatalogServer,
|
|
7
9
|
useCompactLayout,
|
|
10
|
+
useDraftCatalog,
|
|
8
11
|
useOptionalCatalogServer,
|
|
9
12
|
useOptionalServer,
|
|
10
13
|
useOptionalShellMode,
|
|
11
14
|
useServerCapabilities
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U5GBGEGN.js";
|
|
13
16
|
import {
|
|
14
17
|
OpenUiFenceBlock
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FDBJNXH2.js";
|
|
16
19
|
import {
|
|
17
20
|
ThemeContext,
|
|
18
21
|
ThemeProvider,
|
|
@@ -20,7 +23,7 @@ import {
|
|
|
20
23
|
useOptionalContentClassNames,
|
|
21
24
|
useOptionalThemeMode,
|
|
22
25
|
useOptionalThemePreset
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WMRZSULD.js";
|
|
24
27
|
|
|
25
28
|
// src/theme/brand.tsx
|
|
26
29
|
import { useContext } from "react";
|
|
@@ -166,7 +169,7 @@ var Button = React2.forwardRef(
|
|
|
166
169
|
Button.displayName = "Button";
|
|
167
170
|
|
|
168
171
|
// src/theme/SlotsProvider.tsx
|
|
169
|
-
import { createContext as
|
|
172
|
+
import { createContext as createContext3, useContext as useContext4, useMemo as useMemo7 } from "react";
|
|
170
173
|
|
|
171
174
|
// src/atoms/primitives/IconButton.tsx
|
|
172
175
|
import React3 from "react";
|
|
@@ -217,10 +220,45 @@ function AskUserPrompt({
|
|
|
217
220
|
}
|
|
218
221
|
if (!currentQuestion) return null;
|
|
219
222
|
const isCustomSelected = currentAnswer.radioValue === ASK_USER_CUSTOM_OPTION;
|
|
223
|
+
const hasOptions = currentQuestion.options.length > 0;
|
|
220
224
|
const handleOptionSelect = (value) => {
|
|
221
225
|
if (readOnly) return;
|
|
222
226
|
onCurrentAnswerChange?.(currentQuestion.id, { radioValue: value });
|
|
223
227
|
};
|
|
228
|
+
const goToNextQuestion = () => onCurrentQuestionIndexChange?.(currentQuestionIndex + 1);
|
|
229
|
+
const isNextStep = isMultiQuestion && !isLastQuestion;
|
|
230
|
+
const handleAnswerKeyDown = (event) => {
|
|
231
|
+
if (event.key !== "Enter" || event.shiftKey || readOnly) return;
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
if (isNextStep) {
|
|
234
|
+
if (!isSubmitDisabled) goToNextQuestion();
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (!isSubmitAllDisabled) onSubmit();
|
|
238
|
+
};
|
|
239
|
+
const answerInput = /* @__PURE__ */ jsx6(
|
|
240
|
+
"textarea",
|
|
241
|
+
{
|
|
242
|
+
rows: 1,
|
|
243
|
+
value: currentAnswer.custom,
|
|
244
|
+
disabled: readOnly || !currentQuestion.id,
|
|
245
|
+
onFocus: () => onCurrentAnswerChange?.(currentQuestion.id, {
|
|
246
|
+
radioValue: ASK_USER_CUSTOM_OPTION
|
|
247
|
+
}),
|
|
248
|
+
onChange: (e) => {
|
|
249
|
+
onCurrentAnswerChange?.(currentQuestion.id, {
|
|
250
|
+
custom: e.target.value,
|
|
251
|
+
radioValue: ASK_USER_CUSTOM_OPTION
|
|
252
|
+
});
|
|
253
|
+
},
|
|
254
|
+
placeholder: hasOptions ? "Other" : "Type your answer",
|
|
255
|
+
"aria-label": hasOptions ? "Other (custom answer)" : "Your answer",
|
|
256
|
+
className: cn(
|
|
257
|
+
"field-sizing-content min-h-6 max-h-[3lh] w-full resize-none overflow-y-auto rounded border border-input-border bg-primary-bg px-2 py-0.5 text-[0.8125rem] leading-snug text-text-primary",
|
|
258
|
+
"placeholder:text-[0.8125rem] focus:outline-none focus:ring-1 focus:ring-focus-ring"
|
|
259
|
+
)
|
|
260
|
+
}
|
|
261
|
+
);
|
|
224
262
|
return /* @__PURE__ */ jsxs2(
|
|
225
263
|
"div",
|
|
226
264
|
{
|
|
@@ -277,8 +315,9 @@ function AskUserPrompt({
|
|
|
277
315
|
"div",
|
|
278
316
|
{
|
|
279
317
|
className: "flex flex-col gap-3 overflow-visible",
|
|
280
|
-
role: "radiogroup",
|
|
281
|
-
"aria-label": currentQuestion.question || "Answer options",
|
|
318
|
+
role: hasOptions ? "radiogroup" : void 0,
|
|
319
|
+
"aria-label": hasOptions ? currentQuestion.question || "Answer options" : void 0,
|
|
320
|
+
onKeyDown: handleAnswerKeyDown,
|
|
282
321
|
children: [
|
|
283
322
|
currentQuestion.options.map((opt, index) => {
|
|
284
323
|
const isSelected = currentAnswer.radioValue === opt;
|
|
@@ -308,11 +347,11 @@ function AskUserPrompt({
|
|
|
308
347
|
`${index}:${opt}`
|
|
309
348
|
);
|
|
310
349
|
}),
|
|
311
|
-
/* @__PURE__ */ jsxs2(
|
|
350
|
+
hasOptions ? /* @__PURE__ */ jsxs2(
|
|
312
351
|
"label",
|
|
313
352
|
{
|
|
314
353
|
className: cn(
|
|
315
|
-
"flex items-
|
|
354
|
+
"flex items-start gap-x-2 overflow-visible",
|
|
316
355
|
readOnly ? "cursor-default" : "cursor-pointer"
|
|
317
356
|
),
|
|
318
357
|
children: [
|
|
@@ -325,34 +364,13 @@ function AskUserPrompt({
|
|
|
325
364
|
name: `ask-user-question-option-${currentQuestion.id}`,
|
|
326
365
|
checked: isCustomSelected,
|
|
327
366
|
onChange: () => handleOptionSelect(ASK_USER_CUSTOM_OPTION),
|
|
328
|
-
className: "accent-primary-button-bg"
|
|
367
|
+
className: "mt-1 accent-primary-button-bg"
|
|
329
368
|
}
|
|
330
369
|
),
|
|
331
|
-
/* @__PURE__ */ jsx6("div", { className: "min-w-0 flex-1", children:
|
|
332
|
-
"input",
|
|
333
|
-
{
|
|
334
|
-
value: currentAnswer.custom,
|
|
335
|
-
disabled: readOnly || !currentQuestion.id,
|
|
336
|
-
onFocus: () => onCurrentAnswerChange?.(currentQuestion.id, {
|
|
337
|
-
radioValue: ASK_USER_CUSTOM_OPTION
|
|
338
|
-
}),
|
|
339
|
-
onChange: (e) => {
|
|
340
|
-
onCurrentAnswerChange?.(currentQuestion.id, {
|
|
341
|
-
custom: e.target.value,
|
|
342
|
-
radioValue: ASK_USER_CUSTOM_OPTION
|
|
343
|
-
});
|
|
344
|
-
},
|
|
345
|
-
placeholder: "Other",
|
|
346
|
-
"aria-label": "Other (custom answer)",
|
|
347
|
-
className: cn(
|
|
348
|
-
"h-6 w-full rounded border border-input-border bg-primary-bg px-2 text-[0.8125rem] text-text-primary",
|
|
349
|
-
"placeholder:text-[0.8125rem] focus:outline-none focus:ring-1 focus:ring-focus-ring"
|
|
350
|
-
)
|
|
351
|
-
}
|
|
352
|
-
) })
|
|
370
|
+
/* @__PURE__ */ jsx6("div", { className: "min-w-0 flex-1", children: answerInput })
|
|
353
371
|
]
|
|
354
372
|
}
|
|
355
|
-
)
|
|
373
|
+
) : answerInput
|
|
356
374
|
]
|
|
357
375
|
}
|
|
358
376
|
)
|
|
@@ -366,16 +384,7 @@ function AskUserPrompt({
|
|
|
366
384
|
}),
|
|
367
385
|
children: [
|
|
368
386
|
isMultiQuestion && isLastQuestion && !allQuestionsAnswered ? /* @__PURE__ */ jsx6("span", { className: "text-xs font-medium text-failure-bg", children: "Answer all questions to submit" }) : /* @__PURE__ */ jsx6("span", {}),
|
|
369
|
-
|
|
370
|
-
Button,
|
|
371
|
-
{
|
|
372
|
-
type: "button",
|
|
373
|
-
size: "sm",
|
|
374
|
-
onClick: () => onCurrentQuestionIndexChange?.(currentQuestionIndex + 1),
|
|
375
|
-
disabled: isSubmitDisabled,
|
|
376
|
-
children: "Next"
|
|
377
|
-
}
|
|
378
|
-
) : /* @__PURE__ */ jsx6(Button, { type: "button", size: "sm", onClick: onSubmit, disabled: isSubmitAllDisabled, children: "Submit" })
|
|
387
|
+
isNextStep ? /* @__PURE__ */ jsx6(Button, { type: "button", size: "sm", onClick: goToNextQuestion, disabled: isSubmitDisabled, children: "Next" }) : /* @__PURE__ */ jsx6(Button, { type: "button", size: "sm", onClick: onSubmit, disabled: isSubmitAllDisabled, children: "Submit" })
|
|
379
388
|
]
|
|
380
389
|
}
|
|
381
390
|
)
|
|
@@ -689,57 +698,6 @@ import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
|
689
698
|
// src/atoms/lib/useSearchAgentsList.ts
|
|
690
699
|
import { useCallback, useEffect as useEffect2, useRef, useState as useState3 } from "react";
|
|
691
700
|
|
|
692
|
-
// src/utils/getErrorMessage.ts
|
|
693
|
-
function isRecord(value) {
|
|
694
|
-
return value != null && typeof value === "object";
|
|
695
|
-
}
|
|
696
|
-
function readNonEmptyString(value) {
|
|
697
|
-
return typeof value === "string" && value.trim() !== "" ? value : void 0;
|
|
698
|
-
}
|
|
699
|
-
function messageFromErrorShaped(value) {
|
|
700
|
-
if (!isRecord(value)) return void 0;
|
|
701
|
-
const direct = readNonEmptyString(value.message);
|
|
702
|
-
if (direct != null) return direct;
|
|
703
|
-
if (isRecord(value.error)) {
|
|
704
|
-
return readNonEmptyString(value.error.message);
|
|
705
|
-
}
|
|
706
|
-
return void 0;
|
|
707
|
-
}
|
|
708
|
-
function stringifyError(error) {
|
|
709
|
-
if (typeof error === "string") return error;
|
|
710
|
-
if (isRecord(error)) {
|
|
711
|
-
try {
|
|
712
|
-
return JSON.stringify(error);
|
|
713
|
-
} catch {
|
|
714
|
-
return Object.prototype.toString.call(error);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
return String(error);
|
|
718
|
-
}
|
|
719
|
-
function getErrorMessage(error, fallback) {
|
|
720
|
-
if (typeof error === "string") {
|
|
721
|
-
const trimmed = error.trim();
|
|
722
|
-
if (trimmed !== "") return error;
|
|
723
|
-
return fallback ?? error;
|
|
724
|
-
}
|
|
725
|
-
if (isRecord(error) && "body" in error) {
|
|
726
|
-
const fromBody = messageFromErrorShaped(error.body);
|
|
727
|
-
if (fromBody != null) return fromBody;
|
|
728
|
-
if (error.body != null) {
|
|
729
|
-
if (typeof error.body === "string") {
|
|
730
|
-
const trimmed = error.body.trim();
|
|
731
|
-
if (trimmed !== "") return error.body;
|
|
732
|
-
} else {
|
|
733
|
-
return stringifyError(error.body);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
const fromShape = messageFromErrorShaped(error);
|
|
738
|
-
if (fromShape != null) return fromShape;
|
|
739
|
-
if (fallback != null) return fallback;
|
|
740
|
-
return stringifyError(error);
|
|
741
|
-
}
|
|
742
|
-
|
|
743
701
|
// src/atoms/lib/useDebouncedValue.ts
|
|
744
702
|
import { useEffect, useState as useState2 } from "react";
|
|
745
703
|
function useDebouncedValue(value, delayMs) {
|
|
@@ -1844,7 +1802,7 @@ function ComposerShell({
|
|
|
1844
1802
|
|
|
1845
1803
|
// src/atoms/draft/DraftReasoningEffortSelector.tsx
|
|
1846
1804
|
import { useTrueFoundryAgentSpec as useTrueFoundryAgentSpec2, useTrueFoundryUpdateAgentSpec } from "@truefoundry/assistant-ui-runtime";
|
|
1847
|
-
import { useEffect as
|
|
1805
|
+
import { useEffect as useEffect7, useId as useId3, useRef as useRef4, useState as useState11 } from "react";
|
|
1848
1806
|
|
|
1849
1807
|
// src/atoms/lib/useIsMobile.ts
|
|
1850
1808
|
import { useSyncExternalStore } from "react";
|
|
@@ -1919,96 +1877,6 @@ function BottomSheet({
|
|
|
1919
1877
|
);
|
|
1920
1878
|
}
|
|
1921
1879
|
|
|
1922
|
-
// src/atoms/draft/DraftCatalogProvider.tsx
|
|
1923
|
-
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext3, useEffect as useEffect7, useMemo, useState as useState11 } from "react";
|
|
1924
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1925
|
-
var DraftCatalogContext = createContext2(null);
|
|
1926
|
-
var IDLE_ENSURE = () => void 0;
|
|
1927
|
-
var IDLE_REFRESH = async () => void 0;
|
|
1928
|
-
function DraftCatalogProvider({ children }) {
|
|
1929
|
-
const server = useOptionalServer();
|
|
1930
|
-
const existing = useContext3(DraftCatalogContext);
|
|
1931
|
-
if (existing?.server === server) {
|
|
1932
|
-
return children;
|
|
1933
|
-
}
|
|
1934
|
-
return /* @__PURE__ */ jsx30(DraftCatalogStore, { server, children });
|
|
1935
|
-
}
|
|
1936
|
-
function DraftCatalogStore({ server, children }) {
|
|
1937
|
-
const [requested, setRequested] = useState11(false);
|
|
1938
|
-
const [models, setModels] = useState11([]);
|
|
1939
|
-
const [skills, setSkills] = useState11([]);
|
|
1940
|
-
const [connectors, setConnectors] = useState11([]);
|
|
1941
|
-
const [loading, setLoading] = useState11(false);
|
|
1942
|
-
const [error, setError] = useState11(null);
|
|
1943
|
-
const ensureLoaded = useCallback3(() => {
|
|
1944
|
-
setRequested(true);
|
|
1945
|
-
}, []);
|
|
1946
|
-
const refreshConnectors = useCallback3(async () => {
|
|
1947
|
-
if (!server) return;
|
|
1948
|
-
setLoading(true);
|
|
1949
|
-
setError(null);
|
|
1950
|
-
try {
|
|
1951
|
-
const nextConnectors = await server.getMcp();
|
|
1952
|
-
setConnectors(nextConnectors);
|
|
1953
|
-
} catch (reason) {
|
|
1954
|
-
setError(getErrorMessage(reason, "Failed to load connectors."));
|
|
1955
|
-
} finally {
|
|
1956
|
-
setLoading(false);
|
|
1957
|
-
}
|
|
1958
|
-
}, [server]);
|
|
1959
|
-
useEffect7(() => {
|
|
1960
|
-
if (!requested || !server) return;
|
|
1961
|
-
let cancelled = false;
|
|
1962
|
-
setLoading(true);
|
|
1963
|
-
setError(null);
|
|
1964
|
-
void Promise.allSettled([server.getModels(), server.getSkills(), server.getMcp()]).then(([modelsResult, skillsResult, mcpResult]) => {
|
|
1965
|
-
if (cancelled) return;
|
|
1966
|
-
const errors = [];
|
|
1967
|
-
if (modelsResult.status === "fulfilled") {
|
|
1968
|
-
setModels(modelsResult.value);
|
|
1969
|
-
} else {
|
|
1970
|
-
errors.push(getErrorMessage(modelsResult.reason, "Failed to load models."));
|
|
1971
|
-
}
|
|
1972
|
-
if (skillsResult.status === "fulfilled") {
|
|
1973
|
-
setSkills(skillsResult.value);
|
|
1974
|
-
} else {
|
|
1975
|
-
errors.push(getErrorMessage(skillsResult.reason, "Failed to load skills."));
|
|
1976
|
-
}
|
|
1977
|
-
if (mcpResult.status === "fulfilled") {
|
|
1978
|
-
setConnectors(mcpResult.value);
|
|
1979
|
-
} else {
|
|
1980
|
-
errors.push(getErrorMessage(mcpResult.reason, "Failed to load connectors."));
|
|
1981
|
-
}
|
|
1982
|
-
setError(errors[0] ?? null);
|
|
1983
|
-
}).finally(() => {
|
|
1984
|
-
if (!cancelled) setLoading(false);
|
|
1985
|
-
});
|
|
1986
|
-
return () => {
|
|
1987
|
-
cancelled = true;
|
|
1988
|
-
};
|
|
1989
|
-
}, [requested, server]);
|
|
1990
|
-
const value = useMemo(
|
|
1991
|
-
() => ({ server, models, skills, connectors, loading, error, ensureLoaded, refreshConnectors }),
|
|
1992
|
-
[server, models, skills, connectors, loading, error, ensureLoaded, refreshConnectors]
|
|
1993
|
-
);
|
|
1994
|
-
return /* @__PURE__ */ jsx30(DraftCatalogContext.Provider, { value, children });
|
|
1995
|
-
}
|
|
1996
|
-
function useDraftCatalog() {
|
|
1997
|
-
const ctx = useContext3(DraftCatalogContext);
|
|
1998
|
-
if (ctx == null) {
|
|
1999
|
-
return {
|
|
2000
|
-
models: [],
|
|
2001
|
-
skills: [],
|
|
2002
|
-
connectors: [],
|
|
2003
|
-
loading: false,
|
|
2004
|
-
error: null,
|
|
2005
|
-
ensureLoaded: IDLE_ENSURE,
|
|
2006
|
-
refreshConnectors: IDLE_REFRESH
|
|
2007
|
-
};
|
|
2008
|
-
}
|
|
2009
|
-
return ctx;
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
1880
|
// src/atoms/draft/reasoningEffort.ts
|
|
2013
1881
|
function hasReasoningEfforts(efforts) {
|
|
2014
1882
|
return Array.isArray(efforts) && efforts.length > 0;
|
|
@@ -2032,12 +1900,12 @@ function modelPatchWithReasoningEffort(name, existingParams, efforts) {
|
|
|
2032
1900
|
}
|
|
2033
1901
|
|
|
2034
1902
|
// src/atoms/draft/DraftReasoningEffortSelector.tsx
|
|
2035
|
-
import { Fragment as Fragment5, jsx as
|
|
1903
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2036
1904
|
function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
2037
1905
|
const { models, ensureLoaded } = useDraftCatalog();
|
|
2038
1906
|
const { agentSpec } = useTrueFoundryAgentSpec2();
|
|
2039
1907
|
const updateAgentSpec = useTrueFoundryUpdateAgentSpec();
|
|
2040
|
-
const [open, setOpen] =
|
|
1908
|
+
const [open, setOpen] = useState11(false);
|
|
2041
1909
|
const containerRef = useRef4(null);
|
|
2042
1910
|
const clearedStickyEffortForModelRef = useRef4(null);
|
|
2043
1911
|
const menuId = useId3();
|
|
@@ -2048,10 +1916,10 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2048
1916
|
const efforts = selected?.properties.reasoningEfforts;
|
|
2049
1917
|
const currentEffort = agentSpec?.model?.params?.reasoningEffort;
|
|
2050
1918
|
const resolved = resolveReasoningEffort(efforts, currentEffort);
|
|
2051
|
-
|
|
1919
|
+
useEffect7(() => {
|
|
2052
1920
|
ensureLoaded();
|
|
2053
1921
|
}, [ensureLoaded]);
|
|
2054
|
-
|
|
1922
|
+
useEffect7(() => {
|
|
2055
1923
|
if (!open) return;
|
|
2056
1924
|
const handler = (e) => {
|
|
2057
1925
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -2061,7 +1929,7 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2061
1929
|
document.addEventListener("mousedown", handler);
|
|
2062
1930
|
return () => document.removeEventListener("mousedown", handler);
|
|
2063
1931
|
}, [open]);
|
|
2064
|
-
|
|
1932
|
+
useEffect7(() => {
|
|
2065
1933
|
if (!updateAgentSpec || selected === void 0) return;
|
|
2066
1934
|
if (hasReasoningEfforts(efforts)) {
|
|
2067
1935
|
clearedStickyEffortForModelRef.current = null;
|
|
@@ -2076,8 +1944,8 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2076
1944
|
}, [updateAgentSpec, selected, efforts, currentEffort, agentSpec?.model?.params]);
|
|
2077
1945
|
if (!hasReasoningEfforts(efforts) || !resolved) return null;
|
|
2078
1946
|
const content = /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ jsx30("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx30("p", { className: "text-text-primary text-sm font-semibold", children: "Reasoning effort" }) }),
|
|
1948
|
+
/* @__PURE__ */ jsx30(
|
|
2081
1949
|
"div",
|
|
2082
1950
|
{
|
|
2083
1951
|
id: menuId,
|
|
@@ -2086,7 +1954,7 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2086
1954
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto p-1",
|
|
2087
1955
|
children: efforts.map((effort) => {
|
|
2088
1956
|
const active = effort === resolved;
|
|
2089
|
-
return /* @__PURE__ */
|
|
1957
|
+
return /* @__PURE__ */ jsx30(
|
|
2090
1958
|
"button",
|
|
2091
1959
|
{
|
|
2092
1960
|
type: "button",
|
|
@@ -2107,7 +1975,7 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2107
1975
|
});
|
|
2108
1976
|
setOpen(false);
|
|
2109
1977
|
},
|
|
2110
|
-
children: /* @__PURE__ */
|
|
1978
|
+
children: /* @__PURE__ */ jsx30("span", { className: "truncate font-medium", children: effort })
|
|
2111
1979
|
},
|
|
2112
1980
|
effort
|
|
2113
1981
|
);
|
|
@@ -2135,43 +2003,43 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
|
|
|
2135
2003
|
}),
|
|
2136
2004
|
onClick: () => setOpen((v) => !v),
|
|
2137
2005
|
children: [
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx30("span", { className: "truncate", children: resolved }),
|
|
2007
|
+
/* @__PURE__ */ jsx30(Icon, { name: "chevron-down", className: "size-3.5 shrink-0 opacity-60" })
|
|
2140
2008
|
]
|
|
2141
2009
|
}
|
|
2142
2010
|
),
|
|
2143
|
-
open ? isMobile || compactLayout ? /* @__PURE__ */
|
|
2011
|
+
open ? isMobile || compactLayout ? /* @__PURE__ */ jsx30(BottomSheet, { open: true, onOpenChange: setOpen, "aria-label": "Select reasoning effort", children: content }) : /* @__PURE__ */ jsx30("div", { className: "bg-card-bg text-text-primary absolute right-0 bottom-full z-50 mb-2 flex max-h-[22rem] w-[12rem] flex-col overflow-hidden rounded-lg border border-border shadow-lg", children: content }) : null
|
|
2144
2012
|
] });
|
|
2145
2013
|
}
|
|
2146
2014
|
|
|
2147
2015
|
// src/atoms/draft/DraftComposerSections.tsx
|
|
2148
|
-
import { jsx as
|
|
2016
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2149
2017
|
function DraftComposerLeftSection({ disabled, isRunning, onAttach }) {
|
|
2150
2018
|
const DraftCompositeSelector2 = useSlot("DraftCompositeSelector");
|
|
2151
|
-
return /* @__PURE__ */
|
|
2019
|
+
return /* @__PURE__ */ jsx31("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: /* @__PURE__ */ jsx31(DraftCompositeSelector2, { disabled, isRunning, onAttach }) });
|
|
2152
2020
|
}
|
|
2153
2021
|
function DraftComposerRightSection({ disabled, isRunning }) {
|
|
2154
2022
|
const DraftModelSelector2 = useSlot("DraftModelSelector");
|
|
2155
2023
|
return /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ jsx31(DraftModelSelector2, { disabled, isRunning }),
|
|
2025
|
+
/* @__PURE__ */ jsx31(DraftReasoningEffortSelector, { disabled, isRunning })
|
|
2158
2026
|
] });
|
|
2159
2027
|
}
|
|
2160
2028
|
|
|
2161
2029
|
// src/atoms/draft/DraftCompositeSelector.tsx
|
|
2162
2030
|
import { useTrueFoundryAgentSpec as useTrueFoundryAgentSpec3, useTrueFoundryUpdateAgentSpec as useTrueFoundryUpdateAgentSpec2 } from "@truefoundry/assistant-ui-runtime";
|
|
2163
|
-
import { useCallback as
|
|
2031
|
+
import { useCallback as useCallback5, useEffect as useEffect9, useId as useId4, useMemo as useMemo3, useRef as useRef7, useState as useState15 } from "react";
|
|
2164
2032
|
|
|
2165
2033
|
// src/hooks/useMcpAuth.ts
|
|
2166
|
-
import { useCallback as
|
|
2034
|
+
import { useCallback as useCallback4, useEffect as useEffect8, useMemo as useMemo2, useRef as useRef5, useState as useState13 } from "react";
|
|
2167
2035
|
|
|
2168
2036
|
// src/containers/ToasterContainer.tsx
|
|
2169
|
-
import { createContext as
|
|
2170
|
-
import { jsx as
|
|
2037
|
+
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext3, useMemo, useState as useState12 } from "react";
|
|
2038
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2171
2039
|
var MAX_TOAST_DESCRIPTION_CHARS = 480;
|
|
2172
2040
|
var MAX_VISIBLE_TOASTS = 5;
|
|
2173
2041
|
var SUCCESS_TOAST_TTL_MS = 3e3;
|
|
2174
|
-
var ToasterContext =
|
|
2042
|
+
var ToasterContext = createContext2(null);
|
|
2175
2043
|
var toastId = 0;
|
|
2176
2044
|
function nextToastId() {
|
|
2177
2045
|
toastId += 1;
|
|
@@ -2201,16 +2069,16 @@ function normalizeError(error) {
|
|
|
2201
2069
|
function ToasterProvider({ children }) {
|
|
2202
2070
|
const Toast2 = useSlot("Toast");
|
|
2203
2071
|
const ToastStack2 = useSlot("ToastStack");
|
|
2204
|
-
const [toasts, setToasts] =
|
|
2205
|
-
const dismiss =
|
|
2072
|
+
const [toasts, setToasts] = useState12([]);
|
|
2073
|
+
const dismiss = useCallback3((id) => {
|
|
2206
2074
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
2207
2075
|
}, []);
|
|
2208
|
-
const showError =
|
|
2076
|
+
const showError = useCallback3((error) => {
|
|
2209
2077
|
console.error("[trueforge-ui]", error);
|
|
2210
2078
|
const item = { id: nextToastId(), variant: "error", ...normalizeError(error) };
|
|
2211
2079
|
setToasts((prev) => [...prev, item].slice(-MAX_VISIBLE_TOASTS));
|
|
2212
2080
|
}, []);
|
|
2213
|
-
const showSuccess =
|
|
2081
|
+
const showSuccess = useCallback3(
|
|
2214
2082
|
(content) => {
|
|
2215
2083
|
const id = nextToastId();
|
|
2216
2084
|
const item = { id, variant: "success", ...content };
|
|
@@ -2221,10 +2089,10 @@ function ToasterProvider({ children }) {
|
|
|
2221
2089
|
},
|
|
2222
2090
|
[dismiss]
|
|
2223
2091
|
);
|
|
2224
|
-
const value =
|
|
2092
|
+
const value = useMemo(() => ({ showError, showSuccess }), [showError, showSuccess]);
|
|
2225
2093
|
return /* @__PURE__ */ jsxs22(ToasterContext.Provider, { value, children: [
|
|
2226
2094
|
children,
|
|
2227
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ jsx32(ToastStack2, { children: toasts.map((toast) => /* @__PURE__ */ jsx32(
|
|
2228
2096
|
Toast2,
|
|
2229
2097
|
{
|
|
2230
2098
|
title: toast.title,
|
|
@@ -2240,14 +2108,14 @@ function ToasterProvider({ children }) {
|
|
|
2240
2108
|
] });
|
|
2241
2109
|
}
|
|
2242
2110
|
function useToaster() {
|
|
2243
|
-
const context =
|
|
2111
|
+
const context = useContext3(ToasterContext);
|
|
2244
2112
|
if (context == null) {
|
|
2245
2113
|
throw new Error("useToaster must be used within ToasterProvider");
|
|
2246
2114
|
}
|
|
2247
2115
|
return context;
|
|
2248
2116
|
}
|
|
2249
2117
|
function useToasterOptional() {
|
|
2250
|
-
return
|
|
2118
|
+
return useContext3(ToasterContext);
|
|
2251
2119
|
}
|
|
2252
2120
|
|
|
2253
2121
|
// src/hooks/useMcpAuth.ts
|
|
@@ -2261,15 +2129,15 @@ var isPopupMessage = (value) => {
|
|
|
2261
2129
|
var useMCPAuth = ({ callbackPath } = {}) => {
|
|
2262
2130
|
const { connectorCatalog } = useCatalogServer();
|
|
2263
2131
|
const toaster = useToasterOptional();
|
|
2264
|
-
const [isOAuthLoading, setIsOAuthLoading] =
|
|
2265
|
-
const popupUid =
|
|
2132
|
+
const [isOAuthLoading, setIsOAuthLoading] = useState13(false);
|
|
2133
|
+
const popupUid = useMemo2(() => generatePopupUid(), []);
|
|
2266
2134
|
const listenerCleanupRef = useRef5(null);
|
|
2267
|
-
const clearPopupListener =
|
|
2135
|
+
const clearPopupListener = useCallback4(() => {
|
|
2268
2136
|
listenerCleanupRef.current?.();
|
|
2269
2137
|
listenerCleanupRef.current = null;
|
|
2270
2138
|
}, []);
|
|
2271
|
-
|
|
2272
|
-
const openAuthPopup =
|
|
2139
|
+
useEffect8(() => clearPopupListener, [clearPopupListener]);
|
|
2140
|
+
const openAuthPopup = useCallback4(
|
|
2273
2141
|
(authorizationEndpoint, callback) => {
|
|
2274
2142
|
clearPopupListener();
|
|
2275
2143
|
const channel = new BroadcastChannel(MCP_AUTH_POPUP_CHANNEL);
|
|
@@ -2296,7 +2164,7 @@ var useMCPAuth = ({ callbackPath } = {}) => {
|
|
|
2296
2164
|
},
|
|
2297
2165
|
[clearPopupListener, popupUid]
|
|
2298
2166
|
);
|
|
2299
|
-
const handleAuthorize =
|
|
2167
|
+
const handleAuthorize = useCallback4(
|
|
2300
2168
|
async (integrationId, callback) => {
|
|
2301
2169
|
if (!integrationId) return;
|
|
2302
2170
|
try {
|
|
@@ -2333,16 +2201,22 @@ var useMCPAuth = ({ callbackPath } = {}) => {
|
|
|
2333
2201
|
};
|
|
2334
2202
|
};
|
|
2335
2203
|
|
|
2204
|
+
// src/atoms/lib/inputClasses.ts
|
|
2205
|
+
var baseClasses = "w-full cursor-text rounded-md border border-input-border bg-input-box-bg px-3 text-sm text-text-primary outline-none placeholder:text-text-secondary/70 focus-visible:ring-2 focus-visible:ring-focus-ring/40 disabled:cursor-not-allowed";
|
|
2206
|
+
function auiInputClass(className) {
|
|
2207
|
+
return cn(baseClasses, className);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2336
2210
|
// src/atoms/primitives/Tooltip.tsx
|
|
2337
|
-
import { cloneElement, isValidElement, useLayoutEffect as useLayoutEffect2, useRef as useRef6, useState as
|
|
2211
|
+
import { cloneElement, isValidElement, useLayoutEffect as useLayoutEffect2, useRef as useRef6, useState as useState14 } from "react";
|
|
2338
2212
|
import { createPortal } from "react-dom";
|
|
2339
|
-
import { jsx as
|
|
2213
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2340
2214
|
function themePortalRoot(from) {
|
|
2341
2215
|
return from?.closest(".aui-theme-root") ?? document.body;
|
|
2342
2216
|
}
|
|
2343
2217
|
function Tooltip({ content, children, className, side = "top" }) {
|
|
2344
|
-
const [visible, setVisible] =
|
|
2345
|
-
const [pos, setPos] =
|
|
2218
|
+
const [visible, setVisible] = useState14(false);
|
|
2219
|
+
const [pos, setPos] = useState14(null);
|
|
2346
2220
|
const triggerWrapRef = useRef6(null);
|
|
2347
2221
|
useLayoutEffect2(() => {
|
|
2348
2222
|
if (!visible) {
|
|
@@ -2391,7 +2265,7 @@ function Tooltip({ content, children, className, side = "top" }) {
|
|
|
2391
2265
|
}
|
|
2392
2266
|
});
|
|
2393
2267
|
const tooltip = visible && content != null && pos != null ? createPortal(
|
|
2394
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx33(
|
|
2395
2269
|
"span",
|
|
2396
2270
|
{
|
|
2397
2271
|
role: "tooltip",
|
|
@@ -2416,7 +2290,7 @@ function Tooltip({ content, children, className, side = "top" }) {
|
|
|
2416
2290
|
] });
|
|
2417
2291
|
}
|
|
2418
2292
|
function LightTooltip({ title, children, className, size: _size, side }) {
|
|
2419
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx33(Tooltip, { content: title, className, side, children });
|
|
2420
2294
|
}
|
|
2421
2295
|
|
|
2422
2296
|
// src/atoms/draft/agentCapabilities.ts
|
|
@@ -2445,7 +2319,7 @@ function withAgentCapabilities({
|
|
|
2445
2319
|
}
|
|
2446
2320
|
|
|
2447
2321
|
// src/atoms/primitives/Switch.tsx
|
|
2448
|
-
import { jsx as
|
|
2322
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2449
2323
|
var sizeClasses2 = {
|
|
2450
2324
|
sm: {
|
|
2451
2325
|
track: "h-5 w-9 p-0.5",
|
|
@@ -2460,7 +2334,7 @@ var sizeClasses2 = {
|
|
|
2460
2334
|
};
|
|
2461
2335
|
function Switch({ checked, onCheckedChange, size = "sm", disabled, className, ...props }) {
|
|
2462
2336
|
const classes = sizeClasses2[size];
|
|
2463
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ jsx34(
|
|
2464
2338
|
"button",
|
|
2465
2339
|
{
|
|
2466
2340
|
...props,
|
|
@@ -2478,7 +2352,7 @@ function Switch({ checked, onCheckedChange, size = "sm", disabled, className, ..
|
|
|
2478
2352
|
className
|
|
2479
2353
|
),
|
|
2480
2354
|
onClick: () => onCheckedChange(!checked),
|
|
2481
|
-
children: /* @__PURE__ */
|
|
2355
|
+
children: /* @__PURE__ */ jsx34(
|
|
2482
2356
|
"span",
|
|
2483
2357
|
{
|
|
2484
2358
|
"aria-hidden": true,
|
|
@@ -2495,7 +2369,7 @@ function Switch({ checked, onCheckedChange, size = "sm", disabled, className, ..
|
|
|
2495
2369
|
}
|
|
2496
2370
|
|
|
2497
2371
|
// src/atoms/draft/DraftCapabilitiesPanel.tsx
|
|
2498
|
-
import { jsx as
|
|
2372
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2499
2373
|
var CAPABILITIES = [
|
|
2500
2374
|
{
|
|
2501
2375
|
id: "generativeUi",
|
|
@@ -2519,7 +2393,7 @@ function DraftCapabilitiesPanel({
|
|
|
2519
2393
|
disabled = false,
|
|
2520
2394
|
divided = false
|
|
2521
2395
|
}) {
|
|
2522
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ jsx35("div", { className: cn("flex flex-col", divided && "overflow-hidden rounded-xl border border-border"), children: CAPABILITIES.map((capability, index) => {
|
|
2523
2397
|
const checked = value[capability.id];
|
|
2524
2398
|
return /* @__PURE__ */ jsxs24(
|
|
2525
2399
|
"div",
|
|
@@ -2527,10 +2401,10 @@ function DraftCapabilitiesPanel({
|
|
|
2527
2401
|
className: cn("flex items-start gap-3 px-3 py-3", divided && index > 0 && "border-t border-border"),
|
|
2528
2402
|
children: [
|
|
2529
2403
|
/* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2404
|
+
/* @__PURE__ */ jsx35("p", { className: "text-text-primary text-sm font-medium", children: capability.label }),
|
|
2405
|
+
/* @__PURE__ */ jsx35("p", { className: "text-text-secondary mt-0.5 text-xs leading-snug", children: capability.description })
|
|
2532
2406
|
] }),
|
|
2533
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ jsx35(
|
|
2534
2408
|
Switch,
|
|
2535
2409
|
{
|
|
2536
2410
|
checked,
|
|
@@ -2547,8 +2421,39 @@ function DraftCapabilitiesPanel({
|
|
|
2547
2421
|
}) });
|
|
2548
2422
|
}
|
|
2549
2423
|
|
|
2424
|
+
// src/atoms/draft/DraftCatalogEmptyState.tsx
|
|
2425
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2426
|
+
function DraftCatalogEmptyState({
|
|
2427
|
+
loading,
|
|
2428
|
+
emptyLabel,
|
|
2429
|
+
settingsTarget,
|
|
2430
|
+
onOpenSettings
|
|
2431
|
+
}) {
|
|
2432
|
+
if (!loading && onOpenSettings) {
|
|
2433
|
+
return /* @__PURE__ */ jsxs25(
|
|
2434
|
+
"button",
|
|
2435
|
+
{
|
|
2436
|
+
type: "button",
|
|
2437
|
+
className: auiButtonClass({
|
|
2438
|
+
variant: "ghost",
|
|
2439
|
+
className: "text-text-secondary w-full justify-center gap-1 py-4 text-xs"
|
|
2440
|
+
}),
|
|
2441
|
+
onClick: onOpenSettings,
|
|
2442
|
+
children: [
|
|
2443
|
+
"Please configure ",
|
|
2444
|
+
settingsTarget,
|
|
2445
|
+
" in the ",
|
|
2446
|
+
/* @__PURE__ */ jsx36("span", { className: "underline", children: "settings" }),
|
|
2447
|
+
/* @__PURE__ */ jsx36(Icon, { name: "chevron-right", className: "size-3" })
|
|
2448
|
+
]
|
|
2449
|
+
}
|
|
2450
|
+
);
|
|
2451
|
+
}
|
|
2452
|
+
return /* @__PURE__ */ jsx36("p", { className: "text-text-secondary px-2 py-4 text-center text-sm", children: loading ? "Loading\u2026" : emptyLabel });
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2550
2455
|
// src/atoms/draft/DraftCompositeSelector.tsx
|
|
2551
|
-
import { Fragment as Fragment6, jsx as jsx37, jsxs as
|
|
2456
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2552
2457
|
function draftMountsFromSpec(value) {
|
|
2553
2458
|
if (!Array.isArray(value)) return [];
|
|
2554
2459
|
const mounts = [];
|
|
@@ -2588,15 +2493,15 @@ function CatalogRow({
|
|
|
2588
2493
|
onToggle,
|
|
2589
2494
|
action
|
|
2590
2495
|
}) {
|
|
2591
|
-
const content = /* @__PURE__ */
|
|
2496
|
+
const content = /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2592
2497
|
/* @__PURE__ */ jsx37("span", { className: "bg-secondary-bg text-text-secondary mt-0.5 flex size-7 shrink-0 items-center justify-center rounded text-xs font-semibold", children: title.charAt(0).toUpperCase() }),
|
|
2593
|
-
/* @__PURE__ */
|
|
2498
|
+
/* @__PURE__ */ jsxs26("span", { className: "min-w-0 flex-1", children: [
|
|
2594
2499
|
/* @__PURE__ */ jsx37("span", { className: "text-text-primary block truncate text-sm font-medium", children: title }),
|
|
2595
2500
|
description ? /* @__PURE__ */ jsx37("span", { className: "text-text-secondary line-clamp-1 text-xs", children: description }) : null
|
|
2596
2501
|
] })
|
|
2597
2502
|
] });
|
|
2598
2503
|
if (action) {
|
|
2599
|
-
return /* @__PURE__ */
|
|
2504
|
+
return /* @__PURE__ */ jsxs26(
|
|
2600
2505
|
"div",
|
|
2601
2506
|
{
|
|
2602
2507
|
role: "menuitemcheckbox",
|
|
@@ -2617,7 +2522,7 @@ function CatalogRow({
|
|
|
2617
2522
|
}
|
|
2618
2523
|
);
|
|
2619
2524
|
}
|
|
2620
|
-
return /* @__PURE__ */
|
|
2525
|
+
return /* @__PURE__ */ jsxs26(
|
|
2621
2526
|
"button",
|
|
2622
2527
|
{
|
|
2623
2528
|
type: "button",
|
|
@@ -2667,7 +2572,7 @@ function SearchField({
|
|
|
2667
2572
|
onChange,
|
|
2668
2573
|
placeholder
|
|
2669
2574
|
}) {
|
|
2670
|
-
return /* @__PURE__ */
|
|
2575
|
+
return /* @__PURE__ */ jsxs26("label", { className: "relative mx-3 my-2 block", children: [
|
|
2671
2576
|
/* @__PURE__ */ jsx37(
|
|
2672
2577
|
Icon,
|
|
2673
2578
|
{
|
|
@@ -2682,13 +2587,13 @@ function SearchField({
|
|
|
2682
2587
|
value,
|
|
2683
2588
|
onChange: (e) => onChange(e.target.value),
|
|
2684
2589
|
placeholder,
|
|
2685
|
-
className: "
|
|
2590
|
+
className: auiInputClass("h-8 bg-secondary-bg py-1 pr-2 pl-7 dark:bg-primary-bg")
|
|
2686
2591
|
}
|
|
2687
2592
|
)
|
|
2688
2593
|
] });
|
|
2689
2594
|
}
|
|
2690
2595
|
function SectionHeading({ label, count }) {
|
|
2691
|
-
return /* @__PURE__ */
|
|
2596
|
+
return /* @__PURE__ */ jsxs26("div", { className: "text-text-secondary px-3 pt-2 pb-1 text-[11px] font-medium tracking-wide uppercase", children: [
|
|
2692
2597
|
label,
|
|
2693
2598
|
" (",
|
|
2694
2599
|
count,
|
|
@@ -2696,17 +2601,19 @@ function SectionHeading({ label, count }) {
|
|
|
2696
2601
|
] });
|
|
2697
2602
|
}
|
|
2698
2603
|
function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
2699
|
-
const { skills, connectors, ensureLoaded, refreshConnectors } = useDraftCatalog();
|
|
2604
|
+
const { skills, connectors, loading, ensureLoaded, refreshConnectors } = useDraftCatalog();
|
|
2700
2605
|
const capabilities = useServerCapabilities();
|
|
2606
|
+
const settingsCatalog = useOptionalCatalogServer();
|
|
2607
|
+
const shell = useOptionalShellMode();
|
|
2701
2608
|
const { agentSpec } = useTrueFoundryAgentSpec3();
|
|
2702
2609
|
const updateAgentSpec = useTrueFoundryUpdateAgentSpec2();
|
|
2703
|
-
const [open, setOpen] =
|
|
2704
|
-
const [tab, setTab] =
|
|
2705
|
-
const [query, setQuery] =
|
|
2706
|
-
const [pinnedMcpIds, setPinnedMcpIds] =
|
|
2707
|
-
const [pinnedSkillIds, setPinnedSkillIds] =
|
|
2708
|
-
const [localMcp, setLocalMcp] =
|
|
2709
|
-
const [localSkills, setLocalSkills] =
|
|
2610
|
+
const [open, setOpen] = useState15(false);
|
|
2611
|
+
const [tab, setTab] = useState15("connectors");
|
|
2612
|
+
const [query, setQuery] = useState15("");
|
|
2613
|
+
const [pinnedMcpIds, setPinnedMcpIds] = useState15(() => /* @__PURE__ */ new Set());
|
|
2614
|
+
const [pinnedSkillIds, setPinnedSkillIds] = useState15(() => /* @__PURE__ */ new Set());
|
|
2615
|
+
const [localMcp, setLocalMcp] = useState15([]);
|
|
2616
|
+
const [localSkills, setLocalSkills] = useState15([]);
|
|
2710
2617
|
const dirtyRef = useRef7(false);
|
|
2711
2618
|
const flushTimerRef = useRef7(null);
|
|
2712
2619
|
const localMcpRef = useRef7(localMcp);
|
|
@@ -2719,15 +2626,20 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2719
2626
|
const compactLayout = useCompactLayout();
|
|
2720
2627
|
const skillsDisabled = capabilities?.skill.enabled !== true;
|
|
2721
2628
|
const skillsDisabledReason = capabilities?.skill.reason;
|
|
2722
|
-
const
|
|
2723
|
-
const
|
|
2629
|
+
const needsSandbox = capabilities?.sandbox.enabled === false;
|
|
2630
|
+
const settingsEnabled = capabilities?.settings?.enabled !== false;
|
|
2631
|
+
const canConfigureConnectors = settingsEnabled && settingsCatalog?.connectorCatalog != null;
|
|
2632
|
+
const canConfigureSkills = settingsEnabled && settingsCatalog?.skillCatalog != null;
|
|
2633
|
+
const canConfigureSandbox = settingsEnabled && settingsCatalog?.sandboxCatalog != null;
|
|
2634
|
+
const specMcp = useMemo3(() => draftMountsFromSpec(agentSpec?.mcpServers), [agentSpec?.mcpServers]);
|
|
2635
|
+
const specSkills = useMemo3(() => draftMountsFromSpec(agentSpec?.skills), [agentSpec?.skills]);
|
|
2724
2636
|
const selectedMcp = open ? localMcp : specMcp;
|
|
2725
2637
|
const selectedSkills = open ? localSkills : specSkills;
|
|
2726
|
-
const selectedMcpIds =
|
|
2727
|
-
const selectedSkillIds =
|
|
2638
|
+
const selectedMcpIds = useMemo3(() => new Set(selectedMcp.map((m) => m.id)), [selectedMcp]);
|
|
2639
|
+
const selectedSkillIds = useMemo3(() => new Set(selectedSkills.map((s) => s.id)), [selectedSkills]);
|
|
2728
2640
|
const hasValidModel = Boolean(agentSpec?.model?.name.trim());
|
|
2729
2641
|
const toolsCount = selectedMcp.length + selectedSkills.length;
|
|
2730
|
-
const toolsTooltip =
|
|
2642
|
+
const toolsTooltip = useMemo3(() => {
|
|
2731
2643
|
const formatNames = (items) => {
|
|
2732
2644
|
const names = items.map((item) => item.name);
|
|
2733
2645
|
if (names.length <= 4) return names.join(", ");
|
|
@@ -2742,13 +2654,13 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2742
2654
|
}
|
|
2743
2655
|
return lines.length > 0 ? lines.join("\n") : "No connectors or skills selected";
|
|
2744
2656
|
}, [selectedMcp, selectedSkills]);
|
|
2745
|
-
const clearFlushTimer =
|
|
2657
|
+
const clearFlushTimer = useCallback5(() => {
|
|
2746
2658
|
if (flushTimerRef.current != null) {
|
|
2747
2659
|
window.clearTimeout(flushTimerRef.current);
|
|
2748
2660
|
flushTimerRef.current = null;
|
|
2749
2661
|
}
|
|
2750
2662
|
}, []);
|
|
2751
|
-
const flushSpec =
|
|
2663
|
+
const flushSpec = useCallback5(() => {
|
|
2752
2664
|
clearFlushTimer();
|
|
2753
2665
|
if (!dirtyRef.current) return;
|
|
2754
2666
|
dirtyRef.current = false;
|
|
@@ -2757,29 +2669,29 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2757
2669
|
skills: localSkillsRef.current
|
|
2758
2670
|
});
|
|
2759
2671
|
}, [clearFlushTimer, updateAgentSpec]);
|
|
2760
|
-
const scheduleFlush =
|
|
2672
|
+
const scheduleFlush = useCallback5(() => {
|
|
2761
2673
|
clearFlushTimer();
|
|
2762
2674
|
flushTimerRef.current = window.setTimeout(() => {
|
|
2763
2675
|
flushTimerRef.current = null;
|
|
2764
2676
|
flushSpec();
|
|
2765
2677
|
}, SPEC_FLUSH_MS);
|
|
2766
2678
|
}, [clearFlushTimer, flushSpec]);
|
|
2767
|
-
const setOpenAndFlush =
|
|
2679
|
+
const setOpenAndFlush = useCallback5(
|
|
2768
2680
|
(next) => {
|
|
2769
2681
|
if (!next) flushSpec();
|
|
2770
2682
|
setOpen(next);
|
|
2771
2683
|
},
|
|
2772
2684
|
[flushSpec]
|
|
2773
2685
|
);
|
|
2774
|
-
|
|
2686
|
+
useEffect9(() => {
|
|
2775
2687
|
if (open) ensureLoaded();
|
|
2776
2688
|
}, [open, ensureLoaded]);
|
|
2777
|
-
|
|
2689
|
+
useEffect9(() => {
|
|
2778
2690
|
if (open && !hasValidModel) {
|
|
2779
2691
|
setOpenAndFlush(false);
|
|
2780
2692
|
}
|
|
2781
2693
|
}, [hasValidModel, open, setOpenAndFlush]);
|
|
2782
|
-
|
|
2694
|
+
useEffect9(() => {
|
|
2783
2695
|
if (!open) return;
|
|
2784
2696
|
const handler = (e) => {
|
|
2785
2697
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -2793,8 +2705,8 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2793
2705
|
document.removeEventListener("focusin", handler);
|
|
2794
2706
|
};
|
|
2795
2707
|
}, [open, setOpenAndFlush]);
|
|
2796
|
-
|
|
2797
|
-
const filteredConnectors =
|
|
2708
|
+
useEffect9(() => () => clearFlushTimer(), [clearFlushTimer]);
|
|
2709
|
+
const filteredConnectors = useMemo3(() => {
|
|
2798
2710
|
const needle = query.trim().toLowerCase();
|
|
2799
2711
|
const matches = needle ? connectors.filter(
|
|
2800
2712
|
(c) => c.name.toLowerCase().includes(needle) || (c.description?.toLowerCase().includes(needle) ?? false)
|
|
@@ -2803,26 +2715,26 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2803
2715
|
(left, right) => Number(isUnauthenticatedDcrConnector(left)) - Number(isUnauthenticatedDcrConnector(right))
|
|
2804
2716
|
);
|
|
2805
2717
|
}, [connectors, query]);
|
|
2806
|
-
const filteredSkills =
|
|
2718
|
+
const filteredSkills = useMemo3(() => {
|
|
2807
2719
|
const needle = query.trim().toLowerCase();
|
|
2808
2720
|
if (!needle) return skills;
|
|
2809
2721
|
return skills.filter(
|
|
2810
2722
|
(s) => s.name.toLowerCase().includes(needle) || (s.description?.toLowerCase().includes(needle) ?? false)
|
|
2811
2723
|
);
|
|
2812
2724
|
}, [skills, query]);
|
|
2813
|
-
const pinnedSelectedConnectors =
|
|
2725
|
+
const pinnedSelectedConnectors = useMemo3(
|
|
2814
2726
|
() => filteredConnectors.filter((c) => pinnedMcpIds.has(c.id)),
|
|
2815
2727
|
[filteredConnectors, pinnedMcpIds]
|
|
2816
2728
|
);
|
|
2817
|
-
const pinnedAvailableConnectors =
|
|
2729
|
+
const pinnedAvailableConnectors = useMemo3(
|
|
2818
2730
|
() => filteredConnectors.filter((c) => !pinnedMcpIds.has(c.id)),
|
|
2819
2731
|
[filteredConnectors, pinnedMcpIds]
|
|
2820
2732
|
);
|
|
2821
|
-
const pinnedSelectedSkills =
|
|
2733
|
+
const pinnedSelectedSkills = useMemo3(
|
|
2822
2734
|
() => filteredSkills.filter((s) => pinnedSkillIds.has(s.id)),
|
|
2823
2735
|
[filteredSkills, pinnedSkillIds]
|
|
2824
2736
|
);
|
|
2825
|
-
const pinnedAvailableSkills =
|
|
2737
|
+
const pinnedAvailableSkills = useMemo3(
|
|
2826
2738
|
() => filteredSkills.filter((s) => !pinnedSkillIds.has(s.id)),
|
|
2827
2739
|
[filteredSkills, pinnedSkillIds]
|
|
2828
2740
|
);
|
|
@@ -2854,11 +2766,16 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2854
2766
|
setPinnedSkillIds(new Set(specSkills.map((s) => s.id)));
|
|
2855
2767
|
setOpen(true);
|
|
2856
2768
|
};
|
|
2857
|
-
const
|
|
2769
|
+
const openSettings = (section) => {
|
|
2770
|
+
setOpenAndFlush(false);
|
|
2771
|
+
setQuery("");
|
|
2772
|
+
shell?.setSettingsOpen(true, section);
|
|
2773
|
+
};
|
|
2774
|
+
const content = /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2858
2775
|
/* @__PURE__ */ jsx37("div", { className: "flex shrink-0 border-b border-border", children: TABS.map((t) => {
|
|
2859
2776
|
const count = t.id === "connectors" ? selectedMcp.length : t.id === "skills" ? selectedSkills.length : null;
|
|
2860
2777
|
const active = tab === t.id;
|
|
2861
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ jsxs26(
|
|
2862
2779
|
"button",
|
|
2863
2780
|
{
|
|
2864
2781
|
type: "button",
|
|
@@ -2896,7 +2813,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2896
2813
|
});
|
|
2897
2814
|
}
|
|
2898
2815
|
}
|
|
2899
|
-
) }) : /* @__PURE__ */
|
|
2816
|
+
) }) : /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2900
2817
|
/* @__PURE__ */ jsx37(
|
|
2901
2818
|
SearchField,
|
|
2902
2819
|
{
|
|
@@ -2905,7 +2822,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2905
2822
|
placeholder: tab === "connectors" ? "Search connectors..." : "Search skills..."
|
|
2906
2823
|
}
|
|
2907
2824
|
),
|
|
2908
|
-
tab === "skills" && skillsDisabled && skillsDisabledReason ? /* @__PURE__ */
|
|
2825
|
+
tab === "skills" && skillsDisabled && skillsDisabledReason ? /* @__PURE__ */ jsxs26(
|
|
2909
2826
|
"div",
|
|
2910
2827
|
{
|
|
2911
2828
|
role: "status",
|
|
@@ -2916,8 +2833,8 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2916
2833
|
]
|
|
2917
2834
|
}
|
|
2918
2835
|
) : null,
|
|
2919
|
-
/* @__PURE__ */ jsx37("div", { className: "min-h-0 flex-1 overflow-y-auto px-1 pb-2", children: tab === "connectors" ? /* @__PURE__ */
|
|
2920
|
-
pinnedSelectedConnectors.length > 0 ? /* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ jsx37("div", { className: "min-h-0 flex-1 overflow-y-auto px-1 pb-2", children: tab === "connectors" ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2837
|
+
pinnedSelectedConnectors.length > 0 ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2921
2838
|
/* @__PURE__ */ jsx37(SectionHeading, { label: "Selected", count: pinnedSelectedConnectors.length }),
|
|
2922
2839
|
pinnedSelectedConnectors.map((c) => /* @__PURE__ */ jsx37(
|
|
2923
2840
|
CatalogRow,
|
|
@@ -2931,7 +2848,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2931
2848
|
c.id
|
|
2932
2849
|
))
|
|
2933
2850
|
] }) : null,
|
|
2934
|
-
pinnedAvailableConnectors.length > 0 ? /* @__PURE__ */
|
|
2851
|
+
pinnedAvailableConnectors.length > 0 ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2935
2852
|
/* @__PURE__ */ jsx37(SectionHeading, { label: "Available", count: pinnedAvailableConnectors.length }),
|
|
2936
2853
|
pinnedAvailableConnectors.map((c) => /* @__PURE__ */ jsx37(
|
|
2937
2854
|
CatalogRow,
|
|
@@ -2944,9 +2861,18 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2944
2861
|
},
|
|
2945
2862
|
c.id
|
|
2946
2863
|
))
|
|
2947
|
-
] }) : null
|
|
2948
|
-
|
|
2949
|
-
|
|
2864
|
+
] }) : null,
|
|
2865
|
+
filteredConnectors.length === 0 ? /* @__PURE__ */ jsx37(
|
|
2866
|
+
DraftCatalogEmptyState,
|
|
2867
|
+
{
|
|
2868
|
+
loading,
|
|
2869
|
+
emptyLabel: "No connectors",
|
|
2870
|
+
settingsTarget: "Connectors",
|
|
2871
|
+
onOpenSettings: connectors.length === 0 && shell && canConfigureConnectors ? () => openSettings("connectors") : void 0
|
|
2872
|
+
}
|
|
2873
|
+
) : null
|
|
2874
|
+
] }) : /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2875
|
+
pinnedSelectedSkills.length > 0 ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2950
2876
|
/* @__PURE__ */ jsx37(SectionHeading, { label: "Selected", count: pinnedSelectedSkills.length }),
|
|
2951
2877
|
pinnedSelectedSkills.map((s) => /* @__PURE__ */ jsx37(
|
|
2952
2878
|
CatalogRow,
|
|
@@ -2960,7 +2886,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2960
2886
|
s.id
|
|
2961
2887
|
))
|
|
2962
2888
|
] }) : null,
|
|
2963
|
-
pinnedAvailableSkills.length > 0 ? /* @__PURE__ */
|
|
2889
|
+
pinnedAvailableSkills.length > 0 ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2964
2890
|
/* @__PURE__ */ jsx37(SectionHeading, { label: "Available", count: pinnedAvailableSkills.length }),
|
|
2965
2891
|
pinnedAvailableSkills.map((s) => /* @__PURE__ */ jsx37(
|
|
2966
2892
|
CatalogRow,
|
|
@@ -2973,12 +2899,21 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
2973
2899
|
},
|
|
2974
2900
|
s.id
|
|
2975
2901
|
))
|
|
2976
|
-
] }) : null
|
|
2902
|
+
] }) : null,
|
|
2903
|
+
filteredSkills.length === 0 ? /* @__PURE__ */ jsx37(
|
|
2904
|
+
DraftCatalogEmptyState,
|
|
2905
|
+
{
|
|
2906
|
+
loading,
|
|
2907
|
+
emptyLabel: "No skills",
|
|
2908
|
+
settingsTarget: needsSandbox ? "a Sandbox" : "Skills",
|
|
2909
|
+
onOpenSettings: skills.length === 0 && shell && (needsSandbox ? canConfigureSandbox : canConfigureSkills) ? () => openSettings(needsSandbox ? "sandbox" : "skills") : void 0
|
|
2910
|
+
}
|
|
2911
|
+
) : null
|
|
2977
2912
|
] }) })
|
|
2978
2913
|
] })
|
|
2979
2914
|
] });
|
|
2980
|
-
return /* @__PURE__ */
|
|
2981
|
-
hasValidModel ? /* @__PURE__ */ jsx37(Tooltip, { content: toolsTooltip, className: "max-w-xs whitespace-pre-line text-left", side: "top", children: /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ jsxs26("div", { ref: containerRef, className: "relative flex flex-wrap items-center gap-1.5", children: [
|
|
2916
|
+
hasValidModel ? /* @__PURE__ */ jsx37(Tooltip, { content: toolsTooltip, className: "max-w-xs whitespace-pre-line text-left", side: "top", children: /* @__PURE__ */ jsxs26(
|
|
2982
2917
|
"button",
|
|
2983
2918
|
{
|
|
2984
2919
|
type: "button",
|
|
@@ -3032,16 +2967,10 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
|
|
|
3032
2967
|
|
|
3033
2968
|
// src/atoms/draft/DraftModelSelector.tsx
|
|
3034
2969
|
import { useTrueFoundryAgentSpec as useTrueFoundryAgentSpec4, useTrueFoundryUpdateAgentSpec as useTrueFoundryUpdateAgentSpec3 } from "@truefoundry/assistant-ui-runtime";
|
|
3035
|
-
import { useEffect as
|
|
3036
|
-
|
|
3037
|
-
// src/atoms/lib/inputClasses.ts
|
|
3038
|
-
var baseClasses = "w-full cursor-text rounded-md border border-input-border bg-input-box-bg px-3 text-sm text-text-primary outline-none placeholder:text-text-secondary/70 focus-visible:ring-2 focus-visible:ring-focus-ring/40 disabled:cursor-not-allowed";
|
|
3039
|
-
function auiInputClass(className) {
|
|
3040
|
-
return cn(baseClasses, className);
|
|
3041
|
-
}
|
|
2970
|
+
import { useEffect as useEffect11, useId as useId5, useRef as useRef8, useState as useState17 } from "react";
|
|
3042
2971
|
|
|
3043
2972
|
// src/atoms/primitives/CatalogLogo.tsx
|
|
3044
|
-
import { useEffect as
|
|
2973
|
+
import { useEffect as useEffect10, useState as useState16 } from "react";
|
|
3045
2974
|
|
|
3046
2975
|
// src/utils/catalogLogo.ts
|
|
3047
2976
|
function splitCatalogLogoUrl(src) {
|
|
@@ -3074,8 +3003,8 @@ import { createElement } from "react";
|
|
|
3074
3003
|
function CatalogLogo({ src, alt = "", onError, ...props }) {
|
|
3075
3004
|
const mode = useThemeMode();
|
|
3076
3005
|
const preferred = resolveCatalogLogoSrc({ src, mode });
|
|
3077
|
-
const [failedPreferred, setFailedPreferred] =
|
|
3078
|
-
|
|
3006
|
+
const [failedPreferred, setFailedPreferred] = useState16(false);
|
|
3007
|
+
useEffect10(() => {
|
|
3079
3008
|
setFailedPreferred(false);
|
|
3080
3009
|
}, [src, mode, preferred]);
|
|
3081
3010
|
const canFallback = preferred !== src;
|
|
@@ -3099,7 +3028,7 @@ function CatalogLogo({ src, alt = "", onError, ...props }) {
|
|
|
3099
3028
|
}
|
|
3100
3029
|
|
|
3101
3030
|
// src/atoms/draft/DraftModelCatalogPanel.tsx
|
|
3102
|
-
import { Fragment as Fragment7, jsx as jsx38, jsxs as
|
|
3031
|
+
import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3103
3032
|
function monogram(value) {
|
|
3104
3033
|
const trimmed = value.trim();
|
|
3105
3034
|
return trimmed ? trimmed.charAt(0).toUpperCase() : "?";
|
|
@@ -3157,10 +3086,10 @@ function DraftModelCatalogPanel({
|
|
|
3157
3086
|
(model) => model.name.toLowerCase().includes(needle) || model.id.toLowerCase().includes(needle) || model.provider.name.toLowerCase().includes(needle)
|
|
3158
3087
|
) : models;
|
|
3159
3088
|
const sections = groupModelsByProvider(filtered);
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
3090
|
+
/* @__PURE__ */ jsxs27("div", { className: "border-b border-border px-3 py-2", children: [
|
|
3162
3091
|
showHeading ? /* @__PURE__ */ jsx38("p", { className: "text-text-primary mb-2 text-sm font-semibold", children: "Select model" }) : null,
|
|
3163
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ jsxs27("label", { className: "relative block", children: [
|
|
3164
3093
|
/* @__PURE__ */ jsx38(
|
|
3165
3094
|
Icon,
|
|
3166
3095
|
{
|
|
@@ -3188,31 +3117,24 @@ function DraftModelCatalogPanel({
|
|
|
3188
3117
|
role: "listbox",
|
|
3189
3118
|
"aria-label": "Select model",
|
|
3190
3119
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto p-1",
|
|
3191
|
-
children: filtered.length === 0 ?
|
|
3192
|
-
|
|
3120
|
+
children: filtered.length === 0 ? /* @__PURE__ */ jsx38(
|
|
3121
|
+
DraftCatalogEmptyState,
|
|
3193
3122
|
{
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
}),
|
|
3199
|
-
onClick: onOpenSettings,
|
|
3200
|
-
children: [
|
|
3201
|
-
"Please configure Models in the ",
|
|
3202
|
-
/* @__PURE__ */ jsx38("span", { className: "underline", children: "settings" }),
|
|
3203
|
-
/* @__PURE__ */ jsx38(Icon, { name: "chevron-right", className: "size-3.5" })
|
|
3204
|
-
]
|
|
3123
|
+
loading,
|
|
3124
|
+
emptyLabel: "No models",
|
|
3125
|
+
settingsTarget: "Models",
|
|
3126
|
+
onOpenSettings
|
|
3205
3127
|
}
|
|
3206
|
-
) :
|
|
3128
|
+
) : sections.map((section, sectionIndex) => {
|
|
3207
3129
|
const headingId = `${listboxId}-provider-${sectionIndex}`;
|
|
3208
|
-
return /* @__PURE__ */
|
|
3130
|
+
return /* @__PURE__ */ jsxs27(
|
|
3209
3131
|
"div",
|
|
3210
3132
|
{
|
|
3211
3133
|
role: "group",
|
|
3212
3134
|
"aria-labelledby": headingId,
|
|
3213
3135
|
className: cn(sectionIndex > 0 && "mt-2"),
|
|
3214
3136
|
children: [
|
|
3215
|
-
/* @__PURE__ */
|
|
3137
|
+
/* @__PURE__ */ jsxs27(
|
|
3216
3138
|
"div",
|
|
3217
3139
|
{
|
|
3218
3140
|
id: headingId,
|
|
@@ -3225,7 +3147,7 @@ function DraftModelCatalogPanel({
|
|
|
3225
3147
|
),
|
|
3226
3148
|
section.models.map((model) => {
|
|
3227
3149
|
const active = selectedName ? model.name === selectedName : filtered[0] === model;
|
|
3228
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ jsxs27(
|
|
3229
3151
|
"button",
|
|
3230
3152
|
{
|
|
3231
3153
|
type: "button",
|
|
@@ -3255,25 +3177,25 @@ function DraftModelCatalogPanel({
|
|
|
3255
3177
|
}
|
|
3256
3178
|
|
|
3257
3179
|
// src/atoms/draft/DraftModelSelector.tsx
|
|
3258
|
-
import { jsx as jsx39, jsxs as
|
|
3180
|
+
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3259
3181
|
function DraftModelSelector({ disabled, isRunning }) {
|
|
3260
3182
|
const { models, loading, ensureLoaded } = useDraftCatalog();
|
|
3261
3183
|
const { agentSpec } = useTrueFoundryAgentSpec4();
|
|
3262
3184
|
const updateAgentSpec = useTrueFoundryUpdateAgentSpec3();
|
|
3263
3185
|
const catalog = useOptionalCatalogServer();
|
|
3264
3186
|
const shell = useOptionalShellMode();
|
|
3265
|
-
const [open, setOpen] =
|
|
3266
|
-
const [query, setQuery] =
|
|
3187
|
+
const [open, setOpen] = useState17(false);
|
|
3188
|
+
const [query, setQuery] = useState17("");
|
|
3267
3189
|
const containerRef = useRef8(null);
|
|
3268
3190
|
const menuId = useId5();
|
|
3269
3191
|
const isMobile = useIsMobile();
|
|
3270
3192
|
const compactLayout = useCompactLayout();
|
|
3271
3193
|
const showConfigureSettingsCta = !loading && models.length === 0 && catalog != null;
|
|
3272
3194
|
const seededDefaultModelRef = useRef8(null);
|
|
3273
|
-
|
|
3195
|
+
useEffect11(() => {
|
|
3274
3196
|
ensureLoaded();
|
|
3275
3197
|
}, [ensureLoaded]);
|
|
3276
|
-
|
|
3198
|
+
useEffect11(() => {
|
|
3277
3199
|
if (!updateAgentSpec || loading || models.length === 0) return;
|
|
3278
3200
|
const first = models[0];
|
|
3279
3201
|
if (first === void 0) return;
|
|
@@ -3295,7 +3217,7 @@ function DraftModelSelector({ disabled, isRunning }) {
|
|
|
3295
3217
|
const selectedName = agentSpec?.model?.name ?? models[0]?.name ?? "";
|
|
3296
3218
|
const selected = models.find((m) => m.name === selectedName);
|
|
3297
3219
|
const label = selected ? displayModelLabel2(selected.name) : selectedName ? displayModelLabel2(selectedName) : loading ? "Loading\u2026" : "Select model";
|
|
3298
|
-
|
|
3220
|
+
useEffect11(() => {
|
|
3299
3221
|
if (!open) return;
|
|
3300
3222
|
const handler = (e) => {
|
|
3301
3223
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -3318,7 +3240,7 @@ function DraftModelSelector({ disabled, isRunning }) {
|
|
|
3318
3240
|
onOpenSettings: showConfigureSettingsCta ? () => {
|
|
3319
3241
|
setOpen(false);
|
|
3320
3242
|
setQuery("");
|
|
3321
|
-
shell?.setSettingsOpen(true);
|
|
3243
|
+
shell?.setSettingsOpen(true, "models");
|
|
3322
3244
|
} : void 0,
|
|
3323
3245
|
onSelect: (model) => {
|
|
3324
3246
|
updateAgentSpec?.({
|
|
@@ -3329,8 +3251,8 @@ function DraftModelSelector({ disabled, isRunning }) {
|
|
|
3329
3251
|
}
|
|
3330
3252
|
}
|
|
3331
3253
|
);
|
|
3332
|
-
return /* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3254
|
+
return /* @__PURE__ */ jsxs28("div", { ref: containerRef, className: "relative", children: [
|
|
3255
|
+
/* @__PURE__ */ jsxs28(
|
|
3334
3256
|
"button",
|
|
3335
3257
|
{
|
|
3336
3258
|
type: "button",
|
|
@@ -3377,12 +3299,12 @@ var HistoryLoader = forwardRef(
|
|
|
3377
3299
|
HistoryLoader.displayName = "HistoryLoader";
|
|
3378
3300
|
|
|
3379
3301
|
// src/atoms/Markdown.tsx
|
|
3380
|
-
import { useMemo as
|
|
3302
|
+
import { useMemo as useMemo4, useRef as useRef9 } from "react";
|
|
3381
3303
|
import ReactMarkdown from "react-markdown";
|
|
3382
3304
|
import remarkGfm from "remark-gfm";
|
|
3383
3305
|
import { Fragment as Fragment8, jsx as jsx41 } from "react/jsx-runtime";
|
|
3384
3306
|
function preloadMarkdownOpenUI() {
|
|
3385
|
-
return import("./OpenUiFenceBlock-
|
|
3307
|
+
return import("./OpenUiFenceBlock-A2CWCPOP.js");
|
|
3386
3308
|
}
|
|
3387
3309
|
var LARGE_STREAMING_FENCE_CHARS = 8 * 1024;
|
|
3388
3310
|
function getActiveStreamingFenceCode(content) {
|
|
@@ -3476,7 +3398,7 @@ function Markdown({
|
|
|
3476
3398
|
const SyntaxHighlighter2 = useSlot("SyntaxHighlighter");
|
|
3477
3399
|
const activeFenceCodeRef = useRef9(null);
|
|
3478
3400
|
activeFenceCodeRef.current = isStreaming === true ? getActiveStreamingFenceCode(content) : null;
|
|
3479
|
-
const components =
|
|
3401
|
+
const components = useMemo4(
|
|
3480
3402
|
() => makeComponents({
|
|
3481
3403
|
isStreaming,
|
|
3482
3404
|
getActiveFenceCode: () => activeFenceCodeRef.current,
|
|
@@ -3511,11 +3433,11 @@ function Markdown({
|
|
|
3511
3433
|
}
|
|
3512
3434
|
|
|
3513
3435
|
// src/atoms/MessageActionBar.tsx
|
|
3514
|
-
import { jsx as jsx42, jsxs as
|
|
3436
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3515
3437
|
var actionBtnClass = "h-6 w-6 text-text-secondary hover:text-text-primary [&_svg]:size-3.5";
|
|
3516
3438
|
function MessageActionBar({ isCopied, onCopy, createdAt, className }) {
|
|
3517
3439
|
const MessageTimestamp2 = useSlot("MessageTimestamp");
|
|
3518
|
-
return /* @__PURE__ */
|
|
3440
|
+
return /* @__PURE__ */ jsxs29(
|
|
3519
3441
|
"div",
|
|
3520
3442
|
{
|
|
3521
3443
|
className: cn("aui-assistant-action-bar-root animate-in fade-in flex items-center gap-1 duration-200", className),
|
|
@@ -3593,7 +3515,7 @@ function MessageTimestamp({ createdAt, className }) {
|
|
|
3593
3515
|
}
|
|
3594
3516
|
|
|
3595
3517
|
// src/atoms/MonacoEditorCore.tsx
|
|
3596
|
-
import { useEffect as
|
|
3518
|
+
import { useEffect as useEffect12, useRef as useRef10, useState as useState18 } from "react";
|
|
3597
3519
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3598
3520
|
var AUI_MONACO_LIGHT = "aui-monaco-light";
|
|
3599
3521
|
var AUI_MONACO_DARK = "aui-monaco-dark";
|
|
@@ -3707,7 +3629,7 @@ function MonacoEditorCore({
|
|
|
3707
3629
|
const maxPx = toPx(maxHeight, toPx(DEFAULT_MAX_HEIGHT, 168));
|
|
3708
3630
|
const clampRef = useRef10({ minPx, maxPx, autoHeight });
|
|
3709
3631
|
clampRef.current = { minPx, maxPx, autoHeight };
|
|
3710
|
-
const [autoPx, setAutoPx] =
|
|
3632
|
+
const [autoPx, setAutoPx] = useState18(() => autoHeight ? estimateHeightFromValue(value, minPx, maxPx) : 0);
|
|
3711
3633
|
const resolvedTheme = resolveThemeName(theme, classNames.monaco?.monacoTheme, mode);
|
|
3712
3634
|
const syncAutoHeight = () => {
|
|
3713
3635
|
const editor = editorRef.current;
|
|
@@ -3720,7 +3642,7 @@ function MonacoEditorCore({
|
|
|
3720
3642
|
editor.layout();
|
|
3721
3643
|
onAutoHeightChangeRef.current?.(next);
|
|
3722
3644
|
};
|
|
3723
|
-
|
|
3645
|
+
useEffect12(() => {
|
|
3724
3646
|
if (!containerRef.current) return;
|
|
3725
3647
|
let editor = null;
|
|
3726
3648
|
let changeDisposable = null;
|
|
@@ -3760,7 +3682,7 @@ function MonacoEditorCore({
|
|
|
3760
3682
|
monacoRef.current = null;
|
|
3761
3683
|
};
|
|
3762
3684
|
}, []);
|
|
3763
|
-
|
|
3685
|
+
useEffect12(() => {
|
|
3764
3686
|
const editor = editorRef.current;
|
|
3765
3687
|
if (editor && editor.getValue() !== value) {
|
|
3766
3688
|
editor.setValue(value);
|
|
@@ -3769,12 +3691,12 @@ function MonacoEditorCore({
|
|
|
3769
3691
|
}
|
|
3770
3692
|
}
|
|
3771
3693
|
}, [value, autoHeight, minPx, maxPx]);
|
|
3772
|
-
|
|
3694
|
+
useEffect12(() => {
|
|
3773
3695
|
if (autoHeight) {
|
|
3774
3696
|
requestAnimationFrame(() => syncAutoHeight());
|
|
3775
3697
|
}
|
|
3776
3698
|
}, [autoHeight, minPx, maxPx]);
|
|
3777
|
-
|
|
3699
|
+
useEffect12(() => {
|
|
3778
3700
|
monacoRef.current?.editor.setTheme(resolvedTheme);
|
|
3779
3701
|
}, [resolvedTheme]);
|
|
3780
3702
|
const styleHeight = autoHeight ? autoPx : typeof height === "number" ? height : height;
|
|
@@ -3790,7 +3712,7 @@ function MonacoEditorCore({
|
|
|
3790
3712
|
}
|
|
3791
3713
|
|
|
3792
3714
|
// src/atoms/SandboxArtifactDownload.tsx
|
|
3793
|
-
import { useMemo as
|
|
3715
|
+
import { useMemo as useMemo5 } from "react";
|
|
3794
3716
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3795
3717
|
var PREFIX = "sandbox_artifacts";
|
|
3796
3718
|
var PAIR_RE = /\[([^\]]*)\]\(([^)]*)\)/g;
|
|
@@ -3824,7 +3746,7 @@ function SandboxArtifactDownload({
|
|
|
3824
3746
|
readOnly
|
|
3825
3747
|
}) {
|
|
3826
3748
|
const ChatFileDownload2 = useSlot("ChatFileDownload");
|
|
3827
|
-
const artifacts =
|
|
3749
|
+
const artifacts = useMemo5(() => parseSandboxArtifacts(code), [code]);
|
|
3828
3750
|
if (artifacts.length === 0) return null;
|
|
3829
3751
|
return /* @__PURE__ */ jsx47(
|
|
3830
3752
|
ChatFileDownload2,
|
|
@@ -3838,7 +3760,7 @@ function SandboxArtifactDownload({
|
|
|
3838
3760
|
}
|
|
3839
3761
|
|
|
3840
3762
|
// src/atoms/SandboxToolCallCard.tsx
|
|
3841
|
-
import { Fragment as Fragment9, jsx as jsx48, jsxs as
|
|
3763
|
+
import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3842
3764
|
function JsonPane({ value, className }) {
|
|
3843
3765
|
const MonacoEditorCore2 = useSlot("MonacoEditorCore");
|
|
3844
3766
|
return /* @__PURE__ */ jsx48(
|
|
@@ -3872,22 +3794,22 @@ function SandboxBody({
|
|
|
3872
3794
|
onViewModeChange,
|
|
3873
3795
|
dataTestPrefix
|
|
3874
3796
|
}) {
|
|
3875
|
-
return /* @__PURE__ */
|
|
3797
|
+
return /* @__PURE__ */ jsxs30(
|
|
3876
3798
|
"div",
|
|
3877
3799
|
{
|
|
3878
3800
|
className: "rounded-lg border border-border bg-primary-bg",
|
|
3879
3801
|
"data-testid": dataTestPrefix ? `${dataTestPrefix}-sandbox` : void 0,
|
|
3880
3802
|
children: [
|
|
3881
|
-
/* @__PURE__ */ jsx48("div", { className: "rounded-t-md border-b border-primary-button-bg/30 bg-primary-button-bg/10", children: /* @__PURE__ */
|
|
3803
|
+
/* @__PURE__ */ jsx48("div", { className: "rounded-t-md border-b border-primary-button-bg/30 bg-primary-button-bg/10", children: /* @__PURE__ */ jsxs30("div", { className: "flex w-full min-w-0 items-center gap-2 px-3 py-1.5", children: [
|
|
3882
3804
|
/* @__PURE__ */ jsx48("p", { className: "min-w-0 font-sans text-xs font-medium text-primary-button-bg", children: "sandbox" }),
|
|
3883
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ jsxs30(
|
|
3884
3806
|
"div",
|
|
3885
3807
|
{
|
|
3886
3808
|
className: "ml-auto flex shrink-0 items-center gap-1.5",
|
|
3887
3809
|
onClick: (e) => e.stopPropagation(),
|
|
3888
3810
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3889
3811
|
children: [
|
|
3890
|
-
exitCode != null && /* @__PURE__ */
|
|
3812
|
+
exitCode != null && /* @__PURE__ */ jsxs30(
|
|
3891
3813
|
"span",
|
|
3892
3814
|
{
|
|
3893
3815
|
className: cn(
|
|
@@ -3902,7 +3824,7 @@ function SandboxBody({
|
|
|
3902
3824
|
]
|
|
3903
3825
|
}
|
|
3904
3826
|
),
|
|
3905
|
-
/* @__PURE__ */
|
|
3827
|
+
/* @__PURE__ */ jsxs30(
|
|
3906
3828
|
"div",
|
|
3907
3829
|
{
|
|
3908
3830
|
className: "inline-flex h-6 items-center rounded-md border border-border bg-primary-bg p-0.5",
|
|
@@ -3946,33 +3868,33 @@ function SandboxBody({
|
|
|
3946
3868
|
}
|
|
3947
3869
|
)
|
|
3948
3870
|
] }) }),
|
|
3949
|
-
/* @__PURE__ */ jsx48("div", { className: "rounded-b-lg border border-t-0 border-border p-3", children: hasContent && /* @__PURE__ */ jsx48("div", { className: "max-h-80 overflow-x-hidden overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs text-text-primary", children: viewMode === "code" ? /* @__PURE__ */
|
|
3950
|
-
argsJson && /* @__PURE__ */
|
|
3871
|
+
/* @__PURE__ */ jsx48("div", { className: "rounded-b-lg border border-t-0 border-border p-3", children: hasContent && /* @__PURE__ */ jsx48("div", { className: "max-h-80 overflow-x-hidden overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs text-text-primary", children: viewMode === "code" ? /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
3872
|
+
argsJson && /* @__PURE__ */ jsxs30("div", { className: "my-1 border-l-4 border-primary-button-bg px-3", children: [
|
|
3951
3873
|
/* @__PURE__ */ jsx48("div", { className: "mb-1 font-sans text-xs font-medium leading-4", children: "Arguments" }),
|
|
3952
3874
|
/* @__PURE__ */ jsx48(JsonPane, { value: argsJson, className: "pl-2" })
|
|
3953
3875
|
] }),
|
|
3954
|
-
resultJson && /* @__PURE__ */
|
|
3876
|
+
resultJson && /* @__PURE__ */ jsxs30("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
|
|
3955
3877
|
/* @__PURE__ */ jsx48("div", { className: "mb-1 mt-2 font-sans text-xs font-medium leading-4", children: "Result" }),
|
|
3956
3878
|
/* @__PURE__ */ jsx48(JsonPane, { value: resultJson, className: "pl-2" })
|
|
3957
3879
|
] })
|
|
3958
|
-
] }) : /* @__PURE__ */
|
|
3959
|
-
command && /* @__PURE__ */
|
|
3880
|
+
] }) : /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
3881
|
+
command && /* @__PURE__ */ jsxs30("div", { className: "my-1 break-all border-l-4 border-primary-button-bg px-3", children: [
|
|
3960
3882
|
/* @__PURE__ */ jsx48("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "COMMAND" }),
|
|
3961
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
3962
3884
|
/* @__PURE__ */ jsx48("span", { className: "text-primary-button-bg", children: "$" }),
|
|
3963
3885
|
" ",
|
|
3964
3886
|
command
|
|
3965
3887
|
] })
|
|
3966
3888
|
] }),
|
|
3967
|
-
resultText ? /* @__PURE__ */
|
|
3889
|
+
resultText ? /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
3968
3890
|
/* @__PURE__ */ jsx48("div", { className: "mx-3 my-1 border-t border-border" }),
|
|
3969
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ jsxs30("div", { className: "my-1 break-all border-l-4 border-primary-button-bg/60 px-3", children: [
|
|
3970
3892
|
/* @__PURE__ */ jsx48("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "OUTPUT" }),
|
|
3971
3893
|
/* @__PURE__ */ jsx48("div", { children: resultText })
|
|
3972
3894
|
] })
|
|
3973
|
-
] }) : resultJson && /* @__PURE__ */
|
|
3895
|
+
] }) : resultJson && /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
3974
3896
|
/* @__PURE__ */ jsx48("div", { className: "mx-3 my-1 border-t border-border" }),
|
|
3975
|
-
/* @__PURE__ */
|
|
3897
|
+
/* @__PURE__ */ jsxs30("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
|
|
3976
3898
|
/* @__PURE__ */ jsx48("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "OUTPUT" }),
|
|
3977
3899
|
/* @__PURE__ */ jsx48(JsonPane, { value: resultJson, className: "pl-2" })
|
|
3978
3900
|
] })
|
|
@@ -4041,8 +3963,8 @@ import {
|
|
|
4041
3963
|
useTrueFoundryAgentSpec as useTrueFoundryAgentSpec5,
|
|
4042
3964
|
useTrueFoundryFlushAgentSpec
|
|
4043
3965
|
} from "@truefoundry/assistant-ui-runtime";
|
|
4044
|
-
import { useEffect as
|
|
4045
|
-
import { Fragment as Fragment10, jsx as jsx49, jsxs as
|
|
3966
|
+
import { useEffect as useEffect13, useId as useId6, useMemo as useMemo6, useRef as useRef11, useState as useState19 } from "react";
|
|
3967
|
+
import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4046
3968
|
function editableMountsFromSpec(value) {
|
|
4047
3969
|
if (!Array.isArray(value)) return [];
|
|
4048
3970
|
const mounts = [];
|
|
@@ -4062,9 +3984,9 @@ function SummarySection({
|
|
|
4062
3984
|
onEdit,
|
|
4063
3985
|
disabled
|
|
4064
3986
|
}) {
|
|
4065
|
-
return /* @__PURE__ */
|
|
3987
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-3 border-b border-border px-5 py-3.5 last:border-b-0", children: [
|
|
4066
3988
|
/* @__PURE__ */ jsx49(Icon, { name: icon, className: "text-text-secondary size-4 shrink-0" }),
|
|
4067
|
-
/* @__PURE__ */
|
|
3989
|
+
/* @__PURE__ */ jsxs31("div", { className: "min-w-0 flex-1", children: [
|
|
4068
3990
|
/* @__PURE__ */ jsx49("p", { className: "text-text-primary text-sm font-medium", children: title }),
|
|
4069
3991
|
/* @__PURE__ */ jsx49("p", { className: "text-text-secondary mt-0.5 truncate text-xs", children: value })
|
|
4070
3992
|
] }),
|
|
@@ -4100,19 +4022,19 @@ function SaveAgentButtonContent({
|
|
|
4100
4022
|
const serverCapabilities = useServerCapabilities();
|
|
4101
4023
|
const modelListId = useId6();
|
|
4102
4024
|
const visible = useSaveAgentVisible();
|
|
4103
|
-
const [open, setOpen] =
|
|
4104
|
-
const [editor, setEditor] =
|
|
4105
|
-
const [intent, setIntent] =
|
|
4106
|
-
const [name, setName] =
|
|
4107
|
-
const [draftSpec, setDraftSpec] =
|
|
4108
|
-
const [modelQuery, setModelQuery] =
|
|
4109
|
-
const [search, setSearch] =
|
|
4110
|
-
const [saving, setSaving] =
|
|
4111
|
-
const [error, setError] =
|
|
4025
|
+
const [open, setOpen] = useState19(false);
|
|
4026
|
+
const [editor, setEditor] = useState19(null);
|
|
4027
|
+
const [intent, setIntent] = useState19("create");
|
|
4028
|
+
const [name, setName] = useState19("");
|
|
4029
|
+
const [draftSpec, setDraftSpec] = useState19(null);
|
|
4030
|
+
const [modelQuery, setModelQuery] = useState19("");
|
|
4031
|
+
const [search, setSearch] = useState19("");
|
|
4032
|
+
const [saving, setSaving] = useState19(false);
|
|
4033
|
+
const [error, setError] = useState19(null);
|
|
4112
4034
|
const errorRef = useRef11(null);
|
|
4113
|
-
const mcpMounts =
|
|
4114
|
-
const skillMounts =
|
|
4115
|
-
|
|
4035
|
+
const mcpMounts = useMemo6(() => editableMountsFromSpec(draftSpec?.mcpServers), [draftSpec?.mcpServers]);
|
|
4036
|
+
const skillMounts = useMemo6(() => editableMountsFromSpec(draftSpec?.skills), [draftSpec?.skills]);
|
|
4037
|
+
useEffect13(() => {
|
|
4116
4038
|
if (error === null) return;
|
|
4117
4039
|
errorRef.current?.scrollIntoView?.({ block: "nearest", behavior: "smooth" });
|
|
4118
4040
|
}, [error]);
|
|
@@ -4183,8 +4105,8 @@ function SaveAgentButtonContent({
|
|
|
4183
4105
|
const isUpdateMode = shell?.mode.status === "active" && shell.mode.isMutable && (shell.mode.agentName !== void 0 || shell.mode.agentId !== void 0);
|
|
4184
4106
|
const triggerLabel = isUpdateMode && children === "Save Agent" ? "Update Agent" : children;
|
|
4185
4107
|
if (!visible) return null;
|
|
4186
|
-
return /* @__PURE__ */
|
|
4187
|
-
/* @__PURE__ */
|
|
4108
|
+
return /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
4109
|
+
/* @__PURE__ */ jsxs31(
|
|
4188
4110
|
"button",
|
|
4189
4111
|
{
|
|
4190
4112
|
type: "button",
|
|
@@ -4206,9 +4128,9 @@ function SaveAgentButtonContent({
|
|
|
4206
4128
|
description: "Review the configuration before saving.",
|
|
4207
4129
|
className: "md:max-w-lg",
|
|
4208
4130
|
"aria-label": intent === "create" ? "Save agent" : "Update agent",
|
|
4209
|
-
children: draftSpec ? /* @__PURE__ */
|
|
4210
|
-
/* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4131
|
+
children: draftSpec ? /* @__PURE__ */ jsxs31("div", { className: "flex min-h-0 w-[min(32rem,calc(100vw-2rem))] flex-1 flex-col", children: [
|
|
4132
|
+
/* @__PURE__ */ jsxs31("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: [
|
|
4133
|
+
/* @__PURE__ */ jsxs31("label", { className: "mb-4 block", children: [
|
|
4212
4134
|
/* @__PURE__ */ jsx49("span", { className: "mb-1.5 block text-sm font-medium", children: "Agent name" }),
|
|
4213
4135
|
/* @__PURE__ */ jsx49(
|
|
4214
4136
|
"input",
|
|
@@ -4221,7 +4143,7 @@ function SaveAgentButtonContent({
|
|
|
4221
4143
|
}
|
|
4222
4144
|
)
|
|
4223
4145
|
] }),
|
|
4224
|
-
/* @__PURE__ */
|
|
4146
|
+
/* @__PURE__ */ jsxs31("label", { className: "mb-4 block", children: [
|
|
4225
4147
|
/* @__PURE__ */ jsx49("span", { className: "mb-1.5 block text-sm font-medium", children: "Instructions" }),
|
|
4226
4148
|
/* @__PURE__ */ jsx49(
|
|
4227
4149
|
"textarea",
|
|
@@ -4235,9 +4157,9 @@ function SaveAgentButtonContent({
|
|
|
4235
4157
|
}
|
|
4236
4158
|
)
|
|
4237
4159
|
] }),
|
|
4238
|
-
/* @__PURE__ */
|
|
4160
|
+
/* @__PURE__ */ jsxs31("div", { className: "mb-4", children: [
|
|
4239
4161
|
/* @__PURE__ */ jsx49("h3", { className: "mb-2 text-sm font-medium", children: "Configuration" }),
|
|
4240
|
-
/* @__PURE__ */
|
|
4162
|
+
/* @__PURE__ */ jsxs31("div", { className: "overflow-hidden rounded-xl border border-border", children: [
|
|
4241
4163
|
/* @__PURE__ */ jsx49(
|
|
4242
4164
|
SummarySection,
|
|
4243
4165
|
{
|
|
@@ -4270,7 +4192,7 @@ function SaveAgentButtonContent({
|
|
|
4270
4192
|
)
|
|
4271
4193
|
] })
|
|
4272
4194
|
] }),
|
|
4273
|
-
/* @__PURE__ */
|
|
4195
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
4274
4196
|
/* @__PURE__ */ jsx49("h3", { className: "mb-2 text-sm font-medium", children: "Capabilities" }),
|
|
4275
4197
|
/* @__PURE__ */ jsx49(
|
|
4276
4198
|
DraftCapabilitiesPanel,
|
|
@@ -4287,7 +4209,7 @@ function SaveAgentButtonContent({
|
|
|
4287
4209
|
] }),
|
|
4288
4210
|
error ? /* @__PURE__ */ jsx49("p", { ref: errorRef, role: "alert", className: "text-failure-bg mt-3 text-sm", children: error }) : null
|
|
4289
4211
|
] }),
|
|
4290
|
-
/* @__PURE__ */
|
|
4212
|
+
/* @__PURE__ */ jsxs31("div", { className: "bg-card-bg sticky bottom-0 z-10 flex shrink-0 justify-end gap-2 border-t border-border px-5 py-4", children: [
|
|
4291
4213
|
/* @__PURE__ */ jsx49(
|
|
4292
4214
|
"button",
|
|
4293
4215
|
{
|
|
@@ -4327,8 +4249,8 @@ function SaveAgentButtonContent({
|
|
|
4327
4249
|
className: "md:max-w-md",
|
|
4328
4250
|
contentSized: true,
|
|
4329
4251
|
"aria-label": editor === "model" ? "Edit model" : editor === "mcp" ? "Edit Connectors" : "Edit skills",
|
|
4330
|
-
children: draftSpec && editor ? /* @__PURE__ */
|
|
4331
|
-
editor === "model" ? /* @__PURE__ */
|
|
4252
|
+
children: draftSpec && editor ? /* @__PURE__ */ jsxs31("div", { className: "flex h-[min(28rem,calc(100dvh-10rem))] w-[min(28rem,calc(100vw-2rem))] flex-col", children: [
|
|
4253
|
+
editor === "model" ? /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
4332
4254
|
catalog.error ? /* @__PURE__ */ jsx49("p", { role: "alert", className: "text-failure-bg px-3 pt-3 text-sm", children: catalog.error }) : null,
|
|
4333
4255
|
/* @__PURE__ */ jsx49(
|
|
4334
4256
|
DraftModelCatalogPanel,
|
|
@@ -4352,9 +4274,9 @@ function SaveAgentButtonContent({
|
|
|
4352
4274
|
}
|
|
4353
4275
|
}
|
|
4354
4276
|
)
|
|
4355
|
-
] }) : /* @__PURE__ */
|
|
4277
|
+
] }) : /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
4356
4278
|
catalog.error ? /* @__PURE__ */ jsx49("p", { role: "alert", className: "text-failure-bg px-3 pt-3 text-sm", children: catalog.error }) : null,
|
|
4357
|
-
/* @__PURE__ */ jsx49("div", { className: "border-b border-border p-3", children: /* @__PURE__ */
|
|
4279
|
+
/* @__PURE__ */ jsx49("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ jsxs31("label", { className: "relative block", children: [
|
|
4358
4280
|
/* @__PURE__ */ jsx49(
|
|
4359
4281
|
Icon,
|
|
4360
4282
|
{
|
|
@@ -4481,12 +4403,12 @@ var ScrollToBottomButton = forwardRef2(
|
|
|
4481
4403
|
ScrollToBottomButton.displayName = "ScrollToBottomButton";
|
|
4482
4404
|
|
|
4483
4405
|
// src/atoms/SelectAgentEmptyState.tsx
|
|
4484
|
-
import { jsx as jsx51, jsxs as
|
|
4406
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4485
4407
|
function SelectAgentEmptyState() {
|
|
4486
4408
|
const shell = useOptionalShellMode();
|
|
4487
4409
|
const AgentsLibraryButton2 = useSlot("AgentsLibraryButton");
|
|
4488
4410
|
if (shell?.mode.status !== "idle") return null;
|
|
4489
|
-
return /* @__PURE__ */
|
|
4411
|
+
return /* @__PURE__ */ jsxs32(
|
|
4490
4412
|
"div",
|
|
4491
4413
|
{
|
|
4492
4414
|
className: "flex h-full min-h-0 w-full flex-col items-center justify-center gap-4 px-6",
|
|
@@ -4505,9 +4427,9 @@ function ShellActionsActionSlot() {
|
|
|
4505
4427
|
}
|
|
4506
4428
|
|
|
4507
4429
|
// src/atoms/Skeletons.tsx
|
|
4508
|
-
import { jsx as jsx52, jsxs as
|
|
4430
|
+
import { jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4509
4431
|
function MessageListSkeleton({ className }) {
|
|
4510
|
-
return /* @__PURE__ */
|
|
4432
|
+
return /* @__PURE__ */ jsxs33(
|
|
4511
4433
|
"div",
|
|
4512
4434
|
{
|
|
4513
4435
|
role: "status",
|
|
@@ -4516,7 +4438,7 @@ function MessageListSkeleton({ className }) {
|
|
|
4516
4438
|
className: cn("mb-14 flex flex-col gap-y-6", className),
|
|
4517
4439
|
children: [
|
|
4518
4440
|
/* @__PURE__ */ jsx52("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx52(Skeleton, { className: "h-10 w-[min(85%,20rem)] rounded-xl" }) }),
|
|
4519
|
-
/* @__PURE__ */
|
|
4441
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-2 px-2", children: [
|
|
4520
4442
|
/* @__PURE__ */ jsx52(Skeleton, { className: "h-4 w-full max-w-md" }),
|
|
4521
4443
|
/* @__PURE__ */ jsx52(Skeleton, { className: "h-4 w-full max-w-sm" }),
|
|
4522
4444
|
/* @__PURE__ */ jsx52(Skeleton, { className: "h-4 w-2/3 max-w-xs" })
|
|
@@ -4527,7 +4449,7 @@ function MessageListSkeleton({ className }) {
|
|
|
4527
4449
|
}
|
|
4528
4450
|
|
|
4529
4451
|
// src/atoms/SubAgentCard.tsx
|
|
4530
|
-
import { jsx as jsx53, jsxs as
|
|
4452
|
+
import { jsx as jsx53, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4531
4453
|
function SubAgentCard({
|
|
4532
4454
|
agentName,
|
|
4533
4455
|
instruction,
|
|
@@ -4549,7 +4471,7 @@ function SubAgentCard({
|
|
|
4549
4471
|
{
|
|
4550
4472
|
className: cn("aui-sub-agent-card min-w-0", className),
|
|
4551
4473
|
"data-testid": dataTestPrefix ? `${dataTestPrefix}-sub-agent-card` : void 0,
|
|
4552
|
-
children: /* @__PURE__ */
|
|
4474
|
+
children: /* @__PURE__ */ jsxs34(
|
|
4553
4475
|
AgentStepRow,
|
|
4554
4476
|
{
|
|
4555
4477
|
icon: "agent-2",
|
|
@@ -4562,7 +4484,7 @@ function SubAgentCard({
|
|
|
4562
4484
|
statusText: durationText,
|
|
4563
4485
|
dataTestPrefix,
|
|
4564
4486
|
children: [
|
|
4565
|
-
instructionContent != null && /* @__PURE__ */
|
|
4487
|
+
instructionContent != null && /* @__PURE__ */ jsxs34("div", { className: "mb-3 flex flex-col gap-2 rounded-md border border-border p-2", children: [
|
|
4566
4488
|
/* @__PURE__ */ jsx53("h4", { className: "text-sm font-semibold text-text-primary", children: "Instructions" }),
|
|
4567
4489
|
/* @__PURE__ */ jsx53(
|
|
4568
4490
|
"div",
|
|
@@ -4594,8 +4516,8 @@ import {
|
|
|
4594
4516
|
cloneElement as cloneElement2,
|
|
4595
4517
|
isValidElement as isValidElement2,
|
|
4596
4518
|
memo,
|
|
4597
|
-
useCallback as
|
|
4598
|
-
useState as
|
|
4519
|
+
useCallback as useCallback6,
|
|
4520
|
+
useState as useState20
|
|
4599
4521
|
} from "react";
|
|
4600
4522
|
import { Prism as PrismHighlighter } from "react-syntax-highlighter";
|
|
4601
4523
|
|
|
@@ -5594,7 +5516,7 @@ var one_light_default = {
|
|
|
5594
5516
|
};
|
|
5595
5517
|
|
|
5596
5518
|
// src/atoms/SyntaxHighlighter.tsx
|
|
5597
|
-
import { jsx as jsx54, jsxs as
|
|
5519
|
+
import { jsx as jsx54, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5598
5520
|
function applyLineNumberClassName(children, className) {
|
|
5599
5521
|
if (!className) return children;
|
|
5600
5522
|
return Children.map(children, (child) => {
|
|
@@ -5607,14 +5529,14 @@ function applyLineNumberClassName(children, className) {
|
|
|
5607
5529
|
function SyntaxHighlighterImpl({ code, language, darkTheme, className, showLineNumbers }) {
|
|
5608
5530
|
const classNames = useOptionalContentClassNames();
|
|
5609
5531
|
const style = darkTheme ? one_dark_default : one_light_default;
|
|
5610
|
-
const [copied, setCopied] =
|
|
5611
|
-
const handleCopy =
|
|
5532
|
+
const [copied, setCopied] = useState20(false);
|
|
5533
|
+
const handleCopy = useCallback6(() => {
|
|
5612
5534
|
void navigator.clipboard.writeText(code).then(() => {
|
|
5613
5535
|
setCopied(true);
|
|
5614
5536
|
setTimeout(() => setCopied(false), 2e3);
|
|
5615
5537
|
});
|
|
5616
5538
|
}, [code]);
|
|
5617
|
-
return /* @__PURE__ */
|
|
5539
|
+
return /* @__PURE__ */ jsxs35(
|
|
5618
5540
|
"div",
|
|
5619
5541
|
{
|
|
5620
5542
|
className: cn(
|
|
@@ -5675,7 +5597,7 @@ function SyntaxHighlighterImpl({ code, language, darkTheme, className, showLineN
|
|
|
5675
5597
|
var SyntaxHighlighter = memo(SyntaxHighlighterImpl);
|
|
5676
5598
|
|
|
5677
5599
|
// src/atoms/ThreadListMisc.tsx
|
|
5678
|
-
import { Fragment as Fragment11, jsx as jsx55, jsxs as
|
|
5600
|
+
import { Fragment as Fragment11, jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5679
5601
|
function ThreadListNewButton({ className, children, style, ...rest }) {
|
|
5680
5602
|
return /* @__PURE__ */ jsx55(
|
|
5681
5603
|
"button",
|
|
@@ -5691,7 +5613,7 @@ function ThreadListNewButton({ className, children, style, ...rest }) {
|
|
|
5691
5613
|
)
|
|
5692
5614
|
}),
|
|
5693
5615
|
...rest,
|
|
5694
|
-
children: children ?? /* @__PURE__ */
|
|
5616
|
+
children: children ?? /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
5695
5617
|
/* @__PURE__ */ jsx55(Icon, { name: "square-pen" }),
|
|
5696
5618
|
"New Chat"
|
|
5697
5619
|
] })
|
|
@@ -5711,7 +5633,7 @@ function ThreadListEmptyState({ message = "No threads yet", className }) {
|
|
|
5711
5633
|
);
|
|
5712
5634
|
}
|
|
5713
5635
|
function ThreadListShell({ header, children, className }) {
|
|
5714
|
-
return /* @__PURE__ */
|
|
5636
|
+
return /* @__PURE__ */ jsxs36("div", { className: cn("font-sans-flex flex h-full min-h-0 flex-1 flex-col overflow-hidden", className), children: [
|
|
5715
5637
|
/* @__PURE__ */ jsx55("div", { className: "shrink-0 border-b border-border px-2 py-2", children: header }),
|
|
5716
5638
|
/* @__PURE__ */ jsx55("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden p-2", children })
|
|
5717
5639
|
] });
|
|
@@ -5774,7 +5696,7 @@ function canReuseMutableShell({
|
|
|
5774
5696
|
}
|
|
5775
5697
|
|
|
5776
5698
|
// src/atoms/ThreadListRow.tsx
|
|
5777
|
-
import { jsx as jsx56, jsxs as
|
|
5699
|
+
import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5778
5700
|
function ThreadListRow({
|
|
5779
5701
|
title,
|
|
5780
5702
|
active,
|
|
@@ -5786,7 +5708,7 @@ function ThreadListRow({
|
|
|
5786
5708
|
}) {
|
|
5787
5709
|
const relative = lastMessageAt != null ? formatRelativeShort(lastMessageAt) : void 0;
|
|
5788
5710
|
const hasTrailing = relative != null || actions != null;
|
|
5789
|
-
return /* @__PURE__ */
|
|
5711
|
+
return /* @__PURE__ */ jsxs37(
|
|
5790
5712
|
"div",
|
|
5791
5713
|
{
|
|
5792
5714
|
"data-slot": "aui_thread-list-item",
|
|
@@ -5811,16 +5733,16 @@ function ThreadListRow({
|
|
|
5811
5733
|
active ? "text-dropdown-selected-item-text" : "text-inherit"
|
|
5812
5734
|
)
|
|
5813
5735
|
}),
|
|
5814
|
-
children: /* @__PURE__ */
|
|
5736
|
+
children: /* @__PURE__ */ jsxs37("span", { className: "min-w-0 flex-1", children: [
|
|
5815
5737
|
/* @__PURE__ */ jsx56("span", { className: "block truncate text-sm font-medium text-text-primary", children: title }),
|
|
5816
|
-
agentName != null ? /* @__PURE__ */
|
|
5738
|
+
agentName != null ? /* @__PURE__ */ jsxs37("span", { className: "mt-0.5 flex min-w-0 items-center gap-1 text-xs text-text-secondary", children: [
|
|
5817
5739
|
/* @__PURE__ */ jsx56(Icon, { name: "robot", className: "size-3 shrink-0" }),
|
|
5818
5740
|
/* @__PURE__ */ jsx56("span", { className: "truncate", children: agentName })
|
|
5819
5741
|
] }) : null
|
|
5820
5742
|
] })
|
|
5821
5743
|
}
|
|
5822
5744
|
),
|
|
5823
|
-
hasTrailing ? /* @__PURE__ */
|
|
5745
|
+
hasTrailing ? /* @__PURE__ */ jsxs37("div", { className: "relative mr-1 flex size-7 shrink-0 items-center justify-center", children: [
|
|
5824
5746
|
relative != null ? /* @__PURE__ */ jsx56(
|
|
5825
5747
|
"span",
|
|
5826
5748
|
{
|
|
@@ -5926,12 +5848,12 @@ var MessageGroup = forwardRef3(({ className, ...rest }, ref) => /* @__PURE__ */
|
|
|
5926
5848
|
MessageGroup.displayName = "MessageGroup";
|
|
5927
5849
|
|
|
5928
5850
|
// src/atoms/Toast.tsx
|
|
5929
|
-
import { useCallback as
|
|
5851
|
+
import { useCallback as useCallback7, useState as useState21 } from "react";
|
|
5930
5852
|
import { createPortal as createPortal2 } from "react-dom";
|
|
5931
|
-
import { jsx as jsx58, jsxs as
|
|
5853
|
+
import { jsx as jsx58, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5932
5854
|
function Toast({ title, description, open, onOpenChange, variant = "error", className }) {
|
|
5933
|
-
const [copied, setCopied] =
|
|
5934
|
-
const handleCopy =
|
|
5855
|
+
const [copied, setCopied] = useState21(false);
|
|
5856
|
+
const handleCopy = useCallback7(async () => {
|
|
5935
5857
|
const text = `${title}
|
|
5936
5858
|
${description}`;
|
|
5937
5859
|
try {
|
|
@@ -5942,7 +5864,7 @@ ${description}`;
|
|
|
5942
5864
|
}
|
|
5943
5865
|
}, [title, description]);
|
|
5944
5866
|
if (!open) return null;
|
|
5945
|
-
return /* @__PURE__ */
|
|
5867
|
+
return /* @__PURE__ */ jsxs38(
|
|
5946
5868
|
"div",
|
|
5947
5869
|
{
|
|
5948
5870
|
role: "alert",
|
|
@@ -5960,8 +5882,8 @@ ${description}`;
|
|
|
5960
5882
|
className: cn("shrink-0", variant === "success" ? "text-success-bg" : "text-failure-bg")
|
|
5961
5883
|
}
|
|
5962
5884
|
),
|
|
5963
|
-
/* @__PURE__ */
|
|
5964
|
-
/* @__PURE__ */
|
|
5885
|
+
/* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
|
|
5886
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-start justify-between gap-2", children: [
|
|
5965
5887
|
/* @__PURE__ */ jsx58(
|
|
5966
5888
|
"div",
|
|
5967
5889
|
{
|
|
@@ -5972,7 +5894,7 @@ ${description}`;
|
|
|
5972
5894
|
children: title
|
|
5973
5895
|
}
|
|
5974
5896
|
),
|
|
5975
|
-
/* @__PURE__ */
|
|
5897
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
5976
5898
|
variant === "error" ? /* @__PURE__ */ jsx58(
|
|
5977
5899
|
"button",
|
|
5978
5900
|
{
|
|
@@ -6029,7 +5951,7 @@ function ToastStack({ children, duration: _duration = Number.POSITIVE_INFINITY }
|
|
|
6029
5951
|
}
|
|
6030
5952
|
|
|
6031
5953
|
// src/atoms/ToolApprovalBar.tsx
|
|
6032
|
-
import { jsx as jsx59, jsxs as
|
|
5954
|
+
import { jsx as jsx59, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6033
5955
|
var DEFAULT_APPROVE_OPTIONS = [{ id: "approve", label: "Approve", variant: "primary" }];
|
|
6034
5956
|
var DEFAULT_DENY_OPTIONS = [
|
|
6035
5957
|
{ id: "deny", label: "Deny", variant: "secondary", requiresReason: true }
|
|
@@ -6062,22 +5984,22 @@ function ToolApprovalBar({
|
|
|
6062
5984
|
const isDenied = status?.type === "denied";
|
|
6063
5985
|
const interactionsLocked = disabled && !isDecided;
|
|
6064
5986
|
const headingText = isApproved ? "Tool Approved" : isDenied ? "Tool Approval Denied" : "Tool Approval Required for";
|
|
6065
|
-
return /* @__PURE__ */
|
|
5987
|
+
return /* @__PURE__ */ jsxs39(
|
|
6066
5988
|
"div",
|
|
6067
5989
|
{
|
|
6068
5990
|
className: cn("aui-tool-approval-bar", className),
|
|
6069
5991
|
"data-testid": dataTestPrefix ? `${dataTestPrefix}-approval` : void 0,
|
|
6070
5992
|
children: [
|
|
6071
|
-
/* @__PURE__ */
|
|
6072
|
-
/* @__PURE__ */
|
|
5993
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex gap-2", children: [
|
|
5994
|
+
/* @__PURE__ */ jsxs39("div", { className: cn("flex shrink-0 flex-col items-center", !showLineBelow && "pb-1"), children: [
|
|
6073
5995
|
/* @__PURE__ */ jsx59("div", { className: "min-h-[0.75rem] w-px flex-1 bg-border" }),
|
|
6074
5996
|
/* @__PURE__ */ jsx59(StepIconBox, { icon: "wrench", variant: "muted", iconSize: "0.875em", className: "my-1" }),
|
|
6075
5997
|
showLineBelow && /* @__PURE__ */ jsx59("div", { className: "min-h-[0.75rem] w-px flex-1 bg-border" })
|
|
6076
5998
|
] }),
|
|
6077
|
-
/* @__PURE__ */
|
|
6078
|
-
/* @__PURE__ */
|
|
6079
|
-
/* @__PURE__ */
|
|
6080
|
-
/* @__PURE__ */
|
|
5999
|
+
/* @__PURE__ */ jsxs39("div", { className: "mt-2 flex flex-1 items-center justify-between", children: [
|
|
6000
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
6001
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
6002
|
+
/* @__PURE__ */ jsxs39("span", { className: "inline-flex flex-wrap items-center gap-1 font-sans text-xs font-medium leading-4 text-text-primary", children: [
|
|
6081
6003
|
headingText,
|
|
6082
6004
|
/* @__PURE__ */ jsx59("span", { className: "rounded bg-secondary-bg px-1.5 py-0.5 text-xs text-text-secondary", children: toolName })
|
|
6083
6005
|
] }),
|
|
@@ -6101,8 +6023,8 @@ function ToolApprovalBar({
|
|
|
6101
6023
|
}
|
|
6102
6024
|
)
|
|
6103
6025
|
] }),
|
|
6104
|
-
!isDecided && !readOnly && !selectedDenyOption && /* @__PURE__ */
|
|
6105
|
-
approveOptions.map((option) => /* @__PURE__ */
|
|
6026
|
+
!isDecided && !readOnly && !selectedDenyOption && /* @__PURE__ */ jsxs39("div", { className: "flex gap-2", children: [
|
|
6027
|
+
approveOptions.map((option) => /* @__PURE__ */ jsxs39(
|
|
6106
6028
|
Button,
|
|
6107
6029
|
{
|
|
6108
6030
|
size: "sm",
|
|
@@ -6136,16 +6058,16 @@ function ToolApprovalBar({
|
|
|
6136
6058
|
] })
|
|
6137
6059
|
] })
|
|
6138
6060
|
] }),
|
|
6139
|
-
!isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */
|
|
6140
|
-
(selectedDenyOption.confirm?.title || selectedDenyOption.confirm?.description) && /* @__PURE__ */
|
|
6061
|
+
!isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-1 pl-8 pt-3", children: [
|
|
6062
|
+
(selectedDenyOption.confirm?.title || selectedDenyOption.confirm?.description) && /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-0.5", children: [
|
|
6141
6063
|
selectedDenyOption.confirm.title && /* @__PURE__ */ jsx59("span", { className: "text-xs font-medium text-text-primary", children: selectedDenyOption.confirm.title }),
|
|
6142
6064
|
selectedDenyOption.confirm.description && /* @__PURE__ */ jsx59("span", { className: "text-xs text-text-secondary", children: selectedDenyOption.confirm.description })
|
|
6143
6065
|
] }),
|
|
6144
|
-
selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */
|
|
6066
|
+
selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */ jsxs39("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
6145
6067
|
/* @__PURE__ */ jsx59("span", { className: "text-xs text-text-secondary", children: "Grants:" }),
|
|
6146
6068
|
selectedDenyOption.grants.map((grant) => /* @__PURE__ */ jsx59("span", { className: "rounded bg-secondary-bg px-1.5 py-0.5 text-xs text-text-secondary", children: grant }, grant))
|
|
6147
6069
|
] }),
|
|
6148
|
-
/* @__PURE__ */
|
|
6070
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
|
|
6149
6071
|
/* @__PURE__ */ jsx59(
|
|
6150
6072
|
"input",
|
|
6151
6073
|
{
|
|
@@ -6166,7 +6088,7 @@ function ToolApprovalBar({
|
|
|
6166
6088
|
] }),
|
|
6167
6089
|
showReasonError && /* @__PURE__ */ jsx59("span", { id: "aui-denial-reason-error", className: "text-xs text-failure-bg", role: "alert", children: "Reason is required" })
|
|
6168
6090
|
] }),
|
|
6169
|
-
isDecided && status?.reason && /* @__PURE__ */ jsx59("div", { className: "pl-8 pt-2", children: /* @__PURE__ */
|
|
6091
|
+
isDecided && status?.reason && /* @__PURE__ */ jsx59("div", { className: "pl-8 pt-2", children: /* @__PURE__ */ jsxs39("span", { className: "text-xs text-text-secondary", children: [
|
|
6170
6092
|
"Reason: ",
|
|
6171
6093
|
status.reason
|
|
6172
6094
|
] }) })
|
|
@@ -6176,7 +6098,7 @@ function ToolApprovalBar({
|
|
|
6176
6098
|
}
|
|
6177
6099
|
|
|
6178
6100
|
// src/atoms/ToolCallCard.tsx
|
|
6179
|
-
import { Fragment as Fragment12, jsx as jsx60, jsxs as
|
|
6101
|
+
import { Fragment as Fragment12, jsx as jsx60, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6180
6102
|
var DEFAULT_AWAITING_TEXT = "Awaiting Response...";
|
|
6181
6103
|
function ToolCallCard({
|
|
6182
6104
|
icon = "mcp-server",
|
|
@@ -6240,7 +6162,7 @@ function ToolCallCard({
|
|
|
6240
6162
|
showContentConnector: true,
|
|
6241
6163
|
showPersistentContentConnector: !hasApproval,
|
|
6242
6164
|
dataTestPrefix: dataTestPrefix ? `${dataTestPrefix}-header` : void 0,
|
|
6243
|
-
persistentChildren: /* @__PURE__ */
|
|
6165
|
+
persistentChildren: /* @__PURE__ */ jsxs40(Fragment12, { children: [
|
|
6244
6166
|
approvalSlot,
|
|
6245
6167
|
expanded && showResponseLine && responseSlot && /* @__PURE__ */ jsx60("div", { "data-testid": dataTestPrefix ? `${dataTestPrefix}-response` : void 0, children: responseSlot })
|
|
6246
6168
|
] }),
|
|
@@ -6252,8 +6174,8 @@ function ToolCallCard({
|
|
|
6252
6174
|
}
|
|
6253
6175
|
|
|
6254
6176
|
// src/atoms/ToolCallContentBlock.tsx
|
|
6255
|
-
import { useState as
|
|
6256
|
-
import { jsx as jsx61, jsxs as
|
|
6177
|
+
import { useState as useState22 } from "react";
|
|
6178
|
+
import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6257
6179
|
function JsonEditor({
|
|
6258
6180
|
content,
|
|
6259
6181
|
height,
|
|
@@ -6300,7 +6222,7 @@ function ToolCallContentBlock({
|
|
|
6300
6222
|
className
|
|
6301
6223
|
}) {
|
|
6302
6224
|
const Markdown2 = useSlot("Markdown");
|
|
6303
|
-
const [copied, setCopied] =
|
|
6225
|
+
const [copied, setCopied] = useState22(false);
|
|
6304
6226
|
const handleCopy = () => {
|
|
6305
6227
|
const val = copyValue ?? content;
|
|
6306
6228
|
void navigator.clipboard.writeText(val).then(() => {
|
|
@@ -6316,7 +6238,7 @@ function ToolCallContentBlock({
|
|
|
6316
6238
|
} : {
|
|
6317
6239
|
padding: "0.25rem"
|
|
6318
6240
|
};
|
|
6319
|
-
return /* @__PURE__ */
|
|
6241
|
+
return /* @__PURE__ */ jsxs41(
|
|
6320
6242
|
"div",
|
|
6321
6243
|
{
|
|
6322
6244
|
className: cn(
|
|
@@ -6326,9 +6248,9 @@ function ToolCallContentBlock({
|
|
|
6326
6248
|
"data-testid": dataTestPrefix ? `${dataTestPrefix}-content-block` : "tfy-tool-call-content-block",
|
|
6327
6249
|
"data-content": content,
|
|
6328
6250
|
children: [
|
|
6329
|
-
/* @__PURE__ */
|
|
6251
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between rounded-t-lg border border-primary-button-bg/30 bg-primary-button-bg/10 px-3 py-1", children: [
|
|
6330
6252
|
/* @__PURE__ */ jsx61("div", { className: "font-sans text-xs font-medium text-primary-button-bg", children: title }),
|
|
6331
|
-
/* @__PURE__ */
|
|
6253
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1", children: [
|
|
6332
6254
|
/* @__PURE__ */ jsx61(
|
|
6333
6255
|
"button",
|
|
6334
6256
|
{
|
|
@@ -6380,8 +6302,8 @@ function ToolCallContentBlock({
|
|
|
6380
6302
|
)
|
|
6381
6303
|
}
|
|
6382
6304
|
),
|
|
6383
|
-
fullscreen && /* @__PURE__ */ jsx61(Dialog, { open: true, onOpenChange: (open) => onFullscreenChange?.(open), children: /* @__PURE__ */
|
|
6384
|
-
/* @__PURE__ */
|
|
6305
|
+
fullscreen && /* @__PURE__ */ jsx61(Dialog, { open: true, onOpenChange: (open) => onFullscreenChange?.(open), children: /* @__PURE__ */ jsxs41(DialogContent, { className: "flex h-[80vh] max-w-4xl flex-col", children: [
|
|
6306
|
+
/* @__PURE__ */ jsxs41(DialogHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
|
|
6385
6307
|
/* @__PURE__ */ jsx61(DialogTitle, { children: title }),
|
|
6386
6308
|
/* @__PURE__ */ jsx61(IconButton, { variant: "ghost", onClick: () => onFullscreenChange?.(false), "aria-label": "Minimize", children: /* @__PURE__ */ jsx61(Icon, { name: "compress", size: "0.875em" }) })
|
|
6387
6309
|
] }),
|
|
@@ -6393,7 +6315,7 @@ function ToolCallContentBlock({
|
|
|
6393
6315
|
}
|
|
6394
6316
|
|
|
6395
6317
|
// src/atoms/ToolGroupCard.tsx
|
|
6396
|
-
import { jsx as jsx62, jsxs as
|
|
6318
|
+
import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6397
6319
|
function ToolGroupCard({
|
|
6398
6320
|
toolCallCount,
|
|
6399
6321
|
expanded,
|
|
@@ -6406,7 +6328,7 @@ function ToolGroupCard({
|
|
|
6406
6328
|
const AccordionSummary2 = useSlot("AccordionSummary");
|
|
6407
6329
|
const AccordionDetails2 = useSlot("AccordionDetails");
|
|
6408
6330
|
const label = `${toolCallCount} tool ${toolCallCount === 1 ? "call" : "calls"}`;
|
|
6409
|
-
return /* @__PURE__ */
|
|
6331
|
+
return /* @__PURE__ */ jsxs42(
|
|
6410
6332
|
Accordion2,
|
|
6411
6333
|
{
|
|
6412
6334
|
"data-slot": "tool-group-card",
|
|
@@ -6428,7 +6350,7 @@ function ToolGroupCard({
|
|
|
6428
6350
|
"&:hover": { backgroundColor: "transparent" },
|
|
6429
6351
|
"& .MuiAccordionSummary-content": { margin: 0, width: "100%" }
|
|
6430
6352
|
},
|
|
6431
|
-
children: /* @__PURE__ */
|
|
6353
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "text-text-secondary hover:text-text-primary flex origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]", children: [
|
|
6432
6354
|
active && /* @__PURE__ */ jsx62(Icon, { name: "loader", className: "size-3 shrink-0 animate-spin [animation-duration:0.6s]" }),
|
|
6433
6355
|
/* @__PURE__ */ jsx62("span", { className: "text-xs font-medium", children: label }),
|
|
6434
6356
|
/* @__PURE__ */ jsx62(
|
|
@@ -6451,7 +6373,7 @@ function ToolGroupCard({
|
|
|
6451
6373
|
}
|
|
6452
6374
|
|
|
6453
6375
|
// src/atoms/UserMessageActionBar.tsx
|
|
6454
|
-
import { jsx as jsx63, jsxs as
|
|
6376
|
+
import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6455
6377
|
var actionBtnClass2 = "h-6 w-6 text-text-secondary hover:text-text-primary [&_svg]:size-3.5";
|
|
6456
6378
|
function UserMessageActionBar({
|
|
6457
6379
|
isCopied,
|
|
@@ -6463,7 +6385,7 @@ function UserMessageActionBar({
|
|
|
6463
6385
|
className
|
|
6464
6386
|
}) {
|
|
6465
6387
|
const MessageTimestamp2 = useSlot("MessageTimestamp");
|
|
6466
|
-
return /* @__PURE__ */
|
|
6388
|
+
return /* @__PURE__ */ jsxs43("div", { className: cn("aui-user-action-bar-root animate-in fade-in flex items-center gap-1 duration-200", className), children: [
|
|
6467
6389
|
/* @__PURE__ */ jsx63(MessageTimestamp2, { createdAt, className: "mr-1" }),
|
|
6468
6390
|
/* @__PURE__ */ jsx63(
|
|
6469
6391
|
IconButton,
|
|
@@ -6493,9 +6415,9 @@ function UserMessageActionBar({
|
|
|
6493
6415
|
}
|
|
6494
6416
|
|
|
6495
6417
|
// src/atoms/UserMessageBubble.tsx
|
|
6496
|
-
import { jsx as jsx64, jsxs as
|
|
6418
|
+
import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6497
6419
|
function UserMessageBubble({ text, attachments, editAction, className }) {
|
|
6498
|
-
return /* @__PURE__ */
|
|
6420
|
+
return /* @__PURE__ */ jsxs44(
|
|
6499
6421
|
"div",
|
|
6500
6422
|
{
|
|
6501
6423
|
"data-slot": "aui_user-message-root",
|
|
@@ -6519,10 +6441,10 @@ function UserMessageBubble({ text, attachments, editAction, className }) {
|
|
|
6519
6441
|
|
|
6520
6442
|
// src/atoms/UserMessageEdit.tsx
|
|
6521
6443
|
import { forwardRef as forwardRef4 } from "react";
|
|
6522
|
-
import { jsx as jsx65, jsxs as
|
|
6444
|
+
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6523
6445
|
var UserMessageEdit = forwardRef4(
|
|
6524
6446
|
function UserMessageEdit2({ timestamp, attachments, input, footer, className, ...rest }, ref) {
|
|
6525
|
-
return /* @__PURE__ */
|
|
6447
|
+
return /* @__PURE__ */ jsxs45(
|
|
6526
6448
|
"div",
|
|
6527
6449
|
{
|
|
6528
6450
|
ref,
|
|
@@ -6530,7 +6452,7 @@ var UserMessageEdit = forwardRef4(
|
|
|
6530
6452
|
className: cn("flex flex-col gap-2 w-full", className),
|
|
6531
6453
|
...rest,
|
|
6532
6454
|
children: [
|
|
6533
|
-
(timestamp || attachments) && /* @__PURE__ */
|
|
6455
|
+
(timestamp || attachments) && /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2 text-sm text-text-secondary", children: [
|
|
6534
6456
|
/* @__PURE__ */ jsx65("span", { className: "font-medium text-text-primary", children: "User" }),
|
|
6535
6457
|
timestamp
|
|
6536
6458
|
] }),
|
|
@@ -6544,12 +6466,12 @@ var UserMessageEdit = forwardRef4(
|
|
|
6544
6466
|
);
|
|
6545
6467
|
|
|
6546
6468
|
// src/atoms/WelcomeScreen.tsx
|
|
6547
|
-
import { jsx as jsx66, jsxs as
|
|
6469
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6548
6470
|
function WelcomeScreen({ heading = "How can I help you today?", icon, className }) {
|
|
6549
6471
|
const preset = useOptionalThemePreset();
|
|
6550
6472
|
const BrandLogo2 = useSlot("BrandLogo");
|
|
6551
6473
|
const resolvedIcon = icon !== void 0 ? icon : preset === "chatgpt" ? null : preset === "claude" ? /* @__PURE__ */ jsx66(Icon, { name: "welcome-sparkle", className: "size-5 fill-current text-primary-button-bg" }) : /* @__PURE__ */ jsx66(BrandLogo2, { className: "size-10" });
|
|
6552
|
-
return /* @__PURE__ */
|
|
6474
|
+
return /* @__PURE__ */ jsxs46(
|
|
6553
6475
|
"div",
|
|
6554
6476
|
{
|
|
6555
6477
|
"data-preset": preset,
|
|
@@ -6661,16 +6583,16 @@ var defaultSlots = {
|
|
|
6661
6583
|
|
|
6662
6584
|
// src/theme/SlotsProvider.tsx
|
|
6663
6585
|
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
6664
|
-
var SlotsContext =
|
|
6665
|
-
var ThemeModeContext =
|
|
6586
|
+
var SlotsContext = createContext3(defaultSlots);
|
|
6587
|
+
var ThemeModeContext = createContext3(void 0);
|
|
6666
6588
|
function SlotsProvider({
|
|
6667
6589
|
overrides,
|
|
6668
6590
|
theme,
|
|
6669
6591
|
children
|
|
6670
6592
|
}) {
|
|
6671
|
-
const parentSlots =
|
|
6672
|
-
const inheritedTheme =
|
|
6673
|
-
const resolved =
|
|
6593
|
+
const parentSlots = useContext4(SlotsContext);
|
|
6594
|
+
const inheritedTheme = useContext4(ThemeModeContext);
|
|
6595
|
+
const resolved = useMemo7(() => ({ ...parentSlots, ...overrides }), [parentSlots, overrides]);
|
|
6674
6596
|
const slotsTree = /* @__PURE__ */ jsx67(SlotsProviderContents, { slots: resolved, inheritedTheme, theme, children });
|
|
6675
6597
|
const hasParentTheme = inheritedTheme !== void 0;
|
|
6676
6598
|
if (theme !== void 0 || !hasParentTheme) {
|
|
@@ -6690,15 +6612,15 @@ function SlotsProviderContents({
|
|
|
6690
6612
|
return /* @__PURE__ */ jsx67(ThemeModeContext.Provider, { value: resolvedTheme, children: /* @__PURE__ */ jsx67(SlotsContext.Provider, { value: slots, children }) });
|
|
6691
6613
|
}
|
|
6692
6614
|
function useSlot(name) {
|
|
6693
|
-
const slots =
|
|
6615
|
+
const slots = useContext4(SlotsContext);
|
|
6694
6616
|
return slots[name];
|
|
6695
6617
|
}
|
|
6696
6618
|
function useSlotIsDefault(name) {
|
|
6697
|
-
const slots =
|
|
6619
|
+
const slots = useContext4(SlotsContext);
|
|
6698
6620
|
return slots[name] === defaultSlots[name];
|
|
6699
6621
|
}
|
|
6700
6622
|
function useThemeMode() {
|
|
6701
|
-
return
|
|
6623
|
+
return useContext4(ThemeModeContext) ?? "light";
|
|
6702
6624
|
}
|
|
6703
6625
|
|
|
6704
6626
|
export {
|
|
@@ -6715,7 +6637,6 @@ export {
|
|
|
6715
6637
|
useSlotIsDefault,
|
|
6716
6638
|
useThemeMode,
|
|
6717
6639
|
ResumeUnavailable,
|
|
6718
|
-
getErrorMessage,
|
|
6719
6640
|
useSearchAgentsList,
|
|
6720
6641
|
CenteredModal,
|
|
6721
6642
|
SearchInput_default,
|
|
@@ -6740,8 +6661,6 @@ export {
|
|
|
6740
6661
|
ComposerShell,
|
|
6741
6662
|
useIsMobile,
|
|
6742
6663
|
BottomSheet,
|
|
6743
|
-
DraftCatalogProvider,
|
|
6744
|
-
useDraftCatalog,
|
|
6745
6664
|
DraftComposerLeftSection,
|
|
6746
6665
|
DraftComposerRightSection,
|
|
6747
6666
|
ToasterProvider,
|
|
@@ -6749,10 +6668,10 @@ export {
|
|
|
6749
6668
|
useToasterOptional,
|
|
6750
6669
|
MCP_AUTH_POPUP_CHANNEL,
|
|
6751
6670
|
useMCPAuth,
|
|
6671
|
+
auiInputClass,
|
|
6752
6672
|
Tooltip,
|
|
6753
6673
|
Switch,
|
|
6754
6674
|
DraftCompositeSelector,
|
|
6755
|
-
auiInputClass,
|
|
6756
6675
|
CatalogLogo,
|
|
6757
6676
|
DraftModelSelector,
|
|
6758
6677
|
HistoryLoader,
|
|
@@ -6797,4 +6716,4 @@ export {
|
|
|
6797
6716
|
WelcomeScreen,
|
|
6798
6717
|
defaultSlots
|
|
6799
6718
|
};
|
|
6800
|
-
//# sourceMappingURL=chunk-
|
|
6719
|
+
//# sourceMappingURL=chunk-Z27F4LBZ.js.map
|