@opentiny/tiny-robot 0.3.0-rc.5 → 0.3.0

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,11 +1,11 @@
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";
1
+ import { defineComponent as q, ref as V, computed as g, createElementBlock as n, openBlock as a, normalizeClass as G, createElementVNode as s, createBlock as k, createCommentVNode as v, toDisplayString as x, 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 ae, watch as H, normalizeStyle as _e, createTextVNode as me } from "vue";
2
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";
3
+ import { IconArrowRight as ke, IconArrowDown as be, IconDelete as Te, IconClose as oe, IconEmptySearch as Ce, IconPlus as Pe, IconSearch as ee } from "@opentiny/tiny-robot-svgs";
4
4
  import { _ as z } from "../_plugin-vue_export-helper.js";
5
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 = {
6
+ import { o as xe } from "../index3.js";
7
+ import Se from "../mcp-add-form/index.js";
8
+ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-card__content" }, Ae = { class: "plugin-card__info" }, Fe = { class: "plugin-card__name" }, Me = {
9
9
  key: 0,
10
10
  class: "plugin-card__count"
11
11
  }, De = ["title"], Ie = { class: "plugin-card__actions" }, Ee = { class: "plugin-card__operations" }, Le = { title: "移除插件" }, Ue = {
@@ -22,67 +22,67 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
22
22
  showToolCount: { type: Boolean, default: !0 }
23
23
  },
