@opentiny/tiny-robot 0.3.0-alpha.19 → 0.3.0-alpha.20
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/attachments/index.js +4 -4
- package/dist/bubble/index.js +457 -456
- package/dist/container/index.js +44 -40
- package/dist/drag-overlay/index.js +5 -5
- package/dist/feedback/index.js +18 -19
- package/dist/icon-button/index.js +1 -1
- package/dist/index.d.ts +157 -58
- package/dist/index.js +59 -53
- package/dist/index2.js +29 -29
- package/dist/mcp-server-picker/index.js +381 -327
- package/dist/no-data.js +4 -0
- package/dist/prompts/index.js +36 -39
- package/dist/sender/index.js +718 -726
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +144 -143
- package/dist/theme-provider/index.js +82 -0
- package/package.json +4 -4
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TinyPopconfirm as
|
|
3
|
-
import { IconArrowRight as
|
|
4
|
-
import { _ as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as M, ref as D, computed as y, createElementBlock as d, openBlock as s, normalizeClass as K, createElementVNode as e, createBlock as x, createCommentVNode as b, toDisplayString as U, renderSlot as j, Fragment as I, unref as u, createVNode as g, withCtx as S, Transition as Y, withDirectives as F, renderList as H, vShow as ve, useModel as G, vModelText as O, watch as Q, onUnmounted as fe, mergeModels as X, normalizeStyle as he, createTextVNode as ye } from "vue";
|
|
2
|
+
import { TinyPopconfirm as be, TinySwitch as ee, TinyRadioGroup as re, TinyTabs as ke, TinyTabItem as te, TinyInput as le, TinySelect as Te, TinyOption as Ce, TinyModal as oe } from "@opentiny/vue";
|
|
3
|
+
import { IconArrowRight as Pe, IconArrowDown as $e, IconDelete as xe, IconClose as de, IconEmptySearch as we, IconPlus as Se, IconSearch as ae } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { _ as E } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
import { _ as De } from "../no-data.js";
|
|
6
|
+
import { d as Ve, o as Ue } from "../index2.js";
|
|
7
|
+
const Be = { class: "plugin-card__main" }, Ae = ["src"], Fe = { class: "plugin-card__content" }, Ie = { class: "plugin-card__info" }, Me = { class: "plugin-card__name" }, Ee = {
|
|
7
8
|
key: 0,
|
|
8
9
|
class: "plugin-card__count"
|
|
9
|
-
},
|
|
10
|
+
}, Le = ["title"], Oe = { class: "plugin-card__actions" }, Re = { class: "plugin-card__operations" }, Ne = { title: "移除插件" }, ze = {
|
|
10
11
|
key: 1,
|
|
11
12
|
class: "plugin-card__add"
|
|
12
|
-
},
|
|
13
|
+
}, qe = { class: "plugin-card__tools" }, je = { class: "plugin-card__tool" }, He = { class: "plugin-card__content" }, Qe = { class: "plugin-card__info" }, Je = { class: "plugin-card__name" }, Ge = ["title"], We = { class: "plugin-card__actions plugin-card__actions--tool" }, Ke = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "plugin-card__divider"
|
|
15
|
-
},
|
|
16
|
+
}, Xe = /* @__PURE__ */ M({
|
|
16
17
|
__name: "PluginCard",
|
|
17
18
|
props: {
|
|
18
19
|
plugin: {},
|
|
@@ -20,215 +21,219 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
20
21
|
showToolCount: { type: Boolean, default: !0 }
|
|
21
22
|
},
|
|
22
23
|
emits: ["toggle-plugin", "toggle-tool", "add-plugin", "delete-plugin"],
|
|
23
|
-
setup(
|
|
24
|
-
const t =
|
|
25
|
-
var
|
|
26
|
-
return ((
|
|
27
|
-
}),
|
|
28
|
-
"plugin-card--expandable":
|
|
24
|
+
setup(m, { emit: p }) {
|
|
25
|
+
const t = m, r = p, c = D(t.plugin.expanded || !1), k = y(() => {
|
|
26
|
+
var i;
|
|
27
|
+
return ((i = t.plugin.tools) == null ? void 0 : i.length) || 0;
|
|
28
|
+
}), v = y(() => k.value > 0), T = y(() => ({
|
|
29
|
+
"plugin-card--expandable": v.value,
|
|
29
30
|
"plugin-card--expanded": c.value,
|
|
30
31
|
[`plugin-card--${t.mode}`]: !0
|
|
31
|
-
})),
|
|
32
|
-
|
|
33
|
-
}, a =
|
|
34
|
-
if (!
|
|
32
|
+
})), V = () => {
|
|
33
|
+
v.value && (c.value = !c.value);
|
|
34
|
+
}, a = y(() => {
|
|
35
|
+
if (!v.value)
|
|
35
36
|
return { checked: t.plugin.enabled || !1, indeterminate: !1 };
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
}, R = (
|
|
43
|
-
|
|
37
|
+
const i = t.plugin.tools.filter((w) => w.enabled), C = t.plugin.tools.length;
|
|
38
|
+
return i.length === 0 ? { checked: !1, indeterminate: !1 } : i.length === C ? { checked: !0, indeterminate: !1 } : { checked: !0, indeterminate: !0 };
|
|
39
|
+
}), h = (i) => {
|
|
40
|
+
v.value && t.plugin.tools.forEach((C) => {
|
|
41
|
+
C.enabled !== i && (C.enabled = i, r("toggle-tool", C.id, i));
|
|
42
|
+
}), r("toggle-plugin", i);
|
|
43
|
+
}, R = (i, C) => {
|
|
44
|
+
r("toggle-tool", i, C);
|
|
44
45
|
}, _ = () => {
|
|
45
|
-
|
|
46
|
-
}, P =
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
return (
|
|
51
|
-
class: K(["plugin-card",
|
|
46
|
+
r("delete-plugin");
|
|
47
|
+
}, P = y(() => t.plugin.added || !1), N = () => {
|
|
48
|
+
const i = !P.value;
|
|
49
|
+
r("add-plugin", i);
|
|
50
|
+
}, z = (i) => i ? "关闭插件" : "打开插件";
|
|
51
|
+
return (i, C) => (s(), d("div", {
|
|
52
|
+
class: K(["plugin-card", T.value])
|
|
52
53
|
}, [
|
|
53
|
-
e("div",
|
|
54
|
+
e("div", Be, [
|
|
54
55
|
e("img", {
|
|
55
|
-
src:
|
|
56
|
+
src: i.plugin.icon,
|
|
56
57
|
class: "plugin-card__icon"
|
|
57
|
-
}, null, 8,
|
|
58
|
-
e("div",
|
|
59
|
-
e("div",
|
|
60
|
-
e("span",
|
|
61
|
-
|
|
58
|
+
}, null, 8, Ae),
|
|
59
|
+
e("div", Fe, [
|
|
60
|
+
e("div", Ie, [
|
|
61
|
+
e("span", Me, U(i.plugin.name), 1),
|
|
62
|
+
i.showToolCount && k.value ? (s(), d("span", Ee, U(k.value) + " 个工具 ", 1)) : b("", !0)
|
|
62
63
|
]),
|
|
63
64
|
e("div", {
|
|
64
65
|
class: "plugin-card__desc",
|
|
65
|
-
title:
|
|
66
|
-
}, U(
|
|
66
|
+
title: i.plugin.description
|
|
67
|
+
}, U(i.plugin.description), 9, Le)
|
|
67
68
|
]),
|
|
68
|
-
e("div",
|
|
69
|
-
|
|
70
|
-
plugin:
|
|
69
|
+
e("div", Oe, [
|
|
70
|
+
j(i.$slots, "actions", {
|
|
71
|
+
plugin: i.plugin,
|
|
71
72
|
expanded: c.value,
|
|
72
|
-
mode:
|
|
73
|
+
mode: i.mode
|
|
73
74
|
}, () => [
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
i.mode === "installed" ? (s(), d(I, { key: 0 }, [
|
|
76
|
+
v.value ? (s(), d("div", {
|
|
76
77
|
key: 0,
|
|
77
78
|
class: "plugin-card__expand",
|
|
78
|
-
onClick:
|
|
79
|
+
onClick: V
|
|
79
80
|
}, [
|
|
80
|
-
|
|
81
|
-
c.value ? (
|
|
81
|
+
j(i.$slots, "expand-icon", { expanded: c.value }, () => [
|
|
82
|
+
c.value ? (s(), x(u($e), {
|
|
82
83
|
key: 1,
|
|
83
|
-
|
|
84
|
-
})) : (
|
|
84
|
+
class: "common-icon"
|
|
85
|
+
})) : (s(), x(u(Pe), {
|
|
85
86
|
key: 0,
|
|
86
|
-
|
|
87
|
+
class: "common-icon"
|
|
87
88
|
}))
|
|
88
89
|
], !0)
|
|
89
|
-
])) :
|
|
90
|
-
e("div",
|
|
91
|
-
|
|
92
|
-
title: "
|
|
90
|
+
])) : b("", !0),
|
|
91
|
+
e("div", Re, [
|
|
92
|
+
g(u(be), {
|
|
93
|
+
title: "确定移除该插件吗?",
|
|
93
94
|
style: { height: "16px" },
|
|
94
95
|
type: "info",
|
|
95
96
|
onConfirm: _,
|
|
96
97
|
trigger: "click"
|
|
97
98
|
}, {
|
|
98
|
-
reference:
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
reference: S(() => [
|
|
100
|
+
j(i.$slots, "delete-icon", {}, () => [
|
|
101
|
+
e("span", Ne, [
|
|
102
|
+
g(u(xe), { class: "common-icon" })
|
|
103
|
+
])
|
|
101
104
|
], !0)
|
|
102
105
|
]),
|
|
103
106
|
_: 3
|
|
104
107
|
}),
|
|
105
|
-
|
|
108
|
+
g(u(ee), {
|
|
109
|
+
title: z(a.value.checked),
|
|
106
110
|
"model-value": a.value.checked,
|
|
107
111
|
indeterminate: a.value.indeterminate,
|
|
108
|
-
"onUpdate:modelValue":
|
|
109
|
-
}, null, 8, ["model-value", "indeterminate"])
|
|
112
|
+
"onUpdate:modelValue": h
|
|
113
|
+
}, null, 8, ["title", "model-value", "indeterminate"])
|
|
110
114
|
])
|
|
111
|
-
], 64)) :
|
|
112
|
-
|
|
115
|
+
], 64)) : i.mode === "market" ? (s(), d("div", ze, [
|
|
116
|
+
j(i.$slots, "add-button", {}, () => [
|
|
113
117
|
e("div", {
|
|
114
118
|
class: K(["plugin-card__add-button", { "plugin-card__add-button--added": P.value }]),
|
|
115
|
-
onClick:
|
|
119
|
+
onClick: N
|
|
116
120
|
}, [
|
|
117
121
|
e("span", null, U(P.value ? "已添加" : "添加"), 1)
|
|
118
122
|
], 2)
|
|
119
123
|
], !0)
|
|
120
|
-
])) :
|
|
124
|
+
])) : b("", !0)
|
|
121
125
|
], !0)
|
|
122
126
|
])
|
|
123
127
|
]),
|
|
124
|
-
|
|
128
|
+
v.value ? (s(), x(Y, {
|
|
125
129
|
key: 0,
|
|
126
130
|
name: "plugin-card-slide"
|
|
127
131
|
}, {
|
|
128
|
-
default:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
(
|
|
132
|
-
var
|
|
133
|
-
return
|
|
134
|
-
key:
|
|
132
|
+
default: S(() => [
|
|
133
|
+
F(e("div", qe, [
|
|
134
|
+
C[1] || (C[1] = e("div", { class: "plugin-card__divider" }, null, -1)),
|
|
135
|
+
(s(!0), d(I, null, H(i.plugin.tools, (w, A) => {
|
|
136
|
+
var q;
|
|
137
|
+
return s(), d("div", {
|
|
138
|
+
key: w.id,
|
|
135
139
|
class: "plugin-card__tool-item"
|
|
136
140
|
}, [
|
|
137
|
-
e("div",
|
|
138
|
-
|
|
139
|
-
e("div",
|
|
140
|
-
e("div",
|
|
141
|
-
e("span",
|
|
141
|
+
e("div", je, [
|
|
142
|
+
C[0] || (C[0] = e("div", { class: "plugin-card__icon plugin-card__icon--placeholder" }, null, -1)),
|
|
143
|
+
e("div", He, [
|
|
144
|
+
e("div", Qe, [
|
|
145
|
+
e("span", Je, U(w.name), 1)
|
|
142
146
|
]),
|
|
143
147
|
e("div", {
|
|
144
148
|
class: "plugin-card__desc",
|
|
145
|
-
title:
|
|
146
|
-
}, U(
|
|
149
|
+
title: w.description
|
|
150
|
+
}, U(w.description), 9, Ge)
|
|
147
151
|
]),
|
|
148
|
-
e("div",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
152
|
+
e("div", We, [
|
|
153
|
+
g(u(ee), {
|
|
154
|
+
title: z(w.enabled),
|
|
155
|
+
"model-value": w.enabled,
|
|
156
|
+
"onUpdate:modelValue": (W) => R(w.id, W)
|
|
157
|
+
}, null, 8, ["title", "model-value", "onUpdate:modelValue"])
|
|
153
158
|
])
|
|
154
159
|
]),
|
|
155
|
-
|
|
160
|
+
A < (((q = i.plugin.tools) == null ? void 0 : q.length) || 0) - 1 ? (s(), d("div", Ke)) : b("", !0)
|
|
156
161
|
]);
|
|
157
162
|
}), 128))
|
|
158
163
|
], 512), [
|
|
159
|
-
[
|
|
164
|
+
[ve, c.value]
|
|
160
165
|
])
|
|
161
166
|
]),
|
|
162
167
|
_: 1
|
|
163
|
-
})) :
|
|
168
|
+
})) : b("", !0)
|
|
164
169
|
], 2));
|
|
165
170
|
}
|
|
166
|
-
}),
|
|
171
|
+
}), se = /* @__PURE__ */ E(Xe, [["__scopeId", "data-v-ada02cb9"]]), Ye = { class: "code-editor__container" }, Ze = { class: "code-editor__section" }, et = { class: "code-editor__area" }, tt = /* @__PURE__ */ M({
|
|
167
172
|
__name: "CodeEditor",
|
|
168
173
|
props: {
|
|
169
174
|
codeData: { required: !0 },
|
|
170
175
|
codeDataModifiers: {}
|
|
171
176
|
},
|
|
172
177
|
emits: ["update:codeData"],
|
|
173
|
-
setup(
|
|
174
|
-
const
|
|
175
|
-
return (t,
|
|
176
|
-
e("div",
|
|
177
|
-
|
|
178
|
+
setup(m) {
|
|
179
|
+
const p = G(m, "codeData");
|
|
180
|
+
return (t, r) => (s(), d("div", Ye, [
|
|
181
|
+
e("div", Ze, [
|
|
182
|
+
r[1] || (r[1] = e("div", { class: "code-editor__header" }, [
|
|
178
183
|
e("span", { class: "code-editor__title" }, "ai_plugin(填写json)")
|
|
179
184
|
], -1)),
|
|
180
|
-
e("div",
|
|
181
|
-
|
|
182
|
-
"onUpdate:modelValue":
|
|
185
|
+
e("div", et, [
|
|
186
|
+
F(e("textarea", {
|
|
187
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => p.value = c),
|
|
183
188
|
class: "code-editor__textarea",
|
|
184
189
|
placeholder: "请输入 JSON 配置..."
|
|
185
190
|
}, null, 512), [
|
|
186
|
-
[O,
|
|
191
|
+
[O, p.value]
|
|
187
192
|
])
|
|
188
193
|
])
|
|
189
194
|
])
|
|
190
195
|
]));
|
|
191
196
|
}
|
|
192
|
-
}),
|
|
197
|
+
}), lt = /* @__PURE__ */ E(tt, [["__scopeId", "data-v-87ddff5d"]]), ot = { class: "form-editor__container" }, at = { class: "form-editor__item" }, st = { class: "form-editor__item" }, nt = { class: "form-editor__item" }, it = { class: "form-editor__item" }, rt = { class: "form-editor__item" }, dt = { class: "form-editor__item" }, ut = ["src"], ne = "https://res.hc-cdn.com/tinyui-design/1.1.0.20250526191525/home/images/tiny-ng.svg", ct = /* @__PURE__ */ M({
|
|
193
198
|
__name: "FormEditor",
|
|
194
199
|
props: {
|
|
195
200
|
formData: { required: !0 },
|
|
196
201
|
formDataModifiers: {}
|
|
197
202
|
},
|
|
198
203
|
emits: ["update:formData"],
|
|
199
|
-
setup(
|
|
200
|
-
const
|
|
204
|
+
setup(m) {
|
|
205
|
+
const p = D(""), t = G(m, "formData"), r = [
|
|
201
206
|
{ label: "sse", text: "服务器发送事件(SSE)" },
|
|
202
207
|
{ label: "streamableHttp", text: "流式HTTP(Streamable HTTP)" }
|
|
203
|
-
], { open: c, files:
|
|
208
|
+
], { open: c, files: k } = Ve({
|
|
204
209
|
accept: "image/*",
|
|
205
210
|
// 只接受图片文件
|
|
206
211
|
multiple: !1
|
|
207
212
|
// 只允许选择单个文件
|
|
208
|
-
}),
|
|
209
|
-
|
|
213
|
+
}), v = () => {
|
|
214
|
+
p.value && p.value !== ne && (URL.revokeObjectURL(p.value), p.value = "");
|
|
210
215
|
};
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
const a =
|
|
216
|
+
Q(k, (V) => {
|
|
217
|
+
if (V && V.length > 0) {
|
|
218
|
+
const a = V[0];
|
|
214
219
|
if (!a.type.startsWith("image/"))
|
|
215
220
|
return;
|
|
216
|
-
const
|
|
217
|
-
if (a.size >
|
|
221
|
+
const h = 5 * 1024 * 1024;
|
|
222
|
+
if (a.size > h)
|
|
218
223
|
return;
|
|
219
|
-
|
|
224
|
+
v(), p.value = URL.createObjectURL(a), t.value.thumbnail = a;
|
|
220
225
|
}
|
|
221
226
|
});
|
|
222
|
-
const
|
|
227
|
+
const T = () => {
|
|
223
228
|
c();
|
|
224
229
|
};
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
}), (
|
|
228
|
-
e("div",
|
|
230
|
+
return fe(() => {
|
|
231
|
+
v();
|
|
232
|
+
}), (V, a) => (s(), d("form", ot, [
|
|
233
|
+
e("div", at, [
|
|
229
234
|
a[5] || (a[5] = e("label", { class: "form-editor__label" }, "名称", -1)),
|
|
230
|
-
|
|
231
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
235
|
+
F(e("input", {
|
|
236
|
+
"onUpdate:modelValue": a[0] || (a[0] = (h) => t.value.name = h),
|
|
232
237
|
class: "form-editor__input",
|
|
233
238
|
type: "text",
|
|
234
239
|
placeholder: "请输入插件名称"
|
|
@@ -236,30 +241,29 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
236
241
|
[O, t.value.name]
|
|
237
242
|
])
|
|
238
243
|
]),
|
|
239
|
-
e("div",
|
|
244
|
+
e("div", st, [
|
|
240
245
|
a[6] || (a[6] = e("label", { class: "form-editor__label" }, "描述", -1)),
|
|
241
|
-
|
|
242
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
246
|
+
F(e("textarea", {
|
|
247
|
+
"onUpdate:modelValue": a[1] || (a[1] = (h) => t.value.description = h),
|
|
243
248
|
class: "form-editor__textarea",
|
|
244
|
-
placeholder: "请输入插件描述"
|
|
245
|
-
rows: "4"
|
|
249
|
+
placeholder: "请输入插件描述"
|
|
246
250
|
}, null, 512), [
|
|
247
251
|
[O, t.value.description]
|
|
248
252
|
])
|
|
249
253
|
]),
|
|
250
|
-
e("div",
|
|
254
|
+
e("div", nt, [
|
|
251
255
|
a[7] || (a[7] = e("label", { class: "form-editor__label" }, "类型", -1)),
|
|
252
|
-
|
|
256
|
+
g(u(re), {
|
|
253
257
|
modelValue: t.value.type,
|
|
254
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
255
|
-
options:
|
|
256
|
-
|
|
258
|
+
"onUpdate:modelValue": a[2] || (a[2] = (h) => t.value.type = h),
|
|
259
|
+
options: r,
|
|
260
|
+
class: "form-editor__radio-group"
|
|
257
261
|
}, null, 8, ["modelValue"])
|
|
258
262
|
]),
|
|
259
|
-
e("div",
|
|
263
|
+
e("div", it, [
|
|
260
264
|
a[8] || (a[8] = e("label", { class: "form-editor__label" }, "URL", -1)),
|
|
261
|
-
|
|
262
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
265
|
+
F(e("input", {
|
|
266
|
+
"onUpdate:modelValue": a[3] || (a[3] = (h) => t.value.url = h),
|
|
263
267
|
class: "form-editor__input",
|
|
264
268
|
type: "url",
|
|
265
269
|
placeholder: "请输入插件URL"
|
|
@@ -267,28 +271,27 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
267
271
|
[O, t.value.url]
|
|
268
272
|
])
|
|
269
273
|
]),
|
|
270
|
-
e("div",
|
|
274
|
+
e("div", rt, [
|
|
271
275
|
a[9] || (a[9] = e("label", { class: "form-editor__label" }, "请求头", -1)),
|
|
272
|
-
|
|
273
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
276
|
+
F(e("textarea", {
|
|
277
|
+
"onUpdate:modelValue": a[4] || (a[4] = (h) => t.value.headers = h),
|
|
274
278
|
class: "form-editor__textarea",
|
|
275
|
-
placeholder: "请输入请求头,格式为JSON"
|
|
276
|
-
rows: "4"
|
|
279
|
+
placeholder: "请输入请求头,格式为JSON"
|
|
277
280
|
}, null, 512), [
|
|
278
281
|
[O, t.value.headers]
|
|
279
282
|
])
|
|
280
283
|
]),
|
|
281
|
-
e("div",
|
|
284
|
+
e("div", dt, [
|
|
282
285
|
a[11] || (a[11] = e("label", { class: "form-editor__label" }, "缩略图", -1)),
|
|
283
286
|
e("div", {
|
|
284
287
|
class: "form-editor__file-upload",
|
|
285
|
-
onClick:
|
|
288
|
+
onClick: T
|
|
286
289
|
}, [
|
|
287
290
|
e("img", {
|
|
288
|
-
src:
|
|
291
|
+
src: p.value || ne,
|
|
289
292
|
alt: "缩略图预览",
|
|
290
293
|
class: "form-editor__file-preview-image"
|
|
291
|
-
}, null, 8,
|
|
294
|
+
}, null, 8, ut),
|
|
292
295
|
a[10] || (a[10] = e("div", { class: "form-editor__file-overlay" }, [
|
|
293
296
|
e("div", { class: "form-editor__file-icon" })
|
|
294
297
|
], -1))
|
|
@@ -296,127 +299,161 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
296
299
|
])
|
|
297
300
|
]));
|
|
298
301
|
}
|
|
299
|
-
}),
|
|
302
|
+
}), pt = /* @__PURE__ */ E(ct, [["__scopeId", "data-v-7cd7ea10"]]), mt = {
|
|
300
303
|
key: 0,
|
|
301
304
|
class: "plugin-editor__backdrop"
|
|
302
|
-
},
|
|
305
|
+
}, _t = { class: "plugin-editor__header" }, gt = { class: "plugin-editor__content" }, vt = { class: "plugin-editor__add-type" }, ft = {
|
|
303
306
|
key: 0,
|
|
304
307
|
class: "plugin-editor__form-editor"
|
|
305
|
-
},
|
|
308
|
+
}, ht = {
|
|
306
309
|
key: 1,
|
|
307
310
|
class: "plugin-editor__code-editor"
|
|
308
|
-
},
|
|
311
|
+
}, yt = /* @__PURE__ */ M({
|
|
309
312
|
__name: "PluginModal",
|
|
310
313
|
props: {
|
|
311
314
|
visible: { type: Boolean, required: !0 },
|
|
312
315
|
visibleModifiers: {}
|
|
313
316
|
},
|
|
314
|
-
emits: /* @__PURE__ */
|
|
315
|
-
setup(
|
|
316
|
-
const t =
|
|
317
|
+
emits: /* @__PURE__ */ X(["update:visible", "confirm"], ["update:visible"]),
|
|
318
|
+
setup(m, { emit: p }) {
|
|
319
|
+
const t = p, r = G(m, "visible"), c = D(null), k = D({
|
|
317
320
|
name: "",
|
|
318
321
|
description: "",
|
|
319
322
|
type: "sse",
|
|
320
323
|
url: "",
|
|
321
324
|
headers: "",
|
|
322
325
|
thumbnail: null
|
|
323
|
-
}),
|
|
326
|
+
}), v = D(""), T = D("form"), V = [
|
|
324
327
|
{ label: "form", text: "表单添加" },
|
|
325
328
|
{ label: "code", text: "代码添加" }
|
|
326
329
|
], a = () => {
|
|
327
|
-
|
|
330
|
+
r.value = !1;
|
|
328
331
|
};
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
Ue(c, () => {
|
|
333
|
+
r.value && a();
|
|
331
334
|
});
|
|
332
|
-
const
|
|
333
|
-
|
|
335
|
+
const h = () => {
|
|
336
|
+
T.value === "form" ? t("confirm", "form", k.value) : t("confirm", "code", v.value), a();
|
|
334
337
|
};
|
|
335
|
-
return (R, _) => (
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
default:
|
|
339
|
-
|
|
338
|
+
return (R, _) => (s(), d(I, null, [
|
|
339
|
+
r.value ? (s(), d("div", mt)) : b("", !0),
|
|
340
|
+
g(Y, { name: "plugin-editor" }, {
|
|
341
|
+
default: S(() => [
|
|
342
|
+
r.value ? (s(), d("div", {
|
|
340
343
|
key: 0,
|
|
341
344
|
class: "plugin-editor",
|
|
342
345
|
ref_key: "dialogRef",
|
|
343
346
|
ref: c
|
|
344
347
|
}, [
|
|
345
|
-
e("div",
|
|
348
|
+
e("div", _t, [
|
|
346
349
|
_[3] || (_[3] = e("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
|
|
347
|
-
|
|
350
|
+
g(u(de), {
|
|
348
351
|
class: "plugin-editor__close",
|
|
349
352
|
onClick: a
|
|
350
353
|
})
|
|
351
354
|
]),
|
|
352
|
-
e("div",
|
|
353
|
-
e("div",
|
|
355
|
+
e("div", gt, [
|
|
356
|
+
e("div", vt, [
|
|
354
357
|
_[4] || (_[4] = e("span", { class: "plugin-editor__add-type-label" }, "添加方式", -1)),
|
|
355
|
-
|
|
356
|
-
modelValue:
|
|
357
|
-
"onUpdate:modelValue": _[0] || (_[0] = (P) =>
|
|
358
|
+
g(u(re), {
|
|
359
|
+
modelValue: T.value,
|
|
360
|
+
"onUpdate:modelValue": _[0] || (_[0] = (P) => T.value = P),
|
|
358
361
|
type: "button",
|
|
359
|
-
options:
|
|
362
|
+
options: V
|
|
360
363
|
}, null, 8, ["modelValue"])
|
|
361
364
|
]),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"form-data":
|
|
365
|
-
"onUpdate:formData": _[1] || (_[1] = (P) =>
|
|
365
|
+
T.value === "form" ? (s(), d("div", ft, [
|
|
366
|
+
g(pt, {
|
|
367
|
+
"form-data": k.value,
|
|
368
|
+
"onUpdate:formData": _[1] || (_[1] = (P) => k.value = P)
|
|
366
369
|
}, null, 8, ["form-data"])
|
|
367
|
-
])) :
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
"code-data":
|
|
371
|
-
"onUpdate:codeData": _[2] || (_[2] = (P) =>
|
|
370
|
+
])) : b("", !0),
|
|
371
|
+
T.value === "code" ? (s(), d("div", ht, [
|
|
372
|
+
g(lt, {
|
|
373
|
+
"code-data": v.value,
|
|
374
|
+
"onUpdate:codeData": _[2] || (_[2] = (P) => v.value = P)
|
|
372
375
|
}, null, 8, ["code-data"])
|
|
373
|
-
])) :
|
|
376
|
+
])) : b("", !0)
|
|
374
377
|
]),
|
|
375
378
|
e("div", { class: "plugin-editor__footer" }, [
|
|
376
379
|
e("div", {
|
|
377
380
|
class: "button cancel",
|
|
378
381
|
onClick: a
|
|
379
|
-
}, _[5] || (_[5] = [
|
|
382
|
+
}, [..._[5] || (_[5] = [
|
|
380
383
|
e("span", null, "取消", -1)
|
|
381
|
-
])),
|
|
384
|
+
])]),
|
|
382
385
|
e("div", {
|
|
383
386
|
class: "button confirm",
|
|
384
|
-
onClick:
|
|
385
|
-
}, _[6] || (_[6] = [
|
|
387
|
+
onClick: h
|
|
388
|
+
}, [..._[6] || (_[6] = [
|
|
386
389
|
e("span", null, "确定", -1)
|
|
387
|
-
]))
|
|
390
|
+
])])
|
|
388
391
|
])
|
|
389
|
-
], 512)) :
|
|
392
|
+
], 512)) : b("", !0)
|
|
390
393
|
]),
|
|
391
394
|
_: 1
|
|
392
395
|
})
|
|
393
396
|
], 64));
|
|
394
397
|
}
|
|
395
|
-
}),
|
|
398
|
+
}), bt = /* @__PURE__ */ E(yt, [["__scopeId", "data-v-192c66c9"]]), kt = {
|
|
399
|
+
class: "empty-state",
|
|
400
|
+
role: "status",
|
|
401
|
+
"aria-live": "polite"
|
|
402
|
+
}, Tt = {
|
|
403
|
+
key: 1,
|
|
404
|
+
src: De,
|
|
405
|
+
class: "empty-state__illustration"
|
|
406
|
+
}, Ct = { class: "empty-state__message" }, Pt = /* @__PURE__ */ M({
|
|
407
|
+
__name: "NoData",
|
|
408
|
+
props: {
|
|
409
|
+
searchQuery: { default: "" }
|
|
410
|
+
},
|
|
411
|
+
setup(m) {
|
|
412
|
+
const p = m, t = y(() => {
|
|
413
|
+
var c;
|
|
414
|
+
return !!((c = p.searchQuery) != null && c.trim());
|
|
415
|
+
}), r = y(() => t.value ? "暂无搜索结果" : "暂无数据");
|
|
416
|
+
return (c, k) => (s(), d("section", kt, [
|
|
417
|
+
t.value ? (s(), x(u(we), {
|
|
418
|
+
key: 0,
|
|
419
|
+
class: "empty-state__illustration"
|
|
420
|
+
})) : (s(), d("img", Tt)),
|
|
421
|
+
e("p", Ct, U(r.value), 1)
|
|
422
|
+
]));
|
|
423
|
+
}
|
|
424
|
+
}), ie = /* @__PURE__ */ E(Pt, [["__scopeId", "data-v-839781e5"]]), $t = { class: "mcp-server-picker__header" }, xt = { class: "mcp-server-picker__header-left" }, wt = { class: "mcp-server-picker__header-right" }, St = { class: "mcp-server-picker__content" }, Dt = {
|
|
396
425
|
key: 0,
|
|
397
426
|
class: "mcp-server-picker__content-installed-search"
|
|
398
|
-
},
|
|
427
|
+
}, Vt = {
|
|
428
|
+
key: 1,
|
|
429
|
+
class: "mcp-server-picker__content-list"
|
|
430
|
+
}, Ut = {
|
|
399
431
|
key: 0,
|
|
400
432
|
class: "mcp-server-picker__loading"
|
|
401
|
-
},
|
|
433
|
+
}, Bt = {
|
|
402
434
|
key: 0,
|
|
403
435
|
class: "mcp-server-picker__content-market-header"
|
|
404
|
-
},
|
|
436
|
+
}, At = {
|
|
405
437
|
key: 0,
|
|
406
438
|
style: { width: "168px" }
|
|
407
|
-
},
|
|
439
|
+
}, Ft = {
|
|
408
440
|
key: 1,
|
|
409
441
|
style: { width: "264px", "flex-shrink": "0" }
|
|
410
|
-
},
|
|
442
|
+
}, It = {
|
|
443
|
+
key: 1,
|
|
444
|
+
class: "mcp-server-picker__content-list"
|
|
445
|
+
}, Mt = {
|
|
411
446
|
key: 0,
|
|
412
447
|
class: "mcp-server-picker__loading"
|
|
413
|
-
},
|
|
448
|
+
}, Et = /* @__PURE__ */ M({
|
|
414
449
|
__name: "index",
|
|
415
|
-
props: /* @__PURE__ */
|
|
450
|
+
props: /* @__PURE__ */ X({
|
|
416
451
|
installedPlugins: { default: () => [] },
|
|
417
452
|
marketPlugins: { default: () => [] },
|
|
418
453
|
searchPlaceholder: { default: "搜索插件" },
|
|
419
454
|
enableSearch: { type: Boolean, default: !0 },
|
|
455
|
+
installedSearchFn: { type: Function, default: (m, p) => m ? p.name.toLowerCase().includes(m.toLowerCase()) : !0 },
|
|
456
|
+
marketSearchFn: { type: Function, default: (m, p) => m ? p.name.toLowerCase().includes(m.toLowerCase()) : !0 },
|
|
420
457
|
marketCategoryOptions: { default: () => [] },
|
|
421
458
|
marketCategoryPlaceholder: { default: "按照分类筛选" },
|
|
422
459
|
enableMarketCategoryFilter: { type: Boolean, default: !0 },
|
|
@@ -430,7 +467,7 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
430
467
|
drawer: { direction: "right" }
|
|
431
468
|
}) },
|
|
432
469
|
activeCount: {},
|
|
433
|
-
installedTabTitle: { default: "
|
|
470
|
+
installedTabTitle: { default: "已添加插件" },
|
|
434
471
|
marketTabTitle: { default: "市场" },
|
|
435
472
|
title: { default: "插件" },
|
|
436
473
|
showCustomAddButton: { type: Boolean, default: !0 },
|
|
@@ -445,236 +482,253 @@ const xe = { class: "plugin-card__main" }, $e = ["src"], we = { class: "plugin-c
|
|
|
445
482
|
visible: { type: Boolean, required: !0 },
|
|
446
483
|
visibleModifiers: {}
|
|
447
484
|
}),
|
|
448
|
-
emits: /* @__PURE__ */
|
|
449
|
-
setup(
|
|
450
|
-
const t =
|
|
485
|
+
emits: /* @__PURE__ */ X(["market-category-change", "tab-change", "plugin-toggle", "plugin-delete", "plugin-add", "plugin-create", "tool-toggle", "refresh", "update:activeCount", "update:visible"], ["update:visible"]),
|
|
486
|
+
setup(m, { emit: p }) {
|
|
487
|
+
const t = m, r = p, c = D(t.defaultActiveTab), k = D(""), v = D(""), T = D(""), V = y(
|
|
451
488
|
() => c.value === "installed" ? t.searchPlaceholder : "搜索市场插件"
|
|
452
|
-
), a =
|
|
453
|
-
|
|
489
|
+
), a = y(() => t.installedPlugins), h = y(() => t.marketPlugins), R = y(() => !a.value || a.value.length === 0 ? 0 : a.value.filter((l) => l.enabled).length);
|
|
490
|
+
Q(
|
|
454
491
|
R,
|
|
455
492
|
(l) => {
|
|
456
|
-
|
|
493
|
+
r("update:activeCount", l);
|
|
457
494
|
},
|
|
458
495
|
{ immediate: !0 }
|
|
459
|
-
),
|
|
460
|
-
l !== n &&
|
|
461
|
-
}), A(b, (l) => {
|
|
462
|
-
s("search", l, "installed");
|
|
463
|
-
}), A(m, (l) => {
|
|
464
|
-
s("search", l, "market");
|
|
465
|
-
}), A(k, (l) => {
|
|
466
|
-
s("market-category-change", l);
|
|
496
|
+
), Q(c, (l, n) => {
|
|
497
|
+
l !== n && r("tab-change", l);
|
|
467
498
|
});
|
|
468
|
-
const _ = (l,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
499
|
+
const _ = y(() => a.value.filter((l) => t.installedSearchFn(k.value, l))), P = y(() => {
|
|
500
|
+
const { category: l, search: n } = {
|
|
501
|
+
category: T.value,
|
|
502
|
+
search: v.value
|
|
503
|
+
}, f = (o) => {
|
|
504
|
+
const $ = !l || o.category === l, B = !n || t.marketSearchFn(n, o);
|
|
505
|
+
return $ && B;
|
|
506
|
+
};
|
|
507
|
+
return h.value.filter(f);
|
|
508
|
+
}), N = y(() => c.value === "installed" ? _.value.length > 0 : P.value.length > 0);
|
|
509
|
+
Q(T, (l) => {
|
|
510
|
+
r("market-category-change", l);
|
|
511
|
+
});
|
|
512
|
+
const z = (l, n) => {
|
|
513
|
+
var f;
|
|
514
|
+
t.allowPluginToggle && (r("plugin-toggle", l, n), (f = l.tools) != null && f.length && (n ? l.tools.filter(($) => $.enabled).length === 0 && l.tools.forEach(($) => {
|
|
515
|
+
r("tool-toggle", l, $.id, !0);
|
|
472
516
|
}) : l.tools.forEach((o) => {
|
|
473
|
-
o.enabled &&
|
|
517
|
+
o.enabled && r("tool-toggle", l, o.id, !1);
|
|
474
518
|
})));
|
|
475
|
-
},
|
|
519
|
+
}, i = (l, n, f) => {
|
|
476
520
|
var o;
|
|
477
|
-
if (t.allowToolToggle && (
|
|
478
|
-
const
|
|
479
|
-
l.enabled !== B &&
|
|
521
|
+
if (t.allowToolToggle && (r("tool-toggle", l, n, f), (o = l.tools) != null && o.length)) {
|
|
522
|
+
const $ = l.tools.filter((L) => L.id !== n).some((L) => L.enabled), B = f || $;
|
|
523
|
+
l.enabled !== B && r("plugin-toggle", l, B);
|
|
480
524
|
}
|
|
481
|
-
},
|
|
482
|
-
t.allowPluginDelete &&
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
},
|
|
492
|
-
|
|
525
|
+
}, C = (l) => {
|
|
526
|
+
t.allowPluginDelete && (oe.message({
|
|
527
|
+
message: `${l.name} 已移除`,
|
|
528
|
+
status: "success"
|
|
529
|
+
}), r("plugin-delete", l));
|
|
530
|
+
}, w = (l, n) => {
|
|
531
|
+
t.allowPluginAdd && (n && oe.message({
|
|
532
|
+
message: `${l.name} 已添加`,
|
|
533
|
+
status: "success"
|
|
534
|
+
}), r("plugin-add", l, n));
|
|
535
|
+
}, A = D(!1), q = () => {
|
|
536
|
+
A.value = !0;
|
|
537
|
+
}, W = (l, n) => {
|
|
538
|
+
r("plugin-create", l, n), A.value = !1;
|
|
539
|
+
}, ue = G(m, "visible"), ce = () => {
|
|
540
|
+
r("update:visible", !1);
|
|
541
|
+
}, pe = y(() => {
|
|
542
|
+
const { type: l, position: n, drawer: f } = t.popupConfig || {}, o = {
|
|
493
543
|
"z-index": "1000",
|
|
494
544
|
position: "fixed"
|
|
495
545
|
};
|
|
496
546
|
return l === "fixed" ? {
|
|
497
547
|
...o,
|
|
498
|
-
...
|
|
548
|
+
...me(n)
|
|
499
549
|
} : l === "drawer" ? {
|
|
500
550
|
...o,
|
|
501
|
-
...
|
|
551
|
+
..._e(f)
|
|
502
552
|
} : o;
|
|
503
|
-
}),
|
|
553
|
+
}), me = (l = {}) => {
|
|
504
554
|
const n = {};
|
|
505
|
-
return Object.entries(l).forEach(([
|
|
506
|
-
o !== void 0 && (n[
|
|
555
|
+
return Object.entries(l).forEach(([f, o]) => {
|
|
556
|
+
o !== void 0 && (n[f] = typeof o == "number" ? `${o}px` : o);
|
|
507
557
|
}), Object.keys(n).length === 0 ? {
|
|
508
558
|
top: "50%",
|
|
509
559
|
left: "50%",
|
|
510
560
|
transform: "translate(-50%, -50%)"
|
|
511
561
|
} : n;
|
|
512
|
-
},
|
|
513
|
-
const { direction: n } = l,
|
|
562
|
+
}, _e = (l = { direction: "right" }) => {
|
|
563
|
+
const { direction: n } = l, f = {
|
|
514
564
|
top: "0",
|
|
515
565
|
bottom: "0",
|
|
516
566
|
height: "100%"
|
|
517
567
|
};
|
|
518
568
|
return n === "left" ? {
|
|
519
|
-
...
|
|
569
|
+
...f,
|
|
520
570
|
left: "0",
|
|
521
571
|
"border-right": "1px solid rgb(219, 219, 219)"
|
|
522
572
|
} : {
|
|
523
|
-
...
|
|
573
|
+
...f,
|
|
524
574
|
right: "0",
|
|
525
575
|
"border-left": "1px solid rgb(219, 219, 219)"
|
|
526
576
|
};
|
|
527
|
-
},
|
|
577
|
+
}, Z = y(() => {
|
|
528
578
|
const { type: l, drawer: n } = t.popupConfig || {};
|
|
529
579
|
return l !== "drawer" ? "" : `drawer-${(n == null ? void 0 : n.direction) || "right"}`;
|
|
530
|
-
}),
|
|
580
|
+
}), ge = y(() => {
|
|
531
581
|
const { type: l } = t.popupConfig || {};
|
|
532
|
-
return l === "drawer" ?
|
|
582
|
+
return l === "drawer" ? Z.value : "fade";
|
|
533
583
|
});
|
|
534
|
-
return (l, n) => (
|
|
535
|
-
default:
|
|
536
|
-
var
|
|
584
|
+
return (l, n) => (s(), x(Y, { name: ge.value }, {
|
|
585
|
+
default: S(() => {
|
|
586
|
+
var f;
|
|
537
587
|
return [
|
|
538
|
-
|
|
588
|
+
ue.value ? (s(), d("div", {
|
|
539
589
|
key: 0,
|
|
540
|
-
class: K(["mcp-server-picker", [`popup-type-${((
|
|
541
|
-
style:
|
|
590
|
+
class: K(["mcp-server-picker", [`popup-type-${((f = t.popupConfig) == null ? void 0 : f.type) || "fixed"}`, Z.value]]),
|
|
591
|
+
style: he(pe.value)
|
|
542
592
|
}, [
|
|
543
|
-
e("div",
|
|
544
|
-
e("div",
|
|
545
|
-
e("div",
|
|
546
|
-
t.showCustomAddButton ? (
|
|
593
|
+
e("div", $t, [
|
|
594
|
+
e("div", xt, U(t.title), 1),
|
|
595
|
+
e("div", wt, [
|
|
596
|
+
t.showCustomAddButton ? (s(), d("div", {
|
|
547
597
|
key: 0,
|
|
548
598
|
class: "mcp-server-picker__header-right-item",
|
|
549
|
-
onClick:
|
|
599
|
+
onClick: q
|
|
550
600
|
}, [
|
|
551
|
-
|
|
601
|
+
g(u(Se), { style: { "font-size": "16px", cursor: "pointer" } }),
|
|
552
602
|
e("span", null, U(t.customAddButtonText), 1)
|
|
553
|
-
])) :
|
|
554
|
-
|
|
603
|
+
])) : b("", !0),
|
|
604
|
+
g(u(de), {
|
|
555
605
|
class: "mcp-server-picker__header-right-close",
|
|
556
|
-
onClick:
|
|
606
|
+
onClick: ce
|
|
557
607
|
})
|
|
558
608
|
])
|
|
559
609
|
]),
|
|
560
|
-
e("div",
|
|
561
|
-
|
|
610
|
+
e("div", St, [
|
|
611
|
+
g(u(ke), {
|
|
562
612
|
modelValue: c.value,
|
|
563
613
|
"onUpdate:modelValue": n[3] || (n[3] = (o) => c.value = o)
|
|
564
614
|
}, {
|
|
565
|
-
default:
|
|
566
|
-
t.showInstalledTab ? (
|
|
615
|
+
default: S(() => [
|
|
616
|
+
t.showInstalledTab ? (s(), x(u(te), {
|
|
567
617
|
key: 0,
|
|
568
618
|
title: t.installedTabTitle,
|
|
569
619
|
name: "installed"
|
|
570
620
|
}, {
|
|
571
|
-
default:
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
621
|
+
default: S(() => [
|
|
622
|
+
t.enableSearch ? (s(), d("div", Dt, [
|
|
623
|
+
g(u(le), {
|
|
624
|
+
modelValue: k.value,
|
|
625
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => k.value = o),
|
|
626
|
+
placeholder: t.searchPlaceholder
|
|
627
|
+
}, {
|
|
628
|
+
suffix: S(() => [
|
|
629
|
+
g(u(ae), { style: { "font-size": "16px", cursor: "pointer" } })
|
|
630
|
+
]),
|
|
631
|
+
_: 1
|
|
632
|
+
}, 8, ["modelValue", "placeholder"])
|
|
633
|
+
])) : b("", !0),
|
|
634
|
+
N.value ? (s(), d("div", Vt, [
|
|
635
|
+
t.loading ? (s(), d("div", Ut, "加载中...")) : (s(!0), d(I, { key: 1 }, H(_.value, (o) => {
|
|
636
|
+
var $;
|
|
637
|
+
return s(), x(u(se), {
|
|
638
|
+
key: o.id,
|
|
639
|
+
plugin: o,
|
|
640
|
+
mode: "installed",
|
|
641
|
+
expandable: !!(($ = o.tools) != null && $.length),
|
|
642
|
+
onTogglePlugin: (B) => z(o, B),
|
|
643
|
+
onToggleTool: (B, L) => i(o, B, L),
|
|
644
|
+
onDeletePlugin: () => C(o)
|
|
645
|
+
}, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
|
|
646
|
+
}), 128))
|
|
647
|
+
])) : (s(), x(u(ie), {
|
|
648
|
+
key: 2,
|
|
649
|
+
"search-query": k.value
|
|
650
|
+
}, null, 8, ["search-query"]))
|
|
600
651
|
]),
|
|
601
652
|
_: 1
|
|
602
|
-
}, 8, ["title"])) :
|
|
603
|
-
t.showMarketTab ? (
|
|
653
|
+
}, 8, ["title"])) : b("", !0),
|
|
654
|
+
t.showMarketTab ? (s(), x(u(te), {
|
|
604
655
|
key: 1,
|
|
605
656
|
title: t.marketTabTitle,
|
|
606
657
|
name: "market"
|
|
607
658
|
}, {
|
|
608
|
-
default:
|
|
609
|
-
t.enableSearch || t.enableMarketCategoryFilter ? (
|
|
610
|
-
t.enableMarketCategoryFilter ? (
|
|
611
|
-
|
|
612
|
-
modelValue:
|
|
613
|
-
"onUpdate:modelValue": n[1] || (n[1] = (o) =>
|
|
659
|
+
default: S(() => [
|
|
660
|
+
t.enableSearch || t.enableMarketCategoryFilter ? (s(), d("div", Bt, [
|
|
661
|
+
t.enableMarketCategoryFilter ? (s(), d("div", At, [
|
|
662
|
+
g(u(Te), {
|
|
663
|
+
modelValue: T.value,
|
|
664
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => T.value = o),
|
|
614
665
|
placeholder: t.marketCategoryPlaceholder
|
|
615
666
|
}, {
|
|
616
|
-
default:
|
|
617
|
-
(
|
|
667
|
+
default: S(() => [
|
|
668
|
+
(s(!0), d(I, null, H(t.marketCategoryOptions, (o) => (s(), x(u(Ce), {
|
|
618
669
|
key: o.value,
|
|
619
670
|
label: o.label,
|
|
620
671
|
value: o.value
|
|
621
672
|
}, {
|
|
622
|
-
default:
|
|
623
|
-
|
|
673
|
+
default: S(() => [
|
|
674
|
+
ye(U(o.label), 1)
|
|
624
675
|
]),
|
|
625
676
|
_: 2
|
|
626
677
|
}, 1032, ["label", "value"]))), 128))
|
|
627
678
|
]),
|
|
628
679
|
_: 1
|
|
629
680
|
}, 8, ["modelValue", "placeholder"])
|
|
630
|
-
])) :
|
|
631
|
-
t.enableSearch ? (
|
|
632
|
-
|
|
633
|
-
modelValue:
|
|
634
|
-
"onUpdate:modelValue": n[2] || (n[2] = (o) =>
|
|
635
|
-
placeholder:
|
|
681
|
+
])) : b("", !0),
|
|
682
|
+
t.enableSearch ? (s(), d("div", Ft, [
|
|
683
|
+
g(u(le), {
|
|
684
|
+
modelValue: v.value,
|
|
685
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => v.value = o),
|
|
686
|
+
placeholder: V.value
|
|
636
687
|
}, {
|
|
637
|
-
suffix:
|
|
638
|
-
|
|
688
|
+
suffix: S(() => [
|
|
689
|
+
g(u(ae), { style: { "font-size": "16px", cursor: "pointer" } })
|
|
639
690
|
]),
|
|
640
691
|
_: 1
|
|
641
692
|
}, 8, ["modelValue", "placeholder"])
|
|
642
|
-
])) :
|
|
643
|
-
])) :
|
|
644
|
-
|
|
645
|
-
t.marketLoading ? (
|
|
693
|
+
])) : b("", !0)
|
|
694
|
+
])) : b("", !0),
|
|
695
|
+
N.value ? (s(), d("div", It, [
|
|
696
|
+
t.marketLoading ? (s(), d("div", Mt, "加载中...")) : (s(!0), d(I, { key: 1 }, H(P.value, (o) => (s(), x(u(se), {
|
|
646
697
|
key: o.id,
|
|
647
698
|
plugin: o,
|
|
648
699
|
mode: "market",
|
|
649
700
|
expandable: !1,
|
|
650
701
|
"show-tool-count": !1,
|
|
651
|
-
onAddPlugin: (
|
|
702
|
+
onAddPlugin: ($) => w(o, $)
|
|
652
703
|
}, null, 8, ["plugin", "onAddPlugin"]))), 128))
|
|
653
|
-
])
|
|
704
|
+
])) : (s(), x(u(ie), {
|
|
705
|
+
key: 2,
|
|
706
|
+
"search-query": v.value || T.value
|
|
707
|
+
}, null, 8, ["search-query"]))
|
|
654
708
|
]),
|
|
655
709
|
_: 1
|
|
656
|
-
}, 8, ["title"])) :
|
|
710
|
+
}, 8, ["title"])) : b("", !0)
|
|
657
711
|
]),
|
|
658
712
|
_: 1
|
|
659
713
|
}, 8, ["modelValue"])
|
|
660
714
|
]),
|
|
661
|
-
|
|
662
|
-
visible:
|
|
663
|
-
"onUpdate:visible": n[4] || (n[4] = (o) =>
|
|
664
|
-
onConfirm:
|
|
715
|
+
g(u(bt), {
|
|
716
|
+
visible: A.value,
|
|
717
|
+
"onUpdate:visible": n[4] || (n[4] = (o) => A.value = o),
|
|
718
|
+
onConfirm: W
|
|
665
719
|
}, null, 8, ["visible"])
|
|
666
|
-
], 6)) :
|
|
720
|
+
], 6)) : b("", !0)
|
|
667
721
|
];
|
|
668
722
|
}),
|
|
669
723
|
_: 1
|
|
670
724
|
}, 8, ["name"]));
|
|
671
725
|
}
|
|
672
|
-
}),
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
|
|
726
|
+
}), J = /* @__PURE__ */ E(Et, [["__scopeId", "data-v-f4b43bf3"]]);
|
|
727
|
+
J.name = "McpServerPicker";
|
|
728
|
+
const Lt = function(m) {
|
|
729
|
+
m.component(J.name, J);
|
|
676
730
|
};
|
|
677
|
-
|
|
731
|
+
J.install = Lt;
|
|
678
732
|
export {
|
|
679
|
-
|
|
733
|
+
J as default
|
|
680
734
|
};
|