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