@opentiny/tiny-robot 0.4.2-alpha.4 → 0.4.2-alpha.6
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/action-group/ActionGroup.vue.d.ts +26 -0
- package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
- package/dist/action-group/index.d.ts +12 -0
- package/dist/action-group/index.type.d.ts +17 -0
- package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
- package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
- package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
- package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
- package/dist/anchor/composables/index.d.ts +5 -0
- package/dist/anchor/composables/useActiveSync.d.ts +10 -0
- package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
- package/dist/anchor/composables/useNavController.d.ts +12 -0
- package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
- package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
- package/dist/anchor/defaults.d.ts +16 -0
- package/dist/anchor/index.d.ts +7 -0
- package/dist/anchor/index.type.d.ts +60 -0
- package/dist/anchor/index.vue.d.ts +159 -0
- package/dist/anchor/internal.type.d.ts +103 -0
- package/dist/anchor/utils/scroll.d.ts +7 -0
- package/dist/anchor/utils/target.d.ts +6 -0
- package/dist/attachments/components/FileCard.vue.d.ts +18 -0
- package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
- package/dist/attachments/components/index.d.ts +2 -0
- package/dist/attachments/composables/index.d.ts +5 -0
- package/dist/attachments/composables/useFileCard.d.ts +15 -0
- package/dist/attachments/composables/useFileType.d.ts +20 -0
- package/dist/attachments/composables/useImagePreview.d.ts +18 -0
- package/dist/attachments/composables/useListType.d.ts +11 -0
- package/dist/attachments/index.d.ts +7 -0
- package/dist/attachments/index.js +2 -2
- package/dist/attachments/index.type.d.ts +70 -0
- package/dist/attachments/index.vue.d.ts +27 -0
- package/dist/attachments/utils.d.ts +3 -0
- package/dist/base-popper/components/Popper.vue.d.ts +28 -0
- package/dist/base-popper/index.d.ts +2 -0
- package/dist/base-popper/index.vue.d.ts +41 -0
- package/dist/bubble/Bubble.vue.d.ts +39 -0
- package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
- package/dist/bubble/BubbleContentWrapper.vue.d.ts +16 -0
- package/dist/bubble/BubbleItem.vue.d.ts +36 -0
- package/dist/bubble/BubbleList.vue.d.ts +41 -0
- package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
- package/dist/bubble/composables/index.d.ts +10 -0
- package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleStateChange.d.ts +2 -0
- package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
- package/dist/bubble/composables/useContentResolver.d.ts +5 -0
- package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
- package/dist/bubble/composables/useMessageContent.d.ts +5 -0
- package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
- package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
- package/dist/bubble/composables/useToolCall.d.ts +25 -0
- package/dist/bubble/constants.d.ts +42 -0
- package/dist/bubble/index.d.ts +19 -0
- package/dist/bubble/index.type.d.ts +171 -0
- package/dist/bubble/renderers/Box.vue.d.ts +18 -0
- package/dist/bubble/renderers/Image.vue.d.ts +4 -0
- package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
- package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
- package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
- package/dist/bubble/renderers/Text.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
- package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
- package/dist/bubble/renderers/allRenderers.d.ts +93 -0
- package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
- package/dist/bubble/utils.d.ts +7 -0
- package/dist/chat/components/ChatConversation.vue.d.ts +267 -0
- package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
- package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +6 -0
- package/dist/chat/components/ChatWelcome.vue.d.ts +14 -0
- package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +7 -0
- package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +7 -0
- package/dist/chat/components/icons/index.d.ts +5 -0
- package/dist/chat/composables/useChatConversation.d.ts +37 -0
- package/dist/chat/composables/useChatMcp.d.ts +29 -0
- package/dist/chat/composables/useChatModel.d.ts +27 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +13902 -0
- package/dist/chat/index.type.d.ts +92 -0
- package/dist/chat/index.vue.d.ts +51 -0
- package/dist/chat/locale.d.ts +12 -0
- package/dist/chat/mcpServers.d.ts +3 -0
- package/dist/container/index.d.ts +7 -0
- package/dist/container/index.type.d.ts +20 -0
- package/dist/container/index.vue.d.ts +32 -0
- package/dist/conversations/index.d.ts +7 -0
- package/dist/conversations/index.vue.d.ts +2 -0
- package/dist/drag-overlay/constants.d.ts +17 -0
- package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
- package/dist/drag-overlay/index.d.ts +7 -0
- package/dist/drag-overlay/index.type.d.ts +105 -0
- package/dist/drag-overlay/index.vue.d.ts +20 -0
- package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
- package/dist/dropdown-menu/index.d.ts +7 -0
- package/dist/dropdown-menu/index.js +17 -17
- package/dist/dropdown-menu/index.type.d.ts +42 -0
- package/dist/dropdown-menu/index.vue.d.ts +217 -0
- package/dist/feedback/components/SourceList.vue.d.ts +11 -0
- package/dist/feedback/components/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.type.d.ts +25 -0
- package/dist/feedback/index.vue.d.ts +13 -0
- package/dist/flow-layout-buttons/index.d.ts +7 -0
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/flow-layout-buttons/index.type.d.ts +35 -0
- package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
- package/dist/history/components/Empty.vue.d.ts +7 -0
- package/dist/history/components/MenuList.vue.d.ts +24 -0
- package/dist/history/composables/useRenameEditor.d.ts +22 -0
- package/dist/history/constants.d.ts +1 -0
- package/dist/history/index.d.ts +7 -0
- package/dist/history/index.type.d.ts +33 -0
- package/dist/history/index.vue.d.ts +18 -0
- package/dist/icon-button/index.d.ts +7 -0
- package/dist/icon-button/index.type.d.ts +7 -0
- package/dist/icon-button/index.vue.d.ts +6 -0
- package/dist/index.d.ts +49 -5018
- package/dist/index.js +1 -1
- package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
- package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
- package/dist/mcp-add-form/components/index.d.ts +2 -0
- package/dist/mcp-add-form/index.d.ts +7 -0
- package/dist/mcp-add-form/index.type.d.ts +19 -0
- package/dist/mcp-add-form/index.vue.d.ts +13 -0
- package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
- package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
- package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
- package/dist/mcp-server-picker/components/index.d.ts +3 -0
- package/dist/mcp-server-picker/index.d.ts +7 -0
- package/dist/mcp-server-picker/index.js +83 -80
- package/dist/mcp-server-picker/index.type.d.ts +99 -0
- package/dist/mcp-server-picker/index.vue.d.ts +71 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +59 -0
- package/dist/prompts/prompt.vue.d.ts +5 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
- package/dist/sender/components/footer/index.vue.d.ts +38 -0
- package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
- package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
- package/dist/sender/composables/index.d.ts +7 -0
- package/dist/sender/composables/useAutoSize.d.ts +5 -0
- package/dist/sender/composables/useEditor.d.ts +13 -0
- package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
- package/dist/sender/composables/useModeSwitch.d.ts +4 -0
- package/dist/sender/composables/useSenderCore.d.ts +31 -0
- package/dist/sender/composables/useSlotScope.d.ts +10 -0
- package/dist/sender/context/index.d.ts +6 -0
- package/dist/sender/context/types.d.ts +7 -0
- package/dist/sender/extensions/constants.d.ts +94 -0
- package/dist/sender/extensions/index.d.ts +12 -0
- package/dist/sender/extensions/mention/commands.d.ts +20 -0
- package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
- package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
- package/dist/sender/extensions/mention/extension.d.ts +6 -0
- package/dist/sender/extensions/mention/index.d.ts +22 -0
- package/dist/sender/extensions/mention/plugin.d.ts +16 -0
- package/dist/sender/extensions/mention/types.d.ts +126 -0
- package/dist/sender/extensions/mention/utils.d.ts +34 -0
- package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
- package/dist/sender/extensions/suggestion/index.d.ts +20 -0
- package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
- package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
- package/dist/sender/extensions/suggestion/types.d.ts +254 -0
- package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
- package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
- package/dist/sender/extensions/template/block/extension.d.ts +6 -0
- package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
- package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
- package/dist/sender/extensions/template/commands.d.ts +31 -0
- package/dist/sender/extensions/template/extension.d.ts +6 -0
- package/dist/sender/extensions/template/index.d.ts +21 -0
- package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
- package/dist/sender/extensions/template/select/extension.d.ts +5 -0
- package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
- package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
- package/dist/sender/extensions/template/types.d.ts +100 -0
- package/dist/sender/extensions/template/utils.d.ts +20 -0
- package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
- package/dist/sender/extensions/utils/index.d.ts +7 -0
- package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
- package/dist/sender/extensions/utils/position.d.ts +25 -0
- package/dist/sender/index.d.ts +136 -0
- package/dist/sender/index.type.d.ts +302 -0
- package/dist/sender/index.vue.d.ts +90 -0
- package/dist/sender/types/base.d.ts +239 -0
- package/dist/sender/types/components.d.ts +68 -0
- package/dist/sender/types/composables.d.ts +122 -0
- package/dist/sender/types/context.d.ts +132 -0
- package/dist/sender/types/slots.d.ts +67 -0
- package/dist/sender/utils/countGraphemes.d.ts +1 -0
- package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
- package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
- package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
- package/dist/sender-actions/index.d.ts +21 -0
- package/dist/sender-actions/index.type.d.ts +7 -0
- package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/types/common.d.ts +40 -0
- package/dist/sender-actions/types/index.d.ts +5 -0
- package/dist/sender-actions/types/tooltip.d.ts +7 -0
- package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
- package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
- package/dist/sender-actions/utils/tooltip.d.ts +8 -0
- package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
- package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
- package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
- package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
- package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
- package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
- package/dist/sender-compat/index.d.ts +7 -0
- package/dist/sender-compat/index.type.d.ts +91 -0
- package/dist/sender-compat/index.vue.d.ts +532 -0
- package/dist/shared/composables/createTeleport.d.ts +2 -0
- package/dist/shared/composables/index.d.ts +5 -0
- package/dist/shared/composables/useAutoScroll.d.ts +25 -0
- package/dist/shared/composables/useSlotRefs.d.ts +12 -0
- package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
- package/dist/shared/composables/useTouchDevice.d.ts +3 -0
- package/dist/shared/utils.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
- package/dist/suggestion-pills/components/index.d.ts +1 -0
- package/dist/suggestion-pills/index.d.ts +13 -0
- package/dist/suggestion-pills/index.js +12 -12
- package/dist/suggestion-pills/index.type.d.ts +45 -0
- package/dist/suggestion-pills/index.vue.d.ts +44 -0
- package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
- package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
- package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
- package/dist/suggestion-popover/index.d.ts +7 -0
- package/dist/suggestion-popover/index.js +35 -35
- package/dist/suggestion-popover/index.type.d.ts +80 -0
- package/dist/suggestion-popover/index.vue.d.ts +262 -0
- package/dist/theme-provider/constants.d.ts +6 -0
- package/dist/theme-provider/index.d.ts +9 -0
- package/dist/theme-provider/index.js +32 -41
- package/dist/theme-provider/index.type.d.ts +18 -0
- package/dist/theme-provider/index.vue.d.ts +32 -0
- package/dist/theme-provider/useTheme.d.ts +11 -0
- package/dist/useTheme.js +22 -0
- package/dist/welcome/index.d.ts +7 -0
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +18 -0
- package/package.json +22 -3
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Component, VNode } from 'vue';
|
|
2
|
+
import { PluginInfo } from '../mcp-server-picker/index.type';
|
|
3
|
+
export type ChatLang = 'zh-CN' | 'en-US';
|
|
4
|
+
export interface ChatModelCapabilities {
|
|
5
|
+
thinking?: Record<string, unknown> | false;
|
|
6
|
+
search?: Record<string, unknown> | false;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatModelOption {
|
|
9
|
+
id: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
name: string;
|
|
12
|
+
model: string;
|
|
13
|
+
apiUrl: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
icon?: Component;
|
|
16
|
+
capabilities?: ChatModelCapabilities;
|
|
17
|
+
}
|
|
18
|
+
export type ChatMcpTransportType = 'sse' | 'streamableHttp';
|
|
19
|
+
export interface ChatMcpServerConfig {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
type: ChatMcpTransportType;
|
|
23
|
+
url: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
headers?: Record<string, string>;
|
|
26
|
+
category?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ChatPromptItem {
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
message: string;
|
|
32
|
+
icon?: Component;
|
|
33
|
+
}
|
|
34
|
+
export type ChatWelcomeIcon = Component | VNode;
|
|
35
|
+
export interface ChatLocale {
|
|
36
|
+
newConversation?: string;
|
|
37
|
+
historyTitle?: string;
|
|
38
|
+
closeHistory?: string;
|
|
39
|
+
openHistory?: string;
|
|
40
|
+
openMcp?: string;
|
|
41
|
+
mcpTitle?: string;
|
|
42
|
+
installedTabTitle?: string;
|
|
43
|
+
marketTabTitle?: string;
|
|
44
|
+
searchPluginsPlaceholder?: string;
|
|
45
|
+
marketCategoryPlaceholder?: string;
|
|
46
|
+
missingProviderConfig?: string;
|
|
47
|
+
unavailableModelConfig?: string;
|
|
48
|
+
unavailableModelPrompt?: string;
|
|
49
|
+
missingProviderPrompt?: string;
|
|
50
|
+
thinkingPrompt?: string;
|
|
51
|
+
defaultPrompt?: string;
|
|
52
|
+
selectModel?: string;
|
|
53
|
+
fallbackConversationTitle?: string;
|
|
54
|
+
themeLightMode?: string;
|
|
55
|
+
themeDarkMode?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ChatProps {
|
|
58
|
+
show?: boolean;
|
|
59
|
+
fullscreen?: boolean;
|
|
60
|
+
selectedModelId?: string;
|
|
61
|
+
lang?: ChatLang;
|
|
62
|
+
title?: string;
|
|
63
|
+
storageKey?: string;
|
|
64
|
+
activeConversationStorageKey?: string;
|
|
65
|
+
mcpStorageKey?: string;
|
|
66
|
+
systemPrompt?: string;
|
|
67
|
+
launcher?: boolean;
|
|
68
|
+
launcherIcon?: Component;
|
|
69
|
+
launcherAriaLabel?: string;
|
|
70
|
+
modelOptions: ChatModelOption[];
|
|
71
|
+
modelPlaceholder?: string;
|
|
72
|
+
mcpServers?: Record<string, ChatMcpServerConfig>;
|
|
73
|
+
defaultInstalledMcpServerIds?: string[];
|
|
74
|
+
marketMcpServerIds?: string[];
|
|
75
|
+
welcomeTitle?: string;
|
|
76
|
+
welcomeDescription?: string;
|
|
77
|
+
welcomeIcon?: ChatWelcomeIcon;
|
|
78
|
+
promptItems?: ChatPromptItem[];
|
|
79
|
+
locale?: ChatLocale;
|
|
80
|
+
}
|
|
81
|
+
export interface ChatSlots {
|
|
82
|
+
welcome?: () => unknown;
|
|
83
|
+
}
|
|
84
|
+
export interface ChatEmits {
|
|
85
|
+
(e: 'close'): void;
|
|
86
|
+
(e: 'open'): void;
|
|
87
|
+
(e: 'update:show', value: boolean): void;
|
|
88
|
+
(e: 'update:fullscreen', value: boolean): void;
|
|
89
|
+
(e: 'update:selectedModelId', value: string): void;
|
|
90
|
+
(e: 'conversation-change', conversationId: string | null): void;
|
|
91
|
+
}
|
|
92
|
+
export type InstalledChatPlugin = PluginInfo;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ChatProps, ChatSlots } from './index.type';
|
|
2
|
+
type __VLS_Props = ChatProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'show'?: boolean;
|
|
5
|
+
'fullscreen'?: boolean;
|
|
6
|
+
'selectedModelId'?: string;
|
|
7
|
+
} & __VLS_Props;
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: Readonly<ChatSlots> & ChatSlots;
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:show": (value: boolean) => any;
|
|
17
|
+
"update:fullscreen": (value: boolean) => any;
|
|
18
|
+
"update:selectedModelId": (value: string) => any;
|
|
19
|
+
} & {
|
|
20
|
+
close: () => any;
|
|
21
|
+
open: () => any;
|
|
22
|
+
"update:show": (value: boolean) => any;
|
|
23
|
+
"update:fullscreen": (value: boolean) => any;
|
|
24
|
+
"update:selectedModelId": (value: string) => any;
|
|
25
|
+
"conversation-change": (conversationId: string | null) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
onClose?: (() => any) | undefined;
|
|
28
|
+
onOpen?: (() => any) | undefined;
|
|
29
|
+
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
30
|
+
"onUpdate:fullscreen"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
"onUpdate:selectedModelId"?: ((value: string) => any) | undefined;
|
|
32
|
+
"onConversation-change"?: ((conversationId: string | null) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
show: boolean;
|
|
35
|
+
fullscreen: boolean;
|
|
36
|
+
lang: import('./index.type').ChatLang;
|
|
37
|
+
storageKey: string;
|
|
38
|
+
promptItems: import('./index.type').ChatPromptItem[];
|
|
39
|
+
activeConversationStorageKey: string;
|
|
40
|
+
mcpStorageKey: string;
|
|
41
|
+
launcher: boolean;
|
|
42
|
+
defaultInstalledMcpServerIds: string[];
|
|
43
|
+
locale: import('./index.type').ChatLocale;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChatLang, ChatLocale } from './index.type';
|
|
2
|
+
interface ChatBuiltinLocale {
|
|
3
|
+
title: string;
|
|
4
|
+
launcherAriaLabel: string;
|
|
5
|
+
systemPrompt: string;
|
|
6
|
+
modelPlaceholder: string;
|
|
7
|
+
welcomeTitle: string;
|
|
8
|
+
welcomeDescription: string;
|
|
9
|
+
messages: Required<ChatLocale>;
|
|
10
|
+
}
|
|
11
|
+
export declare const CHAT_BUILTIN_LOCALES: Record<ChatLang, ChatBuiltinLocale>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ContainerProps {
|
|
2
|
+
/**
|
|
3
|
+
* model:show
|
|
4
|
+
*/
|
|
5
|
+
show: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* model:fullscreen
|
|
8
|
+
*/
|
|
9
|
+
fullscreen?: boolean;
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ContainerSlots {
|
|
13
|
+
default: () => unknown;
|
|
14
|
+
title: () => unknown;
|
|
15
|
+
operations: () => unknown;
|
|
16
|
+
footer: () => unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface ContainerEmits {
|
|
19
|
+
(e: 'close'): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ContainerProps, ContainerSlots } from './index.type';
|
|
2
|
+
type __VLS_Props = ContainerProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'show': ContainerProps['show'];
|
|
5
|
+
'fullscreen'?: ContainerProps['fullscreen'];
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<ContainerSlots> & ContainerSlots;
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:show": (value: boolean) => any;
|
|
16
|
+
"update:fullscreen": (value: boolean | undefined) => any;
|
|
17
|
+
} & {
|
|
18
|
+
close: () => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
"onUpdate:fullscreen"?: ((value: boolean | undefined) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
title: string;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 拖拽区域错误码
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DragZoneErrorCode {
|
|
5
|
+
/**
|
|
6
|
+
* 文件类型不允许
|
|
7
|
+
*/
|
|
8
|
+
FileTypeNotAllowed = "file-type-not-allowed",
|
|
9
|
+
/**
|
|
10
|
+
* 文件大小超出限制
|
|
11
|
+
*/
|
|
12
|
+
FileSizeExceeded = "file-size-exceeded",
|
|
13
|
+
/**
|
|
14
|
+
* 文件数量超出限制
|
|
15
|
+
*/
|
|
16
|
+
FileCountExceeded = "file-count-exceeded"
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
import { Handlers, DropzoneBinding } from '../index.type';
|
|
3
|
+
type DragAwareOptions = Omit<DropzoneBinding, 'onDraggingChange'>;
|
|
4
|
+
interface DragAwareElement extends HTMLElement {
|
|
5
|
+
__vDropzoneHandlers__?: Handlers;
|
|
6
|
+
__vDropzoneOptions__?: DragAwareOptions;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 拖拽区域指令
|
|
10
|
+
* @param el 元素
|
|
11
|
+
* @param binding 绑定
|
|
12
|
+
*/
|
|
13
|
+
export declare const vDropzone: Directive<DragAwareElement, DropzoneBinding>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DragZoneErrorCode } from './constants';
|
|
2
|
+
export interface Handlers {
|
|
3
|
+
handleDragEnter: (e: DragEvent) => void;
|
|
4
|
+
handleDragOver: (e: DragEvent) => void;
|
|
5
|
+
handleDragLeave: (e: DragEvent) => void;
|
|
6
|
+
handleDrop: (e: DragEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 文件拒绝原因
|
|
10
|
+
*/
|
|
11
|
+
export interface RejectionReason {
|
|
12
|
+
code: DragZoneErrorCode;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 文件拒绝信息
|
|
17
|
+
*/
|
|
18
|
+
export interface FileRejection extends RejectionReason {
|
|
19
|
+
files: File[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 拖拽上传组件的属性
|
|
23
|
+
*/
|
|
24
|
+
export interface DropzoneBinding {
|
|
25
|
+
/**
|
|
26
|
+
* 允许上传的文件类型, 与原生 input 的 accept 属性一致
|
|
27
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
|
|
28
|
+
* @example '.jpg,.png,image/*'
|
|
29
|
+
*/
|
|
30
|
+
accept?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 是否允许多选
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
multiple?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 是否禁用拖拽
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 单个文件的最大大小(单位:字节)
|
|
43
|
+
* @default 10 * 1024 * 1024 (10MB)
|
|
44
|
+
*/
|
|
45
|
+
maxSize?: number;
|
|
46
|
+
/**
|
|
47
|
+
* 允许上传的最大文件数量
|
|
48
|
+
* @default 3
|
|
49
|
+
*/
|
|
50
|
+
maxFiles?: number;
|
|
51
|
+
/**
|
|
52
|
+
* 拖拽完成后的回调
|
|
53
|
+
* @param files 上传的文件
|
|
54
|
+
*/
|
|
55
|
+
onDrop: (files: File[]) => void;
|
|
56
|
+
/**
|
|
57
|
+
* 拖拽失败后的回调
|
|
58
|
+
* @param rejection 拒绝信息
|
|
59
|
+
*/
|
|
60
|
+
onError: (rejection: FileRejection) => void;
|
|
61
|
+
/**
|
|
62
|
+
* 拖拽开始时的回调
|
|
63
|
+
* @param dragging 是否正在拖拽
|
|
64
|
+
* @param element 拖拽目标元素
|
|
65
|
+
*/
|
|
66
|
+
onDraggingChange: (dragging: boolean, element: HTMLElement | null) => void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 拖拽上传组件的属性
|
|
70
|
+
*/
|
|
71
|
+
export interface DragOverlayProps {
|
|
72
|
+
/**
|
|
73
|
+
* 覆盖层标题
|
|
74
|
+
* @default ''
|
|
75
|
+
*/
|
|
76
|
+
overlayTitle?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 覆盖层描述文本数组
|
|
79
|
+
* @default []
|
|
80
|
+
*/
|
|
81
|
+
overlayDescription?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* 控制拖拽覆盖层是否可见。这旨在与 v-dropzone 指令结合使用,由父组件控制。
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
isDragging?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @description 拖拽目标元素,用于定位覆盖层
|
|
89
|
+
* @default null
|
|
90
|
+
*/
|
|
91
|
+
dragTarget?: HTMLElement | null;
|
|
92
|
+
/**
|
|
93
|
+
* @description 是否全屏模式,控制覆盖层的边框显示
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
fullscreen?: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface DragOverlaySlots {
|
|
99
|
+
/**
|
|
100
|
+
* 覆盖层插槽,用于自定义拖拽时的覆盖层内容
|
|
101
|
+
*/
|
|
102
|
+
overlay?: (props: {
|
|
103
|
+
isDragging: boolean;
|
|
104
|
+
}) => unknown;
|
|
105
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DragOverlayProps } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
overlay?(_: {
|
|
6
|
+
isDragging: true;
|
|
7
|
+
}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<DragOverlayProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DragOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MaybeComputedElementRef } from '@vueuse/core';
|
|
2
|
+
export interface UsePopperHoverOptions {
|
|
3
|
+
delayEnter?: number;
|
|
4
|
+
delayLeave?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const usePopperHover: (triggerRef: MaybeComputedElementRef, popperRef: MaybeComputedElementRef, options?: UsePopperHoverOptions) => import('vue').Ref<boolean, boolean>;
|
|
@@ -5,8 +5,8 @@ import { u as F } from "../utils.js";
|
|
|
5
5
|
import { _ as G } from "../_plugin-vue_export-helper.js";
|
|
6
6
|
const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.bottom, N = (o, t, g = !1) => {
|
|
7
7
|
if (t.length < 3) return !1;
|
|
8
|
-
const l = o.x,
|
|
9
|
-
let
|
|
8
|
+
const l = o.x, f = o.y;
|
|
9
|
+
let d = !1;
|
|
10
10
|
const r = (s, c, a, n, i, e) => {
|
|
11
11
|
const m = (i - a) * (c - n) - (e - n) * (s - a);
|
|
12
12
|
if (Math.abs(m) > 1e-10) return !1;
|
|
@@ -15,14 +15,14 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
15
15
|
};
|
|
16
16
|
for (let s = 0, c = t.length - 1; s < t.length; c = s++) {
|
|
17
17
|
const a = t[s].x, n = t[s].y, i = t[c].x, e = t[c].y;
|
|
18
|
-
if (g && r(l,
|
|
18
|
+
if (g && r(l, f, a, n, i, e))
|
|
19
19
|
return !0;
|
|
20
|
-
if (n >
|
|
21
|
-
const u = (i - a) * (
|
|
22
|
-
l < u && (
|
|
20
|
+
if (n > f && e <= f || e > f && n <= f) {
|
|
21
|
+
const u = (i - a) * (f - n) / (e - n) + a;
|
|
22
|
+
l < u && (d = !d);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return d;
|
|
26
26
|
}, U = (o, t) => t.bottom < o.top ? [
|
|
27
27
|
{ x: o.left, y: o.top },
|
|
28
28
|
{ x: o.right, y: o.top },
|
|
@@ -34,7 +34,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
34
34
|
{ x: t.right, y: t.top },
|
|
35
35
|
{ x: t.left, y: t.top }
|
|
36
36
|
] : [], { x: V, y: q } = F(), z = (o, t, g) => {
|
|
37
|
-
const { delayEnter: l = 0, delayLeave:
|
|
37
|
+
const { delayEnter: l = 0, delayLeave: f = 0 } = g || {}, d = k(!1), r = k("outside");
|
|
38
38
|
let s = null;
|
|
39
39
|
const c = () => {
|
|
40
40
|
s && (clearTimeout(s), s = null);
|
|
@@ -43,8 +43,8 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
43
43
|
c();
|
|
44
44
|
});
|
|
45
45
|
const a = (n) => {
|
|
46
|
-
const i = n ? l :
|
|
47
|
-
c(), i ? s = setTimeout(() =>
|
|
46
|
+
const i = n ? l : f;
|
|
47
|
+
c(), i ? s = setTimeout(() => d.value = n, i) : d.value = n;
|
|
48
48
|
};
|
|
49
49
|
return C(
|
|
50
50
|
r,
|
|
@@ -71,7 +71,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
71
71
|
N({ x: n, y: i }, U(u, h), !0) ? r.value = "polygon" : r.value = "outside";
|
|
72
72
|
},
|
|
73
73
|
{ throttle: 10 }
|
|
74
|
-
),
|
|
74
|
+
), d;
|
|
75
75
|
}, J = { class: "tr-dropdown-menu__list" }, K = ["onClick"], Q = /* @__PURE__ */ E({
|
|
76
76
|
__name: "index",
|
|
77
77
|
props: /* @__PURE__ */ M({
|
|
@@ -85,10 +85,10 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
85
85
|
}),
|
|
86
86
|
emits: /* @__PURE__ */ M(["item-click", "click-outside"], ["update:show"]),
|
|
87
87
|
setup(o, { expose: t, emit: g }) {
|
|
88
|
-
const l = o,
|
|
89
|
-
get: () => l.trigger === "manual" ? l.show :
|
|
88
|
+
const l = o, f = g, d = H(o, "show"), r = p({
|
|
89
|
+
get: () => l.trigger === "manual" ? l.show : d.value,
|
|
90
90
|
set: (e) => {
|
|
91
|
-
l.trigger !== "manual" && (
|
|
91
|
+
l.trigger !== "manual" && (d.value = e);
|
|
92
92
|
}
|
|
93
93
|
}), s = k(null), c = p(() => {
|
|
94
94
|
var e;
|
|
@@ -101,7 +101,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
101
101
|
$(
|
|
102
102
|
a,
|
|
103
103
|
(e) => {
|
|
104
|
-
|
|
104
|
+
f("click-outside", e), r.value = !1;
|
|
105
105
|
},
|
|
106
106
|
{ ignore: [c] }
|
|
107
107
|
);
|
|
@@ -114,7 +114,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
114
114
|
const n = () => {
|
|
115
115
|
l.trigger === "click" && (r.value = !r.value);
|
|
116
116
|
}, i = (e) => {
|
|
117
|
-
r.value = !1,
|
|
117
|
+
r.value = !1, f("item-click", e);
|
|
118
118
|
};
|
|
119
119
|
return t({
|
|
120
120
|
update: () => {
|
|
@@ -148,7 +148,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
148
148
|
_: 3
|
|
149
149
|
}, 8, ["show", "append-to", "trigger-events"]));
|
|
150
150
|
}
|
|
151
|
-
}), v = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-
|
|
151
|
+
}), v = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-6fc07009"]]);
|
|
152
152
|
v.name = "TrDropdownMenu";
|
|
153
153
|
const W = function(o) {
|
|
154
154
|
o.component(v.name, v);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface DropdownMenuItem {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DropdownMenuProps {
|
|
7
|
+
appendTo?: string | HTMLElement;
|
|
8
|
+
items: DropdownMenuItem[];
|
|
9
|
+
/**
|
|
10
|
+
* 当 trigger 为 'click' 或 'hover' 时,是一个双向绑定的 model(v-model:show),可在组件外部控制显示状态。
|
|
11
|
+
* 否则当 trigger 为 'manual' 时,是一个单向绑定的 prop,组件内部无法修改 show 的值
|
|
12
|
+
*/
|
|
13
|
+
show?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 触发方式。默认值为 'click'
|
|
16
|
+
*/
|
|
17
|
+
trigger?: 'click' | 'hover' | 'manual';
|
|
18
|
+
}
|
|
19
|
+
export interface DropdownMenuSlots {
|
|
20
|
+
trigger?: () => VNode | VNode[];
|
|
21
|
+
}
|
|
22
|
+
export interface DropdownMenuEmits {
|
|
23
|
+
(e: 'item-click', item: DropdownMenuItem): void;
|
|
24
|
+
/**
|
|
25
|
+
* 点击外部区域时触发, 仅在 trigger 为 'click' 或 'manual' 时有效
|
|
26
|
+
*/
|
|
27
|
+
(e: 'click-outside', event: MouseEvent): void;
|
|
28
|
+
}
|
|
29
|
+
export interface DropdownMenuEventProps {
|
|
30
|
+
onItemClick?: (item: DropdownMenuItem) => void;
|
|
31
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface DropdownMenuEvents {
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
itemClick?: (item: DropdownMenuItem) => void;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
41
|
+
clickOutside?: (event: MouseEvent) => void;
|
|
42
|
+
}
|