@axiom-lattice/react-sdk 4.11.0 → 4.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentDetailSideApp-ZGV4WC4V.mjs → AgentDetailSideApp-GSO53ECQ.mjs} +7 -7
- package/dist/{AgentGovernanceWorkbench-HCVHQ3P7.mjs → AgentGovernanceWorkbench-LHXFBEYO.mjs} +8 -8
- package/dist/{MessageGraph-OA2HMEHI.mjs → MessageGraph-RUU5W4OT.mjs} +3 -3
- package/dist/{ReactChart-DWIFRI5G.mjs → ReactChart-KU4TD7TM.mjs} +3 -3
- package/dist/{SkillFlow-IHRME3YO.mjs → SkillFlow-MLSQCF4X.mjs} +3 -3
- package/dist/{TasksSideApp-KKBQDSO4.mjs → TasksSideApp-LWM6XAWN.mjs} +4 -4
- package/dist/{TeamWorkspace-ETVDJAYT.mjs → TeamWorkspace-3NLKUNRK.mjs} +3 -3
- package/dist/{TopologyRuntimeView-F7JQAXN2.mjs → TopologyRuntimeView-NVFFMHTP.mjs} +4 -4
- package/dist/{WorkflowAutomationView-PBZ5K43L.mjs → WorkflowAutomationView-WBVKM73F.mjs} +6 -6
- package/dist/{chunk-57IPUJ5T.mjs → chunk-BXPPM4ZX.mjs} +2 -2
- package/dist/{chunk-JQLUFZKH.mjs → chunk-NRT6JXPT.mjs} +5 -5
- package/dist/{chunk-6XGZ74LQ.mjs → chunk-PMICYMSW.mjs} +15 -15
- package/dist/chunk-PMICYMSW.mjs.map +1 -0
- package/dist/{chunk-EHUPRLAS.mjs → chunk-QM3NPPQJ.mjs} +14 -26
- package/dist/chunk-QM3NPPQJ.mjs.map +1 -0
- package/dist/{chunk-TA243DB6.mjs → chunk-RDC4ZHXF.mjs} +100 -73
- package/dist/chunk-RDC4ZHXF.mjs.map +1 -0
- package/dist/{chunk-KU634FOH.mjs → chunk-YDIVRYML.mjs} +3 -3
- package/dist/{chunk-3SEKZBYQ.mjs → chunk-ZQ7G446O.mjs} +2 -2
- package/dist/{chunk-3FXH5ZAQ.mjs → chunk-ZX53OESZ.mjs} +2 -2
- package/dist/{chunk-3MF4SALK.mjs → chunk-ZXEY5OGX.mjs} +5 -5
- package/dist/{embed-page-AgentDetailSideApp-RM4TDSC5.js → embed-page-AgentDetailSideApp-FHC56ARN.js} +1 -1
- package/dist/{embed-page-AgentGovernanceWorkbench-G6A6QNZY.js → embed-page-AgentGovernanceWorkbench-KAPZJBE6.js} +1 -1
- package/dist/{embed-page-MessageGraph-ZLGTKJNE.js → embed-page-MessageGraph-DMP5EZBM.js} +1 -1
- package/dist/{embed-page-ReactChart-IB6R6G57.js → embed-page-ReactChart-PYGNSRHG.js} +1 -1
- package/dist/{embed-page-SkillFlow-STU36L34.js → embed-page-SkillFlow-6LPE2VG3.js} +1 -1
- package/dist/{embed-page-TasksSideApp-X4APWG4G.js → embed-page-TasksSideApp-MPYOPRXW.js} +1 -1
- package/dist/{embed-page-TeamWorkspace-EK4BNNGD.js → embed-page-TeamWorkspace-EXUAXKAH.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-X5CHJPHN.js → embed-page-TopologyRuntimeView-MH4YMU7D.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-3LIT27E2.js → embed-page-WorkflowAutomationView-KQYFSLLH.js} +1 -1
- package/dist/{embed-page-chunk-7D54ACES.js → embed-page-chunk-I7BVN6EY.js} +1 -1
- package/dist/{embed-page-chunk-EQRDCFN5.js → embed-page-chunk-JSAUTBU5.js} +1 -1
- package/dist/{embed-page-chunk-734QFJP3.js → embed-page-chunk-NW37OVAX.js} +1 -1
- package/dist/{embed-page-chunk-W45YCZIC.js → embed-page-chunk-O44JEYLD.js} +7 -7
- package/dist/embed-page-chunk-QGXGVLAX.js +2 -0
- package/dist/{embed-page-chunk-DDK2VFYD.js → embed-page-chunk-QHXKZNDU.js} +8 -8
- package/dist/{embed-page-chunk-5WPKSLDW.js → embed-page-chunk-YQZI5LNV.js} +1 -1
- package/dist/embed-page.js +1 -1
- package/dist/index.js +808 -787
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/package.json +4 -4
- package/dist/chunk-6XGZ74LQ.mjs.map +0 -1
- package/dist/chunk-EHUPRLAS.mjs.map +0 -1
- package/dist/chunk-TA243DB6.mjs.map +0 -1
- package/dist/embed-page-chunk-64FTYZ5F.js +0 -2
- /package/dist/{AgentDetailSideApp-ZGV4WC4V.mjs.map → AgentDetailSideApp-GSO53ECQ.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-HCVHQ3P7.mjs.map → AgentGovernanceWorkbench-LHXFBEYO.mjs.map} +0 -0
- /package/dist/{MessageGraph-OA2HMEHI.mjs.map → MessageGraph-RUU5W4OT.mjs.map} +0 -0
- /package/dist/{ReactChart-DWIFRI5G.mjs.map → ReactChart-KU4TD7TM.mjs.map} +0 -0
- /package/dist/{SkillFlow-IHRME3YO.mjs.map → SkillFlow-MLSQCF4X.mjs.map} +0 -0
- /package/dist/{TasksSideApp-KKBQDSO4.mjs.map → TasksSideApp-LWM6XAWN.mjs.map} +0 -0
- /package/dist/{TeamWorkspace-ETVDJAYT.mjs.map → TeamWorkspace-3NLKUNRK.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-F7JQAXN2.mjs.map → TopologyRuntimeView-NVFFMHTP.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-PBZ5K43L.mjs.map → WorkflowAutomationView-WBVKM73F.mjs.map} +0 -0
- /package/dist/{chunk-57IPUJ5T.mjs.map → chunk-BXPPM4ZX.mjs.map} +0 -0
- /package/dist/{chunk-JQLUFZKH.mjs.map → chunk-NRT6JXPT.mjs.map} +0 -0
- /package/dist/{chunk-KU634FOH.mjs.map → chunk-YDIVRYML.mjs.map} +0 -0
- /package/dist/{chunk-3SEKZBYQ.mjs.map → chunk-ZQ7G446O.mjs.map} +0 -0
- /package/dist/{chunk-3FXH5ZAQ.mjs.map → chunk-ZX53OESZ.mjs.map} +0 -0
- /package/dist/{chunk-3MF4SALK.mjs.map → chunk-ZXEY5OGX.mjs.map} +0 -0
|
@@ -70,21 +70,65 @@ function clearAuthItems() {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// src/context/AuthContext.tsx
|
|
73
|
-
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|
|
74
|
-
|
|
73
|
+
import { createContext, useContext as useContext2, useState, useCallback, useEffect, useRef } from "react";
|
|
74
|
+
|
|
75
|
+
// src/i18n/LocaleLayerIfAbsent.tsx
|
|
76
|
+
import { useContext, useMemo } from "react";
|
|
77
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
78
|
+
function LocaleLayerIfAbsent({
|
|
79
|
+
locale,
|
|
80
|
+
storageKey = DEFAULT_LOCALE_STORAGE_KEY,
|
|
81
|
+
onLocaleChange,
|
|
82
|
+
children
|
|
83
|
+
}) {
|
|
84
|
+
const providedAbove = useContext(LocaleBridgeContext) !== null;
|
|
85
|
+
const initialLocale = useMemo(
|
|
86
|
+
() => locale ?? readStoredLocale(storageKey) ?? "en-US",
|
|
87
|
+
[locale, storageKey]
|
|
88
|
+
);
|
|
89
|
+
const handleLocaleChange = useMemo(
|
|
90
|
+
() => onLocaleChange ?? (() => {
|
|
91
|
+
if (typeof window !== "undefined") window.location.reload();
|
|
92
|
+
}),
|
|
93
|
+
[onLocaleChange]
|
|
94
|
+
);
|
|
95
|
+
if (providedAbove) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
LatticeLocaleProvider,
|
|
98
|
+
{
|
|
99
|
+
locale: initialLocale,
|
|
100
|
+
storageKey,
|
|
101
|
+
onLocaleChange: handleLocaleChange,
|
|
102
|
+
children
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/context/AuthContext.tsx
|
|
108
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
75
109
|
var AuthContext = createContext(null);
|
|
76
110
|
var useAuth = () => {
|
|
77
|
-
const context =
|
|
111
|
+
const context = useContext2(AuthContext);
|
|
78
112
|
if (!context) {
|
|
79
113
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
80
114
|
}
|
|
81
115
|
return context;
|
|
82
116
|
};
|
|
83
117
|
var useAuthOptional = () => {
|
|
84
|
-
const context =
|
|
118
|
+
const context = useContext2(AuthContext);
|
|
85
119
|
return context;
|
|
86
120
|
};
|
|
87
|
-
var AuthProvider = (
|
|
121
|
+
var AuthProvider = (props) => (
|
|
122
|
+
/* The locale layer sits above the inner provider on purpose: this component
|
|
123
|
+
* calls useT() for its own error copy (see below), so a layer rendered inside
|
|
124
|
+
* its return value would not reach that call. One layer here covers every
|
|
125
|
+
* auth screen: LoginForm/RegisterForm/TenantSelector all require this
|
|
126
|
+
* provider — useAuth() throws without it — and none of them mounts a locale
|
|
127
|
+
* provider of its own, so without this the whole logged-out screen paints raw
|
|
128
|
+
* keys. */
|
|
129
|
+
/* @__PURE__ */ jsx2(LocaleLayerIfAbsent, { children: /* @__PURE__ */ jsx2(AuthProviderInner, { ...props }) })
|
|
130
|
+
);
|
|
131
|
+
var AuthProviderInner = ({
|
|
88
132
|
children,
|
|
89
133
|
baseURL,
|
|
90
134
|
onLoginSuccess,
|
|
@@ -390,7 +434,7 @@ var AuthProvider = ({
|
|
|
390
434
|
clearError,
|
|
391
435
|
changePassword
|
|
392
436
|
};
|
|
393
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ jsx2(AuthContext.Provider, { value, children });
|
|
394
438
|
};
|
|
395
439
|
|
|
396
440
|
// src/context.tsx
|
|
@@ -398,13 +442,13 @@ import { App } from "antd";
|
|
|
398
442
|
import {
|
|
399
443
|
createContext as createContext2,
|
|
400
444
|
useCallback as useCallback2,
|
|
401
|
-
useContext as
|
|
445
|
+
useContext as useContext3,
|
|
402
446
|
useEffect as useEffect2,
|
|
403
|
-
useMemo,
|
|
447
|
+
useMemo as useMemo2,
|
|
404
448
|
useRef as useRef2
|
|
405
449
|
} from "react";
|
|
406
450
|
import { Client } from "@axiom-lattice/client-sdk";
|
|
407
|
-
import { jsx as
|
|
451
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
408
452
|
var AxiomLatticeContext = createContext2({
|
|
409
453
|
getClient: () => {
|
|
410
454
|
throw new Error("getClient must be used within AxiomLatticeProvider");
|
|
@@ -419,17 +463,16 @@ function AxiomLatticeProvider({
|
|
|
419
463
|
onLocaleChange,
|
|
420
464
|
children
|
|
421
465
|
}) {
|
|
422
|
-
const
|
|
423
|
-
const authContext = useContext2(AuthContext);
|
|
466
|
+
const authContext = useContext3(AuthContext);
|
|
424
467
|
const tenantId = authContext?.currentTenant?.id;
|
|
425
|
-
const effectiveApiKey =
|
|
468
|
+
const effectiveApiKey = useMemo2(() => {
|
|
426
469
|
if (authContext?.isAuthenticated) {
|
|
427
470
|
return readAuthItem("lattice_token") || config.apiKey;
|
|
428
471
|
}
|
|
429
472
|
return config.apiKey;
|
|
430
473
|
}, [authContext?.isAuthenticated, authContext?.currentTenant?.id, config.apiKey]);
|
|
431
474
|
const clientCacheRef = useRef2(/* @__PURE__ */ new Map());
|
|
432
|
-
const baseConfig =
|
|
475
|
+
const baseConfig = useMemo2(
|
|
433
476
|
() => ({
|
|
434
477
|
baseURL: config.baseURL,
|
|
435
478
|
apiKey: effectiveApiKey,
|
|
@@ -439,7 +482,7 @@ function AxiomLatticeProvider({
|
|
|
439
482
|
}),
|
|
440
483
|
[config.baseURL, effectiveApiKey, config.transport]
|
|
441
484
|
);
|
|
442
|
-
const baseClient =
|
|
485
|
+
const baseClient = useMemo2(() => {
|
|
443
486
|
const client = createClient ? createClient(baseConfig) : new Client(baseConfig);
|
|
444
487
|
if (tenantId) {
|
|
445
488
|
client.setTenantId(tenantId);
|
|
@@ -472,52 +515,35 @@ function AxiomLatticeProvider({
|
|
|
472
515
|
},
|
|
473
516
|
[baseClient]
|
|
474
517
|
);
|
|
475
|
-
const value =
|
|
518
|
+
const value = useMemo2(
|
|
476
519
|
() => ({
|
|
477
520
|
getClient
|
|
478
521
|
}),
|
|
479
522
|
[getClient]
|
|
480
523
|
);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
489
|
-
[onLocaleChange]
|
|
490
|
-
);
|
|
491
|
-
const content = /* @__PURE__ */ jsx2(AxiomLatticeContext.Provider, { value, children });
|
|
492
|
-
return /* @__PURE__ */ jsx2(App, { component: false, children: localeProvidedAbove ? content : (
|
|
493
|
-
/* No locale layer above: supply one so a host that mounts only this
|
|
494
|
-
* provider gets real copy and a working switch, not raw keys. The
|
|
495
|
-
* dictionaries it loads are what `useT()` below would otherwise render
|
|
496
|
-
* as keys. */
|
|
497
|
-
/* @__PURE__ */ jsx2(
|
|
498
|
-
LatticeLocaleProvider,
|
|
499
|
-
{
|
|
500
|
-
locale: initialLocale,
|
|
501
|
-
storageKey,
|
|
502
|
-
onLocaleChange: handleLocaleChange,
|
|
503
|
-
children: content
|
|
504
|
-
}
|
|
505
|
-
)
|
|
524
|
+
return /* @__PURE__ */ jsx3(App, { component: false, children: /* @__PURE__ */ jsx3(
|
|
525
|
+
LocaleLayerIfAbsent,
|
|
526
|
+
{
|
|
527
|
+
locale,
|
|
528
|
+
storageKey,
|
|
529
|
+
onLocaleChange,
|
|
530
|
+
children: /* @__PURE__ */ jsx3(AxiomLatticeContext.Provider, { value, children })
|
|
531
|
+
}
|
|
506
532
|
) });
|
|
507
533
|
}
|
|
508
534
|
function useClient(assistantId) {
|
|
509
|
-
const context =
|
|
535
|
+
const context = useContext3(AxiomLatticeContext);
|
|
510
536
|
if (!context) {
|
|
511
537
|
throw new Error(
|
|
512
538
|
"useClient must be used within an AxiomLatticeProvider"
|
|
513
539
|
);
|
|
514
540
|
}
|
|
515
|
-
return
|
|
541
|
+
return useMemo2(() => context.getClient(assistantId), [context, assistantId]);
|
|
516
542
|
}
|
|
517
543
|
function useAxiomLattice({
|
|
518
544
|
assistantId
|
|
519
545
|
} = {}) {
|
|
520
|
-
const context =
|
|
546
|
+
const context = useContext3(AxiomLatticeContext);
|
|
521
547
|
if (!context) {
|
|
522
548
|
throw new Error(
|
|
523
549
|
"useAxiomLattice must be used within an AxiomLatticeProvider"
|
|
@@ -528,17 +554,17 @@ function useAxiomLattice({
|
|
|
528
554
|
"useAxiomLattice requires assistantId parameter. Use useClient(assistantId) instead."
|
|
529
555
|
);
|
|
530
556
|
}
|
|
531
|
-
return
|
|
557
|
+
return useMemo2(() => context.getClient(assistantId), [context, assistantId]);
|
|
532
558
|
}
|
|
533
559
|
|
|
534
560
|
// src/components/Chat/LatticeChatShellContext.tsx
|
|
535
561
|
import {
|
|
536
562
|
createContext as createContext3,
|
|
537
563
|
useCallback as useCallback3,
|
|
538
|
-
useContext as
|
|
564
|
+
useContext as useContext4,
|
|
539
565
|
useState as useState3
|
|
540
566
|
} from "react";
|
|
541
|
-
import { jsx as
|
|
567
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
542
568
|
var DEFAULT_MIDDLEWARE_TYPES = [
|
|
543
569
|
{
|
|
544
570
|
type: "filesystem",
|
|
@@ -1087,7 +1113,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
1087
1113
|
setConfig(defaultConfig);
|
|
1088
1114
|
saveToLocalStorage(defaultConfig);
|
|
1089
1115
|
}, [initialConfig, saveToLocalStorage]);
|
|
1090
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ jsx4(
|
|
1091
1117
|
LatticeChatShellContext.Provider,
|
|
1092
1118
|
{
|
|
1093
1119
|
value: {
|
|
@@ -1103,7 +1129,7 @@ var LatticeChatShellContextProvider = ({
|
|
|
1103
1129
|
);
|
|
1104
1130
|
};
|
|
1105
1131
|
var useLatticeChatShellContext = () => {
|
|
1106
|
-
const context =
|
|
1132
|
+
const context = useContext4(LatticeChatShellContext);
|
|
1107
1133
|
if (!context) {
|
|
1108
1134
|
throw new Error(
|
|
1109
1135
|
"useLatticeChatShellContext must be used within a LatticeChatShellContextProvider"
|
|
@@ -1188,7 +1214,7 @@ import {
|
|
|
1188
1214
|
} from "antd";
|
|
1189
1215
|
import { PlusOutlined } from "@ant-design/icons";
|
|
1190
1216
|
import { theme } from "antd";
|
|
1191
|
-
import { jsx as
|
|
1217
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
1192
1218
|
var { TextArea } = Input;
|
|
1193
1219
|
var { Text } = Typography;
|
|
1194
1220
|
var CreateSkillModal = ({
|
|
@@ -1290,7 +1316,7 @@ var CreateSkillModal = ({
|
|
|
1290
1316
|
const handleAddMetadataRow = () => {
|
|
1291
1317
|
setMetadataRows([...metadataRows, { key: "", value: "" }]);
|
|
1292
1318
|
};
|
|
1293
|
-
return /* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ jsx5(
|
|
1294
1320
|
Modal,
|
|
1295
1321
|
{
|
|
1296
1322
|
title: isEdit ? t("chatConfig.skill.edit.title") : t("chatConfig.skill.create.title"),
|
|
@@ -1302,7 +1328,7 @@ var CreateSkillModal = ({
|
|
|
1302
1328
|
styles: {
|
|
1303
1329
|
body: { padding: 16 }
|
|
1304
1330
|
},
|
|
1305
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx5(
|
|
1306
1332
|
Form,
|
|
1307
1333
|
{
|
|
1308
1334
|
form,
|
|
@@ -1319,8 +1345,8 @@ var CreateSkillModal = ({
|
|
|
1319
1345
|
},
|
|
1320
1346
|
children: [
|
|
1321
1347
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.name") }),
|
|
1349
|
+
/* @__PURE__ */ jsx5(
|
|
1324
1350
|
Form.Item,
|
|
1325
1351
|
{
|
|
1326
1352
|
name: "name",
|
|
@@ -1333,13 +1359,13 @@ var CreateSkillModal = ({
|
|
|
1333
1359
|
{ min: 1, max: 64, message: t("chatConfig.skill.validation.nameLength") }
|
|
1334
1360
|
],
|
|
1335
1361
|
style: { marginBottom: 0 },
|
|
1336
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsx5(Input, { placeholder: "e.g., data-analysis", disabled: isEdit })
|
|
1337
1363
|
}
|
|
1338
1364
|
)
|
|
1339
1365
|
] }),
|
|
1340
1366
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.description") }),
|
|
1368
|
+
/* @__PURE__ */ jsx5(
|
|
1343
1369
|
Form.Item,
|
|
1344
1370
|
{
|
|
1345
1371
|
name: "description",
|
|
@@ -1347,7 +1373,7 @@ var CreateSkillModal = ({
|
|
|
1347
1373
|
{ required: true, message: t("chatConfig.skill.validation.descriptionRequired") }
|
|
1348
1374
|
],
|
|
1349
1375
|
style: { marginBottom: 0 },
|
|
1350
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ jsx5(
|
|
1351
1377
|
TextArea,
|
|
1352
1378
|
{
|
|
1353
1379
|
placeholder: t("chatConfig.skill.placeholder.description"),
|
|
@@ -1358,12 +1384,12 @@ var CreateSkillModal = ({
|
|
|
1358
1384
|
)
|
|
1359
1385
|
] }),
|
|
1360
1386
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1361
|
-
/* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.license") }),
|
|
1388
|
+
/* @__PURE__ */ jsx5(Form.Item, { name: "license", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(Input, { placeholder: t("chatConfig.skill.placeholder.license") }) })
|
|
1363
1389
|
] }),
|
|
1364
1390
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.compatibility") }),
|
|
1392
|
+
/* @__PURE__ */ jsx5(Form.Item, { name: "compatibility", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(Input, { placeholder: t("chatConfig.skill.placeholder.compatibility") }) })
|
|
1367
1393
|
] }),
|
|
1368
1394
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1369
1395
|
/* @__PURE__ */ jsxs(
|
|
@@ -1376,7 +1402,7 @@ var CreateSkillModal = ({
|
|
|
1376
1402
|
gap: 8
|
|
1377
1403
|
},
|
|
1378
1404
|
children: [
|
|
1379
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsx5(
|
|
1380
1406
|
Text,
|
|
1381
1407
|
{
|
|
1382
1408
|
style: {
|
|
@@ -1387,11 +1413,11 @@ var CreateSkillModal = ({
|
|
|
1387
1413
|
children: t("chatConfig.skill.field.metadata")
|
|
1388
1414
|
}
|
|
1389
1415
|
),
|
|
1390
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ jsx5(
|
|
1391
1417
|
Button,
|
|
1392
1418
|
{
|
|
1393
1419
|
size: "small",
|
|
1394
|
-
icon: /* @__PURE__ */
|
|
1420
|
+
icon: /* @__PURE__ */ jsx5(PlusOutlined, {}),
|
|
1395
1421
|
onClick: handleAddMetadataRow,
|
|
1396
1422
|
children: t("chatConfig.skill.metadata.add")
|
|
1397
1423
|
}
|
|
@@ -1400,7 +1426,7 @@ var CreateSkillModal = ({
|
|
|
1400
1426
|
}
|
|
1401
1427
|
),
|
|
1402
1428
|
/* @__PURE__ */ jsxs(Space, { direction: "vertical", size: 8, style: { width: "100%" }, children: [
|
|
1403
|
-
metadataRows.length === 0 && /* @__PURE__ */
|
|
1429
|
+
metadataRows.length === 0 && /* @__PURE__ */ jsx5(
|
|
1404
1430
|
Text,
|
|
1405
1431
|
{
|
|
1406
1432
|
style: {
|
|
@@ -1420,7 +1446,7 @@ var CreateSkillModal = ({
|
|
|
1420
1446
|
width: "100%"
|
|
1421
1447
|
},
|
|
1422
1448
|
children: [
|
|
1423
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ jsx5(
|
|
1424
1450
|
Text,
|
|
1425
1451
|
{
|
|
1426
1452
|
style: { fontSize: 11, color: token.colorTextSecondary },
|
|
@@ -1428,7 +1454,7 @@ var CreateSkillModal = ({
|
|
|
1428
1454
|
}
|
|
1429
1455
|
),
|
|
1430
1456
|
/* @__PURE__ */ jsxs(Space, { style: { width: "100%" }, size: 8, wrap: true, children: [
|
|
1431
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ jsx5(
|
|
1432
1458
|
Input,
|
|
1433
1459
|
{
|
|
1434
1460
|
value: row.key,
|
|
@@ -1437,7 +1463,7 @@ var CreateSkillModal = ({
|
|
|
1437
1463
|
onChange: (e) => handleMetadataChange(index, "key", e.target.value)
|
|
1438
1464
|
}
|
|
1439
1465
|
),
|
|
1440
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ jsx5(
|
|
1441
1467
|
Input,
|
|
1442
1468
|
{
|
|
1443
1469
|
value: row.value,
|
|
@@ -1454,8 +1480,8 @@ var CreateSkillModal = ({
|
|
|
1454
1480
|
] })
|
|
1455
1481
|
] }),
|
|
1456
1482
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ jsx5(Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: t("chatConfig.skill.field.content") }),
|
|
1484
|
+
/* @__PURE__ */ jsx5(Form.Item, { name: "content", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsx5(
|
|
1459
1485
|
TextArea,
|
|
1460
1486
|
{
|
|
1461
1487
|
placeholder: t("chatConfig.skill.placeholder.content"),
|
|
@@ -1474,8 +1500,8 @@ var CreateSkillModal = ({
|
|
|
1474
1500
|
marginTop: 8
|
|
1475
1501
|
},
|
|
1476
1502
|
children: [
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */
|
|
1503
|
+
/* @__PURE__ */ jsx5(Button, { onClick: handleCancel, children: t("common.cancel") }),
|
|
1504
|
+
/* @__PURE__ */ jsx5(Button, { type: "primary", htmlType: "submit", loading, children: isEdit ? t("chatConfig.skill.action.save") : t("chatConfig.skill.action.create") })
|
|
1479
1505
|
]
|
|
1480
1506
|
}
|
|
1481
1507
|
)
|
|
@@ -1496,6 +1522,7 @@ export {
|
|
|
1496
1522
|
writeAuthItem,
|
|
1497
1523
|
removeAuthItem,
|
|
1498
1524
|
clearAuthItems,
|
|
1525
|
+
LocaleLayerIfAbsent,
|
|
1499
1526
|
useAuth,
|
|
1500
1527
|
useAuthOptional,
|
|
1501
1528
|
AuthProvider,
|
|
@@ -1510,4 +1537,4 @@ export {
|
|
|
1510
1537
|
CreateSkillModal,
|
|
1511
1538
|
CreateSkillModal_default
|
|
1512
1539
|
};
|
|
1513
|
-
//# sourceMappingURL=chunk-
|
|
1540
|
+
//# sourceMappingURL=chunk-RDC4ZHXF.mjs.map
|