@blueking/chat-x 0.0.49-beta.9 → 0.0.51-beta.1
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/contents.d.ts +2 -0
- package/dist/ag-ui/types/messages.d.ts +3 -0
- package/dist/common/constants.d.ts +1 -1
- package/dist/components/ai-buttons/file-upload-btn/file-upload-btn.vue.d.ts +0 -2
- package/dist/components/chat-content/file-content/file-content.vue.d.ts +5 -2
- package/dist/components/chat-content/file-content/upload-file-item.vue.d.ts +12 -0
- package/dist/components/chat-content/file-content/upload-image-item.vue.d.ts +21 -0
- package/dist/components/chat-input/ai-slash-editor/ai-slash-editor.vue.d.ts +1 -1
- package/dist/components/chat-input/build-default-placeholder.d.ts +7 -0
- package/dist/components/chat-input/chat-input.vue.d.ts +1 -1
- package/dist/components/chat-message/message-container/message-container.vue.d.ts +1 -0
- package/dist/components/chat-message/message-render/message-render.vue.d.ts +2 -0
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +2 -1
- package/dist/composables/use-custom-tab.d.ts +5 -3
- package/dist/composables/use-message-group.d.ts +78 -72
- package/dist/icons/execution.d.ts +6 -0
- package/dist/icons/tools.d.ts +3 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3054 -2854
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +7 -7
- package/dist/mcp/generated/docs/ai-slash-input.md +2 -0
- package/dist/mcp/generated/docs/assistant-message.md +9 -7
- package/dist/mcp/generated/docs/chat-container.md +35 -31
- package/dist/mcp/generated/docs/chat-input.md +18 -12
- package/dist/mcp/generated/docs/cite-content.md +3 -3
- package/dist/mcp/generated/docs/desc-panel.md +32 -10
- package/dist/mcp/generated/docs/execution-summary.md +3 -3
- package/dist/mcp/generated/docs/file-artifact-panel.md +6 -4
- package/dist/mcp/generated/docs/file-content.md +89 -73
- package/dist/mcp/generated/docs/file-upload-btn.md +16 -18
- package/dist/mcp/generated/docs/message-container.md +1 -0
- package/dist/mcp/generated/docs/message-render.md +2 -1
- package/dist/mcp/generated/docs/messages.md +5 -0
- package/dist/mcp/generated/docs/toolcall-render.md +82 -43
- package/dist/mcp/generated/docs/use-artifact-preview.md +19 -17
- package/dist/mcp/generated/docs/use-custom-tab.md +12 -8
- package/dist/mcp/generated/docs/user-message.md +3 -0
- package/dist/mcp/generated/docs/user-question-card.md +2 -0
- package/dist/mcp/generated/index.json +7 -3
- package/dist/mcp/index.js +0 -0
- package/dist/types/input.d.ts +6 -0
- package/dist/utils/file.d.ts +7 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/merge-tools-by-id.d.ts +6 -0
- package/dist/utils/upload-file.d.ts +35 -0
- package/package.json +21 -20
|
@@ -57,7 +57,10 @@ export type FunctionCall = {
|
|
|
57
57
|
description?: string;
|
|
58
58
|
mcpName?: string;
|
|
59
59
|
name: string;
|
|
60
|
+
/** 调用类型;function或者不填代表函数调用,mcp 代表 MCP 调用,skill 代表 Skill 加载调用*/
|
|
61
|
+
type?: FunctionCallType;
|
|
60
62
|
};
|
|
63
|
+
export type FunctionCallType = 'function' | 'mcp' | 'skill';
|
|
61
64
|
export type GuideMessage = BaseMessage<MessageRole.Guide, string>;
|
|
62
65
|
export type HiddenAssistantMessage = BaseMessage<MessageRole.HiddenAssistant, string>;
|
|
63
66
|
export type HiddenGuideMessage = BaseMessage<MessageRole.HiddenGuide, string>;
|
|
@@ -28,7 +28,7 @@ export declare const CONST_USER_MESSAGE_TOOLS: IToolBtn[];
|
|
|
28
28
|
* 更新工具
|
|
29
29
|
*/
|
|
30
30
|
export declare const CONST_UPDATE_TOOLS: IToolBtn[];
|
|
31
|
-
export declare const MAX_UPLOAD_FILES =
|
|
31
|
+
export declare const MAX_UPLOAD_FILES = 9;
|
|
32
32
|
export declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
33
33
|
/**
|
|
34
34
|
* 关键词高亮类名
|
|
@@ -2,7 +2,6 @@ import type { AITippyProps } from '../../../types';
|
|
|
2
2
|
import 'tippy.js/dist/tippy.css';
|
|
3
3
|
export type FileUploadBtnProps = {
|
|
4
4
|
accept?: string;
|
|
5
|
-
maxFiles?: number;
|
|
6
5
|
multiple?: boolean;
|
|
7
6
|
tippyOptions?: AITippyProps;
|
|
8
7
|
};
|
|
@@ -17,7 +16,6 @@ declare const __VLS_base: import("vue").DefineComponent<FileUploadBtnProps, {},
|
|
|
17
16
|
}>, {
|
|
18
17
|
multiple: boolean;
|
|
19
18
|
accept: string;
|
|
20
|
-
maxFiles: number;
|
|
21
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { type UploadFile } from '../../../types';
|
|
1
|
+
import { type UploadFile, type UploadFileVariant } from '../../../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
files: Partial<UploadFile>[];
|
|
4
4
|
readonly?: boolean;
|
|
5
|
+
variant?: UploadFileVariant;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
8
|
deleteFile: (file: Partial<UploadFile>) => any;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
10
|
onDeleteFile?: ((file: Partial<UploadFile>) => any) | undefined;
|
|
10
|
-
}>, {
|
|
11
|
+
}>, {
|
|
12
|
+
variant: UploadFileVariant;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UploadFile } from '../../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
file: Partial<UploadFile>;
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
delete: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onDelete?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { UploadFileVariant } from '../../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
hasError?: boolean;
|
|
4
|
+
name?: string;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
src?: string;
|
|
7
|
+
variant?: UploadFileVariant;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
error: () => void;
|
|
11
|
+
delete: () => void;
|
|
12
|
+
preview: () => void;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onError?: (() => any) | undefined;
|
|
15
|
+
onDelete?: (() => any) | undefined;
|
|
16
|
+
onPreview?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
variant: UploadFileVariant;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -19,9 +19,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
19
19
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
20
|
onLayoutChange?: ((layoutInfo: monacoEditor.EditorLayoutInfo) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
-
placeholder: string;
|
|
23
22
|
disabled: boolean;
|
|
24
23
|
modelValue: string;
|
|
24
|
+
placeholder: string;
|
|
25
25
|
prompts: string[];
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -43,6 +43,7 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_14: {
|
|
|
43
43
|
filename?: string | undefined;
|
|
44
44
|
id?: string | undefined;
|
|
45
45
|
mimeType?: string | undefined;
|
|
46
|
+
size?: number | undefined;
|
|
46
47
|
type?: MessageContentType.Binary | undefined;
|
|
47
48
|
url?: string | undefined;
|
|
48
49
|
file?: {
|
|
@@ -117,7 +118,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
117
118
|
"onUpdate:cite"?: ((value: string) => any) | undefined;
|
|
118
119
|
"onUpdate:selectedModel"?: ((value: string | undefined) => any) | undefined;
|
|
119
120
|
}>, {
|
|
120
|
-
placeholder: string;
|
|
121
121
|
prompts: string[];
|
|
122
122
|
skills: ISkillListItem[];
|
|
123
123
|
resources: IAiSlashMenuItem[];
|
|
@@ -22,6 +22,7 @@ export type MessageContainerProps = {
|
|
|
22
22
|
onInterruptResume?: OnInterruptResume;
|
|
23
23
|
onUserAction?: UserActionCallback;
|
|
24
24
|
renderMode?: RenderMode;
|
|
25
|
+
userMessageTools?: IToolBtn[];
|
|
25
26
|
updateTools?: IToolBtn[];
|
|
26
27
|
} & {
|
|
27
28
|
onUserInputConfirm?: (message: Message, content: UserMessage['content'], docSchema: TagSchema) => Promise<void>;
|
|
@@ -5,6 +5,7 @@ import type { Token } from '../../../markdown-it';
|
|
|
5
5
|
import type { MessageToolsProps } from '../../message-tools/message-tools.vue';
|
|
6
6
|
import type { UserQuestionAnsweredCardSlots } from '../interrupt-message/user-question/user-question-answered-card.vue';
|
|
7
7
|
import type { UserMessageActionsProps } from '../user-message/user-message.vue';
|
|
8
|
+
import type { IToolBtn } from '../../../types';
|
|
8
9
|
type __VLS_Slots = {
|
|
9
10
|
answeredQuestion: UserQuestionAnsweredCardSlots['answer'];
|
|
10
11
|
codeHeader: (props: {
|
|
@@ -18,6 +19,7 @@ type __VLS_Slots = {
|
|
|
18
19
|
};
|
|
19
20
|
type __VLS_Props = Partial<UserMessageActionsProps> & Pick<MessageToolsProps, 'onAction' | 'tippyOptions'> & {
|
|
20
21
|
message: Partial<Message>;
|
|
22
|
+
messageTools?: IToolBtn[];
|
|
21
23
|
onInterruptResume?: OnInterruptResume;
|
|
22
24
|
};
|
|
23
25
|
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputContent } from '../../../ag-ui/types';
|
|
2
|
-
import { type TagSchema, MessageToolsStatus } from '../../../types';
|
|
2
|
+
import { type IToolBtn, type TagSchema, MessageToolsStatus } from '../../../types';
|
|
3
3
|
import { type MessageToolsProps } from '../../message-tools/message-tools.vue';
|
|
4
4
|
import type { UserMessage } from '../../../ag-ui/types/messages';
|
|
5
5
|
export type UserMessageActionsProps = {
|
|
@@ -13,6 +13,7 @@ interface UserMessageProps extends UserMessageActionsProps {
|
|
|
13
13
|
id?: UserMessage['id'];
|
|
14
14
|
messageId?: UserMessage['messageId'];
|
|
15
15
|
name?: UserMessage['name'];
|
|
16
|
+
messageTools?: IToolBtn[];
|
|
16
17
|
onAction?: MessageToolsProps['onAction'];
|
|
17
18
|
property?: UserMessage['property'];
|
|
18
19
|
role?: UserMessage['role'];
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { type ComputedRef, type ShallowRef } from 'vue';
|
|
1
|
+
import { type ComputedRef, type Ref, type ShallowRef } from 'vue';
|
|
2
2
|
import type { CustomTab } from '../types';
|
|
3
3
|
export declare const CUSTOM_TAB_TOKEN: unique symbol;
|
|
4
4
|
export declare const EXECUTION_TAB_NAME = "execution";
|
|
5
5
|
/** 自定义 Tab 默认排序权重;执行情况固定为 0,业务自定义 Tab 缺省回退到此值 */
|
|
6
6
|
export declare const DEFAULT_TAB_ORDER = 100;
|
|
7
7
|
export declare function useCustomTabProvider<T extends Record<string, unknown>>(options: {
|
|
8
|
+
/** 侧栏折叠态;由容器传入受控 ref(如 ChatContainer 的 v-model:asideCollapsed),缺省内部自持 */
|
|
9
|
+
collapsed?: Ref<boolean>;
|
|
8
10
|
/** 执行情况 Tab 是否展示,缺省 true;传 getter 以保持响应式 */
|
|
9
11
|
executionTabVisible?: () => boolean | undefined;
|
|
10
12
|
onTabChange?: (tab: CustomTab<T>) => void;
|
|
11
13
|
}): {
|
|
12
14
|
tabs: ShallowRef<CustomTab<T>[], CustomTab<T>[]>;
|
|
13
15
|
displayTabs: ComputedRef<CustomTab<T>[]>;
|
|
14
|
-
selectedTab:
|
|
16
|
+
selectedTab: Ref<{
|
|
15
17
|
closable?: boolean | undefined;
|
|
16
18
|
data?: import("vue").UnwrapRef<T & {
|
|
17
19
|
messageUid?: string;
|
|
@@ -32,7 +34,7 @@ export declare function useCustomTabProvider<T extends Record<string, unknown>>(
|
|
|
32
34
|
order?: number | undefined;
|
|
33
35
|
visible?: boolean | undefined;
|
|
34
36
|
}>;
|
|
35
|
-
isCollapse:
|
|
37
|
+
isCollapse: Ref<boolean, boolean>;
|
|
36
38
|
addCustomTab: (tab: CustomTab<T>) => void;
|
|
37
39
|
ensureCustomTab: (tab: CustomTab<T>) => void;
|
|
38
40
|
removeCustomTab: (tabName: CustomTab<T>["name"]) => void;
|