@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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { AllowedComponentProps } from 'vue';
2
2
  import { App } from 'vue';
3
- import { AutoSize as AutoSize_2 } from './index.type';
4
- import { BubbleContentItem as BubbleContentItem_2 } from './renderers';
5
3
  import { Component } from 'vue';
6
4
  import { ComponentCustomProperties } from 'vue';
7
5
  import { ComponentCustomProps } from 'vue';
@@ -17,14 +15,9 @@ import { CSSProperties } from 'vue';
17
15
  import { DebuggerEvent } from 'vue';
18
16
  import { DefineComponent } from 'vue';
19
17
  import { Directive } from 'vue';
20
- import { DisplayVariant as DisplayVariant_2 } from './index.type';
21
18
  import { ExtractPropTypes } from 'vue';
22
- import { FileTypeMatcher as FileTypeMatcher_2 } from './index.type';
23
19
  import { GlobalComponents } from 'vue';
24
20
  import { GlobalDirectives } from 'vue';
25
- import { InputMode as InputMode_2 } from './index.type';
26
- import { ISuggestionItem as ISuggestionItem_2 } from './index.type';
27
- import { MarketCategoryOption as MarketCategoryOption_2 } from './index.type';
28
21
  import { nextTick } from 'vue';
29
22
  import { OnCleanup } from '@vue/reactivity';
30
23
  import { Options } from 'markdown-it';
@@ -35,9 +28,6 @@ import { RendererElement } from 'vue';
35
28
  import { RendererNode } from 'vue';
36
29
  import { ShallowUnwrapRef } from 'vue';
37
30
  import { Slot } from 'vue';
38
- import { SubmitTrigger as SubmitTrigger_2 } from './index.type';
39
- import { ThemeType as ThemeType_2 } from './index.type';
40
- import { TooltipContentProps } from './components/Tooltip.vue';
41
31
  import { TransitionProps } from 'vue';
42
32
  import { VNode } from 'vue';
43
33
  import { VNodeProps } from 'vue';
@@ -45,7 +35,7 @@ import { WatchOptions } from 'vue';
45
35
  import { WatchStopHandle } from 'vue';
46
36
 
47
37
  declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProps> & Readonly<{}>, {
48
- content: string | BubbleContentItem_2[];
38
+ content: string | BubbleContentItem[];
49
39
  placement: "start" | "end";
50
40
  shape: "rounded" | "corner";
51
41
  abortedText: string;
@@ -379,20 +369,20 @@ onSubmit?: ((value: string) => any) | undefined;
379
369
  disabled: boolean;
380
370
  modelValue: string;
381
371
  placeholder: string;
382
- mode: InputMode_2;
372
+ mode: InputMode;
383
373
  loading: boolean;
384
374
  autofocus: boolean;
385
- clearable: boolean;
386
- showWordLimit: boolean;
387
375
  allowSpeech: boolean;
388
376
  allowFiles: boolean;
389
- submitType: SubmitTrigger_2;
377
+ submitType: SubmitTrigger;
390
378
  stopText: string;
391
- suggestions: ISuggestionItem_2[];
392
- autoSize: AutoSize_2;
379
+ suggestions: ISuggestionItem[];
380
+ autoSize: AutoSize;
381
+ clearable: boolean;
393
382
  maxLength: number;
383
+ showWordLimit: boolean;
394
384
  suggestionPopupWidth: string | number;
395
- theme: ThemeType_2;
385
+ theme: ThemeType;
396
386
  templateData: UserItem[];
397
387
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
398
388
  senderRef: HTMLDivElement;
@@ -902,6 +892,10 @@ floatingItemsRef: HTMLDivElement;
902
892
  floatingMaybeItemRefs: unknown[];
903
893
  }, HTMLDivElement>;
904
894
 
