@opentiny/tiny-robot 0.3.1-alpha.3 → 0.3.1-alpha.4
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 +59 -126
- package/dist/mcp-server-picker/index.js +57 -58
- package/dist/sender/index.js +863 -1007
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -192,57 +192,6 @@ 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
|
-
|
|
246
195
|
declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
247
196
|
contentRenderers: Record<string, BubbleContentRenderer>;
|
|
248
197
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -389,7 +338,7 @@ clear: () => any;
|
|
|
389
338
|
blur: (event: FocusEvent) => any;
|
|
390
339
|
cancel: () => any;
|
|
391
340
|
focus: (event: FocusEvent) => any;
|
|
392
|
-
submit: (value: string
|
|
341
|
+
submit: (value: string) => any;
|
|
393
342
|
"update:modelValue": (value: string) => any;
|
|
394
343
|
"update:templateData": (value: UserItem[]) => any;
|
|
395
344
|
"speech-start": () => any;
|
|
@@ -400,16 +349,12 @@ submit: (value: string, templateData?: UserItem[] | undefined) => any;
|
|
|
400
349
|
"escape-press": () => any;
|
|
401
350
|
"reset-template": () => any;
|
|
402
351
|
"files-selected": (files: File[]) => any;
|
|
403
|
-
"trigger-char": (char: string, position: {
|
|
404
|
-
top: number;
|
|
405
|
-
left: number;
|
|
406
|
-
}) => any;
|
|
407
352
|
}, string, PublicProps, Readonly<SenderProps> & Readonly<{
|
|
408
353
|
onClear?: (() => any) | undefined;
|
|
409
354
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
410
355
|
onCancel?: (() => any) | undefined;
|
|
411
356
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
412
|
-
onSubmit?: ((value: string
|
|
357
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
413
358
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
414
359
|
"onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
|
|
415
360
|
"onSpeech-start"?: (() => any) | undefined;
|
|
@@ -420,10 +365,6 @@ onSubmit?: ((value: string, templateData?: UserItem[] | undefined) => any) | und
|
|
|
420
365
|
"onEscape-press"?: (() => any) | undefined;
|
|
421
366
|
"onReset-template"?: (() => any) | undefined;
|
|
422
367
|
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
423
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
424
|
-
top: number;
|
|
425
|
-
left: number;
|
|
426
|
-
}) => any) | undefined;
|
|
427
368
|
}>, {
|
|
428
369
|
disabled: boolean;
|
|
429
370
|
modelValue: string;
|
|
@@ -456,22 +397,13 @@ maxRows: number;
|
|
|
456
397
|
}> & Readonly<{
|
|
457
398
|
onSubmit?: (() => any) | undefined;
|
|
458
399
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
459
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
460
|
-
top: number;
|
|
461
|
-
left: number;
|
|
462
|
-
}) => any) | undefined;
|
|
463
400
|
}>, {
|
|
464
401
|
clearHistory: () => void;
|
|
465
402
|
activateFirstField: () => void;
|
|
466
|
-
focusToEnd: () => void;
|
|
467
403
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
468
404
|
"update:modelValue": (value: UserItem[]) => any;
|
|
469
405
|
} & {
|
|
470
406
|
submit: () => any;
|
|
471
|
-
"trigger-char": (char: string, position: {
|
|
472
|
-
top: number;
|
|
473
|
-
left: number;
|
|
474
|
-
}) => any;
|
|
475
407
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
476
408
|
editorRef: HTMLDivElement;
|
|
477
409
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -491,14 +423,9 @@ maxRows: number;
|
|
|
491
423
|
}> & Readonly<{
|
|
492
424
|
onSubmit?: (() => any) | undefined;
|
|
493
425
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
494
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
495
|
-
top: number;
|
|
496
|
-
left: number;
|
|
497
|
-
}) => any) | undefined;
|
|
498
426
|
}>, {
|
|
499
427
|
clearHistory: () => void;
|
|
500
428
|
activateFirstField: () => void;
|
|
501
|
-
focusToEnd: () => void;
|
|
502
429
|
}, {}, {}, {}, {}> | null;
|
|
503
430
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
504
431
|
_constants: {
|
|
@@ -1163,15 +1090,6 @@ declare function __VLS_template_12(): {
|
|
|
1163
1090
|
rootEl: HTMLDivElement;
|
|
1164
1091
|
};
|
|
1165
1092
|
|
|
1166
|
-
declare function __VLS_template_13(): {
|
|
1167
|
-
attrs: Partial<{}>;
|
|
1168
|
-
slots: {
|
|
1169
|
-
'header-actions'?(_: {}): any;
|
|
1170
|
-
};
|
|
1171
|
-
refs: {};
|
|
1172
|
-
rootEl: any;
|
|
1173
|
-
};
|
|
1174
|
-
|
|
1175
1093
|
declare function __VLS_template_2(): {
|
|
1176
1094
|
attrs: Partial<{}>;
|
|
1177
1095
|
slots: {
|
|
@@ -1333,22 +1251,13 @@ declare function __VLS_template_7(): {
|
|
|
1333
1251
|
}> & Readonly<{
|
|
1334
1252
|
onSubmit?: (() => any) | undefined;
|
|
1335
1253
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1336
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
1337
|
-
top: number;
|
|
1338
|
-
left: number;
|
|
1339
|
-
}) => any) | undefined;
|
|
1340
1254
|
}>, {
|
|
1341
1255
|
clearHistory: () => void;
|
|
1342
1256
|
activateFirstField: () => void;
|
|
1343
|
-
focusToEnd: () => void;
|
|
1344
1257
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1345
1258
|
"update:modelValue": (value: UserItem[]) => any;
|
|
1346
1259
|
} & {
|
|
1347
1260
|
submit: () => any;
|
|
1348
|
-
"trigger-char": (char: string, position: {
|
|
1349
|
-
top: number;
|
|
1350
|
-
left: number;
|
|
1351
|
-
}) => any;
|
|
1352
1261
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
1353
1262
|
editorRef: HTMLDivElement;
|
|
1354
1263
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -1368,14 +1277,9 @@ declare function __VLS_template_7(): {
|
|
|
1368
1277
|
}> & Readonly<{
|
|
1369
1278
|
onSubmit?: (() => any) | undefined;
|
|
1370
1279
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
1371
|
-
"onTrigger-char"?: ((char: string, position: {
|
|
1372
|
-
top: number;
|
|
1373
|
-
left: number;
|
|
1374
|
-
}) => any) | undefined;
|
|
1375
1280
|
}>, {
|
|
1376
1281
|
clearHistory: () => void;
|
|
1377
1282
|
activateFirstField: () => void;
|
|
1378
|
-
focusToEnd: () => void;
|
|
1379
1283
|
}, {}, {}, {}, {}> | null;
|
|
1380
1284
|
inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
|
|
1381
1285
|
_constants: {
|
|
@@ -1860,8 +1764,6 @@ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
|
|
|
1860
1764
|
|
|
1861
1765
|
declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
|
|
1862
1766
|
|
|
1863
|
-
declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
|
|
1864
|
-
|
|
1865
1767
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
1866
1768
|
|
|
1867
1769
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -1902,12 +1804,6 @@ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
|
|
|
1902
1804
|
};
|
|
1903
1805
|
};
|
|
1904
1806
|
|
|
1905
|
-
declare type __VLS_WithTemplateSlots_13<T, S> = T & {
|
|
1906
|
-
new (): {
|
|
1907
|
-
$slots: S;
|
|
1908
|
-
};
|
|
1909
|
-
};
|
|
1910
|
-
|
|
1911
1807
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
1912
1808
|
new (): {
|
|
1913
1809
|
$slots: S;
|
|
@@ -2023,9 +1919,10 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
|
|
|
2023
1919
|
|
|
2024
1920
|
export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
|
|
2025
1921
|
|
|
2026
|
-
declare interface
|
|
1922
|
+
declare interface BaseTextItem {
|
|
2027
1923
|
id: string;
|
|
2028
|
-
|
|
1924
|
+
type: string;
|
|
1925
|
+
content: string;
|
|
2029
1926
|
}
|
|
2030
1927
|
|
|
2031
1928
|
declare const Bubble: typeof _default_18 & {
|
|
@@ -2367,7 +2264,56 @@ declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11,
|
|
|
2367
2264
|
|
|
2368
2265
|
declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
2369
2266
|
|
|
2370
|
-
declare const _default_36:
|
|
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>;
|
|
2371
2317
|
|
|
2372
2318
|
declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2373
2319
|
cancel: () => any;
|
|
@@ -2977,7 +2923,7 @@ export declare interface RejectionReason {
|
|
|
2977
2923
|
export declare type SenderEmits = {
|
|
2978
2924
|
(e: 'update:modelValue', value: string): void;
|
|
2979
2925
|
(e: 'update:templateData', value: UserItem[]): void;
|
|
2980
|
-
(e: 'submit', value: string
|
|
2926
|
+
(e: 'submit', value: string): void;
|
|
2981
2927
|
(e: 'clear'): void;
|
|
2982
2928
|
(e: 'speech-start'): void;
|
|
2983
2929
|
(e: 'speech-end', transcript?: string): void;
|
|
@@ -2990,10 +2936,6 @@ export declare type SenderEmits = {
|
|
|
2990
2936
|
(e: 'cancel'): void;
|
|
2991
2937
|
(e: 'reset-template'): void;
|
|
2992
2938
|
(e: 'files-selected', files: File[]): void;
|
|
2993
|
-
(e: 'trigger-char', char: string, position: {
|
|
2994
|
-
top: number;
|
|
2995
|
-
left: number;
|
|
2996
|
-
}): void;
|
|
2997
2939
|
};
|
|
2998
2940
|
|
|
2999
2941
|
export declare interface SenderProps {
|
|
@@ -3215,16 +3157,14 @@ export declare interface SuggestionTextPart {
|
|
|
3215
3157
|
isMatch: boolean;
|
|
3216
3158
|
}
|
|
3217
3159
|
|
|
3218
|
-
declare interface TemplateItem extends
|
|
3160
|
+
declare interface TemplateItem extends BaseTextItem {
|
|
3219
3161
|
type: 'template';
|
|
3220
|
-
content: string;
|
|
3221
3162
|
prefix: string;
|
|
3222
3163
|
suffix: string;
|
|
3223
3164
|
}
|
|
3224
3165
|
|
|
3225
|
-
declare interface TextItem extends
|
|
3166
|
+
declare interface TextItem extends BaseTextItem {
|
|
3226
3167
|
type: 'text';
|
|
3227
|
-
content: string;
|
|
3228
3168
|
}
|
|
3229
3169
|
|
|
3230
3170
|
export declare interface ThemeProviderProps {
|
|
@@ -3269,14 +3209,7 @@ export declare interface UrlAttachment extends BaseAttachment {
|
|
|
3269
3209
|
rawFile?: File;
|
|
3270
3210
|
}
|
|
3271
3211
|
|
|
3272
|
-
export declare type UserItem = UserTextItem | UserTemplateItem
|
|
3273
|
-
|
|
3274
|
-
export declare type UserSkillItem = {
|
|
3275
|
-
id?: string;
|
|
3276
|
-
type: 'skill';
|
|
3277
|
-
label: string;
|
|
3278
|
-
value: string;
|
|
3279
|
-
};
|
|
3212
|
+
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
3280
3213
|
|
|
3281
3214
|
export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
|
|
3282
3215
|
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
|
|
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
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),
|
|
39
|
-
return c.length === 0 ? { checked: !1, indeterminate: !1 } : c.length ===
|
|
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
40
|
}), Q = (c) => {
|
|
41
|
-
h.value && e.plugin.tools.forEach((
|
|
42
|
-
|
|
41
|
+
h.value && e.plugin.tools.forEach((_) => {
|
|
42
|
+
_.enabled !== c && (_.enabled = c, r("toggle-tool", _.id, c));
|
|
43
43
|
}), r("toggle-plugin", c);
|
|
44
|
-
}, R = (c,
|
|
45
|
-
r("toggle-tool", c,
|
|
46
|
-
},
|
|
44
|
+
}, R = (c, _) => {
|
|
45
|
+
r("toggle-tool", c, _);
|
|
46
|
+
}, D = () => {
|
|
47
47
|
r("delete-plugin");
|
|
48
|
-
}, $ = g(() => e.plugin.addState || "idle"),
|
|
48
|
+
}, $ = g(() => e.plugin.addState || "idle"), I = (c) => {
|
|
49
49
|
$.value === "idle" && r("add-plugin", c);
|
|
50
|
-
},
|
|
51
|
-
return (c,
|
|
50
|
+
}, E = (c) => c ? "关闭插件" : "打开插件";
|
|
51
|
+
return (c, _) => (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
|
-
|
|
70
|
+
U(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
|
-
|
|
81
|
+
U(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
|
-
|
|
92
|
+
m(d(ve), {
|
|
93
93
|
title: "确定移除该插件吗?",
|
|
94
94
|
style: { height: "16px" },
|
|
95
95
|
type: "info",
|
|
96
|
-
onConfirm:
|
|
96
|
+
onConfirm: D,
|
|
97
97
|
trigger: "click"
|
|
98
98
|
}, {
|
|
99
99
|
reference: T(() => [
|
|
100
|
-
|
|
100
|
+
U(c.$slots, "delete-icon", {}, () => [
|
|
101
101
|
s("span", Le, [
|
|
102
|
-
|
|
102
|
+
m(d(Te), { class: "common-icon delete" })
|
|
103
103
|
])
|
|
104
104
|
], !0)
|
|
105
105
|
]),
|
|
106
106
|
_: 3
|
|
107
107
|
}),
|
|
108
|
-
|
|
109
|
-
title:
|
|
108
|
+
m(d(X), {
|
|
109
|
+
title: E(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
|
-
|
|
116
|
+
U(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:
|
|
122
|
+
onClick: _[0] || (_[0] = (y) => I(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
|
-
|
|
137
|
+
_[2] || (_[2] = s("div", { class: "plugin-card__divider" }, null, -1)),
|
|
138
138
|
(a(!0), n(F, null, N(i.plugin.tools, (y, A) => {
|
|
139
|
-
var
|
|
139
|
+
var L;
|
|
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
|
-
|
|
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
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
|
-
|
|
157
|
-
title:
|
|
156
|
+
m(d(X), {
|
|
157
|
+
title: E(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 < (((
|
|
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), [
|
|
@@ -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
|
-
|
|
196
|
+
m(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
|
-
|
|
206
|
+
m(d(oe), {
|
|
207
207
|
class: "plugin-editor__close",
|
|
208
208
|
onClick: f
|
|
209
209
|
})
|
|
210
210
|
]),
|
|
211
|
-
|
|
211
|
+
m(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
|
-
},
|
|
262
|
+
}, _t = {
|
|
263
263
|
key: 1,
|
|
264
264
|
style: { width: "264px", "flex-shrink": "0" }
|
|
265
|
-
},
|
|
265
|
+
}, mt = {
|
|
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
|
|
322
|
+
const D = 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
|
-
}),
|
|
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
|
|
335
|
+
const E = (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
|
-
},
|
|
348
|
+
}, _ = (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),
|
|
352
|
+
}, A = V(!1), L = () => {
|
|
353
353
|
A.value = !0;
|
|
354
354
|
}, j = (t, o) => {
|
|
355
355
|
r("plugin-create", t, o), A.value = !1;
|
|
@@ -408,28 +408,27 @@ 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:
|
|
411
|
+
style: _e(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),
|
|
417
416
|
e.showCustomAddButton ? (a(), n("div", {
|
|
418
417
|
key: 0,
|
|
419
418
|
class: "mcp-server-picker__header-right-item",
|
|
420
|
-
onClick:
|
|
419
|
+
onClick: L
|
|
421
420
|
}, [
|
|
422
|
-
|
|
421
|
+
m(d(Pe), { class: "mcp-server-picker__icon" }),
|
|
423
422
|
s("span", null, x(e.customAddButtonText), 1)
|
|
424
423
|
])) : v("", !0),
|
|
425
|
-
|
|
424
|
+
m(d(oe), {
|
|
426
425
|
class: "mcp-server-picker__header-right-close",
|
|
427
426
|
onClick: ie
|
|
428
427
|
})
|
|
429
428
|
])
|
|
430
429
|
]),
|
|
431
430
|
s("div", rt, [
|
|
432
|
-
|
|
431
|
+
m(d(fe), {
|
|
433
432
|
modelValue: u.value,
|
|
434
433
|
"onUpdate:modelValue": o[3] || (o[3] = (l) => u.value = l)
|
|
435
434
|
}, {
|
|
@@ -441,28 +440,28 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
441
440
|
}, {
|
|
442
441
|
default: T(() => [
|
|
443
442
|
e.enableSearch ? (a(), n("div", dt, [
|
|
444
|
-
|
|
443
|
+
m(d(Z), {
|
|
445
444
|
modelValue: f.value,
|
|
446
445
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => f.value = l),
|
|
447
446
|
placeholder: e.searchPlaceholder
|
|
448
447
|
}, {
|
|
449
448
|
suffix: T(() => [
|
|
450
|
-
|
|
449
|
+
m(d(ee), { class: "mcp-server-picker__icon" })
|
|
451
450
|
]),
|
|
452
451
|
_: 1
|
|
453
452
|
}, 8, ["modelValue", "placeholder"])
|
|
454
453
|
])) : v("", !0),
|
|
455
|
-
|
|
456
|
-
e.loading ? (a(), n("div", ut, "加载中...")) : (a(!0), n(F, { key: 1 }, N(
|
|
454
|
+
I.value ? (a(), n("div", ct, [
|
|
455
|
+
e.loading ? (a(), n("div", ut, "加载中...")) : (a(!0), n(F, { key: 1 }, N(D.value, (l) => {
|
|
457
456
|
var P;
|
|
458
457
|
return a(), k(d(te), {
|
|
459
458
|
key: l.id,
|
|
460
459
|
plugin: l,
|
|
461
460
|
mode: "installed",
|
|
462
461
|
expandable: !!((P = l.tools) != null && P.length),
|
|
463
|
-
onTogglePlugin: (B) =>
|
|
462
|
+
onTogglePlugin: (B) => E(l, B),
|
|
464
463
|
onToggleTool: (B, M) => c(l, B, M),
|
|
465
|
-
onDeletePlugin: () =>
|
|
464
|
+
onDeletePlugin: () => _(l)
|
|
466
465
|
}, null, 8, ["plugin", "expandable", "onTogglePlugin", "onToggleTool", "onDeletePlugin"]);
|
|
467
466
|
}), 128))
|
|
468
467
|
])) : (a(), k(d(le), {
|
|
@@ -480,7 +479,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
480
479
|
default: T(() => [
|
|
481
480
|
e.enableSearch || e.enableMarketCategoryFilter ? (a(), n("div", pt, [
|
|
482
481
|
e.enableMarketCategoryFilter ? (a(), n("div", gt, [
|
|
483
|
-
|
|
482
|
+
m(d(he), {
|
|
484
483
|
modelValue: C.value,
|
|
485
484
|
"onUpdate:modelValue": o[1] || (o[1] = (l) => C.value = l),
|
|
486
485
|
placeholder: e.marketCategoryPlaceholder,
|
|
@@ -494,7 +493,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
494
493
|
class: "mcp-server-picker__content-market-header-select-option"
|
|
495
494
|
}, {
|
|
496
495
|
default: T(() => [
|
|
497
|
-
|
|
496
|
+
me(x(l.label), 1)
|
|
498
497
|
]),
|
|
499
498
|
_: 2
|
|
500
499
|
}, 1032, ["label", "value"]))), 128))
|
|
@@ -502,20 +501,20 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
502
501
|
_: 1
|
|
503
502
|
}, 8, ["modelValue", "placeholder"])
|
|
504
503
|
])) : v("", !0),
|
|
505
|
-
e.enableSearch ? (a(), n("div",
|
|
506
|
-
|
|
504
|
+
e.enableSearch ? (a(), n("div", _t, [
|
|
505
|
+
m(d(Z), {
|
|
507
506
|
modelValue: h.value,
|
|
508
507
|
"onUpdate:modelValue": o[2] || (o[2] = (l) => h.value = l),
|
|
509
508
|
placeholder: w.value
|
|
510
509
|
}, {
|
|
511
510
|
suffix: T(() => [
|
|
512
|
-
|
|
511
|
+
m(d(ee), { class: "mcp-server-picker__icon" })
|
|
513
512
|
]),
|
|
514
513
|
_: 1
|
|
515
514
|
}, 8, ["modelValue", "placeholder"])
|
|
516
515
|
])) : v("", !0)
|
|
517
516
|
])) : v("", !0),
|
|
518
|
-
|
|
517
|
+
I.value ? (a(), n("div", mt, [
|
|
519
518
|
e.marketLoading ? (a(), n("div", vt, "加载中...")) : (a(!0), n(F, { key: 1 }, N($.value, (l) => (a(), k(d(te), {
|
|
520
519
|
key: l.id,
|
|
521
520
|
plugin: l,
|
|
@@ -535,7 +534,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
535
534
|
_: 1
|
|
536
535
|
}, 8, ["modelValue"])
|
|
537
536
|
]),
|
|
538
|
-
|
|
537
|
+
m(d(et), {
|
|
539
538
|
visible: A.value,
|
|
540
539
|
"onUpdate:visible": o[4] || (o[4] = (l) => A.value = l),
|
|
541
540
|
onConfirm: j
|
|
@@ -543,10 +542,10 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
543
542
|
], 6)) : v("", !0)
|
|
544
543
|
];
|
|
545
544
|
}),
|
|
546
|
-
_:
|
|
545
|
+
_: 1
|
|
547
546
|
}, 8, ["name"]));
|
|
548
547
|
}
|
|
549
|
-
}), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-
|
|
548
|
+
}), O = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-7f8cfb42"]]);
|
|
550
549
|
O.name = "McpServerPicker";
|
|
551
550
|
const ht = function(i) {
|
|
552
551
|
i.component(O.name, O);
|