@blueking/chat-x 0.0.3-beta.3 → 0.0.3-beta.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/ag-ui/types/constants.d.ts +2 -0
- package/dist/ag-ui/types/contents.d.ts +29 -4
- package/dist/ag-ui/types/messages.d.ts +3 -3
- package/dist/common/constants.d.ts +4 -0
- package/dist/components/ai-buttons/scroll-btn/scroll-btn.vue.d.ts +9 -4
- package/dist/components/ai-shortcut/shortcut-render/shortcut-render.vue.d.ts +4 -0
- package/dist/components/chat-content/activity-layout/activity-layout.vue.d.ts +29 -0
- package/dist/components/chat-content/flow-agent-content/detail-section.vue.d.ts +16 -0
- package/dist/components/chat-content/flow-agent-content/flow-agent-content.vue.d.ts +17 -0
- package/dist/components/chat-content/flow-agent-content/flow-agent-node-detail.vue.d.ts +22 -0
- package/dist/components/chat-content/flow-agent-content/simple-table.vue.d.ts +12 -0
- package/dist/components/chat-content/knowledge-rag-content/knowledge-rag-content.vue.d.ts +17 -0
- package/dist/components/chat-content/reference-doc-content/reference-doc-content.vue.d.ts +15 -0
- package/dist/components/chat-input/chat-input.vue.d.ts +5 -0
- package/dist/components/chat-message/message-container/message-container.vue.d.ts +24 -12340
- package/dist/components/execution-summary/execution-summary.vue.d.ts +13 -0
- package/dist/components/highlight-keyword/highlight-keyword.d.ts +15 -0
- package/dist/components/index.d.ts +6 -1
- package/dist/components/message-loading/message-loading.vue.d.ts +33 -0
- package/dist/components/selection-footer/selection-footer.vue.d.ts +19 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/use-common.d.ts +23 -0
- package/dist/composables/use-custom-tab.d.ts +31 -0
- package/dist/composables/use-message-group.d.ts +37039 -0
- package/dist/icons/ai.d.ts +3 -0
- package/dist/icons/execution.d.ts +18 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +10965 -9426
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +12 -1
- package/dist/types/custom.d.ts +60 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/tool.d.ts +1 -1
- package/dist/utils/utils.d.ts +2 -1
- package/package.json +23 -9
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare enum MessageContentType {
|
|
2
2
|
Binary = "binary",
|
|
3
|
+
FlowAgent = "flow_agent",
|
|
3
4
|
Function = "function",
|
|
4
5
|
KeyValue = "key-value",
|
|
5
6
|
KnowledgeRag = "knowledge-rag",
|
|
@@ -37,6 +38,7 @@ export declare enum MessageStatus {
|
|
|
37
38
|
Error = "error",
|
|
38
39
|
Pending = "pending",
|
|
39
40
|
Stop = "stop",
|
|
41
|
+
StopLoading = "stop-loading",
|
|
40
42
|
Streaming = "streaming",
|
|
41
43
|
Success = "success"
|
|
42
44
|
}
|
|
@@ -9,15 +9,13 @@ export interface BinaryInputContent {
|
|
|
9
9
|
}
|
|
10
10
|
export type ContentMap = AIBluekingContentMap & {
|
|
11
11
|
[MessageContentType.Binary]: BinaryInputContent;
|
|
12
|
+
[MessageContentType.FlowAgent]: BkFlowMessageContent;
|
|
12
13
|
[MessageContentType.Function]: string;
|
|
13
14
|
[MessageContentType.KeyValue]: {
|
|
14
15
|
key: string;
|
|
15
16
|
value: string;
|
|
16
17
|
}[];
|
|
17
|
-
[MessageContentType.KnowledgeRag]:
|
|
18
|
-
content: string;
|
|
19
|
-
referenceDocument: ReferenceDocumentContent[];
|
|
20
|
-
};
|
|
18
|
+
[MessageContentType.KnowledgeRag]: KnowledgeRagMessageContent;
|
|
21
19
|
[MessageContentType.Other]: any;
|
|
22
20
|
[MessageContentType.ReferenceDocument]: ReferenceDocumentContent[];
|
|
23
21
|
[MessageContentType.Text]: string;
|
|
@@ -37,3 +35,30 @@ declare global {
|
|
|
37
35
|
interface AIBluekingContentMap {
|
|
38
36
|
}
|
|
39
37
|
}
|
|
38
|
+
export type BkFlowMessageContent = {
|
|
39
|
+
nodes: Record<string, BkFlowNode>;
|
|
40
|
+
statistics: {
|
|
41
|
+
state_counts: Record<string, number>;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
task_id: number;
|
|
45
|
+
task_name: string;
|
|
46
|
+
task_outputs: unknown;
|
|
47
|
+
task_state: string;
|
|
48
|
+
};
|
|
49
|
+
export type BkFlowNode = {
|
|
50
|
+
elapsed_time: number;
|
|
51
|
+
finish_time: string;
|
|
52
|
+
id: string;
|
|
53
|
+
loop: number;
|
|
54
|
+
name: string;
|
|
55
|
+
retry: number;
|
|
56
|
+
skip: boolean;
|
|
57
|
+
start_time: string;
|
|
58
|
+
state: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
export type KnowledgeRagMessageContent = {
|
|
62
|
+
content: string;
|
|
63
|
+
referenceDocument: ReferenceDocumentContent[];
|
|
64
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OldShortcut, Shortcut } from '../../types';
|
|
2
2
|
import type { MessageContentType, MessageRole, MessageStatus } from './constants';
|
|
3
3
|
import type { ContentMap, InputContent } from './contents';
|
|
4
|
-
export interface ActivityMessage extends BaseMessage<MessageRole.Activity, ContentMap[MessageContentType.KnowledgeRag] | ContentMap[MessageContentType.ReferenceDocument]> {
|
|
5
|
-
activityType: MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
|
|
4
|
+
export interface ActivityMessage extends BaseMessage<MessageRole.Activity, ContentMap[MessageContentType.FlowAgent] | ContentMap[MessageContentType.KnowledgeRag] | ContentMap[MessageContentType.ReferenceDocument]> {
|
|
5
|
+
activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
|
|
6
6
|
}
|
|
7
7
|
export interface AssistantMessage extends BaseMessage<MessageRole.Assistant> {
|
|
8
8
|
toolCalls?: ToolCall[];
|
|
@@ -110,7 +110,7 @@ export type ToolCall = {
|
|
|
110
110
|
};
|
|
111
111
|
export interface ToolMessage extends BaseMessage<MessageRole.Tool, string> {
|
|
112
112
|
duration: number;
|
|
113
|
-
error?: string;
|
|
113
|
+
error?: boolean | string;
|
|
114
114
|
toolCallId: string;
|
|
115
115
|
}
|
|
116
116
|
export type UserMessage = BaseMessage<MessageRole.User, InputContent[] | string>;
|
|
@@ -30,3 +30,7 @@ export declare const CONST_USER_MESSAGE_TOOLS: IToolBtn[];
|
|
|
30
30
|
export declare const CONST_UPDATE_TOOLS: IToolBtn[];
|
|
31
31
|
export declare const MAX_UPLOAD_FILES = 3;
|
|
32
32
|
export declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
33
|
+
/**
|
|
34
|
+
* 关键词高亮类名
|
|
35
|
+
*/
|
|
36
|
+
export declare const HIGHLIGHT_KEYWORD_CLASS_NAME = "ai-is-keyword";
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
disabled?: boolean;
|
|
3
|
+
loading?: boolean;
|
|
3
4
|
title?: string;
|
|
4
5
|
};
|
|
5
|
-
declare var
|
|
6
|
+
declare var __VLS_7: {}, __VLS_9: {};
|
|
6
7
|
type __VLS_Slots = {} & {
|
|
7
|
-
icon?: (props: typeof
|
|
8
|
+
icon?: (props: typeof __VLS_7) => any;
|
|
8
9
|
} & {
|
|
9
|
-
title?: (props: typeof
|
|
10
|
+
title?: (props: typeof __VLS_9) => any;
|
|
10
11
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
click: (event: MouseEvent) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
18
|
declare const _default: typeof __VLS_export;
|
|
14
19
|
export default _default;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Shortcut } from '../../../types';
|
|
2
|
+
export type ShortcutRenderEmits = {
|
|
3
|
+
(e: 'close'): void;
|
|
4
|
+
(e: 'submit', formModel: Record<string, unknown>): void;
|
|
5
|
+
};
|
|
2
6
|
declare const __VLS_export: import("vue").DefineComponent<Partial<Shortcut>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
7
|
close: () => any;
|
|
4
8
|
submit: (formModel: Record<string, unknown>) => any;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MessageContentType } from '../../../ag-ui/types/constants';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
activityType?: MessageContentType;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
'collapsed'?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare var __VLS_1: {
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
}, __VLS_9: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
title?: (props: typeof __VLS_1) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: typeof __VLS_9) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:collapsed": (value: boolean) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MessageStatus as MessageStatusType } from '../../../ag-ui/types/constants';
|
|
2
|
+
import type { BkFlowMessageContent } from '../../../ag-ui/types/contents';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
content?: BkFlowMessageContent;
|
|
5
|
+
status?: MessageStatusType;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'collapsed'?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:collapsed": (value: boolean) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NodeDetailData } from '../../../types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
3
|
+
data?: Partial<NodeDetailData>;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
node_id?: string;
|
|
6
|
+
node_name?: string;
|
|
7
|
+
task_id?: number;
|
|
8
|
+
task_name?: string;
|
|
9
|
+
} & {
|
|
10
|
+
data: Partial<NodeDetailData>;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
12
|
+
data?: Partial<NodeDetailData>;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
node_id?: string;
|
|
15
|
+
node_name?: string;
|
|
16
|
+
task_id?: number;
|
|
17
|
+
task_name?: string;
|
|
18
|
+
} & {
|
|
19
|
+
data: Partial<NodeDetailData>;
|
|
20
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SimpleTableColumn {
|
|
2
|
+
breakAll?: boolean;
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
columns: SimpleTableColumn[];
|
|
8
|
+
data: Record<string, unknown>[];
|
|
9
|
+
};
|
|
10
|
+
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>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MessageStatus as MessageStatusType } from '../../../ag-ui/types/constants';
|
|
2
|
+
import type { KnowledgeRagMessageContent } from '../../../ag-ui/types/contents';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
content?: KnowledgeRagMessageContent;
|
|
5
|
+
status?: MessageStatusType;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'collapsed'?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:collapsed": (value: boolean) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReferenceDocumentContent } from '../../../ag-ui/types/contents';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
content?: ReferenceDocumentContent[];
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
'collapsed'?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:collapsed": (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type UserMessage, MessageContentType, MessageStatus } from '../../ag-ui/types';
|
|
2
2
|
import { type AITippyProps, type IAiSlashMenuItem, type Shortcut, type TagSchema, type UploadFile, UploadStatus } from '../../types';
|
|
3
|
+
export type ChatInputEmits = {
|
|
4
|
+
(e: 'selectShortcut', shortcut: Shortcut): void;
|
|
5
|
+
(e: 'deleteShortcut'): void;
|
|
6
|
+
(e: 'update:modelValue', value: string | TagSchema, selectedResourceList: IAiSlashMenuItem[]): void;
|
|
7
|
+
};
|
|
3
8
|
export type ChatInputProps = {
|
|
4
9
|
defaultUploadFiles?: UploadFile[];
|
|
5
10
|
inputMaxHeight?: number;
|