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