895
+ declare type __VLS_PrettifyLocal<T> = {
896
+ [K in keyof T]: T[K];
897
+ } & {};
898
+
905
899
  declare type __VLS_Props = {
906
900
  contentRenderers?: Record<string, BubbleContentRenderer>;
907
901
  };
@@ -1904,15 +1898,6 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
1904
1898
 
1905
1899
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
1906
1900
 
1907
- declare interface BaseHistoryProps {
1908
- activeTab?: string;
1909
- searchBar?: boolean;
1910
- searchQuery?: string;
1911
- searchPlaceholder?: string;
1912
- searchFn?: (query: string, item: HistoryItem) => boolean;
1913
- selected?: string;
1914
- }
1915
-
1916
1901
  declare interface BaseTextItem {
1917
1902
  id: string;
1918
1903
  type: string;
@@ -2101,44 +2086,44 @@ declare const _default: {
2101
2086
  };
2102
2087
  export default _default;
2103
2088
 
2104
- declare const _default_10: typeof _default_29 & {
2105
- install: typeof install_8;
2089
+ declare const _default_10: typeof _default_30 & {
2090
+ install: typeof install_9;
2106
2091
  };
2107
2092
  export { _default_10 as Sender }
2108
2093
  export { _default_10 as TrSender }
2109
2094
 
2110
- declare const _default_11: typeof _default_31 & {
2111
- install: typeof install_9;
2095
+ declare const _default_11: typeof _default_32 & {
2096
+ install: typeof install_10;
2112
2097
  };
2113
2098
  export { _default_11 as SuggestionPills }
2114
2099
  export { _default_11 as TrSuggestionPills }
2115
2100
 
2116
- declare const _default_12: typeof _default_32 & {
2117
- install: typeof install_10;
2101
+ declare const _default_12: typeof _default_33 & {
2102
+ install: typeof install_11;
2118
2103
  };
2119
2104
  export { _default_12 as SuggestionPopover }
2120
2105
  export { _default_12 as TrSuggestionPopover }
2121
2106
 
2122
- declare const _default_13: typeof _default_33 & {
2123
- install: typeof install_11;
2107
+ declare const _default_13: typeof _default_34 & {
2108
+ install: typeof install_12;
2124
2109
  };
2125
2110
  export { _default_13 as ThemeProvider }
2126
2111
  export { _default_13 as TrThemeProvider }
2127
2112
 
2128
- declare const _default_14: typeof _default_34 & {
2129
- install: typeof install_12;
2113
+ declare const _default_14: typeof _default_35 & {
2114
+ install: typeof install_13;
2130
2115
  };
2131
2116
  export { _default_14 as TrWelcome }
2132
2117
  export { _default_14 as Welcome }
2133
2118
 
2134
- declare const _default_15: typeof _default_35 & {
2135
- install: typeof install_13;
2119
+ declare const _default_15: typeof _default_36 & {
2120
+ install: typeof install_14;
2136
2121
  };
2137
2122
  export { _default_15 as McpServerPicker }
2138
2123
  export { _default_15 as TrMcpServerPicker }
2139
2124
 
2140
- declare const _default_16: typeof _default_36 & {
2141
- install: typeof install_14;
2125
+ declare const _default_16: typeof _default_37 & {
2126
+ install: typeof install_15;
2142
2127
  };
2143
2128
  export { _default_16 as McpAddForm }
2144
2129
  export { _default_16 as TrMcpAddForm }
@@ -2165,8 +2150,8 @@ file: Attachment;
2165
2150
  }) => any) | undefined;
2166
2151
  }>, {
2167
2152
  actions: ActionButton[];
2168
- fileMatchers: FileTypeMatcher_2[];
2169
- variant: DisplayVariant_2;
2153
+ fileMatchers: FileTypeMatcher[];
2154
+ variant: DisplayVariant;
2170
2155
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2171
2156
 
2172
2157
  declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -2203,18 +2188,36 @@ actionsLimit: number;
2203
2188
  sourcesLinesLimit: number;
2204
2189
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2205
2190
 
2206
- declare const _default_26: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2191
+ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2192
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
2193
+ readonly "onItem-click"?: ((item: T) => any) | undefined;
2194
+ readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
2195
+ readonly "onItem-action"?: ((item: {
2196
+ id: string;
2197
+ text: string;
2198
+ }) => any) | undefined;
2199
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onItem-click" | "onItem-title-change" | "onItem-action"> & HistoryProps<T> & Partial<{}>> & PublicProps;
2200
+ expose(exposed: ShallowUnwrapRef< {}>): void;
2201
+ attrs: any;
2202
+ slots: {};
2203
+ emit: ((evt: "item-click", item: T) => void) & ((evt: "item-title-change", newTitle: string, item: T) => void) & ((evt: "item-action", item: {
2204
+ id: string;
2205
+ text: string;
2206
+ }) => void);
2207
+ }>) => VNode & {
2208
+ __ctx?: Awaited<typeof __VLS_setup>;
2209
+ };
2210
+
2211
+ declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2207
2212
  size: string | number;
2208
2213
  svgSize: string | number;
2209
2214
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
2210
2215
 
2211
- declare const _default_27: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2216
+ declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2212
2217
  size: "small" | "medium" | "large";
2213
2218
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2214
2219
 
2215
- declare const _default_28: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2216
-
2217
- declare const _default_29: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2220
+ declare const _default_29: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2218
2221
 
2219
2222
  declare const _default_3: typeof _default_21 & {
2220
2223
  install: typeof install_2;
@@ -2222,17 +2225,19 @@ declare const _default_3: typeof _default_21 & {
2222
2225
  export { _default_3 as Container }
2223
2226
  export { _default_3 as TrContainer }
2224
2227
 
2225
- declare const _default_30: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2228
+ declare const _default_30: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2229
+
2230
+ declare const _default_31: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2226
2231
 
2227
- declare const _default_31: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2232
+ declare const _default_32: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2228
2233
 
2229
- declare const _default_32: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2234
+ declare const _default_33: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2230
2235
 
2231
- declare const _default_33: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2236
+ declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2232
2237
 
2233
- declare const _default_34: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2238
+ declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2234
2239
 
2235
- declare const _default_35: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2240
+ declare const _default_36: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2236
2241
  "update:visible": (value: boolean) => any;
2237
2242
  } & {
2238
2243
  refresh: (tab: "installed" | "market") => any;
@@ -2259,13 +2264,13 @@ onRefresh?: ((tab: "installed" | "market") => any) | undefined;
2259
2264
  }>, {
2260
2265
  title: string;
2261
2266
  loading: boolean;
2262
- searchPlaceholder: string;
2263
2267
  installedPlugins: PluginInfo[];
2264
2268
  marketPlugins: PluginInfo[];
2269
+ searchPlaceholder: string;
2265
2270
  enableSearch: boolean;
2266
2271
  installedSearchFn: (query: string, item: PluginInfo) => boolean;
2267
2272
  marketSearchFn: (query: string, item: PluginInfo) => boolean;
2268
- marketCategoryOptions: MarketCategoryOption_2[];
2273
+ marketCategoryOptions: MarketCategoryOption[];
2269
2274
  marketCategoryPlaceholder: string;
2270
2275
  enableMarketCategoryFilter: boolean;
2271
2276
  defaultActiveTab: "installed" | "market";
@@ -2283,7 +2288,7 @@ allowPluginAdd: boolean;
2283
2288
  marketLoading: boolean;
2284
2289
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2285
2290
 
2286
- declare const _default_36: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2291
+ declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2287
2292
  cancel: () => any;
2288
2293
  confirm: (type: AddType, data: string | McpAddFormData) => any;
2289
2294
  "update:addType": (value: AddType) => any;
@@ -2319,15 +2324,14 @@ declare const _default_7: typeof _default_25 & {
2319
2324
  export { _default_7 as Feedback }
2320
2325
  export { _default_7 as TrFeedback }
2321
2326
 
2322
- declare const _default_8: {
2323
- install: <T>(app: App<T>) => void;
2324
- name: string;
2327
+ declare const _default_8: typeof _default_26 & {
2328
+ install: typeof install_7;
2325
2329
  };
2326
2330
  export { _default_8 as History }
2327
2331
  export { _default_8 as TrHistory }
2328
2332
 
2329
- declare const _default_9: typeof _default_26 & {
2330
- install: typeof install_7;
2333
+ declare const _default_9: typeof _default_27 & {
2334
+ install: typeof install_8;
2331
2335
  };
2332
2336
  export { _default_9 as IconButton }
2333
2337
  export { _default_9 as TrIconButton }
@@ -2557,6 +2561,7 @@ export declare interface FileTypeMatcher {
2557
2561
  declare interface fileUploadConfig {
2558
2562
  accept?: string;
2559
2563
  multiple?: boolean;
2564
+ reset?: boolean;
2560
2565
  }
2561
2566
 
2562
2567
  export declare interface Handlers {
@@ -2568,34 +2573,25 @@ export declare interface Handlers {
2568
2573
 
2569
2574
  declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2570
2575
 
2571
- export declare type HistoryData = HistoryItem[] | HistoryGroup[];
2576
+ export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
2572
2577
 
2573
- export declare interface HistoryEvents {
2574
- (e: 'close'): void;
2575
- (e: 'item-click', item: HistoryItem): void;
2576
- (e: 'item-title-change', newTitle: string, rawData: HistoryItem): void;
2577
- (e: 'item-delete', item: HistoryItem): void;
2578
- }
2579
-
2580
- export declare interface HistoryGroup<T = Record<string, unknown>> {
2578
+ export declare interface HistoryGroup<T extends HistoryItem> {
2581
2579
  group: string | symbol;
2582
- items: HistoryItem<T>[];
2580
+ items: T[];
2583
2581
  }
2584
2582
 
2585
- export declare interface HistoryItem<T = Record<string, unknown>> {
2586
- id: string;
2583
+ export declare interface HistoryItem {
2584
+ id?: string;
2587
2585
  title: string;
2588
- tag?: HistoryItemTagProps;
2589
- data?: T;
2590
- }
2591
-
2592
- export declare interface HistoryItemTagProps {
2593
- text: string;
2594
- type?: 'success' | 'warning' | 'error' | 'info' | 'default';
2595
- style?: CSSProperties;
2586
+ [x: string]: unknown;
2596
2587
  }
2597
2588
 
2598
- export declare type HistoryProps = SingleTabHistoryProps | MultiTabHistoryProps;
2589
+ export declare type HistoryProps<T extends HistoryItem = HistoryItem> = {
2590
+ data: HistoryData<T>;
2591
+ selected?: string;
2592
+ showRenameControls?: boolean;
2593
+ renameControlOnClickOutside?: 'confirm' | 'cancel' | 'none';
2594
+ };
2599
2595
 
2600
2596
  export declare interface IconButtonProps {
2601
2597
  icon: VNode | Component;
@@ -2624,6 +2620,8 @@ declare const install_13: <T>(app: App<T>) => void;
2624
2620
 
2625
2621
  declare const install_14: <T>(app: App<T>) => void;
2626
2622
 
2623
+ declare const install_15: <T>(app: App<T>) => void;
2624
+
2627
2625
  declare const install_2: <T>(app: App<T>) => void;
2628
2626
 
2629
2627
  declare const install_3: <T>(app: App<T>) => void;
@@ -2724,14 +2722,6 @@ export declare interface McpServerPickerProps {
2724
2722
  marketLoading?: boolean;
2725
2723
  }
2726
2724
 
2727
- export declare type MultiTabHistoryProps = {
2728
- tabs: {
2729
- title: string;
2730
- id: string;
2731
- }[];
2732
- data: Record<string, HistoryData>;
2733
- } & BaseHistoryProps;
2734
-
2735
2725
  export declare type PluginAddState = 'idle' | 'loading' | 'added';
2736
2726
 
2737
2727
  export declare interface PluginCardEmits {
@@ -2797,7 +2787,7 @@ export declare interface PopupConfig {
2797
2787
  };
2798
2788
  }
2799
2789
 
2800
- declare const Prompt: typeof _default_27 & {
2790
+ declare const Prompt: typeof _default_28 & {
2801
2791
  install: typeof installPrompt;
2802
2792
  };
2803
2793
  export { Prompt }
@@ -2834,7 +2824,7 @@ export declare interface PromptProps {
2834
2824
  size?: 'small' | 'medium' | 'large';
2835
2825
  }
2836
2826
 
2837
- declare const Prompts: typeof _default_28 & {
2827
+ declare const Prompts: typeof _default_29 & {
2838
2828
  install: typeof installPrompts;
2839
2829
  };
2840
2830
  export { Prompts }
@@ -2922,16 +2912,12 @@ export declare interface SenderProps {
2922
2912
  showWordLimit?: boolean;
2923
2913
  suggestions?: ISuggestionItem[];
2924
2914
  suggestionPopupWidth?: string | number;
2915
+ activeSuggestionKeys?: string[];
2925
2916
  theme?: ThemeType;
2926
2917
  templateData?: UserItem[];
2927
2918
  stopText?: string;
2928
2919
  }
2929
2920
 
2930
- export declare type SingleTabHistoryProps = {
2931
- tabTitle: string;
2932
- data: HistoryData;
2933
- } & BaseHistoryProps;
2934
-
2935
2921
  export declare interface SpeechConfig {
2936
2922
  lang?: string;
2937
2923
  continuous?: boolean;
@@ -2977,7 +2963,7 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
2977
2963
 
2978
2964
  export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
2979
2965
 
2980
- declare const SuggestionPillButton: typeof _default_30 & {
2966
+ declare const SuggestionPillButton: typeof _default_31 & {
2981
2967
  install: typeof installPillButton;
2982
2968
  };
2983
2969
  export { SuggestionPillButton }
@@ -3144,6 +3130,16 @@ export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
3144
3130
  */
3145
3131
  export declare type ThemeType = 'light' | 'dark';
3146
3132
 
3133
+ declare interface TooltipContentProps {
3134
+ show?: boolean;
3135
+ content: string;
3136
+ trigger?: HTMLElement | null;
3137
+ disabled?: boolean;
3138
+ placement?: 'top' | 'bottom';
3139
+ delayOpen?: number;
3140
+ delayClose?: number;
3141
+ }
3142
+
3147
3143
  export declare type TooltipRender = () => VNode | string;
3148
3144
 
3149
3145
  export declare interface UrlAttachment extends BaseAttachment {
package/dist/index2.js CHANGED
@@ -698,8 +698,8 @@ export {
698
698
  qe as a,
699
699
  S as b,
700
700
  tt as c,
701
- Ke as d,
702
- Je as e,
701
+ Je as d,
702
+ Ke as e,
703
703
  Xe as f,
704
704
  M as g,
705
705
  Be as h,
package/dist/index3.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { onMounted as U, nextTick as B, h as C, defineComponent as g, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as _, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
2
- import { b as oe, a as re, e as ne } from "./index2.js";
2
+ import { b as oe, a as re, d as ne } from "./index2.js";
3
3
  import { t as u } from "./utils.js";
4
4
  import { _ as N } from "./_plugin-vue_export-helper.js";
5
5
  import { u as se } from "./useSlotRefs.js";
@@ -1,6 +1,6 @@
1
- import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as f, openBlock as v, createElementVNode as t, withDirectives as p, vModelText as _, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
1
+ import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as _, openBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
2
2
  import { TinyRadioGroup as E } from "@opentiny/vue";
3
- import { d as L } from "../index2.js";
3
+ import { e as L } from "../index2.js";
4
4
  import { _ as T } from "../_plugin-vue_export-helper.js";
5
5
  const M = { class: "form-editor__container" }, S = { class: "form-editor__item" }, F = { class: "form-editor__item" }, I = { class: "form-editor__item" }, N = { class: "form-editor__item" }, H = { class: "form-editor__item" }, w = { class: "form-editor__item" }, A = ["src"], C = "https://res.hc-cdn.com/tinyui-design/1.1.0.20250526191525/home/images/tiny-ng.svg", P = /* @__PURE__ */ g({
6
6
  __name: "FormEditor",
@@ -37,26 +37,26 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
37
37
  };
38
38
  return R(() => {
39
39
  r();
40
- }), (m, e) => (v(), f("form", M, [
40
+ }), (m, e) => (v(), _("form", M, [
41
41
  t("div", S, [
42
42
  e[5] || (e[5] = t("label", { class: "form-editor__label" }, "名称", -1)),
43
- p(t("input", {
43
+ c(t("input", {
44
44
  "onUpdate:modelValue": e[0] || (e[0] = (a) => o.value.name = a),
45
45
  class: "form-editor__input",
46
46
  type: "text",
47
47
  placeholder: "请输入插件名称"
48
48
  }, null, 512), [
49
- [_, o.value.name]
49
+ [f, o.value.name]
50
50
  ])
51
51
  ]),
52
52
  t("div", F, [
53
53
  e[6] || (e[6] = t("label", { class: "form-editor__label" }, "描述", -1)),
54
- p(t("textarea", {
54
+ c(t("textarea", {
55
55
  "onUpdate:modelValue": e[1] || (e[1] = (a) => o.value.description = a),
56
56
  class: "form-editor__textarea",
57
57
  placeholder: "请输入插件描述"
58
58
  }, null, 512), [
59
- [_, o.value.description]
59
+ [f, o.value.description]
60
60
  ])
61
61
  ]),
62
62
  t("div", I, [
@@ -70,23 +70,23 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
70
70
  ]),
71
71
  t("div", N, [
72
72
  e[8] || (e[8] = t("label", { class: "form-editor__label" }, "URL", -1)),
73
- p(t("input", {
73
+ c(t("input", {
74
74
  "onUpdate:modelValue": e[3] || (e[3] = (a) => o.value.url = a),
75
75
  class: "form-editor__input",
76
76
  type: "url",
77
77
  placeholder: "请输入插件URL"
78
78
  }, null, 512), [
79
- [_, o.value.url]
79
+ [f, o.value.url]
80
80
  ])
81
81
  ]),
82
82
  t("div", H, [
83
83
  e[9] || (e[9] = t("label", { class: "form-editor__label" }, "请求头", -1)),
84
- p(t("textarea", {
84
+ c(t("textarea", {
85
85
  "onUpdate:modelValue": e[4] || (e[4] = (a) => o.value.headers = a),
86
86
  class: "form-editor__textarea",
87
87
  placeholder: "请输入请求头,格式为JSON"
88
88
  }, null, 512), [
89
- [_, o.value.headers]
89
+ [f, o.value.headers]
90
90
  ])
91
91
  ]),
92
92
  t("div", w, [
@@ -107,7 +107,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
107
107
  ])
108
108
  ]));
109
109
  }
110
- }), h = /* @__PURE__ */ T(P, [["__scopeId", "data-v-94f8726e"]]), j = { class: "code-editor__container" }, q = { class: "code-editor__section" }, z = { class: "code-editor__area" }, B = /* @__PURE__ */ g({
110
+ }), h = /* @__PURE__ */ T(P, [["__scopeId", "data-v-e91567e8"]]), j = { class: "code-editor__container" }, q = { class: "code-editor__section" }, z = { class: "code-editor__area" }, B = /* @__PURE__ */ g({
111
111
  __name: "CodeEditor",
112
112
  props: {
113
113
  codeData: { required: !0 },
@@ -116,21 +116,21 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
116
116
  emits: ["update:codeData"],
117
117
  setup(i) {
118
118
  const d = k(i, "codeData");
119
- return (o, s) => (v(), f("div", j, [
119
+ return (o, s) => (v(), _("div", j, [
120
120
  t("div", q, [
121
121
  t("div", z, [
122
- p(t("textarea", {
122
+ c(t("textarea", {
123
123
  "onUpdate:modelValue": s[0] || (s[0] = (n) => d.value = n),
124
124
  class: "code-editor__textarea",
125
125
  placeholder: "请输入 JSON 配置..."
126
126
  }, null, 512), [
127
- [_, d.value]
127
+ [f, d.value]
128
128
  ])
129
129
  ])
130
130
  ])
131
131
  ]));
132
132
  }
133
- }), J = /* @__PURE__ */ T(B, [["__scopeId", "data-v-9907c109"]]), G = { class: "mcp-add-form" }, W = { class: "mcp-add-form__content" }, K = { class: "mcp-add-form__add-type" }, Q = { key: 0 }, X = { key: 1 }, Y = /* @__PURE__ */ g({
133
+ }), J = /* @__PURE__ */ T(B, [["__scopeId", "data-v-555fb3c4"]]), G = { class: "mcp-add-form" }, W = { class: "mcp-add-form__content" }, K = { class: "mcp-add-form__add-type" }, Q = { key: 0 }, X = { key: 1 }, Y = /* @__PURE__ */ g({
134
134
  __name: "index",
135
135
  props: {
136
136
  addType: { default: "form" },
@@ -158,30 +158,30 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
158
158
  }, a = (V) => {
159
159
  s("update:addType", V);
160
160
  };
161
- return (V, l) => (v(), f("div", G, [
161
+ return (V, l) => (v(), _("div", G, [
162
162
  t("div", W, [
163
163
  t("div", K, [
164
164
  l[3] || (l[3] = t("span", { class: "mcp-add-form__add-type-label" }, "添加方式", -1)),
165
165
  y(D(E), {
166
166
  modelValue: r.value,
167
167
  "onUpdate:modelValue": [
168
- l[0] || (l[0] = (c) => r.value = c),
168
+ l[0] || (l[0] = (p) => r.value = p),
169
169
  a
170
170
  ],
171
171
  type: "button",
172
172
  options: x
173
173
  }, null, 8, ["modelValue"])
174
174
  ]),
175
- r.value === "form" ? (v(), f("div", Q, [
175
+ r.value === "form" ? (v(), _("div", Q, [
176
176
  y(D(h), {
177
177
  "form-data": n.value,
178
- "onUpdate:formData": l[1] || (l[1] = (c) => n.value = c)
178
+ "onUpdate:formData": l[1] || (l[1] = (p) => n.value = p)
179
179
  }, null, 8, ["form-data"])
180
180
  ])) : $("", !0),
181
- r.value === "code" ? (v(), f("div", X, [
181
+ r.value === "code" ? (v(), _("div", X, [
182
182
  y(D(J), {
183
183
  "code-data": u.value,
184
- "onUpdate:codeData": l[2] || (l[2] = (c) => u.value = c)
184
+ "onUpdate:codeData": l[2] || (l[2] = (p) => u.value = p)
185
185
  }, null, 8, ["code-data"])
186
186
  ])) : $("", !0)
187
187
  ]),
@@ -201,7 +201,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
201
201
  ])
202
202
  ]));
203
203
  }
204
- }), U = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-c4bac4dc"]]);
204
+ }), U = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-e85f1044"]]);
205
205
  U.name = "TrMcpAddForm";
206
206
  const Z = function(i) {
207
207
  i.component(U.name, U);