@opentiny/tiny-robot 0.3.0-alpha.19 → 0.3.0-alpha.20

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