@opentiny/tiny-robot 0.3.0-alpha.21 → 0.3.0-alpha.23

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,20 +1,20 @@
1
- import { defineComponent as O, 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 ce, renderList as N, vShow as pe, mergeModels as J, useModel as oe, watch as H, normalizeStyle as ge, createTextVNode as _e } from "vue";
2
- import { TinyPopconfirm as me, TinySwitch as X, TinyTabs as ve, TinyTabItem as Y, TinyInput as Z, TinyBaseSelect as fe, TinyOption as he } from "@opentiny/vue";
3
- import { IconArrowRight as ye, IconArrowDown as ke, IconDelete as be, IconClose as ne, IconEmptySearch as Te, IconPlus as Ce, IconSearch as ee } from "@opentiny/tiny-robot-svgs";
4
- import { _ as q } from "../_plugin-vue_export-helper.js";
5
- import { _ as Pe } from "../no-data.js";
6
- import { o as we } from "../index2.js";
7
- import Se from "../mcp-add-form/index.js";
8
- const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-card__content" }, Ve = { class: "plugin-card__info" }, Ae = { class: "plugin-card__name" }, Fe = {
1
+ import { defineComponent as q, ref as V, computed as p, createElementBlock as i, openBlock as o, normalizeClass as G, createElementVNode as s, createBlock as k, createCommentVNode as v, toDisplayString as S, renderSlot as U, Fragment as F, unref as d, createVNode as m, withCtx as T, Transition as K, withDirectives as pe, renderList as N, vShow as ge, mergeModels as J, useModel as oe, watch as H, normalizeStyle as _e, createTextVNode as me } from "vue";
2
+ import { TinyPopconfirm as ve, TinySwitch as X, TinyTabs as fe, TinyTabItem as Y, TinyInput as Z, TinyBaseSelect as he, TinyOption as ye } from "@opentiny/vue";
3
+ import { IconArrowRight as ke, IconArrowDown as be, IconDelete as Te, IconClose as ae, IconEmptySearch as Ce, IconPlus as Pe, IconSearch as ee } from "@opentiny/tiny-robot-svgs";
4
+ import { _ as z } from "../_plugin-vue_export-helper.js";
5
+ import { _ as we } from "../no-data.js";
6
+ import { o as Se } from "../index2.js";
7
+ import $e from "../mcp-add-form/index.js";
8
+ const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-card__content" }, Ae = { class: "plugin-card__info" }, Fe = { class: "plugin-card__name" }, Me = {
9
9
  key: 0,
10
10
  class: "plugin-card__count"
