@opentiny/tiny-robot 0.3.0 → 0.3.1-alpha.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.
package/dist/index.d.ts CHANGED
@@ -192,6 +192,57 @@ declare const __VLS_component_12: DefineComponent<WelcomeProps, {}, {}, {}, {},
192
192
  align: "left" | "center" | "right" | string;
193
193
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
194
194
 
195
+ declare const __VLS_component_13: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
196
+ "update:visible": (value: boolean) => any;
197
+ } & {
198
+ refresh: (tab: "installed" | "market") => any;
199
+ "update:visible": (visible: boolean) => any;
200
+ "market-category-change": (category: string) => any;
201
+ "tab-change": (activeTab: "installed" | "market") => any;
202
+ "plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
203
+ "plugin-delete": (plugin: PluginInfo) => any;
204
+ "plugin-add": (plugin: PluginInfo) => any;
205
+ "plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
206
+ "tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
207
+ "update:activeCount": (count: number) => any;
208
+ }, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
209
+ onRefresh?: ((tab: "installed" | "market") => any) | undefined;
210
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
211
+ "onMarket-category-change"?: ((category: string) => any) | undefined;
212
+ "onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
213
+ "onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
214
+ "onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
215
+ "onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
216
+ "onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
217
+ "onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
218
+ "onUpdate:activeCount"?: ((count: number) => any) | undefined;
219
+ }>, {
220
+ title: string;
221
+ loading: boolean;
222
+ installedPlugins: PluginInfo[];
223
+ marketPlugins: PluginInfo[];
224
+ searchPlaceholder: string;
225
+ enableSearch: boolean;
226
+ installedSearchFn: (query: string, item: PluginInfo) => boolean;
227
+ marketSearchFn: (query: string, item: PluginInfo) => boolean;
228
+ marketCategoryOptions: MarketCategoryOption[];
229
+ marketCategoryPlaceholder: string;
230
+ enableMarketCategoryFilter: boolean;
231
+ defaultActiveTab: "installed" | "market";
232
+ showInstalledTab: boolean;
233
+ showMarketTab: boolean;
234
+ popupConfig: PopupConfig;
235
+ installedTabTitle: string;
236
+ marketTabTitle: string;
237
+ showCustomAddButton: boolean;
238
+ customAddButtonText: string;
239
+ allowPluginToggle: boolean;
240
+ allowToolToggle: boolean;
241
+ allowPluginDelete: boolean;
242
+ allowPluginAdd: boolean;
243
+ marketLoading: boolean;
244
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
245
+
195
246
  declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
196
247
  contentRenderers: Record<string, BubbleContentRenderer>;
197
248
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -338,7 +389,7 @@ clear: () => any;
338
389
  blur: (event: FocusEvent) => any;
339
390
  cancel: () => any;
340
391
  focus: (event: FocusEvent) => any;
341
- submit: (value: string) => any;
392
+ submit: (value: string, templateData?: UserItem[] | undefined) => any;
342
393
  "update:modelValue": (value: string) => any;
343
394
  "update:templateData": (value: UserItem[]) => any;
344
395
  "speech-start": () => any;
@@ -349,12 +400,16 @@ submit: (value: string) => any;
349
400
  "escape-press": () => any;
350
401
  "reset-template": () => any;
351
402
  "files-selected": (files: File[]) => any;
403
+ "trigger-char": (char: string, position: {
404
+ top: number;
405
+ left: number;
406
+ }) => any;
352
407
  }, string, PublicProps, Readonly<SenderProps> & Readonly<{
353
408
  onClear?: (() => any) | undefined;
354
409
  onBlur?: ((event: FocusEvent) => any) | undefined;
355
410
  onCancel?: (() => any) | undefined;
356
411
  onFocus?: ((event: FocusEvent) => any) | undefined;
357
- onSubmit?: ((value: string) => any) | undefined;
412
+ onSubmit?: ((value: string, templateData?: UserItem[] | undefined) => any) | undefined;
358
413
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
359
414
  "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
360
415
  "onSpeech-start"?: (() => any) | undefined;
@@ -365,6 +420,10 @@ onSubmit?: ((value: string) => any) | undefined;
365
420
  "onEscape-press"?: (() => any) | undefined;
366
421
  "onReset-template"?: (() => any) | undefined;
367
422
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
423
+ "onTrigger-char"?: ((char: string, position: {
424
+ top: number;
425
+ left: number;
426
+ }) => any) | undefined;
368
427
  }>, {
369
428
  disabled: boolean;
370
429
  modelValue: string;
@@ -397,13 +456,22 @@ maxRows: number;
397
456
  }> & Readonly<{
398
457
  onSubmit?: (() => any) | undefined;
399
458
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
459
+ "onTrigger-char"?: ((char: string, position: {
460
+ top: number;
461
+ left: number;
462
+ }) => any) | undefined;
400
463
  }>, {
401
464
  clearHistory: () => void;
402
465
  activateFirstField: () => void;
466
+ focusToEnd: () => void;
403
467
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
404
468
  "update:modelValue": (value: UserItem[]) => any;
405
469
  } & {
406
470
  submit: () => any;
471
+ "trigger-char": (char: string, position: {
472
+ top: number;
473
+ left: number;
474
+ }) => any;
407
475
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
408
476
  editorRef: HTMLDivElement;
409
477
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -423,9 +491,14 @@ maxRows: number;
423
491
  }> & Readonly<{
424
492
  onSubmit?: (() => any) | undefined;
425
493
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
494
+ "onTrigger-char"?: ((char: string, position: {
495
+ top: number;
496
+ left: number;
497
+ }) => any) | undefined;
426
498
  }>, {
427
499
  clearHistory: () => void;
428
500
  activateFirstField: () => void;
501
+ focusToEnd: () => void;
429
502
  }, {}, {}, {}, {}> | null;
