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