24
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(() => ({
25
+ setup(i, { emit: b }) {
26
+ const e = i, r = b, u = V(e.plugin.expanded || !1), f = g(() => {
27
+ var c;
28
+ return ((c = e.plugin.tools) == null ? void 0 : c.length) || 0;
29
+ }), h = g(() => f.value > 0), C = g(() => ({
30
30
  "plugin-card--expandable": h.value,
31
- "plugin-card--expanded": c.value,
31
+ "plugin-card--expanded": u.value,
32
32
  [`plugin-card--${e.mode}`]: !0
33
33
  })), w = () => {
34
- h.value && (c.value = !c.value);
35
- }, $ = p(() => {
34
+ h.value && (u.value = !u.value);
35
+ }, S = g(() => {
36
36
  if (!h.value)
37
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) => {
38
+ const c = e.plugin.tools.filter((y) => y.enabled), _ = e.plugin.tools.length;
39
+ return c.length === 0 ? { checked: !1, indeterminate: !1 } : c.length === _ ? { checked: !0, indeterminate: !1 } : { checked: !0, indeterminate: !0 };
40
+ }), Q = (c) => {
41
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, _);
42
+ _.enabled !== c && (_.enabled = c, r("toggle-tool", _.id, c));
43
+ }), r("toggle-plugin", c);
44
+ }, R = (c, _) => {
45
+ r("toggle-tool", c, _);
46
46
  }, D = () => {
47
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", {
48
+ }, $ = g(() => e.plugin.addState || "idle"), I = (c) => {
49
+ $.value === "idle" && r("add-plugin", c);
50
+ }, E = (c) => c ? "关闭插件" : "打开插件";
51
+ return (c, _) => (a(), n("div", {
52
52
  class: G(["plugin-card", C.value])
53
53
  }, [
54
- s("div", xe, [
54
+ s("div", $e, [
55
55
  s("img", {
56
- src: a.plugin.icon,
56
+ src: i.plugin.icon,
57
57
  class: "plugin-card__icon"
58
58
  }, null, 8, Be),
59
59
  s("div", Ve, [
60
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)
61
+ s("span", Fe, x(i.plugin.name), 1),
62
+ i.showToolCount && f.value ? (a(), n("span", Me, x(f.value) + " 个工具 ", 1)) : v("", !0)
63
63
  ]),
64
64
  s("div", {
65
65
  class: "plugin-card__desc",
66
- title: a.plugin.description
67
- }, S(a.plugin.description), 9, De)
66
+ title: i.plugin.description
67
+ }, x(i.plugin.description), 9, De)
68
68
  ]),
69
69
  s("div", Ie, [
70
- U(a.$slots, "actions", {
71
- plugin: a.plugin,
72
- expanded: c.value,
73
- mode: a.mode
70
+ U(c.$slots, "actions", {
71
+ plugin: i.plugin,
72
+ expanded: u.value,
73
+ mode: i.mode
74
74
  }, () => [
75
- a.mode === "installed" ? (o(), i(F, { key: 0 }, [
76
- h.value ? (o(), i("div", {
75
+ i.mode === "installed" ? (a(), n(F, { key: 0 }, [
76
+ h.value ? (a(), n("div", {
77
77
  key: 0,
78
78
  class: "plugin-card__expand",
79
79
  onClick: w
80
80
  }, [
81
- U(a.$slots, "expand-icon", { expanded: c.value }, () => [
82
- c.value ? (o(), k(d(be), {
81
+ U(c.$slots, "expand-icon", { expanded: u.value }, () => [
82
+ u.value ? (a(), k(d(be), {
83
83
  key: 1,
84
84
  class: "common-icon"
85
- })) : (o(), k(d(ke), {
85
+ })) : (a(), k(d(ke), {
86
86
  key: 0,
87
87
  class: "common-icon"
88
88
  }))
@@ -97,7 +97,7 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
97
97
  trigger: "click"
98
98
  }, {
99
99
  reference: T(() => [
100
- U(a.$slots, "delete-icon", {}, () => [
100
+ U(c.$slots, "delete-icon", {}, () => [
101
101
  s("span", Le, [
102
102
  m(d(Te), { class: "common-icon delete" })
103
103
  ])
@@ -106,38 +106,38 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
106
106
  _: 3
107
107
  }),
108
108
  m(d(X), {
109
- title: E($.value.checked),
110
- "model-value": $.value.checked,
111
- indeterminate: $.value.indeterminate,
109
+ title: E(S.value.checked),
110
+ "model-value": S.value.checked,
111
+ indeterminate: S.value.indeterminate,
112
112
  "onUpdate:modelValue": Q
113
113
  }, null, 8, ["title", "model-value", "indeterminate"])
114
114
  ])
115
- ], 64)) : a.mode === "market" ? (o(), i("div", Ue, [
116
- U(a.$slots, "add-button", {}, () => [
115
+ ], 64)) : i.mode === "market" ? (a(), n("div", Ue, [
116
+ U(c.$slots, "add-button", {}, () => [
117
117
  s("div", {
118
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"
119
+ "plugin-card__add-button--loading": $.value === "loading",
120
+ "plugin-card__add-button--added": $.value === "added"
121
121
  }]),
122
- onClick: _[0] || (_[0] = (y) => I(a.plugin))
122
+ onClick: _[0] || (_[0] = (y) => I(i.plugin))
123
123
  }, [
124
- x.value === "idle" ? (o(), i("span", Ne, "添加")) : x.value === "loading" ? (o(), i("span", Oe, "添加中")) : (o(), i("span", qe, "已添加"))
124
+ $.value === "idle" ? (a(), n("span", Ne, "添加")) : $.value === "loading" ? (a(), n("span", Oe, "添加中")) : (a(), n("span", qe, "已添加"))
125
125
  ], 2)
126
126
  ], !0)
127
127
  ])) : v("", !0)
128
128
  ], !0)
129
129
  ])
130
130
  ]),
131
- h.value ? (o(), k(K, {
131
+ h.value ? (a(), k(K, {
132
132
  key: 0,
133
133
  name: "plugin-card-slide"
134
134
  }, {
135
135
  default: T(() => [
136
136
  pe(s("div", ze, [
137
137
  _[2] || (_[2] = s("div", { class: "plugin-card__divider" }, null, -1)),
138
- (o(!0), i(F, null, N(a.plugin.tools, (y, A) => {
138
+ (a(!0), n(F, null, N(i.plugin.tools, (y, A) => {
139
139
  var L;
140
- return o(), i("div", {
140
+ return a(), n("div", {
141
141
  key: y.id,
142
142
  class: "plugin-card__tool-item"
143
143
  }, [
@@ -145,12 +145,12 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
145
145
  _[1] || (_[1] = s("div", { class: "plugin-card__icon plugin-card__icon--placeholder" }, null, -1)),
146
146
  s("div", Re, [
147
147
  s("div", je, [
148
- s("span", He, S(y.name), 1)
148
+ s("span", He, x(y.name), 1)
149
149
  ]),
150
150
  s("div", {
151
151
  class: "plugin-card__desc",
152
152
  title: y.description
153
- }, S(y.description), 9, Ge)
153
+ }, x(y.description), 9, Ge)
154
154
  ]),
155
155
  s("div", Je, [
156
156
  m(d(X), {
@@ -160,18 +160,18 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
160
160
  }, null, 8, ["title", "model-value", "onUpdate:modelValue"])
161
161
  ])
162
162
  ]),
163
- A < (((L = a.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (o(), i("div", Ke)) : v("", !0)
163
+ A < (((L = i.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (a(), n("div", Ke)) : v("", !0)
164
164
  ]);
165
165
  }), 128))
166
166
  ], 512), [
167
- [ge, c.value]
167
+ [ge, u.value]
168
168
  ])
169
169
  ]),
170
170
  _: 1
171
171
  })) : v("", !0)
172
172
  ], 2));
173
173
  }
174
- }), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-c4e722eb"]]), Xe = {
174
+ }), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-89b32345"]]), Xe = {
175
175
  key: 0,
176
176
  class: "plugin-editor__backdrop"
177
177
  }, Ye = { class: "plugin-editor__header" }, Ze = /* @__PURE__ */ q({
@@ -181,34 +181,34 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
181
181
  visibleModifiers: {}
182
182
  },
183
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 = () => {
184
+ setup(i, { emit: b }) {
185
+ const e = b, r = ae(i, "visible"), u = V(null), f = () => {
186
186
  r.value = !1;
187
187
  };
188
- Se(c, () => {
188
+ xe(u, () => {
189
189
  r.value && f();
190
190
  });
191
191
  const h = (C, w) => {
192
192
  C === "form" ? e("confirm", "form", w) : e("confirm", "code", w), f();
193
193
  };
194
- return (C, w) => (o(), i(F, null, [
195
- r.value ? (o(), i("div", Xe)) : v("", !0),
194
+ return (C, w) => (a(), n(F, null, [
195
+ r.value ? (a(), n("div", Xe)) : v("", !0),
196
196
  m(K, { name: "plugin-editor" }, {
197
197
  default: T(() => [
198
- r.value ? (o(), i("div", {
198
+ r.value ? (a(), n("div", {
199
199
  key: 0,
200
200
  class: "plugin-editor",
201
201
  ref_key: "dialogRef",
202
- ref: c
202
+ ref: u
203
203
  }, [
204
204
  s("div", Ye, [
205
205
  w[0] || (w[0] = s("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
206
- m(d(ae), {
206
+ m(d(oe), {
207
207
  class: "plugin-editor__close",
208
208
  onClick: f
209
209
  })
210
210
  ]),
211
- m(d($e), {
211
+ m(d(Se), {
212
212
  onConfirm: h,
213
213
  onCancel: f
214
214
  })
@@ -226,25 +226,25 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
226
226
  key: 1,
227
227
  src: we,
228
228
  class: "empty-state__illustration"
229
- }, ot = { class: "empty-state__message" }, at = /* @__PURE__ */ q({
229
+ }, at = { class: "empty-state__message" }, ot = /* @__PURE__ */ q({
230
230
  __name: "NoData",
231
231
  props: {
232
232
  searchQuery: { default: "" }
233
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), {
234
+ setup(i) {
235
+ const b = i, e = g(() => {
236
+ var u;
237
+ return !!((u = b.searchQuery) != null && u.trim());
238
+ }), r = g(() => e.value ? "暂无搜索结果" : "暂无数据");
239
+ return (u, f) => (a(), n("section", tt, [
240
+ e.value ? (a(), k(d(Ce), {
241
241
  key: 0,
242
242
  class: "empty-state__illustration"
243
- })) : (o(), i("img", lt)),
244
- s("p", ot, S(r.value), 1)
243
+ })) : (a(), n("img", lt)),
244
+ s("p", at, x(r.value), 1)
245
245
  ]));
246
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 = {
247
+ }), le = /* @__PURE__ */ z(ot, [["__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
248
  key: 0,
249
249
  class: "mcp-server-picker__content-installed-search"
250
250
  }, ct = {
@@ -275,8 +275,8 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
275
275
  marketPlugins: { default: () => [] },
276
276
  searchPlaceholder: { default: "搜索插件" },
277
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 },
278
+ installedSearchFn: { type: Function, default: (i, b) => i ? b.name.toLowerCase().includes(i.toLowerCase()) : !0 },
279
+ marketSearchFn: { type: Function, default: (i, b) => i ? b.name.toLowerCase().includes(i.toLowerCase()) : !0 },
280
280
  marketCategoryOptions: { default: () => [] },
281
281
  marketCategoryPlaceholder: { default: "按照分类筛选" },
282
282
  enableMarketCategoryFilter: { type: Boolean, default: !0 },
@@ -306,43 +306,43 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
306
306
  visibleModifiers: {}
307
307
  }),
308
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);
309
+ setup(i, { emit: b }) {
310
+ const e = i, r = b, u = V(e.defaultActiveTab), f = V(""), h = V(""), C = V(""), w = g(
311
+ () => u.value === "installed" ? e.searchPlaceholder : "搜索市场插件"
312
+ ), S = g(() => e.installedPlugins), Q = g(() => e.marketPlugins), R = g(() => !S.value || S.value.length === 0 ? 0 : S.value.filter((t) => t.enabled).length);
313
313
  H(
314
314
  R,
315
315
  (t) => {
316
316
  r("update:activeCount", t);
317
317
  },
318
318
  { immediate: !0 }
319
- ), H(c, (t, n) => {
320
- t !== n && r("tab-change", t);
319
+ ), H(u, (t, o) => {
320
+ t !== o && r("tab-change", t);
321
321
  });
322
- const D = p(() => $.value.filter((t) => e.installedSearchFn(f.value, t))), x = p(() => {
323
- const { category: t, search: n } = {
322
+ const D = g(() => S.value.filter((t) => e.installedSearchFn(f.value, t))), $ = g(() => {
323
+ const { category: t, search: o } = {
324
324
  category: C.value,
325
325
  search: h.value
326
- }, u = (l) => {
327
- const P = !t || l.category === t, B = !n || e.marketSearchFn(n, l);
326
+ }, p = (l) => {
327
+ const P = !t || l.category === t, B = !o || e.marketSearchFn(o, l);
328
328
  return P && B;
329
329
  };
330
- return Q.value.filter(u);
331
- }), I = p(() => c.value === "installed" ? D.value.length > 0 : x.value.length > 0);
330
+ return Q.value.filter(p);
331
+ }), I = g(() => u.value === "installed" ? D.value.length > 0 : $.value.length > 0);
332
332
  H(C, (t) => {
333
333
  r("market-category-change", t);
334
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) => {
335
+ const E = (t, o) => {
336
+ var p;
337
+ e.allowPluginToggle && (r("plugin-toggle", t, o), (p = t.tools) != null && p.length && (o ? t.tools.filter((P) => P.enabled).length === 0 && t.tools.forEach((P) => {
338
338
  r("tool-toggle", t, P.id, !0);
339
339
  }) : t.tools.forEach((l) => {
340
340
  l.enabled && r("tool-toggle", t, l.id, !1);
341
341
  })));
342
- }, a = (t, n, u) => {
342
+ }, c = (t, o, p) => {
343
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;
344
+ if (e.allowToolToggle && (r("tool-toggle", t, o, p), (l = t.tools) != null && l.length)) {
345
+ const P = t.tools.filter((M) => M.id !== o).some((M) => M.enabled), B = p || P;
346
346
  t.enabled !== B && r("plugin-toggle", t, B);
347
347
  }
348
348
  }, _ = (t) => {
@@ -351,77 +351,77 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
351
351
  e.allowPluginAdd && r("plugin-add", t);
352
352
  }, A = V(!1), L = () => {
353
353
  A.value = !0;
354
- }, j = (t, n) => {
355
- r("plugin-create", t, n), A.value = !1;
356
- }, ne = oe(g, "visible"), ie = () => {
354
+ }, j = (t, o) => {
355
+ r("plugin-create", t, o), A.value = !1;
356
+ }, ne = ae(i, "visible"), ie = () => {
357
357
  r("update:visible", !1);
358
- }, se = p(() => {
359
- const { type: t, position: n, drawer: u } = e.popupConfig || {}, l = {
358
+ }, se = g(() => {
359
+ const { type: t, position: o, drawer: p } = e.popupConfig || {}, l = {
360
360
  "z-index": "1000",
361
361
  position: "fixed"
362
362
  };
363
363
  return t === "fixed" ? {
364
364
  ...l,
365
- ...re(n)
365
+ ...re(o)
366
366
  } : t === "drawer" ? {
367
367
  ...l,
368
- ...de(u)
368
+ ...de(p)
369
369
  } : l;
370
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 ? {
371
+ const o = {};
372
+ return Object.entries(t).forEach(([p, l]) => {
373
+ l !== void 0 && (o[p] = typeof l == "number" ? `${l}px` : l);
374
+ }), Object.keys(o).length === 0 ? {
375
375
  top: "50%",
376
376
  left: "50%",
377
377
  transform: "translate(-50%, -50%)"
378
- } : n;
378
+ } : o;
379
379
  }, de = (t = { direction: "right" }) => {
380
- const { direction: n } = t, u = {
380
+ const { direction: o } = t, p = {
381
381
  top: "0",
382
382
  bottom: "0",
383
383
  height: "100%"
384
384
  };
385
- return n === "left" ? {
386
- ...u,
385
+ return o === "left" ? {
386
+ ...p,
387
387
  left: "0",
388
388
  "border-right": "1px solid rgb(219, 219, 219)"
389
389
  } : {
390
- ...u,
390
+ ...p,
391
391
  right: "0",
392
392
  "border-left": "1px solid rgb(219, 219, 219)"
393
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(() => {
394
+ }, W = g(() => {
395
+ const { type: t, drawer: o } = e.popupConfig || {};
396
+ return t !== "drawer" ? "" : `drawer-${(o == null ? void 0 : o.direction) || "right"}`;
397
+ }), ce = g(() => {
398
398
  const { type: t } = e.popupConfig || {};
399
399
  return t === "drawer" ? W.value : "fade";
400
400
  }), ue = {
401
401
  background: "var(--tr-mcp-server-picker-bg-default-2)",
402
402
  color: "var(--tr-text-primary)"
403
403
  };
404
- return (t, n) => (o(), k(K, { name: ce.value }, {
404
+ return (t, o) => (a(), k(K, { name: ce.value }, {
405
405
  default: T(() => {
406
- var u;
406
+ var p;
407
407
  return [
408
- ne.value ? (o(), i("div", {
408
+ ne.value ? (a(), n("div", {
409
409
  key: 0,
410
- class: G(["mcp-server-picker", [`popup-type-${((u = e.popupConfig) == null ? void 0 : u.type) || "fixed"}`, W.value]]),
410
+ class: G(["mcp-server-picker", [`popup-type-${((p = e.popupConfig) == null ? void 0 : p.type) || "fixed"}`, W.value]]),
411
411
  style: _e(se.value)
412
412
  }, [
413
413
  s("div", nt, [
414
- s("div", it, S(e.title), 1),
414
+ s("div", it, x(e.title), 1),
415
415
  s("div", st, [
416
- e.showCustomAddButton ? (o(), i("div", {
416
+ e.showCustomAddButton ? (a(), n("div", {
417
417
  key: 0,
418
418
  class: "mcp-server-picker__header-right-item",
419
419
  onClick: L
420
420
  }, [
421
421
  m(d(Pe), { class: "mcp-server-picker__icon" }),
422
- s("span", null, S(e.customAddButtonText), 1)
422
+ s("span", null, x(e.customAddButtonText), 1)
423
423
  ])) : v("", !0),
424
- m(d(ae), {
424
+ m(d(oe), {
425
425
  class: "mcp-server-picker__header-right-close",
426
426
  onClick: ie
427
427
  })
@@ -429,20 +429,20 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
429
429
  ]),
430
430
  s("div", rt, [
431
431
  m(d(fe), {
432
- modelValue: c.value,
433
- "onUpdate:modelValue": n[3] || (n[3] = (l) => c.value = l)
432
+ modelValue: u.value,
433
+ "onUpdate:modelValue": o[3] || (o[3] = (l) => u.value = l)
434
434
  }, {
435
435
  default: T(() => [
436
- e.showInstalledTab ? (o(), k(d(Y), {
436
+ e.showInstalledTab ? (a(), k(d(Y), {
437
437
  key: 0,
438
438
  title: e.installedTabTitle,
439
439
  name: "installed"
440
440
  }, {
441
441
  default: T(() => [
442
- e.enableSearch ? (o(), i("div", dt, [
442
+ e.enableSearch ? (a(), n("div", dt, [
443
443
  m(d(Z), {
444
444
  modelValue: f.value,
445
- "onUpdate:modelValue": n[0] || (n[0] = (l) => f.value = l),
445
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => f.value = l),
446
446
  placeholder: e.searchPlaceholder
447
447
  }, {
448
448
  suffix: T(() => [
@@ -451,49 +451,49 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
451
451
  _: 1
452
452
  }, 8, ["modelValue", "placeholder"])
453
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) => {
454
+ I.value ? (a(), n("div", ct, [
455
+ e.loading ? (a(), n("div", ut, "加载中...")) : (a(!0), n(F, { key: 1 }, N(D.value, (l) => {
456
456
  var P;
457
- return o(), k(d(te), {
457
+ return a(), k(d(te), {
458
458
  key: l.id,
459
459
  plugin: l,
460
460
  mode: "installed",
461
461
  expandable: !!((P = l.tools) != null && P.length),
462
462
  onTogglePlugin: (B) => E(l, B),
463
- onToggleTool: (B, M) => a(l, B, M),
463
+ onToggleTool: (B, M) => c(l, B, M),
464
464
  onDeletePlugin: () => _(l)
465
465
  }, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
466
466
  }), 128))
467
- ])) : (o(), k(d(le), {
467
+ ])) : (a(), k(d(le), {
468
468
  key: 2,
469
469
  "search-query": f.value
470
470
  }, null, 8, ["search-query"]))
471
471
  ]),
472
472
  _: 1
473
473
  }, 8, ["title"])) : v("", !0),
474
- e.showMarketTab ? (o(), k(d(Y), {
474
+ e.showMarketTab ? (a(), k(d(Y), {
475
475
  key: 1,
476
476
  title: e.marketTabTitle,
477
477
  name: "market"
478
478
  }, {
479
479
  default: T(() => [
480
- e.enableSearch || e.enableMarketCategoryFilter ? (o(), i("div", pt, [
481
- e.enableMarketCategoryFilter ? (o(), i("div", gt, [
480
+ e.enableSearch || e.enableMarketCategoryFilter ? (a(), n("div", pt, [
481
+ e.enableMarketCategoryFilter ? (a(), n("div", gt, [
482
482
  m(d(he), {
483
483
  modelValue: C.value,
484
- "onUpdate:modelValue": n[1] || (n[1] = (l) => C.value = l),
484
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => C.value = l),
485
485
  placeholder: e.marketCategoryPlaceholder,
486
486
  "drop-style": ue
487
487
  }, {
488
488
  default: T(() => [
489
- (o(!0), i(F, null, N(e.marketCategoryOptions, (l) => (o(), k(d(ye), {
489
+ (a(!0), n(F, null, N(e.marketCategoryOptions, (l) => (a(), k(d(ye), {
490
490
  key: l.value,
491
491
  label: l.label,
492
492
  value: l.value,
493
493
  class: "mcp-server-picker__content-market-header-select-option"
494
494
  }, {
495
495
  default: T(() => [
496
- me(S(l.label), 1)
496
+ me(x(l.label), 1)
497
497
  ]),
498
498
  _: 2
499
499
  }, 1032, ["label", "value"]))), 128))
@@ -501,10 +501,10 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
501
501
  _: 1
502
502
  }, 8, ["modelValue", "placeholder"])
503
503
  ])) : v("", !0),
504
- e.enableSearch ? (o(), i("div", _t, [
504
+ e.enableSearch ? (a(), n("div", _t, [
505
505
  m(d(Z), {
506
506
  modelValue: h.value,
507
- "onUpdate:modelValue": n[2] || (n[2] = (l) => h.value = l),
507
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => h.value = l),
508
508
  placeholder: w.value
509
509
  }, {
510
510
  suffix: T(() => [
@@ -514,8 +514,8 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
514
514
  }, 8, ["modelValue", "placeholder"])
515
515
  ])) : v("", !0)
516
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), {
517
+ I.value ? (a(), n("div", mt, [
518
+ e.marketLoading ? (a(), n("div", vt, "加载中...")) : (a(!0), n(F, { key: 1 }, N($.value, (l) => (a(), k(d(te), {
519
519
  key: l.id,
520
520
  plugin: l,
521
521
  mode: "market",
@@ -523,7 +523,7 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
523
523
  "show-tool-count": !1,
524
524
  onAddPlugin: y
525
525
  }, null, 8, ["plugin"]))), 128))
526
- ])) : (o(), k(d(le), {
526
+ ])) : (a(), k(d(le), {
527
527
  key: 2,
528
528
  "search-query": h.value || C.value
529
529
  }, null, 8, ["search-query"]))
@@ -536,7 +536,7 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
536
536
  ]),
537
537
  m(d(et), {
538
538
  visible: A.value,
539
- "onUpdate:visible": n[4] || (n[4] = (l) => A.value = l),
539
+ "onUpdate:visible": o[4] || (o[4] = (l) => A.value = l),
540
540
  onConfirm: j
541
541
  }, null, 8, ["visible"])
542
542
  ], 6)) : v("", !0)
@@ -547,8 +547,8 @@ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
547
547
  }
548
548
  }), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-7f8cfb42"]]);
549
549
  O.name = "McpServerPicker";
550
- const ht = function(g) {
551
- g.component(O.name, O);
550
+ const ht = function(i) {
551
+ i.component(O.name, O);
552
552
  };
553
553
  O.install = ht;
554
554
  export {