430
503
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
431
504
  _constants: {
@@ -1090,6 +1163,15 @@ declare function __VLS_template_12(): {
1090
1163
  rootEl: HTMLDivElement;
1091
1164
  };
1092
1165
 
1166
+ declare function __VLS_template_13(): {
1167
+ attrs: Partial<{}>;
1168
+ slots: {
1169
+ 'header-actions'?(_: {}): any;
1170
+ };
1171
+ refs: {};
1172
+ rootEl: any;
1173
+ };
1174
+
1093
1175
  declare function __VLS_template_2(): {
1094
1176
  attrs: Partial<{}>;
1095
1177
  slots: {
@@ -1251,13 +1333,22 @@ declare function __VLS_template_7(): {
1251
1333
  }> & Readonly<{
1252
1334
  onSubmit?: (() => any) | undefined;
1253
1335
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1336
+ "onTrigger-char"?: ((char: string, position: {
1337
+ top: number;
1338
+ left: number;
1339
+ }) => any) | undefined;
1254
1340
  }>, {
1255
1341
  clearHistory: () => void;
1256
1342
  activateFirstField: () => void;
1343
+ focusToEnd: () => void;
1257
1344
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1258
1345
  "update:modelValue": (value: UserItem[]) => any;
1259
1346
  } & {
1260
1347
  submit: () => any;
1348
+ "trigger-char": (char: string, position: {
1349
+ top: number;
1350
+ left: number;
1351
+ }) => any;
1261
1352
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1262
1353
  editorRef: HTMLDivElement;
1263
1354
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -1277,9 +1368,14 @@ declare function __VLS_template_7(): {
1277
1368
  }> & Readonly<{
1278
1369
  onSubmit?: (() => any) | undefined;
1279
1370
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1371
+ "onTrigger-char"?: ((char: string, position: {
1372
+ top: number;
1373
+ left: number;
1374
+ }) => any) | undefined;
1280
1375
  }>, {
1281
1376
  clearHistory: () => void;
1282
1377
  activateFirstField: () => void;
1378
+ focusToEnd: () => void;
1283
1379
  }, {}, {}, {}, {}> | null;
1284
1380
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1285
1381
  _constants: {
@@ -1764,6 +1860,8 @@ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
1764
1860
 
1765
1861
  declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1766
1862
 
1863
+ declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
1864
+
1767
1865
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1768
1866
 
1769
1867
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1804,6 +1902,12 @@ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
1804
1902
  };
1805
1903
  };
1806
1904
 
1905
+ declare type __VLS_WithTemplateSlots_13<T, S> = T & {
1906
+ new (): {
1907
+ $slots: S;
1908
+ };
1909
+ };
1910
+
1807
1911
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1808
1912
  new (): {
1809
1913
  $slots: S;
@@ -1919,10 +2023,9 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
1919
2023
 
1920
2024
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
1921
2025
 
1922
- declare interface BaseTextItem {
2026
+ declare interface BaseItem {
1923
2027
  id: string;
1924
- type: string;
1925
- content: string;
2028
+ readonly?: boolean;
1926
2029
  }
1927
2030
 
1928
2031
  declare const Bubble: typeof _default_18 & {
@@ -2264,56 +2367,7 @@ declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11,
2264
2367
 
2265
2368
  declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2266
2369
 
2267
- declare const _default_36: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2268
- "update:visible": (value: boolean) => any;
2269
- } & {
2270
- refresh: (tab: "installed" | "market") => any;
2271
- "update:visible": (visible: boolean) => any;
2272
- "market-category-change": (category: string) => any;
2273
- "tab-change": (activeTab: "installed" | "market") => any;
2274
- "plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
2275
- "plugin-delete": (plugin: PluginInfo) => any;
2276
- "plugin-add": (plugin: PluginInfo) => any;
2277
- "plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
2278
- "tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
2279
- "update:activeCount": (count: number) => any;
2280
- }, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
2281
- onRefresh?: ((tab: "installed" | "market") => any) | undefined;
2282
- "onUpdate:visible"?: ((value: boolean) => any) | undefined;
2283
- "onMarket-category-change"?: ((category: string) => any) | undefined;
2284
- "onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
2285
- "onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
2286
- "onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
2287
- "onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
2288
- "onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
2289
- "onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
2290
- "onUpdate:activeCount"?: ((count: number) => any) | undefined;
2291
- }>, {
2292
- title: string;
2293
- loading: boolean;
2294
- installedPlugins: PluginInfo[];
2295
- marketPlugins: PluginInfo[];
2296
- searchPlaceholder: string;
2297
- enableSearch: boolean;
2298
- installedSearchFn: (query: string, item: PluginInfo) => boolean;
2299
- marketSearchFn: (query: string, item: PluginInfo) => boolean;
2300
- marketCategoryOptions: MarketCategoryOption[];
2301
- marketCategoryPlaceholder: string;
2302
- enableMarketCategoryFilter: boolean;
2303
- defaultActiveTab: "installed" | "market";
2304
- showInstalledTab: boolean;
2305
- showMarketTab: boolean;
2306
- popupConfig: PopupConfig;
2307
- installedTabTitle: string;
2308
- marketTabTitle: string;
2309
- showCustomAddButton: boolean;
2310
- customAddButtonText: string;
2311
- allowPluginToggle: boolean;
2312
- allowToolToggle: boolean;
2313
- allowPluginDelete: boolean;
2314
- allowPluginAdd: boolean;
2315
- marketLoading: boolean;
2316
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2370
+ declare const _default_36: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2317
2371
 
2318
2372
  declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2319
2373
  cancel: () => any;
@@ -2923,7 +2977,7 @@ export declare interface RejectionReason {
2923
2977
  export declare type SenderEmits = {
2924
2978
  (e: 'update:modelValue', value: string): void;
2925
2979
  (e: 'update:templateData', value: UserItem[]): void;
2926
- (e: 'submit', value: string): void;
2980
+ (e: 'submit', value: string, templateData?: UserItem[]): void;
2927
2981
  (e: 'clear'): void;
2928
2982
  (e: 'speech-start'): void;
2929
2983
  (e: 'speech-end', transcript?: string): void;
@@ -2936,6 +2990,10 @@ export declare type SenderEmits = {
2936
2990
  (e: 'cancel'): void;
2937
2991
  (e: 'reset-template'): void;
2938
2992
  (e: 'files-selected', files: File[]): void;
2993
+ (e: 'trigger-char', char: string, position: {
2994
+ top: number;
2995
+ left: number;
2996
+ }): void;
2939
2997
  };
2940
2998
 
2941
2999
  export declare interface SenderProps {
@@ -3157,14 +3215,16 @@ export declare interface SuggestionTextPart {
3157
3215
  isMatch: boolean;
3158
3216
  }
3159
3217
 
3160
- declare interface TemplateItem extends BaseTextItem {
3218
+ declare interface TemplateItem extends BaseItem {
3161
3219
  type: 'template';
3220
+ content: string;
3162
3221
  prefix: string;
3163
3222
  suffix: string;
3164
3223
  }
3165
3224
 
3166
- declare interface TextItem extends BaseTextItem {
3225
+ declare interface TextItem extends BaseItem {
3167
3226
  type: 'text';
3227
+ content: string;
3168
3228
  }
3169
3229
 
3170
3230
  export declare interface ThemeProviderProps {
@@ -3209,7 +3269,14 @@ export declare interface UrlAttachment extends BaseAttachment {
3209
3269
  rawFile?: File;
3210
3270
  }
3211
3271
 
3212
- export declare type UserItem = UserTextItem | UserTemplateItem;
3272
+ export declare type UserItem = UserTextItem | UserTemplateItem | UserSkillItem;
3273
+
3274
+ export declare type UserSkillItem = {
3275
+ id?: string;
3276
+ type: 'skill';
3277
+ label: string;
3278
+ value: string;
3279
+ };
3213
3280
 
3214
3281
  export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3215
3282
  id?: TemplateItem['id'];
@@ -1,4 +1,4 @@
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";
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 D, Fragment as F, unref as d, createVNode as _, 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 me, createTextVNode as _e } 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
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";
@@ -35,20 +35,20 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
35
35
  }, S = g(() => {
36
36
  if (!h.value)
37
37
  return { checked: e.plugin.enabled || !1, indeterminate: !1 };
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 };
38
+ const c = e.plugin.tools.filter((y) => y.enabled), m = e.plugin.tools.length;
39
+ return c.length === 0 ? { checked: !1, indeterminate: !1 } : c.length === m ? { checked: !0, indeterminate: !1 } : { checked: !0, indeterminate: !0 };
40
40
  }), Q = (c) => {
41
- h.value && e.plugin.tools.forEach((_) => {
42
- _.enabled !== c && (_.enabled = c, r("toggle-tool", _.id, c));
41
+ h.value && e.plugin.tools.forEach((m) => {
42
+ m.enabled !== c && (m.enabled = c, r("toggle-tool", m.id, c));
43
43
  }), r("toggle-plugin", c);
44
- }, R = (c, _) => {
45
- r("toggle-tool", c, _);
46
- }, D = () => {
44
+ }, R = (c, m) => {
45
+ r("toggle-tool", c, m);
46
+ }, I = () => {
47
47
  r("delete-plugin");
48
- }, $ = g(() => e.plugin.addState || "idle"), I = (c) => {
48
+ }, $ = g(() => e.plugin.addState || "idle"), E = (c) => {
49
49
  $.value === "idle" && r("add-plugin", c);
50
- }, E = (c) => c ? "关闭插件" : "打开插件";
51
- return (c, _) => (a(), n("div", {
50
+ }, L = (c) => c ? "关闭插件" : "打开插件";
51
+ return (c, m) => (a(), n("div", {
52
52
  class: G(["plugin-card", C.value])
53
53
  }, [
54
54
  s("div", $e, [
@@ -67,7 +67,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
67
67
  }, x(i.plugin.description), 9, De)
68
68
  ]),
69
69
  s("div", Ie, [
70
- U(c.$slots, "actions", {
70
+ D(c.$slots, "actions", {
71
71
  plugin: i.plugin,
72
72
  expanded: u.value,
73
73
  mode: i.mode
@@ -78,7 +78,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
78
78
  class: "plugin-card__expand",
79
79
  onClick: w
80
80
  }, [
81
- U(c.$slots, "expand-icon", { expanded: u.value }, () => [
81
+ D(c.$slots, "expand-icon", { expanded: u.value }, () => [
82
82
  u.value ? (a(), k(d(be), {
83
83
  key: 1,
84
84
  class: "common-icon"
@@ -89,37 +89,37 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
89
89
  ], !0)
90
90
  ])) : v("", !0),
91
91
  s("div", Ee, [
92
- m(d(ve), {
92
+ _(d(ve), {
93
93
  title: "确定移除该插件吗?",
94
94
  style: { height: "16px" },
95
95
  type: "info",
96
- onConfirm: D,
96
+ onConfirm: I,
97
97
  trigger: "click"
98
98
  }, {
99
99
  reference: T(() => [
100
- U(c.$slots, "delete-icon", {}, () => [
100
+ D(c.$slots, "delete-icon", {}, () => [
101
101
  s("span", Le, [
102
- m(d(Te), { class: "common-icon delete" })
102
+ _(d(Te), { class: "common-icon delete" })
103
103
  ])
104
104
  ], !0)
105
105
  ]),
106
106
  _: 3
107
107
  }),
108
- m(d(X), {
109
- title: E(S.value.checked),
108
+ _(d(X), {
109
+ title: L(S.value.checked),
110
110
  "model-value": S.value.checked,
111
111
  indeterminate: S.value.indeterminate,
112
112
  "onUpdate:modelValue": Q
113
113
  }, null, 8, ["title", "model-value", "indeterminate"])
114
114
  ])
115
115
  ], 64)) : i.mode === "market" ? (a(), n("div", Ue, [
116
- U(c.$slots, "add-button", {}, () => [
116
+ D(c.$slots, "add-button", {}, () => [
117
117
  s("div", {
118
118
  class: G(["plugin-card__add-button", {
119
119
  "plugin-card__add-button--loading": $.value === "loading",
120
120
  "plugin-card__add-button--added": $.value === "added"
121
121
  }]),
122
- onClick: _[0] || (_[0] = (y) => I(i.plugin))
122
+ onClick: m[0] || (m[0] = (y) => E(i.plugin))
123
123
  }, [
124
124
  $.value === "idle" ? (a(), n("span", Ne, "添加")) : $.value === "loading" ? (a(), n("span", Oe, "添加中")) : (a(), n("span", qe, "已添加"))
125
125
  ], 2)
@@ -134,15 +134,15 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
134
134
  }, {
135
135
  default: T(() => [
136
136
  pe(s("div", ze, [
137
- _[2] || (_[2] = s("div", { class: "plugin-card__divider" }, null, -1)),
137
+ m[2] || (m[2] = s("div", { class: "plugin-card__divider" }, null, -1)),
138
138
  (a(!0), n(F, null, N(i.plugin.tools, (y, A) => {
139
- var L;
139
+ var U;
140
140
  return a(), n("div", {
141
141
  key: y.id,
142
142
  class: "plugin-card__tool-item"
143
143
  }, [
144
144
  s("div", Qe, [
145
- _[1] || (_[1] = s("div", { class: "plugin-card__icon plugin-card__icon--placeholder" }, null, -1)),
145
+ m[1] || (m[1] = s("div", { class: "plugin-card__icon plugin-card__icon--placeholder" }, null, -1)),
146
146
  s("div", Re, [
147
147
  s("div", je, [
148
148
  s("span", He, x(y.name), 1)
@@ -153,14 +153,14 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
153
153
  }, x(y.description), 9, Ge)
154
154
  ]),
155
155
  s("div", Je, [
156
- m(d(X), {
157
- title: E(y.enabled),
156
+ _(d(X), {
157
+ title: L(y.enabled),
158
158
  "model-value": y.enabled,
159
159
  "onUpdate:modelValue": (j) => R(y.id, j)
160
160
  }, null, 8, ["title", "model-value", "onUpdate:modelValue"])
161
161
  ])
162
162
  ]),
163
- A < (((L = i.plugin.tools) == null ? void 0 : L.length) || 0) - 1 ? (a(), n("div", Ke)) : v("", !0)
163
+ A < (((U = i.plugin.tools) == null ? void 0 : U.length) || 0) - 1 ? (a(), n("div", Ke)) : v("", !0)
164
164
  ]);
165
165
  }), 128))
166
166
  ], 512), [
@@ -193,7 +193,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
193
193
  };
194
194
  return (C, w) => (a(), n(F, null, [
195
195
  r.value ? (a(), n("div", Xe)) : v("", !0),
196
- m(K, { name: "plugin-editor" }, {
196
+ _(K, { name: "plugin-editor" }, {
197
197
  default: T(() => [
198
198
  r.value ? (a(), n("div", {
199
199
  key: 0,
@@ -203,12 +203,12 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
203
203
  }, [
204
204
  s("div", Ye, [
205
205
  w[0] || (w[0] = s("h3", { class: "plugin-editor__title" }, "添加插件", -1)),
206
- m(d(oe), {
206
+ _(d(oe), {
207
207
  class: "plugin-editor__close",
208
208
  onClick: f
209
209
  })
210
210
  ]),
211
- m(d(Se), {
211
+ _(d(Se), {
212
212
  onConfirm: h,
213
213
  onCancel: f
214
214
  })
@@ -259,10 +259,10 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
259
259
  }, gt = {
260
260
  key: 0,
261
261
  style: { width: "168px" }
262
- }, _t = {
262
+ }, mt = {
263
263
  key: 1,
264
264
  style: { width: "264px", "flex-shrink": "0" }
265
- }, mt = {
265
+ }, _t = {
266
266
  key: 1,
267
267
  class: "mcp-server-picker__content-list"
268
268
  }, vt = {
@@ -319,7 +319,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
319
319
  ), H(u, (t, o) => {
320
320
  t !== o && r("tab-change", t);
321
321
  });
322
- const D = g(() => S.value.filter((t) => e.installedSearchFn(f.value, t))), $ = g(() => {
322
+ const I = g(() => S.value.filter((t) => e.installedSearchFn(f.value, t))), $ = g(() => {
323
323
  const { category: t, search: o } = {
324
324
  category: C.value,
325
325
  search: h.value
@@ -328,11 +328,11 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
328
328
  return P && B;
329
329
  };
330
330
  return Q.value.filter(p);
331
- }), I = g(() => u.value === "installed" ? D.value.length > 0 : $.value.length > 0);
331
+ }), E = g(() => u.value === "installed" ? I.value.length > 0 : $.value.length > 0);
332
332
  H(C, (t) => {
333
333
  r("market-category-change", t);
334
334
  });
335
- const E = (t, o) => {
335
+ const L = (t, o) => {
336
336
  var p;
337
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);
@@ -345,11 +345,11 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
345
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
- }, _ = (t) => {
348
+ }, m = (t) => {
349
349
  e.allowPluginDelete && r("plugin-delete", t);
350
350
  }, y = (t) => {
351
351
  e.allowPluginAdd && r("plugin-add", t);
352
- }, A = V(!1), L = () => {
352
+ }, A = V(!1), U = () => {
353
353
  A.value = !0;
354
354
  }, j = (t, o) => {
355
355
  r("plugin-create", t, o), A.value = !1;
@@ -408,27 +408,28 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
408
408
  ne.value ? (a(), n("div", {
409
409
  key: 0,
410
410
  class: G(["mcp-server-picker", [`popup-type-${((p = e.popupConfig) == null ? void 0 : p.type) || "fixed"}`, W.value]]),
411
- style: _e(se.value)
411
+ style: me(se.value)
412
412
  }, [
413
413
  s("div", nt, [
414
414
  s("div", it, x(e.title), 1),
415
415
  s("div", st, [
416
+ D(t.$slots, "header-actions", {}, void 0, !0),
416
417
  e.showCustomAddButton ? (a(), n("div", {
417
418
  key: 0,
418
419
  class: "mcp-server-picker__header-right-item",
419
- onClick: L
420
+ onClick: U
420
421
  }, [
421
- m(d(Pe), { class: "mcp-server-picker__icon" }),
422
+ _(d(Pe), { class: "mcp-server-picker__icon" }),
422
423
  s("span", null, x(e.customAddButtonText), 1)
423
424
  ])) : v("", !0),
424
- m(d(oe), {
425
+ _(d(oe), {
425
426
  class: "mcp-server-picker__header-right-close",
426
427
  onClick: ie
427
428
  })
428
429
  ])
429
430
  ]),
430
431
  s("div", rt, [
431
- m(d(fe), {
432
+ _(d(fe), {
432
433
  modelValue: u.value,
433
434
  "onUpdate:modelValue": o[3] || (o[3] = (l) => u.value = l)
434
435
  }, {
@@ -440,28 +441,28 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
440
441
  }, {
441
442
  default: T(() => [
442
443
  e.enableSearch ? (a(), n("div", dt, [
443
- m(d(Z), {
444
+ _(d(Z), {
444
445
  modelValue: f.value,
445
446
  "onUpdate:modelValue": o[0] || (o[0] = (l) => f.value = l),
446
447
  placeholder: e.searchPlaceholder
447
448
  }, {
448
449
  suffix: T(() => [
449
- m(d(ee), { class: "mcp-server-picker__icon" })
450
+ _(d(ee), { class: "mcp-server-picker__icon" })
450
451
  ]),
451
452
  _: 1
452
453
  }, 8, ["modelValue", "placeholder"])
453
454
  ])) : v("", !0),
454
- I.value ? (a(), n("div", ct, [
455
- e.loading ? (a(), n("div", ut, "加载中...")) : (a(!0), n(F, { key: 1 }, N(D.value, (l) => {
455
+ E.value ? (a(), n("div", ct, [
456
+ e.loading ? (a(), n("div", ut, "加载中...")) : (a(!0), n(F, { key: 1 }, N(I.value, (l) => {
456
457
  var P;
457
458
  return a(), k(d(te), {
458
459
  key: l.id,
459
460
  plugin: l,
460
461
  mode: "installed",
461
462
  expandable: !!((P = l.tools) != null && P.length),
462
- onTogglePlugin: (B) => E(l, B),
463
+ onTogglePlugin: (B) => L(l, B),
463
464
  onToggleTool: (B, M) => c(l, B, M),
464
- onDeletePlugin: () => _(l)
465
+ onDeletePlugin: () => m(l)
465
466
  }, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
466
467
  }), 128))
467
468
  ])) : (a(), k(d(le), {
@@ -479,7 +480,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
479
480
  default: T(() => [
480
481
  e.enableSearch || e.enableMarketCategoryFilter ? (a(), n("div", pt, [
481
482
  e.enableMarketCategoryFilter ? (a(), n("div", gt, [
482
- m(d(he), {
483
+ _(d(he), {
483
484
  modelValue: C.value,
484
485
  "onUpdate:modelValue": o[1] || (o[1] = (l) => C.value = l),
485
486
  placeholder: e.marketCategoryPlaceholder,
@@ -493,7 +494,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
493
494
  class: "mcp-server-picker__content-market-header-select-option"
494
495
  }, {
495
496
  default: T(() => [
496
- me(x(l.label), 1)
497
+ _e(x(l.label), 1)
497
498
  ]),
498
499
  _: 2
499
500
  }, 1032, ["label", "value"]))), 128))
@@ -501,20 +502,20 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
501
502
  _: 1
502
503
  }, 8, ["modelValue", "placeholder"])
503
504
  ])) : v("", !0),
504
- e.enableSearch ? (a(), n("div", _t, [
505
- m(d(Z), {
505
+ e.enableSearch ? (a(), n("div", mt, [
506
+ _(d(Z), {
506
507
  modelValue: h.value,
507
508
  "onUpdate:modelValue": o[2] || (o[2] = (l) => h.value = l),
508
509
  placeholder: w.value
509
510
  }, {
510
511
  suffix: T(() => [
511
- m(d(ee), { class: "mcp-server-picker__icon" })
512
+ _(d(ee), { class: "mcp-server-picker__icon" })
512
513
  ]),
513
514
  _: 1
514
515
  }, 8, ["modelValue", "placeholder"])
515
516
  ])) : v("", !0)
516
517
  ])) : v("", !0),
517
- I.value ? (a(), n("div", mt, [
518
+ E.value ? (a(), n("div", _t, [
518
519
  e.marketLoading ? (a(), n("div", vt, "加载中...")) : (a(!0), n(F, { key: 1 }, N($.value, (l) => (a(), k(d(te), {
519
520
  key: l.id,
520
521
  plugin: l,
@@ -534,7 +535,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
534
535
  _: 1
535
536
  }, 8, ["modelValue"])
536
537
  ]),
537
- m(d(et), {
538
+ _(d(et), {
538
539
  visible: A.value,
539
540
  "onUpdate:visible": o[4] || (o[4] = (l) => A.value = l),
540
541
  onConfirm: j
@@ -542,10 +543,10 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
542
543
  ], 6)) : v("", !0)
543
544
  ];
544
545
  }),
545
- _: 1
546
+ _: 3
546
547
  }, 8, ["name"]));
547
548
  }
548
- }), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-7f8cfb42"]]);
549
+ }), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-1708103a"]]);
549
550
  O.name = "McpServerPicker";
550
551
  const ht = function(i) {
551
552
  i.component(O.name, O);