@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.
@@ -1,19 +1,19 @@
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 k, 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 ke, TinySwitch as ee, TinyRadioGroup as re, TinyTabs as be, 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";
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 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 = {
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
- }, Le = ["title"], Oe = { class: "plugin-card__actions" }, Re = { class: "plugin-card__operations" }, Ne = { title: "移除插件" }, ze = {
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" }, 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
+ }, 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
- }, Xe = /* @__PURE__ */ M({
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(m, { emit: p }) {
25
- const t = m, r = p, c = D(t.plugin.expanded || !1), b = y(() => {
26
- var i;
27
- return ((i = t.plugin.tools) == null ? void 0 : i.length) || 0;
28
- }), v = y(() => b.value > 0), T = 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
- })), V = () => {
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 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);
45
- }, _ = () => {
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])
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", Be, [
53
+ e("div", Ue, [
55
54
  e("img", {
56
- src: i.plugin.icon,
55
+ src: s.plugin.icon,
57
56
  class: "plugin-card__icon"
58
- }, null, 8, Ae),
57
+ }, null, 8, Be),
59
58
  e("div", Fe, [
60
59
  e("div", Ie, [
61
- e("span", Me, U(i.plugin.name), 1),
62
- i.showToolCount && b.value ? (s(), d("span", Ee, U(b.value) + " 个工具 ", 1)) : k("", !0)
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: i.plugin.description
67
- }, U(i.plugin.description), 9, Le)
65
+ title: s.plugin.description
66
+ }, U(s.plugin.description), 9, Ee)
68
67
  ]),
