china-mobile-international-custom-components 0.0.54 → 0.0.55
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/es/AddOrEditSupplierDialog.mjs +920 -22
- package/es/AuthSection.mjs +192 -0
- package/es/CommonTagsList.mjs +31 -30
- package/es/CreateMcpForm.mjs +321 -0
- package/es/FilePreview.mjs +229 -0
- package/es/McpFormDialog.mjs +188 -0
- package/es/RadioGroup.mjs +120 -0
- package/es/SourcePublish.mjs +2 -2
- package/es/assets/AddOrEditSupplierDialog.css +1 -1
- package/es/assets/AuthSection.css +1 -0
- package/es/assets/CreateMcpForm.css +1 -0
- package/es/assets/FilePreview.css +1 -0
- package/es/assets/McpFormDialog.css +1 -0
- package/es/assets/RadioGroup.css +1 -0
- package/es/assets/usePreview.css +1 -0
- package/es/chunks/config.CgrPt4Zx.js +435 -0
- package/es/chunks/usePreview.BMkgYO7E.js +124 -0
- package/es/index.mjs +162 -147
- package/lib/AddOrEditSupplierDialog.js +1 -1
- package/lib/AuthSection.js +1 -0
- package/lib/CommonTagsList.js +1 -1
- package/lib/CreateMcpForm.js +1 -0
- package/lib/FilePreview.js +1 -0
- package/lib/McpFormDialog.js +1 -0
- package/lib/RadioGroup.js +1 -0
- package/lib/SourcePublish.js +1 -1
- package/lib/assets/AddOrEditSupplierDialog.css +1 -1
- package/lib/assets/AuthSection.css +1 -0
- package/lib/assets/CreateMcpForm.css +1 -0
- package/lib/assets/FilePreview.css +1 -0
- package/lib/assets/McpFormDialog.css +1 -0
- package/lib/assets/RadioGroup.css +1 -0
- package/lib/assets/usePreview.css +1 -0
- package/lib/chunks/config.BvBtwI1A.js +1 -0
- package/lib/chunks/usePreview.BzTCNJfE.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,24 +1,922 @@
|
|
|
1
|
-
import "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import {
|
|
1
|
+
import { w as Le } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { createElementBlock as _, openBlock as i, Fragment as B, createCommentVNode as h, unref as e, renderSlot as de, createVNode as s, withCtx as r, renderList as $, createBlock as T, createElementVNode as M, resolveDynamicComponent as re, toDisplayString as R, createTextVNode as V, normalizeClass as me, computed as Oe, ref as L, onMounted as ve, reactive as Re } from "vue";
|
|
3
|
+
import { u as ie } from "./chunks/i18n.Bd7hh14j.js";
|
|
4
|
+
import { g as X } from "./chunks/request.24c3shPx.js";
|
|
5
|
+
import { ElRow as ge, ElCol as fe, ElIcon as w, ElButton as Y, ElMessage as G, ElForm as Ae, ElFormItem as P, ElInput as x, ElSelect as De, ElOption as Ce } from "element-plus";
|
|
6
|
+
import { IconDelete as ue, IconHide as Ie, IconWarn as Te, IconGoto3 as _e, Workflow as ye } from "color-message-aibox-vue";
|
|
7
|
+
import { UploadTypesEnum as ne, FileUploader as Ne } from "./FileUploader.mjs";
|
|
8
|
+
import { o as we, c as ce, u as he } from "./chunks/usePreview.BMkgYO7E.js";
|
|
9
|
+
import { d as hl, g as bl, i as Pl, a as Bl, b as Ul, e as kl, f as Sl, h as xl, j as Vl, k as Yl, l as $l, m as Fl, n as Kl } from "./chunks/usePreview.BMkgYO7E.js";
|
|
10
|
+
import { _ as J } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
|
+
import { useDialog as pe, DialogContainer as Ee } from "./DialogContainer.mjs";
|
|
12
|
+
import { useRouter as be } from "vue-router";
|
|
13
|
+
import './assets/AddOrEditSupplierDialog.css';const Me = () => {
|
|
14
|
+
const { $request: d, $env: c } = X();
|
|
15
|
+
return {
|
|
16
|
+
deleteKey: (E) => d({
|
|
17
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/model/key/${E}`,
|
|
18
|
+
method: "delete"
|
|
19
|
+
}),
|
|
20
|
+
deleteOwnerModel: (E) => d({
|
|
21
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/model/${E}`,
|
|
22
|
+
method: "delete"
|
|
23
|
+
}),
|
|
24
|
+
addModel: (E) => d({
|
|
25
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/model`,
|
|
26
|
+
method: "post",
|
|
27
|
+
data: E
|
|
28
|
+
}),
|
|
29
|
+
updateModel: (E, p) => d({
|
|
30
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/model/${E}`,
|
|
31
|
+
method: "put",
|
|
32
|
+
data: p
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
}, Pe = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "panel-preview"
|
|
38
|
+
}, Be = { class: "panel-preview__item" }, Ue = ["onClick"], ke = ["src", "alt"], Se = { class: "panel-preview__name ellipsis" }, xe = { key: 0 }, Ve = { key: 1 }, Ye = {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: "upload-preview"
|
|
41
|
+
}, $e = ["src", "alt"], Fe = { class: "preview-item__mask" }, Ke = {
|
|
42
|
+
__name: "FilePreview",
|
|
43
|
+
props: {
|
|
44
|
+
fileList: {
|
|
45
|
+
type: Array,
|
|
46
|
+
default: () => []
|
|
47
|
+
},
|
|
48
|
+
canEdit: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
previewType: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ne.面板
|
|
55
|
+
},
|
|
56
|
+
isStream: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
isCustom: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
emits: ["on-remove", "on-preview"],
|
|
66
|
+
setup(d, { emit: c }) {
|
|
67
|
+
const { downloadPrew: v, downloadStreamPrew: t } = we(), { t: g } = ie(), A = d, E = c, p = (u) => he(u);
|
|
68
|
+
function U(u) {
|
|
69
|
+
A.isCustom ? E("on-preview", u) : A.isStream ? t(u) : v(u);
|
|
70
|
+
}
|
|
71
|
+
function f(u, D) {
|
|
72
|
+
E("on-remove", u, D);
|
|
73
|
+
}
|
|
74
|
+
return (u, D) => (i(), _(B, null, [
|
|
75
|
+
d.previewType === e(ne).面板 ? (i(), _("div", Pe, [
|
|
76
|
+
de(u.$slots, "PanelUploader", {}, void 0, !0),
|
|
77
|
+
s(e(ge), {
|
|
78
|
+
gutter: 20,
|
|
79
|
+
class: "panel-preview__row"
|
|
80
|
+
}, {
|
|
81
|
+
default: r(() => [
|
|
82
|
+
(i(!0), _(B, null, $(d.fileList, (O, C) => (i(), T(e(fe), {
|
|
83
|
+
span: 8,
|
|
84
|
+
key: O.bnid
|
|
85
|
+
}, {
|
|
86
|
+
default: r(() => [
|
|
87
|
+
M("div", Be, [
|
|
88
|
+
M("div", {
|
|
89
|
+
class: "panel-preview__box",
|
|
90
|
+
onClick: (b) => U(O)
|
|
91
|
+
}, [
|
|
92
|
+
e(ce)(O.suffix) ? (i(), _("img", {
|
|
93
|
+
key: 0,
|
|
94
|
+
src: O.url,
|
|
95
|
+
alt: O.name,
|
|
96
|
+
class: "panel-preview__img"
|
|
97
|
+
}, null, 8, ke)) : (i(), T(e(w), {
|
|
98
|
+
key: 1,
|
|
99
|
+
size: "32px",
|
|
100
|
+
class: "panel-preview__img"
|
|
101
|
+
}, {
|
|
102
|
+
default: r(() => [
|
|
103
|
+
(i(), T(re(p(O))))
|
|
104
|
+
]),
|
|
105
|
+
_: 2
|
|
106
|
+
}, 1024)),
|
|
107
|
+
M("span", Se, R(O.name), 1)
|
|
108
|
+
], 8, Ue),
|
|
109
|
+
O.isUploading ? (i(), _("div", xe, [
|
|
110
|
+
s(e(Y), {
|
|
111
|
+
text: "",
|
|
112
|
+
size: "small",
|
|
113
|
+
loading: ""
|
|
114
|
+
}, {
|
|
115
|
+
default: r(() => [
|
|
116
|
+
V(R(e(g)("COMPONENTS.UPLOADING")) + "...", 1)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
})
|
|
120
|
+
])) : (i(), _("div", Ve, [
|
|
121
|
+
d.canEdit ? (i(), T(e(w), {
|
|
122
|
+
key: 0,
|
|
123
|
+
size: "18",
|
|
124
|
+
style: { cursor: "pointer" },
|
|
125
|
+
onClick: (b) => f(C, O)
|
|
126
|
+
}, {
|
|
127
|
+
default: r(() => [
|
|
128
|
+
s(e(ue))
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, ["onClick"])) : h("", !0)
|
|
132
|
+
]))
|
|
133
|
+
])
|
|
134
|
+
]),
|
|
135
|
+
_: 2
|
|
136
|
+
}, 1024))), 128))
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
})
|
|
140
|
+
])) : h("", !0),
|
|
141
|
+
d.previewType === e(ne).卡片 ? (i(), _("ul", Ye, [
|
|
142
|
+
(i(!0), _(B, null, $(d.fileList, (O, C) => (i(), _("li", {
|
|
143
|
+
class: "preview-item",
|
|
144
|
+
key: O.bnid
|
|
145
|
+
}, [
|
|
146
|
+
e(ce)(O.suffix) ? (i(), _("img", {
|
|
147
|
+
key: 0,
|
|
148
|
+
src: O.url,
|
|
149
|
+
alt: O.name,
|
|
150
|
+
class: "preview-item__img"
|
|
151
|
+
}, null, 8, $e)) : (i(), T(e(w), {
|
|
152
|
+
key: 1,
|
|
153
|
+
size: "32px",
|
|
154
|
+
class: "preview-item__img"
|
|
155
|
+
}, {
|
|
156
|
+
default: r(() => [
|
|
157
|
+
(i(), T(re(p(O))))
|
|
158
|
+
]),
|
|
159
|
+
_: 2
|
|
160
|
+
}, 1024)),
|
|
161
|
+
M("div", Fe, [
|
|
162
|
+
s(e(w), {
|
|
163
|
+
class: "preview-item__mask--view",
|
|
164
|
+
onClick: (b) => U(O)
|
|
165
|
+
}, {
|
|
166
|
+
default: r(() => [
|
|
167
|
+
s(e(Ie))
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["onClick"]),
|
|
171
|
+
d.canEdit ? (i(), T(e(w), {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "preview-item__mask--delete",
|
|
174
|
+
onClick: (b) => f(C, O)
|
|
175
|
+
}, {
|
|
176
|
+
default: r(() => [
|
|
177
|
+
s(e(ue))
|
|
178
|
+
]),
|
|
179
|
+
_: 1
|
|
180
|
+
}, 8, ["onClick"])) : h("", !0)
|
|
181
|
+
])
|
|
182
|
+
]))), 128)),
|
|
183
|
+
de(u.$slots, "CardUploader", {}, void 0, !0)
|
|
184
|
+
])) : h("", !0)
|
|
185
|
+
], 64));
|
|
186
|
+
}
|
|
187
|
+
}, He = /* @__PURE__ */ J(Ke, [["__scopeId", "data-v-58503153"]]), Ge = () => {
|
|
188
|
+
const { $request: d, $env: c } = X();
|
|
189
|
+
return {
|
|
190
|
+
getSystemReference: (t) => d({
|
|
191
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/system/reference`,
|
|
192
|
+
method: "get",
|
|
193
|
+
params: t
|
|
194
|
+
})
|
|
195
|
+
};
|
|
196
|
+
}, Xe = () => {
|
|
197
|
+
const { $request: d, $env: c } = X();
|
|
198
|
+
return {
|
|
199
|
+
deleteKnowledgeBase: (t) => d({
|
|
200
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/library/${t}`,
|
|
201
|
+
method: "delete"
|
|
202
|
+
})
|
|
203
|
+
};
|
|
204
|
+
}, je = () => {
|
|
205
|
+
const { $request: d, $env: c } = X();
|
|
206
|
+
return {
|
|
207
|
+
del: (t) => d({
|
|
208
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/workflow/${t}`,
|
|
209
|
+
method: "delete"
|
|
210
|
+
})
|
|
211
|
+
};
|
|
212
|
+
}, qe = () => {
|
|
213
|
+
const { $request: d, $env: c } = X();
|
|
214
|
+
return {
|
|
215
|
+
deleteId: (g) => d({
|
|
216
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/plugin/${g}`,
|
|
217
|
+
method: "delete"
|
|
218
|
+
}),
|
|
219
|
+
deleteTools: (g) => d({
|
|
220
|
+
url: `${c.VITE_APP_AIBOX_BASE_URL}/api/v1/plugin/tools/${g}`,
|
|
221
|
+
method: "delete"
|
|
222
|
+
})
|
|
223
|
+
};
|
|
224
|
+
}, We = { class: "ai-box-tabs overflow-hidden" }, ze = ["onClick"], Qe = {
|
|
225
|
+
__name: "AiboxTabs",
|
|
226
|
+
props: {
|
|
227
|
+
modelValue: {
|
|
228
|
+
type: [String, Number],
|
|
229
|
+
default: () => ""
|
|
230
|
+
},
|
|
231
|
+
tabList: {
|
|
232
|
+
type: Array,
|
|
233
|
+
default: () => []
|
|
234
|
+
},
|
|
235
|
+
propsObj: {
|
|
236
|
+
type: Object,
|
|
237
|
+
default: () => ({
|
|
238
|
+
label: "label",
|
|
239
|
+
value: "value"
|
|
240
|
+
})
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
emits: ["update:modelValue", "change"],
|
|
244
|
+
setup(d, { emit: c }) {
|
|
245
|
+
const v = c, t = d, g = (A) => {
|
|
246
|
+
v("update:modelValue", A[t.propsObj.value]), v("change", A[t.propsObj.value]);
|
|
247
|
+
};
|
|
248
|
+
return (A, E) => (i(), _("div", We, [
|
|
249
|
+
M("ul", null, [
|
|
250
|
+
(i(!0), _(B, null, $(d.tabList, (p) => (i(), _("li", {
|
|
251
|
+
key: p[d.propsObj.value],
|
|
252
|
+
onClick: (U) => g(p),
|
|
253
|
+
class: me(d.modelValue === p[d.propsObj.value] ? "current" : "")
|
|
254
|
+
}, R(p[d.propsObj.label]), 11, ze))), 128))
|
|
255
|
+
])
|
|
256
|
+
]));
|
|
257
|
+
}
|
|
258
|
+
}, Je = /* @__PURE__ */ J(Qe, [["__scopeId", "data-v-82d3878d"]]), Ze = { class: "delete-title" }, el = { class: "custom-message-box" }, ll = {
|
|
259
|
+
class: "custom-message-box__title",
|
|
260
|
+
style: { "line-height": "24px" }
|
|
261
|
+
}, tl = { style: { color: "red" } }, ol = {
|
|
262
|
+
key: 0,
|
|
263
|
+
class: "custom-message-box__tip"
|
|
264
|
+
}, al = {
|
|
265
|
+
key: 0,
|
|
266
|
+
class: "delete-tabs"
|
|
267
|
+
}, sl = {
|
|
268
|
+
key: 0,
|
|
269
|
+
class: "resource-list"
|
|
270
|
+
}, nl = ["onClick"], rl = { class: "item-title" }, il = {
|
|
271
|
+
key: 1,
|
|
272
|
+
class: "resource-list"
|
|
273
|
+
}, dl = ["onClick"], ul = { class: "item-title" }, _l = { class: "dialog-footer" }, cl = {
|
|
274
|
+
__name: "DeleteResourceDialog",
|
|
275
|
+
props: {
|
|
276
|
+
title: {
|
|
277
|
+
type: String,
|
|
278
|
+
default: ""
|
|
279
|
+
},
|
|
280
|
+
deleteType: {
|
|
281
|
+
type: String,
|
|
282
|
+
default: ""
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
emits: ["success"],
|
|
286
|
+
setup(d, { expose: c, emit: v }) {
|
|
287
|
+
const { getSystemReference: t } = Ge(), { deleteKnowledgeBase: g } = Xe(), { del: A } = je(), { deleteId: E, deleteTools: p } = qe(), { deleteKey: U, deleteOwnerModel: f } = Me(), { t: u } = ie(), D = be(), { dialogRef: O, showDialog: C, hideDialog: b } = pe(), j = d, F = v, n = Oe(() => {
|
|
288
|
+
const l = [];
|
|
289
|
+
return y.value.length && l.push({
|
|
290
|
+
label: u("COMPONENTS_OUTER_SPHERE.APPLICATION_REFERENCE", {
|
|
291
|
+
num: y.value.length
|
|
292
|
+
}),
|
|
293
|
+
value: "1"
|
|
294
|
+
}), N.value.length && l.push({
|
|
295
|
+
label: u("COMPONENTS_OUTER_SPHERE.WORKFLOW_REFERENCE", {
|
|
296
|
+
num: N.value.length
|
|
297
|
+
}),
|
|
298
|
+
value: "2"
|
|
299
|
+
}), l;
|
|
300
|
+
}), k = L("1"), m = L(""), y = L([]), N = L([]), Z = (l) => {
|
|
301
|
+
const a = {
|
|
302
|
+
model: {
|
|
303
|
+
code: 1,
|
|
304
|
+
desc: u("COMMON_TAG.APPLICATION"),
|
|
305
|
+
deleteFn: async () => await f(m.value)
|
|
306
|
+
},
|
|
307
|
+
knowledge: {
|
|
308
|
+
code: 2,
|
|
309
|
+
desc: u("COMMON_TAG.KNOWLEDGE_BASE"),
|
|
310
|
+
deleteFn: async () => await g(m.value)
|
|
311
|
+
},
|
|
312
|
+
workflow: {
|
|
313
|
+
code: 4,
|
|
314
|
+
desc: u("COMMON_TAG.WORKFLOW"),
|
|
315
|
+
deleteFn: async () => await A(m.value)
|
|
316
|
+
},
|
|
317
|
+
plugin: {
|
|
318
|
+
code: 6,
|
|
319
|
+
desc: u("COMMON_TAG.PLUGIN"),
|
|
320
|
+
deleteFn: async () => await E(m.value)
|
|
321
|
+
},
|
|
322
|
+
pluglit: {
|
|
323
|
+
code: 6,
|
|
324
|
+
desc: u("COMMON_TAG.TOOL"),
|
|
325
|
+
deleteFn: async () => await p(m.value)
|
|
326
|
+
},
|
|
327
|
+
modelKey: {
|
|
328
|
+
code: 7,
|
|
329
|
+
desc: u("COMMON_TAG.MODEL_KEY"),
|
|
330
|
+
deleteFn: async () => await U(m.value)
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
return console.log(l, "value"), a[l];
|
|
334
|
+
}, ee = async () => {
|
|
335
|
+
let l = m.value;
|
|
336
|
+
j.deleteType == "plugin" && (l = W.value);
|
|
337
|
+
const a = {
|
|
338
|
+
bnid: l,
|
|
339
|
+
size: 999,
|
|
340
|
+
page: 1,
|
|
341
|
+
"business-type": q
|
|
342
|
+
}, { code: o, data: I } = await t(a);
|
|
343
|
+
o === 0 && ((I.data || []).forEach((Q) => {
|
|
344
|
+
Q.name == "workflow" && (N.value = Q.data), Q.name == "agent" && (y.value = Q.data);
|
|
345
|
+
}), y.value.length || (k.value = "2"));
|
|
346
|
+
}, S = L("");
|
|
347
|
+
let q = "", K = null;
|
|
348
|
+
ve(() => {
|
|
349
|
+
const l = Z(j.deleteType);
|
|
350
|
+
S.value = l.desc || "", q = l.code || "", K = l.deleteFn || null;
|
|
351
|
+
});
|
|
352
|
+
const W = L(""), le = (l, a = "") => {
|
|
353
|
+
m.value = l, W.value = a, C(), ee();
|
|
354
|
+
}, te = async () => {
|
|
355
|
+
if (!K) return;
|
|
356
|
+
const l = await K();
|
|
357
|
+
l && l.code == 0 ? (G({
|
|
358
|
+
message: u("COMPONENTS_OUTER_SPHERE.DELETE_DATA_SUCCESS", {
|
|
359
|
+
name: S.value
|
|
360
|
+
}),
|
|
361
|
+
type: "success"
|
|
362
|
+
}), F("success"), H()) : G({
|
|
363
|
+
message: u("COMPONENTS_OUTER_SPHERE.DELETE_DATA_FAILED", {
|
|
364
|
+
name: S.value
|
|
365
|
+
}),
|
|
366
|
+
type: "error"
|
|
367
|
+
});
|
|
368
|
+
}, oe = (l) => {
|
|
369
|
+
D.push({ name: "AgentDetail", params: { bnid: l.skillet } });
|
|
370
|
+
}, z = (l) => {
|
|
371
|
+
D.push({ name: "Workflow", params: { workflowBnid: l.skillet } });
|
|
372
|
+
}, ae = () => {
|
|
373
|
+
}, H = () => {
|
|
374
|
+
b(), m.value = "", y.value = [], N.value = [];
|
|
375
|
+
};
|
|
376
|
+
return c({ showDeleteDialog: le, hideDeleteDialog: H }), (l, a) => (i(), T(e(Ee), {
|
|
377
|
+
title: d.title || e(u)("COMPONENTS_OUTER_SPHERE.CONFIRM_DELETE", { deleteTypeStr: S.value }),
|
|
378
|
+
width: "520px",
|
|
379
|
+
ref_key: "dialogRef",
|
|
380
|
+
ref: O
|
|
381
|
+
}, {
|
|
382
|
+
footer: r(() => [
|
|
383
|
+
M("div", _l, [
|
|
384
|
+
s(e(Y), {
|
|
385
|
+
onClick: H,
|
|
386
|
+
plain: ""
|
|
387
|
+
}, {
|
|
388
|
+
default: r(() => [
|
|
389
|
+
V(R(e(u)("COMMON_BUTTON.CANCEL_TEXT")), 1)
|
|
390
|
+
]),
|
|
391
|
+
_: 1
|
|
392
|
+
}),
|
|
393
|
+
s(e(Y), {
|
|
394
|
+
type: "danger",
|
|
395
|
+
onClick: te
|
|
396
|
+
}, {
|
|
397
|
+
default: r(() => [
|
|
398
|
+
V(R(e(u)("COMMON_BUTTON.CONFIRM_AFFIRM")), 1)
|
|
399
|
+
]),
|
|
400
|
+
_: 1
|
|
401
|
+
})
|
|
402
|
+
])
|
|
403
|
+
]),
|
|
404
|
+
default: r(() => [
|
|
405
|
+
M("div", Ze, [
|
|
406
|
+
s(e(w), { class: "warning-icon" }, {
|
|
407
|
+
default: r(() => [
|
|
408
|
+
s(e(Te))
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
}),
|
|
412
|
+
M("div", el, [
|
|
413
|
+
M("div", ll, [
|
|
414
|
+
V(R(e(u)("COMPONENTS_OUTER_SPHERE.HISTORY_REFERENCE", { deleteTypeStr: S.value })) + " ", 1),
|
|
415
|
+
M("span", tl, R(e(u)("PLUGINLIST.CAUTION")), 1)
|
|
416
|
+
]),
|
|
417
|
+
y.value.length || N.value.length ? (i(), _("div", ol, R(e(u)("PLUGINLIST.CAUTION_INFO")), 1)) : h("", !0),
|
|
418
|
+
a[1] || (a[1] = M("div", null, null, -1))
|
|
419
|
+
])
|
|
420
|
+
]),
|
|
421
|
+
y.value.length || N.value.length ? (i(), _("div", al, [
|
|
422
|
+
s(Je, {
|
|
423
|
+
modelValue: k.value,
|
|
424
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => k.value = o),
|
|
425
|
+
tabList: n.value,
|
|
426
|
+
onChange: ae
|
|
427
|
+
}, null, 8, ["modelValue", "tabList"]),
|
|
428
|
+
k.value == "1" ? (i(), _("div", sl, [
|
|
429
|
+
(i(!0), _(B, null, $(y.value, (o) => (i(), _("div", {
|
|
430
|
+
class: "resource-item",
|
|
431
|
+
key: o.resource,
|
|
432
|
+
onClick: (I) => oe(o)
|
|
433
|
+
}, [
|
|
434
|
+
a[2] || (a[2] = M("div", { class: "flow-name__icon-placeholder" }, null, -1)),
|
|
435
|
+
M("div", rl, R(o.name), 1),
|
|
436
|
+
s(e(w), null, {
|
|
437
|
+
default: r(() => [
|
|
438
|
+
s(e(_e))
|
|
439
|
+
]),
|
|
440
|
+
_: 1
|
|
441
|
+
})
|
|
442
|
+
], 8, nl))), 128))
|
|
443
|
+
])) : h("", !0),
|
|
444
|
+
k.value == "2" ? (i(), _("div", il, [
|
|
445
|
+
(i(!0), _(B, null, $(N.value, (o) => (i(), _("div", {
|
|
446
|
+
class: "resource-item",
|
|
447
|
+
key: o.resource,
|
|
448
|
+
onClick: (I) => z(o)
|
|
449
|
+
}, [
|
|
450
|
+
s(e(w), { size: "32px" }, {
|
|
451
|
+
default: r(() => [
|
|
452
|
+
s(e(ye))
|
|
453
|
+
]),
|
|
454
|
+
_: 1
|
|
455
|
+
}),
|
|
456
|
+
M("div", ul, R(o.name), 1),
|
|
457
|
+
s(e(w), null, {
|
|
458
|
+
default: r(() => [
|
|
459
|
+
s(e(_e))
|
|
460
|
+
]),
|
|
461
|
+
_: 1
|
|
462
|
+
})
|
|
463
|
+
], 8, dl))), 128))
|
|
464
|
+
])) : h("", !0)
|
|
465
|
+
])) : h("", !0)
|
|
466
|
+
]),
|
|
467
|
+
_: 1
|
|
468
|
+
}, 8, ["title"]));
|
|
469
|
+
}
|
|
470
|
+
}, Ol = /* @__PURE__ */ J(cl, [["__scopeId", "data-v-047a5991"]]), pl = { class: "dialog-footer" }, El = {
|
|
471
|
+
__name: "AddOrEditSupplierDialog",
|
|
472
|
+
props: {
|
|
473
|
+
showDeleteButton: {
|
|
474
|
+
type: Boolean,
|
|
475
|
+
default: !0
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
emits: ["submit", "success"],
|
|
479
|
+
setup(d, { expose: c, emit: v }) {
|
|
480
|
+
const { t } = ie(), { addModel: g, updateModel: A } = Me(), E = L(null), p = L([]), U = L(!1), f = L(!1), { dialogRef: u, hideDialog: D, resetDialog: O } = pe(f), C = L(!1), b = L(""), j = Oe(() => C.value ? t("COMMON_MODEL_LIBRARY.EDIT_MODEL") : t("COMMON_MODEL_LIBRARY.ADD_MODEL")), F = L(""), n = Re({
|
|
481
|
+
name: "",
|
|
482
|
+
code: "",
|
|
483
|
+
type: "",
|
|
484
|
+
description: "",
|
|
485
|
+
apiKey: "",
|
|
486
|
+
apiUrl: "",
|
|
487
|
+
bnid: null,
|
|
488
|
+
maxTokens: 2e6,
|
|
489
|
+
contextLength: 2e6,
|
|
490
|
+
icon: "0",
|
|
491
|
+
avatarUrl: ""
|
|
492
|
+
}), k = [
|
|
493
|
+
{
|
|
494
|
+
label: t("COMMON_MODEL_LIBRARY.MODEL_TYPE_LARGE_LANGUAGE_MODEL"),
|
|
495
|
+
value: "llm"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
label: t("COMMON_MODEL_LIBRARY.MODEL_TYPE_MULTIMODAL_MODEL"),
|
|
499
|
+
value: "multimodal"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
label: t("COMMON_MODEL_LIBRARY.MODEL_TYPE_EMBEDDING_MODEL"),
|
|
503
|
+
value: "embedding"
|
|
504
|
+
},
|
|
505
|
+
{ label: t("COMMON_MODEL_LIBRARY.MODEL_TYPE_RERANK_MODEL"), value: "rerank" }
|
|
506
|
+
], m = L(!n.bnid), y = {
|
|
507
|
+
name: [
|
|
508
|
+
{
|
|
509
|
+
required: !0,
|
|
510
|
+
message: t("COMMON_MODEL_LIBRARY.MODEL_NAME_REQUIRED"),
|
|
511
|
+
trigger: "blur"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
max: 64,
|
|
515
|
+
message: t("COMMON_MODEL_LIBRARY.MODEL_NAME_MAX_LENGTH"),
|
|
516
|
+
trigger: "blur"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
validator: (l, a, o) => {
|
|
520
|
+
a && /\s/.test(a) ? o(new Error(t("COMMON_MODEL_LIBRARY.MODEL_NAME_NO_SPACE"))) : o();
|
|
521
|
+
},
|
|
522
|
+
trigger: "blur"
|
|
523
|
+
}
|
|
524
|
+
],
|
|
525
|
+
code: [
|
|
526
|
+
{
|
|
527
|
+
required: !0,
|
|
528
|
+
message: t("COMMON_MODEL_LIBRARY.MODEL_CODE_REQUIRED"),
|
|
529
|
+
trigger: "blur"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
max: 64,
|
|
533
|
+
message: t("COMMON_MODEL_LIBRARY.MODEL_CODE_MAX_LENGTH"),
|
|
534
|
+
trigger: "blur"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
validator: (l, a, o) => {
|
|
538
|
+
a && /\s/.test(a) ? o(new Error(t("COMMON_MODEL_LIBRARY.MODEL_CODE_NO_SPACE"))) : o();
|
|
539
|
+
},
|
|
540
|
+
trigger: "blur"
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
type: [
|
|
544
|
+
{
|
|
545
|
+
required: !0,
|
|
546
|
+
message: t("COMMON_MODEL_LIBRARY.MODEL_TYPE_PLACEHOLDER"),
|
|
547
|
+
trigger: "change"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
maxTokens: [
|
|
551
|
+
{
|
|
552
|
+
required: !0,
|
|
553
|
+
message: t("COMMON_MODEL_LIBRARY.MAX_TOKENS_PLACEHOLDER"),
|
|
554
|
+
trigger: "blur"
|
|
555
|
+
}
|
|
556
|
+
],
|
|
557
|
+
contextLength: [
|
|
558
|
+
{
|
|
559
|
+
required: !0,
|
|
560
|
+
message: t("COMMON_MODEL_LIBRARY.CONTEXT_LENGTH_PLACEHOLDER"),
|
|
561
|
+
trigger: "blur"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
apiKey: [
|
|
565
|
+
{
|
|
566
|
+
required: !0,
|
|
567
|
+
message: t("COMMON_MODEL_LIBRARY.API_KEY_REQUIRED"),
|
|
568
|
+
trigger: "blur"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
apiUrl: [
|
|
572
|
+
{
|
|
573
|
+
required: !0,
|
|
574
|
+
message: t("COMMON_MODEL_LIBRARY.API_URL_REQUIRED"),
|
|
575
|
+
trigger: "blur"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
validator: (l, a, o) => {
|
|
579
|
+
if (!a) {
|
|
580
|
+
o();
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
try {
|
|
584
|
+
const I = new URL(a);
|
|
585
|
+
if (I.protocol !== "http:" && I.protocol !== "https:") {
|
|
586
|
+
o(new Error(t("COMMON_MODEL_LIBRARY.API_URL_INVALID")));
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
o();
|
|
590
|
+
} catch {
|
|
591
|
+
o(new Error(t("COMMON_MODEL_LIBRARY.API_URL_INVALID_DESC")));
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
trigger: "blur"
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
}, N = v, Z = (l = null) => {
|
|
598
|
+
console.log("data:", l), Object.assign(n, {
|
|
599
|
+
name: "",
|
|
600
|
+
code: "",
|
|
601
|
+
type: "",
|
|
602
|
+
description: "",
|
|
603
|
+
maxTokens: 2e6,
|
|
604
|
+
contextLength: 2e6,
|
|
605
|
+
supplier: "",
|
|
606
|
+
apiKey: "",
|
|
607
|
+
apiUrl: "",
|
|
608
|
+
bnid: null,
|
|
609
|
+
avatarUrl: "",
|
|
610
|
+
icon: "0"
|
|
611
|
+
}), b.value = l?.rowData?.bnid || "", l?.rowData ? (console.log("rowData:", l.rowData), l.rowData.apiKey || (U.value = !0), Object.assign(n, l.rowData), F.value = l.rowData.apiUrl || "") : F.value = "", p.value = [], l ? (n.supplier = l.supplier || "", C.value = l.isEditDialog ?? !1, l.rowData?.icon && l.rowData.icon !== "0" && l.rowData?.avatarUrl && (p.value = [
|
|
612
|
+
{
|
|
613
|
+
bnid: l.rowData.icon,
|
|
614
|
+
url: l.rowData.avatarUrl
|
|
615
|
+
}
|
|
616
|
+
])) : C.value = !1, u.value?.showDialog();
|
|
617
|
+
}, ee = (l) => {
|
|
618
|
+
l > 2e9 ? n.maxTokens = 2e9 : n.maxTokens = l;
|
|
619
|
+
}, S = (l) => {
|
|
620
|
+
l > 2e9 ? n.contextLength = 2e9 : n.contextLength = l;
|
|
621
|
+
}, q = async () => {
|
|
622
|
+
E.value && await E.value.validate(async (l) => {
|
|
623
|
+
if (l) {
|
|
624
|
+
f.value = !0;
|
|
625
|
+
const a = 2e9;
|
|
626
|
+
let o = Number(n.maxTokens), I = Number(n.contextLength);
|
|
627
|
+
o = Math.min(o, a), I = Math.min(I, a);
|
|
628
|
+
const se = {
|
|
629
|
+
name: n.name,
|
|
630
|
+
code: n.code,
|
|
631
|
+
icon: n.icon,
|
|
632
|
+
type: n.type,
|
|
633
|
+
description: n.description,
|
|
634
|
+
maxTokens: o,
|
|
635
|
+
contextLength: I,
|
|
636
|
+
apiKey: n.apiKey,
|
|
637
|
+
apiUrl: n.apiUrl
|
|
638
|
+
};
|
|
639
|
+
C.value ? await W(se) : K(se);
|
|
640
|
+
} else
|
|
641
|
+
G.error(t("COMMON_MODEL_LIBRARY.REQUIRED"));
|
|
642
|
+
});
|
|
643
|
+
}, K = async (l) => {
|
|
644
|
+
try {
|
|
645
|
+
console.log(l), (await g(l)).code === 0 && (G.success(t("COMMON_MODEL_LIBRARY.CREATE_MODEL_SUCCESS")), D(), N("submit"));
|
|
646
|
+
} finally {
|
|
647
|
+
f.value = !1;
|
|
648
|
+
}
|
|
649
|
+
}, W = async (l) => {
|
|
650
|
+
console.log("更新模型formData:", l);
|
|
651
|
+
try {
|
|
652
|
+
(await A(b.value, l)).code === 0 && (G.success(t("COMMON_MODEL_LIBRARY.UPDATE_MODEL_SUCCESS")), D());
|
|
653
|
+
} finally {
|
|
654
|
+
f.value = !1;
|
|
655
|
+
}
|
|
656
|
+
}, le = () => {
|
|
657
|
+
m.value = !m.value;
|
|
658
|
+
}, te = (l) => {
|
|
659
|
+
n.avatarUrl = l.url, n.icon = l.bnid, p.value = [l];
|
|
660
|
+
}, oe = () => {
|
|
661
|
+
n.icon = "0", p.value = [];
|
|
662
|
+
}, z = L(null), ae = () => {
|
|
663
|
+
z.value.showDeleteDialog(b.value);
|
|
664
|
+
}, H = () => {
|
|
665
|
+
D(), N("success");
|
|
666
|
+
};
|
|
667
|
+
return c({
|
|
668
|
+
showDialog: Z,
|
|
669
|
+
hideDialog: D
|
|
670
|
+
}), (l, a) => (i(), _(B, null, [
|
|
671
|
+
s(e(Ee), {
|
|
672
|
+
class: "custom-model-dialog",
|
|
673
|
+
ref_key: "dialogRef",
|
|
674
|
+
ref: u,
|
|
675
|
+
title: j.value,
|
|
676
|
+
width: "520px",
|
|
677
|
+
onClosed: e(O)
|
|
678
|
+
}, {
|
|
679
|
+
footer: r(() => [
|
|
680
|
+
M("div", pl, [
|
|
681
|
+
C.value && d.showDeleteButton ? (i(), T(e(Y), {
|
|
682
|
+
key: 0,
|
|
683
|
+
style: { float: "left" },
|
|
684
|
+
type: "danger",
|
|
685
|
+
onClick: ae
|
|
686
|
+
}, {
|
|
687
|
+
default: r(() => [
|
|
688
|
+
V(R(e(t)("COMMON_BUTTON.DELETE_TEXT")), 1)
|
|
689
|
+
]),
|
|
690
|
+
_: 1
|
|
691
|
+
})) : h("", !0),
|
|
692
|
+
s(e(Y), {
|
|
693
|
+
onClick: e(D),
|
|
694
|
+
plain: ""
|
|
695
|
+
}, {
|
|
696
|
+
default: r(() => [
|
|
697
|
+
V(R(e(t)("COMMON_BUTTON.CANCEL_TEXT")), 1)
|
|
698
|
+
]),
|
|
699
|
+
_: 1
|
|
700
|
+
}, 8, ["onClick"]),
|
|
701
|
+
s(e(Y), {
|
|
702
|
+
type: "primary",
|
|
703
|
+
loading: f.value,
|
|
704
|
+
onClick: q,
|
|
705
|
+
disabled: f.value
|
|
706
|
+
}, {
|
|
707
|
+
default: r(() => [
|
|
708
|
+
V(R(f.value ? e(t)("COMMON_MODEL_LIBRARY.VALIDATION_LOADING") : e(t)("COMMON_BUTTON.CONFIRM_TEXT")), 1)
|
|
709
|
+
]),
|
|
710
|
+
_: 1
|
|
711
|
+
}, 8, ["loading", "disabled"])
|
|
712
|
+
])
|
|
713
|
+
]),
|
|
714
|
+
default: r(() => [
|
|
715
|
+
s(e(Ae), {
|
|
716
|
+
ref_key: "formRef",
|
|
717
|
+
ref: E,
|
|
718
|
+
model: n,
|
|
719
|
+
rules: y,
|
|
720
|
+
"label-width": "auto",
|
|
721
|
+
class: "vertical-form"
|
|
722
|
+
}, {
|
|
723
|
+
default: r(() => [
|
|
724
|
+
s(e(P), {
|
|
725
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MODEL_NAME"),
|
|
726
|
+
prop: "name"
|
|
727
|
+
}, {
|
|
728
|
+
default: r(() => [
|
|
729
|
+
s(e(x), {
|
|
730
|
+
modelValue: n.name,
|
|
731
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.name = o),
|
|
732
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.MODEL_NAME_PLACEHOLDER"),
|
|
733
|
+
maxlength: 64
|
|
734
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
735
|
+
]),
|
|
736
|
+
_: 1
|
|
737
|
+
}, 8, ["label"]),
|
|
738
|
+
s(e(P), {
|
|
739
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MODEL_CODE"),
|
|
740
|
+
prop: "code"
|
|
741
|
+
}, {
|
|
742
|
+
default: r(() => [
|
|
743
|
+
s(e(x), {
|
|
744
|
+
modelValue: n.code,
|
|
745
|
+
"onUpdate:modelValue": a[1] || (a[1] = (o) => n.code = o),
|
|
746
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.MODEL_CODE_PLACEHOLDER"),
|
|
747
|
+
maxlength: 64
|
|
748
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
749
|
+
]),
|
|
750
|
+
_: 1
|
|
751
|
+
}, 8, ["label"]),
|
|
752
|
+
s(e(P), {
|
|
753
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MODEL_AVATAR_URL"),
|
|
754
|
+
prop: "avatarUrl"
|
|
755
|
+
}, {
|
|
756
|
+
default: r(() => [
|
|
757
|
+
s(He, {
|
|
758
|
+
fileList: p.value,
|
|
759
|
+
previewType: "Card",
|
|
760
|
+
onOnRemove: oe
|
|
761
|
+
}, {
|
|
762
|
+
CardUploader: r(() => [
|
|
763
|
+
p.value.length === 0 ? (i(), T(e(Ne), {
|
|
764
|
+
key: 0,
|
|
765
|
+
limitSize: 5,
|
|
766
|
+
acceptType: ".jpg,.png",
|
|
767
|
+
defaultUploadIcon: "model",
|
|
768
|
+
onOnSuccess: te,
|
|
769
|
+
businessType: "model"
|
|
770
|
+
})) : h("", !0)
|
|
771
|
+
]),
|
|
772
|
+
_: 1
|
|
773
|
+
}, 8, ["fileList"])
|
|
774
|
+
]),
|
|
775
|
+
_: 1
|
|
776
|
+
}, 8, ["label"]),
|
|
777
|
+
s(e(P), {
|
|
778
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MODEL_TYPE"),
|
|
779
|
+
prop: "type"
|
|
780
|
+
}, {
|
|
781
|
+
default: r(() => [
|
|
782
|
+
s(e(De), {
|
|
783
|
+
modelValue: n.type,
|
|
784
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => n.type = o),
|
|
785
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.MODEL_TYPE_PLACEHOLDER"),
|
|
786
|
+
style: { width: "100%" }
|
|
787
|
+
}, {
|
|
788
|
+
default: r(() => [
|
|
789
|
+
(i(), _(B, null, $(k, (o) => s(e(Ce), {
|
|
790
|
+
key: o.value,
|
|
791
|
+
label: o.label,
|
|
792
|
+
value: o.value
|
|
793
|
+
}, null, 8, ["label", "value"])), 64))
|
|
794
|
+
]),
|
|
795
|
+
_: 1
|
|
796
|
+
}, 8, ["modelValue", "placeholder"])
|
|
797
|
+
]),
|
|
798
|
+
_: 1
|
|
799
|
+
}, 8, ["label"]),
|
|
800
|
+
s(e(P), {
|
|
801
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MODEL_DESCRIPTION"),
|
|
802
|
+
prop: "description"
|
|
803
|
+
}, {
|
|
804
|
+
default: r(() => [
|
|
805
|
+
s(e(x), {
|
|
806
|
+
modelValue: n.description,
|
|
807
|
+
"onUpdate:modelValue": a[3] || (a[3] = (o) => n.description = o),
|
|
808
|
+
type: "textarea",
|
|
809
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.MODEL_DESCRIPTION_PLACEHOLDER"),
|
|
810
|
+
maxlength: 200,
|
|
811
|
+
autosize: { minRows: 2, maxRows: 6 },
|
|
812
|
+
"show-word-limit": ""
|
|
813
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
814
|
+
]),
|
|
815
|
+
_: 1
|
|
816
|
+
}, 8, ["label"]),
|
|
817
|
+
s(e(P), {
|
|
818
|
+
label: e(t)("COMMON_MODEL_LIBRARY.MAX_TOKENS"),
|
|
819
|
+
prop: "maxTokens"
|
|
820
|
+
}, {
|
|
821
|
+
default: r(() => [
|
|
822
|
+
s(e(x), {
|
|
823
|
+
modelValue: n.maxTokens,
|
|
824
|
+
"onUpdate:modelValue": a[4] || (a[4] = (o) => n.maxTokens = o),
|
|
825
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.MAX_TOKENS_PLACEHOLDER"),
|
|
826
|
+
onInput: ee
|
|
827
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
828
|
+
]),
|
|
829
|
+
_: 1
|
|
830
|
+
}, 8, ["label"]),
|
|
831
|
+
s(e(P), {
|
|
832
|
+
label: e(t)("COMMON_MODEL_LIBRARY.CONTEXT_LENGTH"),
|
|
833
|
+
prop: "contextLength"
|
|
834
|
+
}, {
|
|
835
|
+
default: r(() => [
|
|
836
|
+
s(e(x), {
|
|
837
|
+
modelValue: n.contextLength,
|
|
838
|
+
"onUpdate:modelValue": a[5] || (a[5] = (o) => n.contextLength = o),
|
|
839
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.CONTEXT_LENGTH_PLACEHOLDER"),
|
|
840
|
+
onInput: S
|
|
841
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
842
|
+
]),
|
|
843
|
+
_: 1
|
|
844
|
+
}, 8, ["label"]),
|
|
845
|
+
s(e(P), {
|
|
846
|
+
label: e(t)("COMMON_MODEL_LIBRARY.API_KEY"),
|
|
847
|
+
prop: "apiKey"
|
|
848
|
+
}, {
|
|
849
|
+
default: r(() => [
|
|
850
|
+
s(e(x), {
|
|
851
|
+
modelValue: n.apiKey,
|
|
852
|
+
"onUpdate:modelValue": a[6] || (a[6] = (o) => n.apiKey = o),
|
|
853
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.API_KEY_PLACEHOLDER"),
|
|
854
|
+
type: m.value ? "text" : "password"
|
|
855
|
+
}, {
|
|
856
|
+
suffix: r(() => [
|
|
857
|
+
s(e(w), {
|
|
858
|
+
class: "cursor-pointer",
|
|
859
|
+
onClick: le
|
|
860
|
+
}, {
|
|
861
|
+
default: r(() => [
|
|
862
|
+
(i(), T(re(m.value ? "IconLook" : "IconHide")))
|
|
863
|
+
]),
|
|
864
|
+
_: 1
|
|
865
|
+
})
|
|
866
|
+
]),
|
|
867
|
+
_: 1
|
|
868
|
+
}, 8, ["modelValue", "placeholder", "type"])
|
|
869
|
+
]),
|
|
870
|
+
_: 1
|
|
871
|
+
}, 8, ["label"]),
|
|
872
|
+
s(e(P), {
|
|
873
|
+
label: e(t)("COMMON_MODEL_LIBRARY.API_URL"),
|
|
874
|
+
prop: "apiUrl"
|
|
875
|
+
}, {
|
|
876
|
+
default: r(() => [
|
|
877
|
+
s(e(x), {
|
|
878
|
+
modelValue: n.apiUrl,
|
|
879
|
+
"onUpdate:modelValue": a[7] || (a[7] = (o) => n.apiUrl = o),
|
|
880
|
+
placeholder: e(t)("COMMON_MODEL_LIBRARY.API_URL_PLACEHOLDER"),
|
|
881
|
+
disabled: !!F.value
|
|
882
|
+
}, null, 8, ["modelValue", "placeholder", "disabled"])
|
|
883
|
+
]),
|
|
884
|
+
_: 1
|
|
885
|
+
}, 8, ["label"])
|
|
886
|
+
]),
|
|
887
|
+
_: 1
|
|
888
|
+
}, 8, ["model"])
|
|
889
|
+
]),
|
|
890
|
+
_: 1
|
|
891
|
+
}, 8, ["title", "onClosed"]),
|
|
892
|
+
s(Ol, {
|
|
893
|
+
ref_key: "deleteResourceDialog",
|
|
894
|
+
ref: z,
|
|
895
|
+
deleteType: "model",
|
|
896
|
+
onSuccess: H
|
|
897
|
+
}, null, 512)
|
|
898
|
+
], 64));
|
|
899
|
+
}
|
|
900
|
+
}, Ml = /* @__PURE__ */ J(El, [["__scopeId", "data-v-ed4f0da0"]]), yl = Le(Ml);
|
|
3
901
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
902
|
+
yl as AddOrEditSupplierDialog,
|
|
903
|
+
Je as AiboxTabs,
|
|
904
|
+
Ol as DeleteResourceDialog,
|
|
905
|
+
He as FilePreview,
|
|
906
|
+
yl as default,
|
|
907
|
+
hl as downloadBlobFile,
|
|
908
|
+
bl as getFilesApis,
|
|
909
|
+
Pl as isAudioFile,
|
|
910
|
+
Bl as isExcelFile,
|
|
911
|
+
Ul as isHtmlFile,
|
|
912
|
+
ce as isImageLink,
|
|
913
|
+
kl as isJsonFile,
|
|
914
|
+
Sl as isMdFile,
|
|
915
|
+
xl as isPdfFile,
|
|
916
|
+
Vl as isPptFile,
|
|
917
|
+
Yl as isText,
|
|
918
|
+
$l as isVideoFile,
|
|
919
|
+
Fl as isWordFile,
|
|
920
|
+
Kl as isZipFile,
|
|
921
|
+
he as uploadUrl
|
|
24
922
|
};
|