11
- }, Me = ["title"], Ie = { class: "plugin-card__actions" }, De = { class: "plugin-card__operations" }, Ee = { title: "移除插件" }, Le = {
11
+ }, De = ["title"], Ie = { class: "plugin-card__actions" }, Ee = { class: "plugin-card__operations" }, Le = { title: "移除插件" }, Ue = {
12
12
  key: 1,
13
13
  class: "plugin-card__add"
14
- }, Ue = { key: 0 }, Ne = { key: 1 }, ze = { key: 2 }, Oe = { class: "plugin-card__tools" }, qe = { class: "plugin-card__tool" }, Qe = { class: "plugin-card__content" }, Re = { class: "plugin-card__info" }, je = { class: "plugin-card__name" }, He = ["title"], Ge = { class: "plugin-card__actions plugin-card__actions--tool" }, Je = {
14
+ }, Ne = { key: 0 }, Oe = { key: 1 }, qe = { key: 2 }, ze = { class: "plugin-card__tools" }, Qe = { class: "plugin-card__tool" }, Re = { class: "plugin-card__content" }, je = { class: "plugin-card__info" }, He = { class: "plugin-card__name" }, Ge = ["title"], Je = { class: "plugin-card__actions plugin-card__actions--tool" }, Ke = {
15
15
  key: 0,
16
16
  class: "plugin-card__divider"
17
- }, Ke = /* @__PURE__ */ O({
17
+ }, We = /* @__PURE__ */ q({
18
18
  __name: "PluginCard",
19
19
  props: {
20
20
  plugin: {},
@@ -23,83 +23,83 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
23
23
  },
24
24
  emits: ["toggle-plugin", "toggle-tool", "add-plugin", "delete-plugin"],
25
25
  setup(g, { emit: b }) {
26
- const e = g, r = b, u = V(e.plugin.expanded || !1), f = p(() => {
27
- var n;
28
- return ((n = e.plugin.tools) == null ? void 0 : n.length) || 0;
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
29
  }), h = p(() => f.value > 0), C = p(() => ({
30
30
  "plugin-card--expandable": h.value,
31
- "plugin-card--expanded": u.value,
31
+ "plugin-card--expanded": c.value,
32
32
  [`plugin-card--${e.mode}`]: !0
33
33
  })), w = () => {
34
- h.value && (u.value = !u.value);
34
+ h.value && (c.value = !c.value);
35
35
  }, $ = p(() => {
36
36
  if (!h.value)
37
37
  return { checked: e.plugin.enabled || !1, indeterminate: !1 };
38
- const n = e.plugin.tools.filter((y) => y.enabled), _ = e.plugin.tools.length;
39
- return n.length === 0 ? { checked: !1, indeterminate: !1 } : n.length === _ ? { checked: !0, indeterminate: !1 } : { checked: !0, indeterminate: !0 };
40
- }), Q = (n) => {
38
+ const a = e.plugin.tools.filter((y) => y.enabled), _ = e.plugin.tools.length;
39
+ return a.length === 0 ? { checked: !1, indeterminate: !1 } : a.length === _ ? { checked: !0, indeterminate: !1 } : { checked: !0, indeterminate: !0 };
40
+ }), Q = (a) => {
41
41
  h.value && e.plugin.tools.forEach((_) => {
42
- _.enabled !== n && (_.enabled = n, r("toggle-tool", _.id, n));
43
- }), r("toggle-plugin", n);
44
- }, R = (n, _) => {
45
- r("toggle-tool", n, _);
46
- }, I = () => {
42
+ _.enabled !== a && (_.enabled = a, r("toggle-tool", _.id, a));
43
+ }), r("toggle-plugin", a);
44
+ }, R = (a, _) => {
45
+ r("toggle-tool", a, _);
46
+ }, D = () => {
47
47
  r("delete-plugin");
48
- }, x = p(() => e.plugin.addState || "idle"), D = (n) => {
49
- x.value === "idle" && r("add-plugin", n);
50
- }, E = (n) => n ? "关闭插件" : "打开插件";
51
- return (n, _) => (o(), i("div", {
48
+ }, x = p(() => e.plugin.addState || "idle"), I = (a) => {
49
+ x.value === "idle" && r("add-plugin", a);
50
+ }, E = (a) => a ? "关闭插件" : "打开插件";
51
+ return (a, _) => (o(), i("div", {
52
52
  class: G(["plugin-card", C.value])
53
53
  }, [
54
- s("div", $e, [
54
+ s("div", xe, [
55
55
  s("img", {
56
- src: n.plugin.icon,
56
+ src: a.plugin.icon,
57
57
  class: "plugin-card__icon"
58
- }, null, 8, xe),
59
- s("div", Be, [
60
- s("div", Ve, [
61
- s("span", Ae, S(n.plugin.name), 1),
62
- n.showToolCount && f.value ? (o(), i("span", Fe, S(f.value) + " 个工具 ", 1)) : v("", !0)
58
+ }, null, 8, Be),
59
+ s("div", Ve, [
60
+ s("div", Ae, [
61
+ s("span", Fe, S(a.plugin.name), 1),
62
+ a.showToolCount && f.value ? (o(), i("span", Me, S(f.value) + " 个工具 ", 1)) : v("", !0)
63
63
  ]),
64
64
  s("div", {
65
65
  class: "plugin-card__desc",
66
- title: n.plugin.description
67
- }, S(n.plugin.description), 9, Me)
66
+ title: a.plugin.description
67
+ }, S(a.plugin.description), 9, De)
68
68
  ]),
69
69
  s("div", Ie, [
70
- U(n.$slots, "actions", {
71
- plugin: n.plugin,
72
- expanded: u.value,
73
- mode: n.mode
70
+ U(a.$slots, "actions", {
71
+ plugin: a.plugin,
72
+ expanded: c.value,
73
+ mode: a.mode
74
74
  }, () => [
75
- n.mode === "installed" ? (o(), i(F, { key: 0 }, [
75
+ a.mode === "installed" ? (o(), i(F, { key: 0 }, [
76
76
  h.value ? (o(), i("div", {
77
77
  key: 0,
78
78
  class: "plugin-card__expand",
79
79
  onClick: w
80
80
  }, [
81
- U(n.$slots, "expand-icon", { expanded: u.value }, () => [
82
- u.value ? (o(), k(d(ke), {
81
+ U(a.$slots, "expand-icon", { expanded: c.value }, () => [
82
+ c.value ? (o(), k(d(be), {
83
83
  key: 1,
84
84
  class: "common-icon"
85
- })) : (o(), k(d(ye), {
85
+ })) : (o(), k(d(ke), {
86
86
  key: 0,
87
87
  class: "common-icon"
88
88
  }))
89
89
  ], !0)
90
90
  ])) : v("", !0),
91
- s("div", De, [
92
- m(d(me), {
91
+ s("div", Ee, [
92
+ m(d(ve), {
93
93
  title: "确定移除该插件吗?",
94
94
  style: { height: "16px" },
95
95
  type: "info",
96
- onConfirm: I,
96
+ onConfirm: D,
97
97
  trigger: "click"
98
98
  }, {
99
99
  reference: T(() => [
100
- U(n.$slots, "delete-icon", {}, () => [
101
- s("span", Ee, [
102
- m(d(be), { class: "common-icon delete" })
100
+ U(a.$slots, "delete-icon", {}, () => [
101
+ s("span", Le, [
102
+ m(d(Te), { class: "common-icon delete" })
103
103
  ])
104
104
  ], !0)
105
105
  ]),
@@ -112,16 +112,16 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
112
112
  "onUpdate:modelValue": Q
113
113
  }, null, 8, ["title", "model-value", "indeterminate"])
114
114
  ])
115
- ], 64)) : n.mode === "market" ? (o(), i("div", Le, [
116
- U(n.$slots, "add-button", {}, () => [
115
+ ], 64)) : a.mode === "market" ? (o(), i("div", Ue, [
116
+ U(a.$slots, "add-button", {}, () => [
117
117
  s("div", {
118
118
  class: G(["plugin-card__add-button", {
119
119
  "plugin-card__add-button--loading": x.value === "loading",
120
120
  "plugin-card__add-button--added": x.value === "added"
121
121
  }]),
122
- onClick: _[0] || (_[0] = (y) => D(n.plugin))
122
+ onClick: _[0] || (_[0] = (y) => I(a.plugin))
123
123
  }, [
124
- x.value === "idle" ? (o(), i("span", Ue, "添加")) : x.value === "loading" ? (o(), i("span", Ne, "添加中")) : (o(), i("span", ze, "已添加"))
124
+ x.value === "idle" ? (o(), i("span", Ne, "添加")) : x.value === "loading" ? (o(), i("span", Oe, "添加中")) : (o(), i("span", qe, "已添加"))
125
125
  ], 2)
126
126
  ], !0)
127
127
  ])) : v("", !0)
@@ -133,26 +133,26 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
133
133
  name: "plugin-card-slide"
134
134
  }, {
135
135
  default: T(() => [
136
- ce(s("div", Oe, [
136
+ pe(s("div", ze, [
137
137
  _[2] || (_[2] = s("div", { class: "plugin-card__divider" }, null, -1)),
138
- (o(!0), i(F, null, N(n.plugin.tools, (y, A) => {
138
+ (o(!0), i(F, null, N(a.plugin.tools, (y, A) => {
139
139
  var L;
140
140
  return o(), i("div", {
141
141
  key: y.id,
142
142
  class: "plugin-card__tool-item"
143
143
  }, [
144
- s("div", qe, [
144
+ s("div", Qe, [
145
145
  _[1] || (_[1] = s("div", { class: "plugin-card__icon plugin-card__icon--placeholder" }, null, -1)),
146
- s("div", Qe, [
147
- s("div", Re, [
148
- s("span", je, S(y.name), 1)
146
+ s("div", Re, [
147
+ s("div", je, [
148
+ s("span", He, S(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, He)
153
+ }, S(y.description), 9, Ge)
154
154
  ]),
155
- s("div", Ge, [
155
+ s("div", Je, [
156
156
  m(d(X), {
157
157
  title: E(y.enabled),
158
158
  "model-value": y.enabled,
@@ -160,21 +160,21 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
160
160
  }, null, 8, ["title", "model-value", "onUpdate:modelValue"])
161
161
  ])
162
162
  ]),
163
- A < (((L = n.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (o(), i("div", Je)) : v("", !0)
163
+ A < (((L = a.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (o(), i("div", Ke)) : v("", !0)
164
164
  ]);
165
165
  }), 128))
166
166
  ], 512), [
167
- [pe, u.value]
167
+ [ge, c.value]
168
168
  ])
169
169
  ]),
170
170
  _: 1
171
171
  })) : v("", !0)
172
172
  ], 2));
173
173
  }
174
- }), te = /* @__PURE__ */ q(Ke, [["__scopeId", "data-v-f406f1f0"]]), We = {
174
+ }), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-c4e722eb"]]), Xe = {
175
175
  key: 0,
176
176
  class: "plugin-editor__backdrop"
177
- }, Xe = { class: "plugin-editor__header" }, Ye = /* @__PURE__ */ O({
177
+ }, Ye = { class: "plugin-editor__header" }, Ze = /* @__PURE__ */ q({
178
178
  __name: "PluginModal",
179
179
  props: {
180
180
  visible: { type: Boolean, required: !0 },
@@ -182,33 +182,33 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
182
182
  },
183
183
  emits: /* @__PURE__ */ J(["update:visible", "confirm"], ["update:visible"]),
184
184
  setup(g, { emit: b }) {
185
- const e = b, r = oe(g, "visible"), u = V(null), f = () => {
185
+ const e = b, r = oe(g, "visible"), c = V(null), f = () => {
186
186
  r.value = !1;
187
187
  };
188
- we(u, () => {
188
+ Se(c, () => {
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
194
  return (C, w) => (o(), i(F, null, [
195
- r.value ? (o(), i("div", We)) : v("", !0),
195
+ r.value ? (o(), i("div", Xe)) : v("", !0),
196
196
  m(K, { name: "plugin-editor" }, {
197
197
  default: T(() => [
198
198
  r.value ? (o(), i("div", {
199
199
  key: 0,
200
200
  class: "plugin-editor",
201
201
  ref_key: "dialogRef",
202
- ref: u
202
+ ref: c
203
203
  }, [
204
- s("div", Xe, [
204
+ s("div", Ye, [
205
205
  w[0] || (w[0] = s("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
206
- m(d(ne), {
206
+ m(d(ae), {
207
207
  class: "plugin-editor__close",
208
208
  onClick: f
209
209
  })
210
210
  ]),
211
- m(d(Se), {
211
+ m(d($e), {
212
212
  onConfirm: h,
213
213
  onCancel: f
214
214
  })
@@ -218,57 +218,57 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
218
218
  })
219
219
  ], 64));
220
220
  }
221
- }), Ze = /* @__PURE__ */ q(Ye, [["__scopeId", "data-v-b6ec8753"]]), et = {
221
+ }), et = /* @__PURE__ */ z(Ze, [["__scopeId", "data-v-f2f12f4a"]]), tt = {
222
222
  class: "empty-state",
223
223
  role: "status",
224
224
  "aria-live": "polite"
225
- }, tt = {
225
+ }, lt = {
226
226
  key: 1,
227
- src: Pe,
227
+ src: we,
228
228
  class: "empty-state__illustration"
229
- }, lt = { class: "empty-state__message" }, ot = /* @__PURE__ */ O({
229
+ }, ot = { class: "empty-state__message" }, at = /* @__PURE__ */ q({
230
230
  __name: "NoData",
231
231
  props: {
232
232
  searchQuery: { default: "" }
233
233
  },
234
234
  setup(g) {
235
235
  const b = g, e = p(() => {
236
- var u;
237
- return !!((u = b.searchQuery) != null && u.trim());
236
+ var c;
237
+ return !!((c = b.searchQuery) != null && c.trim());
238
238
  }), r = p(() => e.value ? "暂无搜索结果" : "暂无数据");
239
- return (u, f) => (o(), i("section", et, [
240
- e.value ? (o(), k(d(Te), {
239
+ return (c, f) => (o(), i("section", tt, [
240
+ e.value ? (o(), k(d(Ce), {
241
241
  key: 0,
242
242
  class: "empty-state__illustration"
243
- })) : (o(), i("img", tt)),
244
- s("p", lt, S(r.value), 1)
243
+ })) : (o(), i("img", lt)),
244
+ s("p", ot, S(r.value), 1)
245
245
  ]));
246
246
  }
247
- }), le = /* @__PURE__ */ q(ot, [["__scopeId", "data-v-839781e5"]]), nt = { class: "mcp-server-picker__header" }, at = { class: "mcp-server-picker__header-left" }, it = { class: "mcp-server-picker__header-right" }, st = { class: "mcp-server-picker__content" }, rt = {
247
+ }), le = /* @__PURE__ */ z(at, [["__scopeId", "data-v-05810d65"]]), nt = { class: "mcp-server-picker__header" }, it = { class: "mcp-server-picker__header-left" }, st = { class: "mcp-server-picker__header-right" }, rt = { class: "mcp-server-picker__content" }, dt = {
248
248
  key: 0,
249
249
  class: "mcp-server-picker__content-installed-search"
250
- }, dt = {
250
+ }, ct = {
251
251
  key: 1,
252
252
  class: "mcp-server-picker__content-list"
253
253
  }, ut = {
254
254
  key: 0,
255
255
  class: "mcp-server-picker__loading"
256
- }, ct = {
256
+ }, pt = {
257
257
  key: 0,
258
258
  class: "mcp-server-picker__content-market-header"
259
- }, pt = {
259
+ }, gt = {
260
260
  key: 0,
261
261
  style: { width: "168px" }
262
- }, gt = {
262
+ }, _t = {
263
263
  key: 1,
264
264
  style: { width: "264px", "flex-shrink": "0" }
265
- }, _t = {
265
+ }, mt = {
266
266
  key: 1,
267
267
  class: "mcp-server-picker__content-list"
268
- }, mt = {
268
+ }, vt = {
269
269
  key: 0,
270
270
  class: "mcp-server-picker__loading"
271
- }, vt = /* @__PURE__ */ O({
271
+ }, ft = /* @__PURE__ */ q({
272
272
  __name: "index",
273
273
  props: /* @__PURE__ */ J({
274
274
  installedPlugins: { default: () => [] },
@@ -307,8 +307,8 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
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
309
  setup(g, { emit: b }) {
310
- const e = g, r = b, u = V(e.defaultActiveTab), f = V(""), h = V(""), C = V(""), w = p(
311
- () => u.value === "installed" ? e.searchPlaceholder : "搜索市场插件"
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
312
  ), $ = p(() => e.installedPlugins), Q = p(() => e.marketPlugins), R = p(() => !$.value || $.value.length === 0 ? 0 : $.value.filter((t) => t.enabled).length);
313
313
  H(
314
314
  R,
@@ -316,33 +316,33 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
316
316
  r("update:activeCount", t);
317
317
  },
318
318
  { immediate: !0 }
319
- ), H(u, (t, a) => {
320
- t !== a && r("tab-change", t);
319
+ ), H(c, (t, n) => {
320
+ t !== n && r("tab-change", t);
321
321
  });
322
- const I = p(() => $.value.filter((t) => e.installedSearchFn(f.value, t))), x = p(() => {
323
- const { category: t, search: a } = {
322
+ const D = p(() => $.value.filter((t) => e.installedSearchFn(f.value, t))), x = p(() => {
323
+ const { category: t, search: n } = {
324
324
  category: C.value,
325
325
  search: h.value
326
- }, c = (l) => {
327
- const P = !t || l.category === t, B = !a || e.marketSearchFn(a, l);
326
+ }, u = (l) => {
327
+ const P = !t || l.category === t, B = !n || e.marketSearchFn(n, l);
328
328
  return P && B;
329
329
  };
330
- return Q.value.filter(c);
331
- }), D = p(() => u.value === "installed" ? I.value.length > 0 : x.value.length > 0);
330
+ return Q.value.filter(u);
331
+ }), I = p(() => c.value === "installed" ? D.value.length > 0 : x.value.length > 0);
332
332
  H(C, (t) => {
333
333
  r("market-category-change", t);
334
334
  });
335
- const E = (t, a) => {
336
- var c;
337
- e.allowPluginToggle && (r("plugin-toggle", t, a), (c = t.tools) != null && c.length && (a ? t.tools.filter((P) => P.enabled).length === 0 && t.tools.forEach((P) => {
335
+ const E = (t, n) => {
336
+ var u;
337
+ e.allowPluginToggle && (r("plugin-toggle", t, n), (u = t.tools) != null && u.length && (n ? t.tools.filter((P) => P.enabled).length === 0 && t.tools.forEach((P) => {
338
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
- }, n = (t, a, c) => {
342
+ }, a = (t, n, u) => {
343
343
  var l;
344
- if (e.allowToolToggle && (r("tool-toggle", t, a, c), (l = t.tools) != null && l.length)) {
345
- const P = t.tools.filter((M) => M.id !== a).some((M) => M.enabled), B = c || P;
344
+ if (e.allowToolToggle && (r("tool-toggle", t, n, u), (l = t.tools) != null && l.length)) {
345
+ const P = t.tools.filter((M) => M.id !== n).some((M) => M.enabled), B = u || P;
346
346
  t.enabled !== B && r("plugin-toggle", t, B);
347
347
  }
348
348
  }, _ = (t) => {
@@ -351,83 +351,86 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { 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, a) => {
355
- r("plugin-create", t, a), A.value = !1;
356
- }, ae = oe(g, "visible"), ie = () => {
354
+ }, j = (t, n) => {
355
+ r("plugin-create", t, n), A.value = !1;
356
+ }, ne = oe(g, "visible"), ie = () => {
357
357
  r("update:visible", !1);
358
358
  }, se = p(() => {
359
- const { type: t, position: a, drawer: c } = e.popupConfig || {}, l = {
359
+ const { type: t, position: n, drawer: u } = e.popupConfig || {}, l = {
360
360
  "z-index": "1000",
361
361
  position: "fixed"
362
362
  };
363
363
  return t === "fixed" ? {
364
364
  ...l,
365
- ...re(a)
365
+ ...re(n)
366
366
  } : t === "drawer" ? {
367
367
  ...l,
368
- ...de(c)
368
+ ...de(u)
369
369
  } : l;
370
370
  }), re = (t = {}) => {
371
- const a = {};
372
- return Object.entries(t).forEach(([c, l]) => {
373
- l !== void 0 && (a[c] = typeof l == "number" ? `${l}px` : l);
374
- }), Object.keys(a).length === 0 ? {
371
+ const n = {};
372
+ return Object.entries(t).forEach(([u, l]) => {
373
+ l !== void 0 && (n[u] = typeof l == "number" ? `${l}px` : l);
374
+ }), Object.keys(n).length === 0 ? {
375
375
  top: "50%",
376
376
  left: "50%",
377
377
  transform: "translate(-50%, -50%)"
378
- } : a;
378
+ } : n;
379
379
  }, de = (t = { direction: "right" }) => {
380
- const { direction: a } = t, c = {
380
+ const { direction: n } = t, u = {
381
381
  top: "0",
382
382
  bottom: "0",
383
383
  height: "100%"
384
384
  };
385
- return a === "left" ? {
386
- ...c,
385
+ return n === "left" ? {
386
+ ...u,
387
387
  left: "0",
388
388
  "border-right": "1px solid rgb(219, 219, 219)"
389
389
  } : {
390
- ...c,
390
+ ...u,
391
391
  right: "0",
392
392
  "border-left": "1px solid rgb(219, 219, 219)"
393
393
  };
394
394
  }, W = p(() => {
395
- const { type: t, drawer: a } = e.popupConfig || {};
396
- return t !== "drawer" ? "" : `drawer-${(a == null ? void 0 : a.direction) || "right"}`;
397
- }), ue = p(() => {
395
+ const { type: t, drawer: n } = e.popupConfig || {};
396
+ return t !== "drawer" ? "" : `drawer-${(n == null ? void 0 : n.direction) || "right"}`;
397
+ }), ce = p(() => {
398
398
  const { type: t } = e.popupConfig || {};
399
399
  return t === "drawer" ? W.value : "fade";
400
- });
401
- return (t, a) => (o(), k(K, { name: ue.value }, {
400
+ }), ue = {
401
+ background: "var(--tr-mcp-server-picker-bg-default-2)",
402
+ color: "var(--tr-text-primary)"
403
+ };
404
+ return (t, n) => (o(), k(K, { name: ce.value }, {
402
405
  default: T(() => {
403
- var c;
406
+ var u;
404
407
  return [
405
- ae.value ? (o(), i("div", {
408
+ ne.value ? (o(), i("div", {
406
409
  key: 0,
407
- class: G(["mcp-server-picker", [`popup-type-${((c = e.popupConfig) == null ? void 0 : c.type) || "fixed"}`, W.value]]),
408
- style: ge(se.value)
410
+ class: G(["mcp-server-picker", [`popup-type-${((u = e.popupConfig) == null ? void 0 : u.type) || "fixed"}`, W.value]]),
411
+ style: _e(se.value)
409
412
  }, [
410
413
  s("div", nt, [
411
- s("div", at, S(e.title), 1),
412
- s("div", it, [
414
+ s("div", it, S(e.title), 1),
415
+ s("div", st, [
413
416
  e.showCustomAddButton ? (o(), i("div", {
414
417
  key: 0,
415
418
  class: "mcp-server-picker__header-right-item",
416
419
  onClick: L
417
420
  }, [
418
- m(d(Ce), { style: { "font-size": "16px", cursor: "pointer" } }),
421
+ m(d(Pe), { class: "mcp-server-picker__icon" }),
419
422
  s("span", null, S(e.customAddButtonText), 1)
420
423
  ])) : v("", !0),
421
- m(d(ne), {
424
+ m(d(ae), {
422
425
  class: "mcp-server-picker__header-right-close",
423
426
  onClick: ie
424
427
  })
425
428
  ])
426
429
  ]),
427
- s("div", st, [
428
- m(d(ve), {
429
- modelValue: u.value,
430
- "onUpdate:modelValue": a[3] || (a[3] = (l) => u.value = l)
430
+ s("div", rt, [
431
+ m(d(fe), {
432
+ modelValue: c.value,
433
+ "onUpdate:modelValue": n[3] || (n[3] = (l) => c.value = l)
431
434
  }, {
432
435
  default: T(() => [
433
436
  e.showInstalledTab ? (o(), k(d(Y), {
@@ -436,20 +439,20 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
436
439
  name: "installed"
437
440
  }, {
438
441
  default: T(() => [
439
- e.enableSearch ? (o(), i("div", rt, [
442
+ e.enableSearch ? (o(), i("div", dt, [
440
443
  m(d(Z), {
441
444
  modelValue: f.value,
442
- "onUpdate:modelValue": a[0] || (a[0] = (l) => f.value = l),
445
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => f.value = l),
443
446
  placeholder: e.searchPlaceholder
444
447
  }, {
445
448
  suffix: T(() => [
446
- m(d(ee), { style: { "font-size": "16px", cursor: "pointer" } })
449
+ m(d(ee), { class: "mcp-server-picker__icon" })
447
450
  ]),
448
451
  _: 1
449
452
  }, 8, ["modelValue", "placeholder"])
450
453
  ])) : v("", !0),
451
- D.value ? (o(), i("div", dt, [
452
- e.loading ? (o(), i("div", ut, "加载中...")) : (o(!0), i(F, { key: 1 }, N(I.value, (l) => {
454
+ I.value ? (o(), i("div", ct, [
455
+ e.loading ? (o(), i("div", ut, "加载中...")) : (o(!0), i(F, { key: 1 }, N(D.value, (l) => {
453
456
  var P;
454
457
  return o(), k(d(te), {
455
458
  key: l.id,
@@ -457,7 +460,7 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
457
460
  mode: "installed",
458
461
  expandable: !!((P = l.tools) != null && P.length),
459
462
  onTogglePlugin: (B) => E(l, B),
460
- onToggleTool: (B, M) => n(l, B, M),
463
+ onToggleTool: (B, M) => a(l, B, M),
461
464
  onDeletePlugin: () => _(l)
462
465
  }, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
463
466
  }), 128))
@@ -474,21 +477,23 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
474
477
  name: "market"
475
478
  }, {
476
479
  default: T(() => [
477
- e.enableSearch || e.enableMarketCategoryFilter ? (o(), i("div", ct, [
478
- e.enableMarketCategoryFilter ? (o(), i("div", pt, [
479
- m(d(fe), {
480
+ e.enableSearch || e.enableMarketCategoryFilter ? (o(), i("div", pt, [
481
+ e.enableMarketCategoryFilter ? (o(), i("div", gt, [
482
+ m(d(he), {
480
483
  modelValue: C.value,
481
- "onUpdate:modelValue": a[1] || (a[1] = (l) => C.value = l),
482
- placeholder: e.marketCategoryPlaceholder
484
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => C.value = l),
485
+ placeholder: e.marketCategoryPlaceholder,
486
+ "drop-style": ue
483
487
  }, {
484
488
  default: T(() => [
485
- (o(!0), i(F, null, N(e.marketCategoryOptions, (l) => (o(), k(d(he), {
489
+ (o(!0), i(F, null, N(e.marketCategoryOptions, (l) => (o(), k(d(ye), {
486
490
  key: l.value,
487
491
  label: l.label,
488
- value: l.value
492
+ value: l.value,
493
+ class: "mcp-server-picker__content-market-header-select-option"
489
494
  }, {
490
495
  default: T(() => [
491
- _e(S(l.label), 1)
496
+ me(S(l.label), 1)
492
497
  ]),
493
498
  _: 2
494
499
  }, 1032, ["label", "value"]))), 128))
@@ -496,21 +501,21 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
496
501
  _: 1
497
502
  }, 8, ["modelValue", "placeholder"])
498
503
  ])) : v("", !0),
499
- e.enableSearch ? (o(), i("div", gt, [
504
+ e.enableSearch ? (o(), i("div", _t, [
500
505
  m(d(Z), {
501
506
  modelValue: h.value,
502
- "onUpdate:modelValue": a[2] || (a[2] = (l) => h.value = l),
507
+ "onUpdate:modelValue": n[2] || (n[2] = (l) => h.value = l),
503
508
  placeholder: w.value
504
509
  }, {
505
510
  suffix: T(() => [
506
- m(d(ee), { style: { "font-size": "16px", cursor: "pointer" } })
511
+ m(d(ee), { class: "mcp-server-picker__icon" })
507
512
  ]),
508
513
  _: 1
509
514
  }, 8, ["modelValue", "placeholder"])
510
515
  ])) : v("", !0)
511
516
  ])) : v("", !0),
512
- D.value ? (o(), i("div", _t, [
513
- e.marketLoading ? (o(), i("div", mt, "加载中...")) : (o(!0), i(F, { key: 1 }, N(x.value, (l) => (o(), k(d(te), {
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), {
514
519
  key: l.id,
515
520
  plugin: l,
516
521
  mode: "market",
@@ -529,9 +534,9 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
529
534
  _: 1
530
535
  }, 8, ["modelValue"])
531
536
  ]),
532
- m(d(Ze), {
537
+ m(d(et), {
533
538
  visible: A.value,
534
- "onUpdate:visible": a[4] || (a[4] = (l) => A.value = l),
539
+ "onUpdate:visible": n[4] || (n[4] = (l) => A.value = l),
535
540
  onConfirm: j
536
541
  }, null, 8, ["visible"])
537
542
  ], 6)) : v("", !0)
@@ -540,12 +545,12 @@ const $e = { class: "plugin-card__main" }, xe = ["src"], Be = { class: "plugin-c
540
545
  _: 1
541
546
  }, 8, ["name"]));
542
547
  }
543
- }), z = /* @__PURE__ */ q(vt, [["__scopeId", "data-v-21023081"]]);
544
- z.name = "McpServerPicker";
545
- const ft = function(g) {
546
- g.component(z.name, z);
548
+ }), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-7f8cfb42"]]);
549
+ O.name = "McpServerPicker";
550
+ const ht = function(g) {
551
+ g.component(O.name, O);
547
552
  };
548
- z.install = ft;
553
+ O.install = ht;
549
554
  export {
550
- z as default
555
+ O as default
551
556
  };