@blueking/chat-x 0.0.1-beta.3 → 0.0.1-beta.5
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/ag-ui/types/constants.d.ts +38 -0
- package/dist/ag-ui/types/contents.d.ts +29 -0
- package/dist/ag-ui/types/index.d.ts +3 -0
- package/dist/ag-ui/types/messages.d.ts +113 -0
- package/dist/common/constants.d.ts +30 -0
- package/dist/common/icon.d.ts +14 -0
- package/dist/common/index.d.ts +5 -0
- package/dist/common/lang.d.ts +1 -0
- package/dist/common/markdown.d.ts +5 -0
- package/dist/common/shortcut.d.ts +2 -0
- package/dist/components/ai-buttons/scroll-btn/scroll-btn.vue.d.ts +19 -0
- package/dist/components/ai-buttons/tool-btn/tool-btn.vue.d.ts +8 -0
- package/dist/components/ai-selection/ai-selection.vue.d.ts +39 -0
- package/dist/components/ai-shortcut/shortcut-btn/shortcut-btn.vue.d.ts +26 -0
- package/dist/components/ai-shortcut/shortcut-btns/shortcut-btns.vue.d.ts +12 -0
- package/dist/components/ai-shortcut/shortcut-render/shortcut-render.vue.d.ts +10 -0
- package/dist/components/animation-text/animation-text.vue.d.ts +6 -0
- package/dist/components/chat-content/cite-content/cite-content.vue.d.ts +7 -0
- package/dist/components/chat-content/common-error-content/common-error-content.vue.d.ts +6 -0
- package/dist/components/chat-content/content-render/content-render.vue.d.ts +26 -0
- package/dist/components/chat-content/key-value-content/key-value-content.vue.d.ts +10 -0
- package/dist/components/chat-content/markdown-content/markdown-content.vue.d.ts +11 -0
- package/dist/components/chat-content/reference-content/reference-content.vue.d.ts +7 -0
- package/dist/components/chat-content/text-content/text-content.vue.d.ts +6 -0
- package/dist/components/chat-content/vnode-renderer.d.ts +27 -0
- package/dist/components/chat-content/x-content/x-content.vue.d.ts +17 -0
- package/dist/components/chat-input/ai-slash-editor/ai-slash-editor.vue.d.ts +28 -0
- package/dist/components/chat-input/ai-slash-editor/theme.d.ts +24 -0
- package/dist/components/chat-input/ai-slash-input/ai-prompt-list/ai-prompt-list.vue.d.ts +7 -0
- package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +49 -0
- package/dist/components/chat-input/ai-slash-input/ai-slash-menu/ai-slash-menu.vue.d.ts +8 -0
- package/dist/components/chat-input/ai-slash-input/command.d.ts +6 -0
- package/dist/components/chat-input/ai-slash-input/constants.d.ts +11 -0
- package/dist/components/chat-input/chat-input.vue.d.ts +72 -0
- package/dist/components/chat-input/input-attachment/input-attachment.vue.d.ts +25 -0
- package/dist/components/chat-message/activity-message/activity-message.vue.d.ts +13 -0
- package/dist/components/chat-message/assistant-message/assistant-message.vue.d.ts +16 -0
- package/dist/components/chat-message/flow-message/flow-detail.vue.d.ts +11 -0
- package/dist/components/chat-message/flow-message/flow-message.vue.d.ts +4 -0
- package/dist/components/chat-message/flow-message/flow-node-group.vue.d.ts +12 -0
- package/dist/components/chat-message/flow-message/flow-node-item.vue.d.ts +11 -0
- package/dist/components/chat-message/flow-message/flow-status-icons.d.ts +36 -0
- package/dist/components/chat-message/flow-message/index.d.ts +6 -0
- package/dist/components/chat-message/flow-message/mock.d.ts +13 -0
- package/dist/components/chat-message/flow-message/types.d.ts +132 -0
- package/dist/components/chat-message/info-message/info-message.vue.d.ts +4 -0
- package/dist/components/chat-message/message-container/message-container.vue.d.ts +11484 -0
- package/dist/components/chat-message/message-render/message-render.vue.d.ts +21 -0
- package/dist/components/chat-message/reasoning-message/reasoning-message.vue.d.ts +13 -0
- package/dist/components/chat-message/tool-message/tool-message.vue.d.ts +4 -0
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +6 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/markdown-token/code-content/code-content.vue.d.ts +15 -0
- package/dist/components/markdown-token/image-content/image-content.vue.d.ts +7 -0
- package/dist/components/markdown-token/index.d.ts +5 -0
- package/dist/components/markdown-token/latex-content/latex-content.vue.d.ts +8 -0
- package/dist/components/markdown-token/mermaid-content/mermaid-content.vue.d.ts +15 -0
- package/dist/components/message-tools/message-tools.vue.d.ts +18 -0
- package/dist/components/message-tools/user-feedback/user-feedback.vue.d.ts +13 -0
- package/dist/components/tool-call/desc-panel/desc-panel.vue.d.ts +7 -0
- package/dist/components/tool-call/toolcall-render/toolcall-render.vue.d.ts +10 -0
- package/dist/composables/index.d.ts +8 -0
- package/dist/composables/use-animation-text.d.ts +16 -0
- package/dist/composables/use-clipboard.d.ts +3 -0
- package/dist/composables/use-command-selection.d.ts +11 -0
- package/dist/composables/use-container-scroll.d.ts +15 -0
- package/dist/composables/use-global-config.d.ts +11 -0
- package/dist/composables/use-menu-keydown.d.ts +8 -0
- package/dist/composables/use-observer-visible-list.d.ts +10 -0
- package/dist/composables/use-parent-scrolling.d.ts +16 -0
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/overflow-tips.d.ts +15 -0
- package/dist/edix/commands.d.ts +6 -0
- package/dist/edix/doc/edit.d.ts +55 -0
- package/dist/edix/doc/position.d.ts +19 -0
- package/dist/edix/doc/types.d.ts +15 -0
- package/dist/edix/doc/utils.d.ts +9 -0
- package/dist/edix/dom/default.d.ts +4 -0
- package/dist/edix/dom/index.d.ts +42 -0
- package/dist/edix/dom/parser.d.ts +63 -0
- package/dist/edix/editor.d.ts +55 -0
- package/dist/edix/history.d.ts +10 -0
- package/dist/edix/index.d.ts +6 -0
- package/dist/edix/mutation.d.ts +8 -0
- package/dist/edix/plugins/singleline.d.ts +5 -0
- package/dist/edix/schema/index.d.ts +3 -0
- package/dist/edix/schema/plain.d.ts +7 -0
- package/dist/edix/schema/structured.d.ts +35 -0
- package/dist/edix/schema/types.d.ts +13 -0
- package/dist/edix/utils.d.ts +8 -0
- package/dist/icons/ai.d.ts +3 -0
- package/dist/icons/content.d.ts +21 -0
- package/dist/icons/index.d.ts +5 -0
- package/dist/icons/messages.d.ts +36 -0
- package/dist/icons/shortcuts.d.ts +12 -0
- package/dist/icons/tools.d.ts +51 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +10834 -0
- package/dist/index.js.map +1 -0
- package/dist/lang/lang.d.ts +70 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/markdown-animation-attrs.d.ts +6 -0
- package/dist/plugins/markdown-latex.d.ts +19 -0
- package/dist/plugins/markdown-mermaid.d.ts +7 -0
- package/dist/types/editor.d.ts +20 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/input.d.ts +18 -0
- package/dist/types/shortcut.d.ts +64 -0
- package/dist/types/tool.d.ts +6 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/markdown-completer.d.ts +37 -0
- package/dist/utils/stream-markdown-completer.d.ts +17 -0
- package/dist/utils/tokens-to-vnodes.d.ts +28 -0
- package/dist/utils/utils.d.ts +7 -0
- package/package.json +32 -7
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare enum MessageContentType {
|
|
2
|
+
Binary = "binary",
|
|
3
|
+
Function = "function",
|
|
4
|
+
KeyValue = "key-value",
|
|
5
|
+
Other = "other",
|
|
6
|
+
Text = "text"
|
|
7
|
+
}
|
|
8
|
+
export declare enum MessageRole {
|
|
9
|
+
Activity = "activity",
|
|
10
|
+
Assistant = "assistant",
|
|
11
|
+
Developer = "developer",
|
|
12
|
+
Guide = "guide",
|
|
13
|
+
Hidden = "hidden",
|
|
14
|
+
HiddenAssistant = "hidden-assistant",
|
|
15
|
+
HiddenGuide = "hidden-guide",
|
|
16
|
+
HiddenSystem = "hidden-system",
|
|
17
|
+
HiddenUser = "hidden-user",
|
|
18
|
+
Info = "info",
|
|
19
|
+
Pause = "pause",
|
|
20
|
+
Placeholder = "placeholder",
|
|
21
|
+
Reasoning = "reasoning",
|
|
22
|
+
System = "system",
|
|
23
|
+
TemplateAssistant = "template-assistant",
|
|
24
|
+
TemplateGuide = "template-guide",
|
|
25
|
+
TemplateHidden = "template-hidden",
|
|
26
|
+
TemplateSystem = "template-system",
|
|
27
|
+
TemplateUser = "template-user",
|
|
28
|
+
Tool = "tool",
|
|
29
|
+
User = "user"
|
|
30
|
+
}
|
|
31
|
+
export declare enum MessageStatus {
|
|
32
|
+
Complete = "complete",
|
|
33
|
+
Disabled = "disabled",
|
|
34
|
+
Error = "error",
|
|
35
|
+
Pending = "pending",
|
|
36
|
+
Stop = "stop",
|
|
37
|
+
Streaming = "streaming"
|
|
38
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type MessageContentType } from './constants';
|
|
2
|
+
export interface BinaryInputContent {
|
|
3
|
+
data?: string;
|
|
4
|
+
filename?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
mimeType: string;
|
|
7
|
+
type: MessageContentType.Binary;
|
|
8
|
+
url?: string;
|
|
9
|
+
}
|
|
10
|
+
export type ContentMap = AIBluekingContentMap & {
|
|
11
|
+
[MessageContentType.Binary]: BinaryInputContent;
|
|
12
|
+
[MessageContentType.Function]: string;
|
|
13
|
+
[MessageContentType.KeyValue]: {
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
[MessageContentType.Other]: any;
|
|
18
|
+
[MessageContentType.Text]: string;
|
|
19
|
+
};
|
|
20
|
+
export type ContentType = keyof ContentMap;
|
|
21
|
+
export type InputContent = BinaryInputContent | TextInputContent;
|
|
22
|
+
export type TextInputContent = {
|
|
23
|
+
text: string;
|
|
24
|
+
type: MessageContentType.Text;
|
|
25
|
+
};
|
|
26
|
+
declare global {
|
|
27
|
+
interface AIBluekingContentMap {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { OldShortcut, Shortcut } from '../../types';
|
|
2
|
+
import type { MessageContentType, MessageRole, MessageStatus } from './constants';
|
|
3
|
+
import type { InputContent } from './contents';
|
|
4
|
+
export interface ActivityMessage extends BaseMessage<MessageRole.Activity, Record<string, unknown>[]> {
|
|
5
|
+
activityType: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AssistantMessage extends BaseMessage<MessageRole.Assistant> {
|
|
8
|
+
toolCalls?: ToolCall[];
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
interface AIBluekingMessageMap {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface BaseMessage<T extends MessageType, C = string> {
|
|
15
|
+
content: C;
|
|
16
|
+
id: string;
|
|
17
|
+
messageId: number | string;
|
|
18
|
+
name?: string;
|
|
19
|
+
role: T;
|
|
20
|
+
status: MessageStatus;
|
|
21
|
+
property?: {
|
|
22
|
+
extra?: {
|
|
23
|
+
cite: {
|
|
24
|
+
data: {
|
|
25
|
+
key: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}[];
|
|
28
|
+
title: string;
|
|
29
|
+
type: 'structured';
|
|
30
|
+
} | string;
|
|
31
|
+
command: string;
|
|
32
|
+
context: Partial<{
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
__key: string;
|
|
35
|
+
__label: string;
|
|
36
|
+
__value: string;
|
|
37
|
+
context_type: 'checkbox' | 'input' | 'number' | 'radioGroup' | 'select' | 'switcher' | 'text' | 'textarea';
|
|
38
|
+
} & Partial<OldShortcut>>[];
|
|
39
|
+
shortcut?: Partial<Shortcut>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface Context {
|
|
44
|
+
description: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
export type DeveloperMessage = BaseMessage<MessageRole.Developer, string>;
|
|
48
|
+
export type FunctionCall = {
|
|
49
|
+
arguments: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
mcpName?: string;
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
export type GuideMessage = BaseMessage<MessageRole.Guide, string>;
|
|
55
|
+
export type HiddenAssistantMessage = BaseMessage<MessageRole.HiddenAssistant, string>;
|
|
56
|
+
export type HiddenGuideMessage = BaseMessage<MessageRole.HiddenGuide, string>;
|
|
57
|
+
export type HiddenMessage = BaseMessage<MessageRole.Hidden, string>;
|
|
58
|
+
export type HiddenSystemMessage = BaseMessage<MessageRole.HiddenSystem, string>;
|
|
59
|
+
export type HiddenUserMessage = BaseMessage<MessageRole.HiddenUser, string>;
|
|
60
|
+
export type InfoMessage = BaseMessage<MessageRole.Info, string>;
|
|
61
|
+
export type Message = MessageMap[MessageType];
|
|
62
|
+
export type MessageMap = AIBluekingMessageMap & {
|
|
63
|
+
[MessageRole.Activity]: ActivityMessage;
|
|
64
|
+
[MessageRole.Assistant]: AssistantMessage;
|
|
65
|
+
[MessageRole.Developer]: DeveloperMessage;
|
|
66
|
+
[MessageRole.Guide]: GuideMessage;
|
|
67
|
+
[MessageRole.Hidden]: HiddenMessage;
|
|
68
|
+
[MessageRole.HiddenAssistant]: HiddenAssistantMessage;
|
|
69
|
+
[MessageRole.HiddenGuide]: HiddenGuideMessage;
|
|
70
|
+
[MessageRole.HiddenSystem]: HiddenSystemMessage;
|
|
71
|
+
[MessageRole.HiddenUser]: HiddenUserMessage;
|
|
72
|
+
[MessageRole.Info]: InfoMessage;
|
|
73
|
+
[MessageRole.Pause]: PauseMessage;
|
|
74
|
+
[MessageRole.Placeholder]: PlaceholderMessage;
|
|
75
|
+
[MessageRole.Reasoning]: ReasoningMessage;
|
|
76
|
+
[MessageRole.System]: SystemMessage;
|
|
77
|
+
[MessageRole.TemplateAssistant]: TemplateAssistantMessage;
|
|
78
|
+
[MessageRole.TemplateGuide]: TemplateGuideMessage;
|
|
79
|
+
[MessageRole.TemplateHidden]: TemplateHiddenMessage;
|
|
80
|
+
[MessageRole.TemplateSystem]: TemplateSystemMessage;
|
|
81
|
+
[MessageRole.TemplateUser]: TemplateUserMessage;
|
|
82
|
+
[MessageRole.Tool]: ToolMessage;
|
|
83
|
+
[MessageRole.User]: UserMessage;
|
|
84
|
+
};
|
|
85
|
+
export type MessageType = keyof MessageMap;
|
|
86
|
+
export type PauseMessage = BaseMessage<MessageRole.Pause, string>;
|
|
87
|
+
export type PlaceholderMessage = BaseMessage<MessageRole.Placeholder, string>;
|
|
88
|
+
export interface ReasoningMessage extends BaseMessage<MessageRole.Reasoning, string[]> {
|
|
89
|
+
duration?: number;
|
|
90
|
+
}
|
|
91
|
+
export type SystemMessage = BaseMessage<MessageRole.System, string>;
|
|
92
|
+
export type TemplateAssistantMessage = BaseMessage<MessageRole.TemplateAssistant, string>;
|
|
93
|
+
export type TemplateGuideMessage = BaseMessage<MessageRole.TemplateGuide, string>;
|
|
94
|
+
export type TemplateHiddenMessage = BaseMessage<MessageRole.TemplateHidden, string>;
|
|
95
|
+
export type TemplateSystemMessage = BaseMessage<MessageRole.TemplateSystem, string>;
|
|
96
|
+
export type TemplateUserMessage = BaseMessage<MessageRole.TemplateUser, string>;
|
|
97
|
+
export type Tool = {
|
|
98
|
+
description: string;
|
|
99
|
+
name: string;
|
|
100
|
+
parameters: unknown;
|
|
101
|
+
};
|
|
102
|
+
export type ToolCall = {
|
|
103
|
+
function: FunctionCall;
|
|
104
|
+
id: string;
|
|
105
|
+
toolMessage?: Partial<ToolMessage>;
|
|
106
|
+
type: MessageContentType.Function;
|
|
107
|
+
};
|
|
108
|
+
export interface ToolMessage extends BaseMessage<MessageRole.Tool, string> {
|
|
109
|
+
duration: number;
|
|
110
|
+
error?: string;
|
|
111
|
+
toolCallId: string;
|
|
112
|
+
}
|
|
113
|
+
export type UserMessage = BaseMessage<MessageRole.User, InputContent[] | string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IToolBtn } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 全局 chat-x 组件 Z-Index
|
|
4
|
+
*/
|
|
5
|
+
export declare const CHAT_Z_INDEX = 9999;
|
|
6
|
+
/**
|
|
7
|
+
* 编辑器组件 Z-Index
|
|
8
|
+
*/
|
|
9
|
+
export declare const EDITOR_Z_INDEX: number;
|
|
10
|
+
/**
|
|
11
|
+
* 编辑器菜单 Z-Index
|
|
12
|
+
*/
|
|
13
|
+
export declare const EDITOR_MENU_Z_INDEX: number;
|
|
14
|
+
/**
|
|
15
|
+
* 快捷指令菜单 Z-Index
|
|
16
|
+
*/
|
|
17
|
+
export declare const SHORTCUT_MENU_Z_INDEX: number;
|
|
18
|
+
/**
|
|
19
|
+
* 划选弹窗 Z-Index
|
|
20
|
+
*/
|
|
21
|
+
export declare const SELECTION_Z_INDEX: number;
|
|
22
|
+
/**
|
|
23
|
+
* 消息工具
|
|
24
|
+
*/
|
|
25
|
+
export declare const CONST_MESSAGE_TOOLS: IToolBtn[];
|
|
26
|
+
export declare const CONST_USER_MESSAGE_TOOLS: IToolBtn[];
|
|
27
|
+
/**
|
|
28
|
+
* 更新工具
|
|
29
|
+
*/
|
|
30
|
+
export declare const CONST_UPDATE_TOOLS: IToolBtn[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isEn: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
8
|
+
} & {
|
|
9
|
+
title?: (props: typeof __VLS_3) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IToolBtn } from '../../../types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<IToolBtn, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
click: (data: IToolBtn, event: MouseEvent) => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<IToolBtn> & Readonly<{
|
|
5
|
+
onClick?: ((data: IToolBtn, event: MouseEvent) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Shortcut } from '../../types';
|
|
2
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
maxShortcutCount?: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
shortcuts?: Shortcut[];
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
'visible': boolean;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare var __VLS_13: {
|
|
13
|
+
shortcuts: Shortcut[];
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_13) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:visible": (value: boolean) => any;
|
|
20
|
+
} & {
|
|
21
|
+
selectShortcut: (shortcut: Shortcut, text: string) => any;
|
|
22
|
+
selectionChange: (text: string) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
onSelectShortcut?: ((shortcut: Shortcut, text: string) => any) | undefined;
|
|
25
|
+
onSelectionChange?: ((text: string) => any) | undefined;
|
|
26
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
offset: number;
|
|
29
|
+
maxShortcutCount: number;
|
|
30
|
+
shortcuts: Shortcut[];
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Shortcut } from '../../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
mode?: 'btn' | 'menu';
|
|
4
|
+
shortcut?: Shortcut;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {}, __VLS_15: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
} & {
|
|
10
|
+
append?: (props: typeof __VLS_15) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
+
readonly $el: HTMLElement | null;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
|
+
click: (shortcut?: Shortcut | undefined) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onClick?: ((shortcut?: Shortcut | undefined) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Shortcut } from '../../../types';
|
|
2
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
shortcuts: Shortcut[];
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
selectShortcut: (shortcut: Shortcut) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSelectShortcut?: ((shortcut: Shortcut) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Shortcut } from '../../../types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<Partial<Shortcut>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
close: () => any;
|
|
4
|
+
submit: (formModel: Record<string, unknown>) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<Partial<Shortcut>> & Readonly<{
|
|
6
|
+
onClose?: (() => any) | undefined;
|
|
7
|
+
onSubmit?: ((formModel: Record<string, unknown>) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: string;
|
|
3
|
+
onClose?: (content: string) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MessageStatus } from '../../../ag-ui/types';
|
|
2
|
+
import type { ContentMap, ContentType } from '../../../ag-ui/types/contents';
|
|
3
|
+
declare const __VLS_export: <T extends ContentType>(__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<{
|
|
4
|
+
props: __VLS_PrettifyLocal<{
|
|
5
|
+
content: ContentMap[T];
|
|
6
|
+
status?: MessageStatus;
|
|
7
|
+
type?: T;
|
|
8
|
+
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
9
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
+
} ? P : {});
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
|
+
attrs: any;
|
|
13
|
+
slots: {
|
|
14
|
+
default?: (props: {
|
|
15
|
+
content: ContentMap[T];
|
|
16
|
+
}) => any;
|
|
17
|
+
};
|
|
18
|
+
emit: {};
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
} & {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
title?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MessageStatus } from '../../../ag-ui/types/constants';
|
|
2
|
+
import 'github-markdown-css/github-markdown-light.css';
|
|
3
|
+
import 'highlight.js/styles/atom-one-dark.min.css';
|
|
4
|
+
import 'katex/dist/katex.min.css';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
content: string;
|
|
7
|
+
status?: MessageStatus;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ActivityMessage } from '../../../ag-ui/types/messages';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
content: ActivityMessage['content'];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type TokenToVNodeOptions } from '../../utils/tokens-to-vnodes';
|
|
3
|
+
import type { Token } from '../../markdown-it';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
tokens: {
|
|
6
|
+
type: PropType<Token[]>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
options: {
|
|
10
|
+
type: PropType<TokenToVNodeOptions>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
tokens: {
|
|
17
|
+
type: PropType<Token[]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
options: {
|
|
21
|
+
type: PropType<TokenToVNodeOptions>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
options: TokenToVNodeOptions;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface XContentProps {
|
|
2
|
+
content?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<XContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<XContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IKeyboardEvent, editor as monacoEditor } from 'monaco-editor';
|
|
2
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
prompts?: string[];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
10
|
+
readonly editor: monacoEditor.IStandaloneCodeEditor;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
focus: () => any;
|
|
13
|
+
keydown: (event: IKeyboardEvent) => any;
|
|
14
|
+
"update:modelValue": (value: string) => any;
|
|
15
|
+
layoutChange: (layoutInfo: monacoEditor.EditorLayoutInfo) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onFocus?: (() => any) | undefined;
|
|
18
|
+
onKeydown?: ((event: IKeyboardEvent) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
|
+
onLayoutChange?: ((layoutInfo: monacoEditor.EditorLayoutInfo) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
placeholder: string;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
modelValue: string;
|
|
25
|
+
prompts: string[];
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor';
|
|
2
|
+
export declare const aiSlashEditorOptions: editor.IStandaloneEditorConstructionOptions;
|
|
3
|
+
export declare const resourceTypeMap: {
|
|
4
|
+
readonly tool: {
|
|
5
|
+
readonly background: "#F0F1F5";
|
|
6
|
+
readonly color: "#4D4F56";
|
|
7
|
+
readonly iconColor: "#979BA5";
|
|
8
|
+
};
|
|
9
|
+
readonly shortcut: {
|
|
10
|
+
readonly background: "#E1ECFF";
|
|
11
|
+
readonly color: "#3A84FF";
|
|
12
|
+
readonly iconColor: "#3A84FF";
|
|
13
|
+
};
|
|
14
|
+
readonly doc: {
|
|
15
|
+
readonly background: "#DAF6E5";
|
|
16
|
+
readonly color: "#2CAF5E";
|
|
17
|
+
readonly iconColor: "#2CAF5E";
|
|
18
|
+
};
|
|
19
|
+
readonly mcp: {
|
|
20
|
+
readonly background: "#FDEED8";
|
|
21
|
+
readonly color: "#F59500";
|
|
22
|
+
readonly iconColor: "#F59500";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
onSelect: (prompt: string) => void;
|
|
3
|
+
prompts: string[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type KeyboardPayload } from '../../../edix';
|
|
2
|
+
import type { IAiSlashMenuItem } from '../../../types/editor';
|
|
3
|
+
import type { TagSchema } from '../../../types/input';
|
|
4
|
+
import 'tippy.js/dist/tippy.css';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
prompts?: string[];
|
|
8
|
+
resources?: IAiSlashMenuItem[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
modelValue: string | TagSchema;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
15
|
+
cleanup: () => void;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string | ({
|
|
18
|
+
text: string;
|
|
19
|
+
type: "text";
|
|
20
|
+
} | {
|
|
21
|
+
data: {
|
|
22
|
+
readonly label: string;
|
|
23
|
+
readonly value: string;
|
|
24
|
+
readonly type: string;
|
|
25
|
+
};
|
|
26
|
+
type: "tag";
|
|
27
|
+
})[][]) => any;
|
|
28
|
+
} & {
|
|
29
|
+
keydown: (event: KeyboardEvent & KeyboardPayload) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onKeydown?: ((event: KeyboardEvent & KeyboardPayload) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string | ({
|
|
33
|
+
text: string;
|
|
34
|
+
type: "text";
|
|
35
|
+
} | {
|
|
36
|
+
data: {
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly value: string;
|
|
39
|
+
readonly type: string;
|
|
40
|
+
};
|
|
41
|
+
type: "tag";
|
|
42
|
+
})[][]) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
placeholder: string;
|
|
45
|
+
prompts: string[];
|
|
46
|
+
resources: IAiSlashMenuItem[];
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IAiSlashMenuItem } from '../../../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
onSelect: (item: IAiSlashMenuItem) => void;
|
|
4
|
+
resourceList?: IAiSlashMenuItem[];
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditorCommand } from '../../../edix';
|
|
2
|
+
import type { Position } from '../../../edix/doc/types';
|
|
3
|
+
import type { IAiSlashMenuItem } from '../../../types/editor';
|
|
4
|
+
export declare const DeleteTag: EditorCommand<[Position, Position]>;
|
|
5
|
+
export declare const InsertTag: EditorCommand<[Position, IAiSlashMenuItem]>;
|
|
6
|
+
export declare const InsertText: EditorCommand<[Position, string]>;
|