@opentiny/tiny-robot 0.3.0-alpha.3 → 0.3.0-alpha.30

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.
@@ -0,0 +1,556 @@
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 = {
9
+ key: 0,
10
+ class: "plugin-card__count"
11
+ }, De = ["title"], Ie = { class: "plugin-card__actions" }, Ee = { class: "plugin-card__operations" }, Le = { title: "移除插件" }, Ue = {
12
+ key: 1,
13
+ class: "plugin-card__add"
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 = {
15
+ key: 0,
16
+ class: "plugin-card__divider"
17
+ }, We = /* @__PURE__ */ q({
18
+ __name: "PluginCard",
19
+ props: {
20
+ plugin: {},
21
+ mode: { default: "installed" },
22
+ showToolCount: { type: Boolean, default: !0 }
23
+ },
24
+ emits: ["toggle-plugin", "toggle-tool", "add-plugin", "delete-plugin"],
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,
31
+ "plugin-card--expanded": c.value,
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])
53
+ }, [
54
+ s("div", xe, [
55
+ s("img", {
56
+ src: a.plugin.icon,
57
+ class: "plugin-card__icon"
58
+ }, null, 8, Be),
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)
63
+ ]),
64
+ s("div", {
65
+ class: "plugin-card__desc",
66
+ title: a.plugin.description
67
+ }, S(a.plugin.description), 9, De)
68
+ ]),
69
+ s("div", Ie, [
70
+ U(a.$slots, "actions", {
71
+ plugin: a.plugin,
72
+ expanded: c.value,
73
+ mode: a.mode
74
+ }, () => [
75
+ a.mode === "installed" ? (o(), i(F, { key: 0 }, [
76
+ h.value ? (o(), i("div", {
77
+ key: 0,
78
+ class: "plugin-card__expand",
79
+ onClick: w
80
+ }, [
81
+ U(a.$slots, "expand-icon", { expanded: c.value }, () => [
82
+ c.value ? (o(), k(d(be), {
83
+ key: 1,
84
+ class: "common-icon"
85
+ })) : (o(), k(d(ke), {
86
+ key: 0,
87
+ class: "common-icon"
88
+ }))
89
+ ], !0)
90
+ ])) : v("", !0),
91
+ s("div", Ee, [
92
+ m(d(ve), {
93
+ title: "确定移除该插件吗?",
94
+ style: { height: "16px" },
95
+ type: "info",
96
+ onConfirm: D,
97
+ trigger: "click"
98
+ }, {
99
+ reference: T(() => [
100
+ U(a.$slots, "delete-icon", {}, () => [
101
+ s("span", Le, [
102
+ m(d(Te), { class: "common-icon delete" })
103
+ ])
104
+ ], !0)
105
+ ]),
106
+ _: 3
107
+ }),
108
+ m(d(X), {
109
+ title: E($.value.checked),
110
+ "model-value": $.value.checked,
111
+ indeterminate: $.value.indeterminate,
112
+ "onUpdate:modelValue": Q
113
+ }, null, 8, ["title", "model-value", "indeterminate"])
114
+ ])
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"
121
+ }]),
122
+ onClick: _[0] || (_[0] = (y) => I(a.plugin))
123
+ }, [
124
+ x.value === "idle" ? (o(), i("span", Ne, "添加")) : x.value === "loading" ? (o(), i("span", Oe, "添加中")) : (o(), i("span", qe, "已添加"))
125
+ ], 2)
126
+ ], !0)
127
+ ])) : v("", !0)
128
+ ], !0)
129
+ ])
130
+ ]),
131
+ h.value ? (o(), k(K, {
132
+ key: 0,
133
+ name: "plugin-card-slide"
134
+ }, {
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,
142
+ class: "plugin-card__tool-item"
143
+ }, [
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)
149
+ ]),
150
+ s("div", {
151
+ class: "plugin-card__desc",
152
+ title: y.description
153
+ }, S(y.description), 9, Ge)
154
+ ]),
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)
160
+ }, null, 8, ["title", "model-value", "onUpdate:modelValue"])
161
+ ])
162
+ ]),
163
+ A < (((L = a.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (o(), i("div", Ke)) : v("", !0)
164
+ ]);
165
+ }), 128))
166
+ ], 512), [
167
+ [ge, c.value]
168
+ ])
169
+ ]),
170
+ _: 1
171
+ })) : v("", !0)
172
+ ], 2));
173
+ }
174
+ }), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-c4e722eb"]]), Xe = {
175
+ key: 0,
176
+ class: "plugin-editor__backdrop"
177
+ }, Ye = { class: "plugin-editor__header" }, Ze = /* @__PURE__ */ q({
178
+ __name: "PluginModal",
179
+ props: {
180
+ visible: { type: Boolean, required: !0 },
181
+ visibleModifiers: {}
182
+ },
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;
187
+ };
188
+ Se(c, () => {
189
+ r.value && f();
190
+ });
191
+ const h = (C, w) => {
192
+ C === "form" ? e("confirm", "form", w) : e("confirm", "code", w), f();
193
+ };
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", {
199
+ key: 0,
200
+ class: "plugin-editor",
201
+ ref_key: "dialogRef",
202
+ ref: c
203
+ }, [
204
+ s("div", Ye, [
205
+ w[0] || (w[0] = s("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
206
+ m(d(ae), {
207
+ class: "plugin-editor__close",
208
+ onClick: f
209
+ })
210
+ ]),
211
+ m(d($e), {
212
+ onConfirm: h,
213
+ onCancel: f
214
+ })
215
+ ], 512)) : v("", !0)
216
+ ]),
217
+ _: 1
218
+ })
219
+ ], 64));
220
+ }
221
+ }), et = /* @__PURE__ */ z(Ze, [["__scopeId", "data-v-f2f12f4a"]]), tt = {
222
+ class: "empty-state",
223
+ role: "status",
224
+ "aria-live": "polite"
225
+ }, lt = {
226
+ key: 1,
227
+ src: we,
228
+ class: "empty-state__illustration"
229
+ }, ot = { class: "empty-state__message" }, at = /* @__PURE__ */ q({
230
+ __name: "NoData",
231
+ props: {
232
+ searchQuery: { default: "" }
233
+ },
234
+ setup(g) {
235
+ const b = g, e = p(() => {
236
+ var c;
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), {
241
+ key: 0,
242
+ class: "empty-state__illustration"
243
+ })) : (o(), i("img", lt)),
244
+ s("p", ot, S(r.value), 1)
245
+ ]));
246
+ }
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 = {
248
+ key: 0,
249
+ class: "mcp-server-picker__content-installed-search"
250
+ }, ct = {
251
+ key: 1,
252
+ class: "mcp-server-picker__content-list"
253
+ }, ut = {
254
+ key: 0,
255
+ class: "mcp-server-picker__loading"
256
+ }, pt = {
257
+ key: 0,
258
+ class: "mcp-server-picker__content-market-header"
259
+ }, gt = {
260
+ key: 0,
261
+ style: { width: "168px" }
262
+ }, _t = {
263
+ key: 1,
264
+ style: { width: "264px", "flex-shrink": "0" }
265
+ }, mt = {
266
+ key: 1,
267
+ class: "mcp-server-picker__content-list"
268
+ }, vt = {
269
+ key: 0,
270
+ class: "mcp-server-picker__loading"
271
+ }, ft = /* @__PURE__ */ q({
272
+ __name: "index",
273
+ props: /* @__PURE__ */ J({
274
+ installedPlugins: { default: () => [] },
275
+ marketPlugins: { default: () => [] },
276
+ searchPlaceholder: { default: "搜索插件" },
277
+ enableSearch: { type: Boolean, default: !0 },
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 },
280
+ marketCategoryOptions: { default: () => [] },
281
+ marketCategoryPlaceholder: { default: "按照分类筛选" },
282
+ enableMarketCategoryFilter: { type: Boolean, default: !0 },
283
+ defaultActiveTab: { default: "installed" },
284
+ showInstalledTab: { type: Boolean, default: !0 },
285
+ showMarketTab: { type: Boolean, default: !0 },
286
+ visible: { type: Boolean },
287
+ popupConfig: { default: () => ({
288
+ type: "fixed",
289
+ position: {},
290
+ drawer: { direction: "right" }
291
+ }) },
292
+ activeCount: {},
293
+ installedTabTitle: { default: "已添加插件" },
294
+ marketTabTitle: { default: "市场" },
295
+ title: { default: "插件" },
296
+ showCustomAddButton: { type: Boolean, default: !0 },
297
+ customAddButtonText: { default: "自定义添加" },
298
+ allowPluginToggle: { type: Boolean, default: !0 },
299
+ allowToolToggle: { type: Boolean, default: !0 },
300
+ allowPluginDelete: { type: Boolean, default: !0 },
301
+ allowPluginAdd: { type: Boolean, default: !0 },
302
+ loading: { type: Boolean, default: !1 },
303
+ marketLoading: { type: Boolean, default: !1 }
304
+ }, {
305
+ visible: { type: Boolean, required: !0 },
306
+ visibleModifiers: {}
307
+ }),
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(
314
+ R,
315
+ (t) => {
316
+ r("update:activeCount", t);
317
+ },
318
+ { immediate: !0 }
319
+ ), H(c, (t, n) => {
320
+ t !== n && r("tab-change", t);
321
+ });
322
+ const D = p(() => $.value.filter((t) => e.installedSearchFn(f.value, t))), x = p(() => {
323
+ const { category: t, search: n } = {
324
+ category: C.value,
325
+ search: h.value
326
+ }, u = (l) => {
327
+ const P = !t || l.category === t, B = !n || e.marketSearchFn(n, l);
328
+ return P && B;
329
+ };
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);
334
+ });
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);
341
+ })));
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);
347
+ }
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 = {
360
+ "z-index": "1000",
361
+ position: "fixed"
362
+ };
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 ? {
375
+ top: "50%",
376
+ left: "50%",
377
+ transform: "translate(-50%, -50%)"
378
+ } : n;
379
+ }, de = (t = { direction: "right" }) => {
380
+ const { direction: n } = t, u = {
381
+ top: "0",
382
+ bottom: "0",
383
+ height: "100%"
384
+ };
385
+ return n === "left" ? {
386
+ ...u,
387
+ left: "0",
388
+ "border-right": "1px solid rgb(219, 219, 219)"
389
+ } : {
390
+ ...u,
391
+ right: "0",
392
+ "border-left": "1px solid rgb(219, 219, 219)"
393
+ };
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;
407
+ return [
408
+ ne.value ? (o(), i("div", {
409
+ key: 0,
410
+ class: G(["mcp-server-picker", [`popup-type-${((u = e.popupConfig) == null ? void 0 : u.type) || "fixed"}`, W.value]]),
411
+ style: _e(se.value)
412
+ }, [
413
+ s("div", nt, [
414
+ s("div", it, S(e.title), 1),
415
+ s("div", st, [
416
+ e.showCustomAddButton ? (o(), i("div", {
417
+ key: 0,
418
+ class: "mcp-server-picker__header-right-item",
419
+ onClick: L
420
+ }, [
421
+ m(d(Pe), { class: "mcp-server-picker__icon" }),
422
+ s("span", null, S(e.customAddButtonText), 1)
423
+ ])) : v("", !0),
424
+ m(d(ae), {
425
+ class: "mcp-server-picker__header-right-close",
426
+ onClick: ie
427
+ })
428
+ ])
429
+ ]),
430
+ s("div", rt, [
431
+ m(d(fe), {
432
+ modelValue: c.value,
433
+ "onUpdate:modelValue": n[3] || (n[3] = (l) => c.value = l)
434
+ }, {
435
+ default: T(() => [
436
+ e.showInstalledTab ? (o(), k(d(Y), {
437
+ key: 0,
438
+ title: e.installedTabTitle,
439
+ name: "installed"
440
+ }, {
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
447
+ }, {
448
+ suffix: T(() => [
449
+ m(d(ee), { class: "mcp-server-picker__icon" })
450
+ ]),
451
+ _: 1
452
+ }, 8, ["modelValue", "placeholder"])
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,
460
+ mode: "installed",
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)
465
+ }, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
466
+ }), 128))
467
+ ])) : (o(), k(d(le), {
468
+ key: 2,
469
+ "search-query": f.value
470
+ }, null, 8, ["search-query"]))
471
+ ]),
472
+ _: 1
473
+ }, 8, ["title"])) : v("", !0),
474
+ e.showMarketTab ? (o(), k(d(Y), {
475
+ key: 1,
476
+ title: e.marketTabTitle,
477
+ name: "market"
478
+ }, {
479
+ default: T(() => [
480
+ e.enableSearch || e.enableMarketCategoryFilter ? (o(), i("div", pt, [
481
+ e.enableMarketCategoryFilter ? (o(), i("div", gt, [
482
+ m(d(he), {
483
+ modelValue: C.value,
484
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => C.value = l),
485
+ placeholder: e.marketCategoryPlaceholder,
486
+ "drop-style": ue
487
+ }, {
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"
494
+ }, {
495
+ default: T(() => [
496
+ me(S(l.label), 1)
497
+ ]),
498
+ _: 2
499
+ }, 1032, ["label", "value"]))), 128))
500
+ ]),
501
+ _: 1
502
+ }, 8, ["modelValue", "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
509
+ }, {
510
+ suffix: T(() => [
511
+ m(d(ee), { class: "mcp-server-picker__icon" })
512
+ ]),
513
+ _: 1
514
+ }, 8, ["modelValue", "placeholder"])
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,
521
+ mode: "market",
522
+ expandable: !1,
523
+ "show-tool-count": !1,
524
+ onAddPlugin: y
525
+ }, null, 8, ["plugin"]))), 128))
526
+ ])) : (o(), k(d(le), {
527
+ key: 2,
528
+ "search-query": h.value || C.value
529
+ }, null, 8, ["search-query"]))
530
+ ]),
531
+ _: 1
532
+ }, 8, ["title"])) : v("", !0)
533
+ ]),
534
+ _: 1
535
+ }, 8, ["modelValue"])
536
+ ]),
537
+ m(d(et), {
538
+ visible: A.value,
539
+ "onUpdate:visible": n[4] || (n[4] = (l) => A.value = l),
540
+ onConfirm: j
541
+ }, null, 8, ["visible"])
542
+ ], 6)) : v("", !0)
543
+ ];
544
+ }),
545
+ _: 1
546
+ }, 8, ["name"]));
547
+ }
548
+ }), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-7f8cfb42"]]);
549
+ O.name = "McpServerPicker";
550
+ const ht = function(g) {
551
+ g.component(O.name, O);
552
+ };
553
+ O.install = ht;
554
+ export {
555
+ O as default
556
+ };
@@ -0,0 +1,4 @@
1
+ const l = "data:image/svg+xml,%3csvg%20width='120.000000'%20height='120.000000'%20viewBox='0%200%20120%20120'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs%20/%3e%3crect%20width='120.000000'%20height='120.000000'%20fill='%23FFFFFF'%20fill-opacity='0'%20/%3e%3cpath%20d='M18.75%2037.31L104.52%2037.31C107.68%2037.31%20110.25%2039.87%20110.25%2043.04L110.25%20105.15C110.25%20108.28%20107.71%20110.81%20104.59%20110.81L24.4%20110.81C21.28%20110.81%2018.75%20108.28%2018.75%20105.15L18.75%2037.31Z'%20fill='%23F0F0F0'%20fill-opacity='1.000000'%20fill-rule='evenodd'%20/%3e%3cpath%20d='M13.22%2038.06L84.75%2038.06L84.75%20105.15C84.75%20108.28%2082.21%20110.81%2079.09%20110.81L16.9%20110.81C13.78%20110.81%2011.25%20108.12%2011.25%20105L11.25%2059.25L0.75%2059.25C0.75%2058.15%2012.13%2038.06%2013.22%2038.06Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'%20/%3e%3cpath%20d='M84.44%2038.06L105.13%2038.06C106.16%2038.06%20107.41%2037.86%20107.91%2038.76L118.07%2056.96C118.45%2057.64%20119.18%2058.68%20118.5%2059.06C118.28%2059.17%20117.08%2059.06%20116.84%2059.06L99.33%2059.06C97.21%2059.06%2095.27%2057.87%2094.3%2055.98L84.44%2038.06Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'%20/%3e%3cpath%20d='M110.42%2059.08L110.42%20105.09C110.42%20108.35%20107.78%20111%20104.51%20111L78.89%20111L78.89%20109.68L104.51%20109.68C107.05%20109.68%20109.11%20107.63%20109.11%20105.09L109.11%2059.08L110.42%2059.08Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3cpath%20d='M85.38%2037.5L85.38%20105.09C85.38%20108.35%2082.73%20111%2079.46%20111L16.42%20111C13.15%20111%2010.51%20108.35%2010.51%20105.09L10.51%2059.08L11.82%2059.08L11.82%20105.09C11.82%20107.63%2013.88%20109.68%2016.42%20109.68L79.46%20109.68C82%20109.68%2084.06%20107.63%2084.06%20105.09L84.06%2038.81L16%2038.81L16%2037.5L85.38%2037.5Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3cpath%20d='M14.14%2037.5C13.25%2037.5%2012.42%2037.96%2011.95%2038.74L0.19%2057.97C-0.19%2058.59%200%2059.41%200.6%2059.79C0.81%2059.92%201.05%2060%201.29%2060L68.53%2060C70.28%2060%2071.92%2059.08%2072.87%2057.58L85.56%2037.5L14.14%2037.5ZM14.47%2039L82.76%2039L71.48%2056.71C70.78%2057.82%2069.56%2058.5%2068.26%2058.5L1.76%2058.5L13.39%2039.61C13.62%2039.23%2014.03%2039%2014.47%2039Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3cpath%20d='M106.12%2037.5C106.97%2037.5%20107.75%2037.95%20108.21%2038.7L119.8%2057.79C120.17%2058.4%20120%2059.21%20119.43%2059.6C119.22%2059.74%20118.99%2059.81%20118.75%2059.81L99.22%2059.81C97.46%2059.81%2095.83%2058.82%2094.94%2057.22L83.97%2037.5L106.12%2037.5ZM106.09%2039L86.69%2039L96.27%2056.57C96.92%2057.76%2098.11%2058.5%2099.39%2058.5L118.35%2058.5L107.1%2039.59C106.88%2039.22%20106.5%2039%20106.09%2039Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3crect%20x='20.250000'%20y='84.000000'%20rx='1.886225'%20width='20.999998'%20height='6.000000'%20fill='%231476FF'%20fill-opacity='1.000000'%20/%3e%3cpath%20d='M35.34%2094.5C35.7%2094.5%2036%2094.83%2036%2095.25C36%2095.66%2035.7%2096%2035.34%2096L20.9%2096C20.54%2096%2020.25%2095.66%2020.25%2095.25C20.25%2094.83%2020.54%2094.5%2020.9%2094.5L35.34%2094.5Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3crect%20x='20.250000'%20y='99.000000'%20rx='0.750000'%20width='7.500000'%20height='1.500000'%20fill='%23808080'%20fill-opacity='1.000000'%20/%3e%3cpath%20d='M60%209C60.41%209%2060.75%209.29%2060.75%209.66L60.75%2018.91C60.75%2019.27%2060.41%2019.57%2060%2019.57C59.58%2019.57%2059.24%2019.27%2059.24%2018.91L59.24%209.66C59.24%209.29%2059.58%209%2060%209Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3cpath%20d='M84.83%2012.96C85.19%2013.17%2085.33%2013.59%2085.15%2013.91L80.52%2021.92C80.34%2022.24%2079.9%2022.33%2079.54%2022.12C79.18%2021.91%2079.03%2021.48%2079.21%2021.17L83.84%2013.16C84.02%2012.84%2084.46%2012.75%2084.83%2012.96Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3cpath%20d='M35.17%2012.96C35.53%2012.75%2035.97%2012.84%2036.15%2013.16L40.78%2021.17C40.96%2021.48%2040.81%2021.91%2040.45%2022.12C40.09%2022.33%2039.65%2022.24%2039.47%2021.92L34.84%2013.91C34.66%2013.59%2034.81%2013.17%2035.17%2012.96Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='nonzero'%20/%3e%3c/svg%3e";
2
+ export {
3
+ l as _
4
+ };