69
- e("div", Oe, [
70
- j(i.$slots, "actions", {
71
- plugin: i.plugin,
68
+ e("div", Le, [
69
+ j(s.$slots, "actions", {
70
+ plugin: s.plugin,
72
71
  expanded: c.value,
73
- mode: i.mode
72
+ mode: s.mode
74
73
  }, () => [
75
- i.mode === "installed" ? (s(), d(I, { key: 0 }, [
76
- v.value ? (s(), d("div", {
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: V
78
+ onClick: D
80
79
  }, [
81
- j(i.$slots, "expand-icon", { expanded: c.value }, () => [
82
- c.value ? (s(), x(u($e), {
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
- })) : (s(), x(u(Pe), {
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", Re, [
92
- g(u(ke), {
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: S(() => [
100
- j(i.$slots, "delete-icon", {}, () => [
101
- e("span", Ne, [
102
- g(u(xe), { class: "common-icon" })
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)) : i.mode === "market" ? (s(), d("div", ze, [
116
- j(i.$slots, "add-button", {}, () => [
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", { "plugin-card__add-button--added": P.value }]),
119
- onClick: N
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
- e("span", null, U(P.value ? "已添加" : "添加"), 1)
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 ? (s(), x(Y, {
130
+ v.value ? (o(), x(Y, {
129
131
  key: 0,
130
132
  name: "plugin-card-slide"
131
133
  }, {
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) => {
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 s(), d("div", {
138
- key: w.id,
139
+ return o(), r("div", {
140
+ key: $.id,
139
141
  class: "plugin-card__tool-item"
140
142
  }, [
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)
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: w.description
150
- }, U(w.description), 9, Ge)
151
+ title: $.description
152
+ }, U($.description), 9, Ke)
151
153
  ]),
152
- e("div", We, [
154
+ e("div", Xe, [
153
155
  g(u(ee), {
154
- title: z(w.enabled),
155
- "model-value": w.enabled,
156
- "onUpdate:modelValue": (W) => R(w.id, W)
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
- A < (((q = i.plugin.tools) == null ? void 0 : q.length) || 0) - 1 ? (s(), d("div", Ke)) : k("", !0)
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
- [ve, c.value]
166
+ [ge, c.value]
165
167
  ])
166
168
  ]),
167
169
  _: 1
168
170
  })) : k("", !0)
169
171
  ], 2));
170
172
  }
171
- }), se = /* @__PURE__ */ E(Xe, [["__scopeId", "data-v-dc13ac19"]]), Ye = { class: "code-editor__container" }, Ze = { class: "code-editor__section" }, et = { class: "code-editor__area" }, tt = /* @__PURE__ */ M({
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(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" }, [
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", et, [
186
- F(e("textarea", {
187
- "onUpdate:modelValue": r[0] || (r[0] = (c) => p.value = c),
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
- }), 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({
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(m) {
205
- const p = D(""), t = G(m, "formData"), r = [
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: b } = Ve({
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(b, (V) => {
217
- if (V && V.length > 0) {
218
- const a = V[0];
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 T = () => {
229
+ const C = () => {
228
230
  c();
229
231
  };
230
- return fe(() => {
232
+ return ve(() => {
231
233
  v();
232
- }), (V, a) => (s(), d("form", ot, [
233
- e("div", at, [
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
- F(e("input", {
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", st, [
246
+ e("div", it, [
245
247
  a[6] || (a[6] = e("label", { class: "form-editor__label" }, "描述", -1)),
246
- F(e("textarea", {
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", nt, [
256
+ e("div", rt, [
255
257
  a[7] || (a[7] = e("label", { class: "form-editor__label" }, "类型", -1)),
256
- g(u(re), {
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: r,
261
+ options: d,
260
262
  class: "form-editor__radio-group"
261
263
  }, null, 8, ["modelValue"])
262
264
  ]),
263
- e("div", it, [
265
+ e("div", dt, [
264
266
  a[8] || (a[8] = e("label", { class: "form-editor__label" }, "URL", -1)),
265
- F(e("input", {
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", rt, [
276
+ e("div", ut, [
275
277
  a[9] || (a[9] = e("label", { class: "form-editor__label" }, "请求头", -1)),
276
- F(e("textarea", {
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", dt, [
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: T
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, ut),
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
- }), pt = /* @__PURE__ */ E(ct, [["__scopeId", "data-v-7cd7ea10"]]), mt = {
304
+ }), mt = /* @__PURE__ */ E(_t, [["__scopeId", "data-v-7cd7ea10"]]), gt = {
303
305
  key: 0,
304
306
  class: "plugin-editor__backdrop"
305
- }, _t = { class: "plugin-editor__header" }, gt = { class: "plugin-editor__content" }, vt = { class: "plugin-editor__add-type" }, ft = {
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
- }, ht = {
310
+ }, kt = {
309
311
  key: 1,
310
312
  class: "plugin-editor__code-editor"
311
- }, yt = /* @__PURE__ */ M({
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(m, { emit: p }) {
319
- const t = p, r = G(m, "visible"), c = D(null), b = D({
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 = D(""), T = D("form"), V = [
328
+ }), v = S(""), C = S("form"), D = [
327
329
  { label: "form", text: "表单添加" },
328
330
  { label: "code", text: "代码添加" }
329
331
  ], a = () => {
330
- r.value = !1;
332
+ d.value = !1;
331
333
  };
332
- Ue(c, () => {
333
- r.value && a();
334
+ Ve(c, () => {
335
+ d.value && a();
334
336
  });
335
337
  const h = () => {
336
- T.value === "form" ? t("confirm", "form", b.value) : t("confirm", "code", v.value), a();
338
+ C.value === "form" ? t("confirm", "form", T.value) : t("confirm", "code", v.value), a();
337
339
  };
338
- return (R, _) => (s(), d(I, null, [
339
- r.value ? (s(), d("div", mt)) : k("", !0),
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: S(() => [
342
- r.value ? (s(), d("div", {
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", _t, [
349
- _[3] || (_[3] = e("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
350
- g(u(de), {
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", gt, [
356
- e("div", vt, [
357
- _[4] || (_[4] = e("span", { class: "plugin-editor__add-type-label" }, "添加方式", -1)),
358
- g(u(re), {
359
- modelValue: T.value,
360
- "onUpdate:modelValue": _[0] || (_[0] = (P) => T.value = P),
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: V
364
+ options: D
363
365
  }, null, 8, ["modelValue"])
364
366
  ]),
365
- T.value === "form" ? (s(), d("div", ft, [
366
- g(pt, {
367
- "form-data": b.value,
368
- "onUpdate:formData": _[1] || (_[1] = (P) => b.value = P)
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
- T.value === "code" ? (s(), d("div", ht, [
372
- g(lt, {
373
+ C.value === "code" ? (o(), r("div", kt, [
374
+ g(at, {
373
375
  "code-data": v.value,
374
- "onUpdate:codeData": _[2] || (_[2] = (P) => v.value = P)
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
- }, _[5] || (_[5] = [
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
- }, _[6] || (_[6] = [
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
- }), kt = /* @__PURE__ */ E(yt, [["__scopeId", "data-v-192c66c9"]]), bt = {
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
- }, Tt = {
404
+ }, Pt = {
403
405
  key: 1,
404
- src: De,
406
+ src: Se,
405
407
  class: "empty-state__illustration"
406
- }, Ct = { class: "empty-state__message" }, Pt = /* @__PURE__ */ M({
408
+ }, $t = { class: "empty-state__message" }, xt = /* @__PURE__ */ A({
407
409
  __name: "NoData",
408
410
  props: {
409
411
  searchQuery: { default: "" }
410
412
  },
411
- setup(m) {
412
- const p = m, t = y(() => {
413
+ setup(_) {
414
+ const p = _, t = y(() => {
413
415
  var c;
414
416
  return !!((c = p.searchQuery) != null && c.trim());
415
- }), r = y(() => t.value ? "暂无搜索结果" : "暂无数据");
416
- return (c, b) => (s(), d("section", bt, [
417
- t.value ? (s(), x(u(we), {
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
- })) : (s(), d("img", Tt)),
421
- e("p", Ct, U(r.value), 1)
422
+ })) : (o(), r("img", Pt)),
423
+ e("p", $t, U(d.value), 1)
422
424
  ]));
423
425
  }
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 = { class: "mcp-server-picker__content-item" }, Vt = {
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
- }, At = {
435
+ }, It = {
434
436
  key: 0,
435
437
  class: "mcp-server-picker__content-market-header"
436
- }, Ft = {
438
+ }, Mt = {
437
439
  key: 0,
438
440
  style: { width: "168px" }
439
- }, It = {
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
- }, Lt = /* @__PURE__ */ M({
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: (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 },
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(m, { emit: p }) {
487
- const t = m, r = p, c = D(t.defaultActiveTab), b = D(""), v = D(""), T = D(""), V = y(
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
- r("update:activeCount", l);
495
+ d("update:activeCount", l);
494
496
  },
495
497
  { immediate: !0 }
496
- ), Q(c, (l, n) => {
497
- l !== n && r("tab-change", l);
498
+ ), Q(c, (l, i) => {
499
+ l !== i && d("tab-change", l);
498
500
  });
499
- const _ = y(() => a.value.filter((l) => t.installedSearchFn(b.value, l))), P = y(() => {
500
- const { category: l, search: n } = {
501
- category: T.value,
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 = (o) => {
504
- const $ = !l || o.category === l, B = !n || t.marketSearchFn(n, o);
505
- return $ && B;
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" ? _.value.length > 0 : P.value.length > 0);
509
- Q(T, (l) => {
510
- r("market-category-change", l);
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, n) => {
514
+ const z = (l, i) => {
513
515
  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);
516
- }) : l.tools.forEach((o) => {
517
- o.enabled && r("tool-toggle", l, o.id, !1);
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
- }, i = (l, n, f) => {
520
- var o;
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);
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
- }, 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 = {
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
- ...o,
548
- ...me(n)
543
+ ...n,
544
+ ...pe(i)
549
545
  } : l === "drawer" ? {
550
- ...o,
546
+ ...n,
551
547
  ..._e(f)
552
- } : o;
553
- }), me = (l = {}) => {
554
- const n = {};
555
- return Object.entries(l).forEach(([f, o]) => {
556
- o !== void 0 && (n[f] = typeof o == "number" ? `${o}px` : o);
557
- }), Object.keys(n).length === 0 ? {
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
- } : n;
557
+ } : i;
562
558
  }, _e = (l = { direction: "right" }) => {
563
- const { direction: n } = l, f = {
559
+ const { direction: i } = l, f = {
564
560
  top: "0",
565
561
  bottom: "0",
566
562
  height: "100%"
567
563
  };
568
- return n === "left" ? {
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: n } = t.popupConfig || {};
579
- return l !== "drawer" ? "" : `drawer-${(n == null ? void 0 : n.direction) || "right"}`;
580
- }), ge = y(() => {
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, n) => (s(), x(Y, { name: ge.value }, {
585
- default: S(() => {
580
+ return (l, i) => (o(), x(Y, { name: me.value }, {
581
+ default: w(() => {
586
582
  var f;
587
583
  return [
588
- ue.value ? (s(), d("div", {
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: he(pe.value)
587
+ style: fe(ce.value)
592
588
  }, [
593
- e("div", $t, [
594
- e("div", xt, U(t.title), 1),
595
- e("div", wt, [
596
- t.showCustomAddButton ? (s(), d("div", {
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(Se), { style: { "font-size": "16px", cursor: "pointer" } }),
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(de), {
600
+ g(u(re), {
605
601
  class: "mcp-server-picker__header-right-close",
606
- onClick: ce
602
+ onClick: ue
607
603
  })
608
604
  ])
609
605
  ]),
610
- e("div", St, [
611
- g(u(be), {
606
+ e("div", Vt, [
607
+ g(u(ke), {
612
608
  modelValue: c.value,
613
- "onUpdate:modelValue": n[3] || (n[3] = (o) => c.value = o)
609
+ "onUpdate:modelValue": i[3] || (i[3] = (n) => c.value = n)
614
610
  }, {
615
- default: S(() => [
616
- t.showInstalledTab ? (s(), x(u(te), {
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: S(() => [
622
- e("div", Dt, [
623
- t.enableSearch ? (s(), d("div", Vt, [
624
- g(u(le), {
625
- modelValue: b.value,
626
- "onUpdate:modelValue": n[0] || (n[0] = (o) => b.value = o),
627
- placeholder: t.searchPlaceholder
628
- }, {
629
- suffix: S(() => [
630
- g(u(ae), { style: { "font-size": "16px", cursor: "pointer" } })
631
- ]),
632
- _: 1
633
- }, 8, ["modelValue", "placeholder"])
634
- ])) : k("", !0),
635
- N.value ? (s(), d("div", Ut, [
636
- t.loading ? (s(), d("div", Bt, "加载中...")) : (s(!0), d(I, { key: 1 }, H(_.value, (o) => {
637
- var $;
638
- return s(), x(u(se), {
639
- key: o.id,
640
- plugin: o,
641
- mode: "installed",
642
- expandable: !!(($ = o.tools) != null && $.length),
643
- onTogglePlugin: (B) => z(o, B),
644
- onToggleTool: (B, L) => i(o, B, L),
645
- onDeletePlugin: () => C(o)
646
- }, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
647
- }), 128))
648
- ])) : (s(), x(u(ie), {
649
- key: 2,
650
- "search-query": b.value
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 ? (s(), x(u(te), {
650
+ t.showMarketTab ? (o(), x(u(te), {
657
651
  key: 1,
658
652
  title: t.marketTabTitle,
659
653
  name: "market"
660
654
  }, {
661
- default: S(() => [
662
- t.enableSearch || t.enableMarketCategoryFilter ? (s(), d("div", At, [
663
- t.enableMarketCategoryFilter ? (s(), d("div", Ft, [
664
- g(u(Te), {
665
- modelValue: T.value,
666
- "onUpdate:modelValue": n[1] || (n[1] = (o) => T.value = o),
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: S(() => [
670
- (s(!0), d(I, null, H(t.marketCategoryOptions, (o) => (s(), x(u(Ce), {
671
- key: o.value,
672
- label: o.label,
673
- value: o.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: S(() => [
676
- ye(U(o.label), 1)
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 ? (s(), d("div", It, [
678
+ t.enableSearch ? (o(), r("div", At, [
685
679
  g(u(le), {
686
680
  modelValue: v.value,
687
- "onUpdate:modelValue": n[2] || (n[2] = (o) => v.value = o),
688
- placeholder: V.value
681
+ "onUpdate:modelValue": i[2] || (i[2] = (n) => v.value = n),
682
+ placeholder: D.value
689
683
  }, {
690
- suffix: S(() => [
691
- g(u(ae), { style: { "font-size": "16px", cursor: "pointer" } })
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 ? (s(), d("div", Mt, [
698
- t.marketLoading ? (s(), d("div", Et, "加载中...")) : (s(!0), d(I, { key: 1 }, H(P.value, (o) => (s(), x(u(se), {
699
- key: o.id,
700
- plugin: o,
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: ($) => w(o, $)
705
- }, null, 8, ["plugin", "onAddPlugin"]))), 128))
706
- ])) : (s(), x(u(ie), {
698
+ onAddPlugin: $
699
+ }, null, 8, ["plugin"]))), 128))
700
+ ])) : (o(), x(u(se), {
707
701
  key: 2,
708
- "search-query": v.value || T.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(kt), {
718
- visible: A.value,
719
- "onUpdate:visible": n[4] || (n[4] = (o) => A.value = o),
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(Lt, [["__scopeId", "data-v-3db8e1e1"]]);
722
+ }), J = /* @__PURE__ */ E(Ot, [["__scopeId", "data-v-51b705ed"]]);
729
723
  J.name = "McpServerPicker";
730
- const Ot = function(m) {
731
- m.component(J.name, J);
724
+ const Rt = function(_) {
725
+ _.component(J.name, J);
732
726
  };
733
- J.install = Ot;
727
+ J.install = Rt;
734
728
  export {
735
729
  J as default
736
730
  };