@blueking/chat-x 2.4.0 → 3.0.0-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/messages.d.ts +1 -1
- package/dist/components/chat-content/flow-agent-content/flow-agent-state.d.ts +24 -7
- package/dist/components/chat-content/flow-agent-content/use-flow-agent.d.ts +6 -1
- package/dist/components/chat-input/chat-input.vue.d.ts +5 -2
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +1 -0
- package/dist/components/image-preview/image.vue.d.ts +2 -2
- package/dist/composables/use-global-config.d.ts +8 -0
- package/dist/composables/use-message-group.d.ts +3 -3
- package/dist/icons/execution.d.ts +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2464 -2386
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +2 -1
- package/dist/mcp/generated/docs/activity-message.md +15 -13
- package/dist/mcp/generated/docs/assistant-message.md +3 -2
- package/dist/mcp/generated/docs/chat-container.md +4 -4
- package/dist/mcp/generated/docs/chat-input.md +4 -3
- package/dist/mcp/generated/docs/flow-agent-content.md +19 -14
- package/dist/mcp/generated/docs/messages.md +1 -1
- package/dist/mcp/generated/docs/toolcall-render.md +9 -9
- package/dist/mcp/generated/docs/use-global-config.md +14 -5
- package/dist/mcp/generated/docs/user-message.md +7 -4
- package/dist/mcp/generated/index.json +3 -3
- package/package.json +2 -2
- package/skills/blueking-chat-x/references/components/activity-message.md +15 -13
- package/skills/blueking-chat-x/references/components/assistant-message.md +3 -2
- package/skills/blueking-chat-x/references/components/flow-agent-content.md +14 -10
- package/skills/blueking-chat-x/references/components/toolcall-render.md +9 -9
- package/skills/blueking-chat-x/references/types/messages.md +1 -1
|
@@ -63,7 +63,7 @@ export type FunctionCall = {
|
|
|
63
63
|
mcpName?: string;
|
|
64
64
|
name: string;
|
|
65
65
|
/** 调用类型;function或者不填代表函数调用,mcp 代表 MCP 调用,skill 代表 Skill 加载调用*/
|
|
66
|
-
|
|
66
|
+
function_type?: FunctionCallType;
|
|
67
67
|
};
|
|
68
68
|
export type FunctionCallType = 'function' | 'mcp' | 'skill';
|
|
69
69
|
export type GuideMessage = BaseMessage<MessageRole.Guide, string>;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { type VNode } from 'vue';
|
|
2
2
|
/** 归一后的执行状态 */
|
|
3
|
-
export type ConvergedState = 'failed' | 'pending' | 'running' | 'skipped' | 'success' | 'suspended';
|
|
3
|
+
export type ConvergedState = 'failed' | 'pending' | 'running' | 'skipped' | 'success' | 'suspended' | 'terminated';
|
|
4
4
|
/** 单个归一状态的完整定义 */
|
|
5
|
-
interface FlowStateDef {
|
|
6
|
-
/**
|
|
5
|
+
export interface FlowStateDef {
|
|
6
|
+
/** 状态主题色,供统计标签文字、整体 header 文案与图标语义复用 */
|
|
7
7
|
color: string;
|
|
8
|
-
/**
|
|
8
|
+
/** 节点 / 统计圆点的边框色,缺省回退到 color(仅 pending 与主题色不同) */
|
|
9
9
|
dotColor?: string;
|
|
10
|
+
/** 节点 / 统计圆点的填充色;缺省透明(空心环)。已终止等实心底圆点在此声明 */
|
|
11
|
+
dotFill?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 任一任务 task_state 命中该状态时,标题栏前置该标签并括号包裹统计。
|
|
14
|
+
* 后续若有同类「整体覆盖态」,只需在对应 def 上打开此标记。
|
|
15
|
+
*/
|
|
16
|
+
flowHeader?: boolean;
|
|
10
17
|
/** 状态图标(VNode);running 走 Loading 动画,故为 null */
|
|
11
18
|
icon: null | VNode;
|
|
12
19
|
/** 归一状态标识 */
|
|
@@ -15,20 +22,30 @@ interface FlowStateDef {
|
|
|
15
22
|
label: string;
|
|
16
23
|
/** 归一到该状态的后端原始状态枚举 */
|
|
17
24
|
rawStates: string[];
|
|
25
|
+
/** 是否出现在标题栏 / tooltip 统计;缺省 true */
|
|
26
|
+
showInStats?: boolean;
|
|
18
27
|
}
|
|
19
28
|
/**
|
|
20
29
|
* 执行状态唯一配置源(Single Source of Truth)。
|
|
21
|
-
* 新增 /
|
|
30
|
+
* 新增 / 调整状态只需维护此处:归一映射、统计标签、颜色、图标、整体 header 覆盖均由它派生,
|
|
22
31
|
* 避免状态逻辑散落在组件与 SCSS 多处。
|
|
23
32
|
* 数组顺序即统计概览(visibleStats)的展示顺序。
|
|
24
33
|
*/
|
|
25
34
|
export declare const STATE_DEFS: FlowStateDef[];
|
|
26
35
|
/** 后端原始状态归一;未知状态回退 running(保持原有行为) */
|
|
27
36
|
export declare const getConvergedState: (rawState: string) => ConvergedState;
|
|
37
|
+
/**
|
|
38
|
+
* 根据任务原始状态扫描整体 header 覆盖定义。
|
|
39
|
+
* 只遍历 task_state(O(任务数)),命中首个 flowHeader 即返回。
|
|
40
|
+
*/
|
|
41
|
+
export declare const getFlowHeaderDef: (rawTaskStates: Iterable<string>) => FlowStateDef | undefined;
|
|
42
|
+
/** 是否进入标题栏 / tooltip 统计;未声明时默认展示 */
|
|
43
|
+
export declare const isShownInStats: (def: FlowStateDef) => boolean;
|
|
28
44
|
/** 状态主题色(用于统计标签文字) */
|
|
29
45
|
export declare const getStateColor: (state: ConvergedState) => string;
|
|
30
|
-
/**
|
|
46
|
+
/** 节点 / 统计圆点边框色 */
|
|
31
47
|
export declare const getStateDotColor: (state: ConvergedState) => string;
|
|
48
|
+
/** 节点 / 统计圆点填充色;未声明时返回 undefined,保持空心环 */
|
|
49
|
+
export declare const getStateDotFill: (state: ConvergedState) => string | undefined;
|
|
32
50
|
/** 取状态图标,返回深拷贝的 VNode 以支持多处复用;running 无图标返回 null */
|
|
33
51
|
export declare const getStateIcon: (state: ConvergedState) => null | VNode;
|
|
34
|
-
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type ComputedRef, type Ref, type VNode } from 'vue';
|
|
2
|
-
import { type ConvergedState } from './flow-agent-state';
|
|
3
2
|
import type { BkFlowMessageContent, BkFlowNode, BkFlowTask } from '../../../ag-ui/types/contents';
|
|
3
|
+
import type { ConvergedState, FlowStateDef } from './flow-agent-state';
|
|
4
4
|
/** 节点视图模型:模板直接消费,避免重复 Object.values / 状态归一 / 时间格式化 */
|
|
5
5
|
export interface FlowNodeVM {
|
|
6
6
|
convergedState: ConvergedState;
|
|
7
7
|
dotColor: string;
|
|
8
|
+
/** 实心底圆点填充色;空心环时缺省 */
|
|
9
|
+
dotFill?: string;
|
|
8
10
|
elapsedTimeText: string;
|
|
9
11
|
id: string;
|
|
10
12
|
name: string;
|
|
@@ -21,6 +23,8 @@ export interface FlowStatVM {
|
|
|
21
23
|
display: string;
|
|
22
24
|
/** 状态圆点(环)边框色,pending 等需与文字色区分时回退到独立 dotColor */
|
|
23
25
|
dotColor: string;
|
|
26
|
+
/** 实心底圆点填充色;空心环时缺省 */
|
|
27
|
+
dotFill?: string;
|
|
24
28
|
key: ConvergedState;
|
|
25
29
|
label: string;
|
|
26
30
|
}
|
|
@@ -43,6 +47,7 @@ export interface FlowTaskVM {
|
|
|
43
47
|
* 纯派生逻辑(不依赖注入),便于复用与单测。
|
|
44
48
|
*/
|
|
45
49
|
export declare const useFlowAgent: (contentRef: Ref<BkFlowMessageContent | undefined>) => {
|
|
50
|
+
flowHeaderDef: ComputedRef<FlowStateDef | undefined>;
|
|
46
51
|
isTaskExpanded: (task: BkFlowTask) => boolean;
|
|
47
52
|
taskList: ComputedRef<BkFlowTask[]>;
|
|
48
53
|
toggleTaskExpanded: (task: BkFlowTask) => void;
|
|
@@ -73,7 +73,9 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_15: {}, __VLS_24: {
|
|
|
73
73
|
}, __VLS_62: {}, __VLS_86: {
|
|
74
74
|
models: IModelOption[] | undefined;
|
|
75
75
|
selectedModel: string | undefined;
|
|
76
|
-
}, __VLS_97: {
|
|
76
|
+
}, __VLS_97: {
|
|
77
|
+
sendDisabledTip: string | undefined;
|
|
78
|
+
};
|
|
77
79
|
type __VLS_Slots = {} & {
|
|
78
80
|
top?: (props: typeof __VLS_1) => any;
|
|
79
81
|
} & {
|
|
@@ -91,8 +93,9 @@ type __VLS_Slots = {} & {
|
|
|
91
93
|
};
|
|
92
94
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
93
95
|
focus: () => void;
|
|
96
|
+
getUploadFiles: () => Partial<UploadFile>[];
|
|
94
97
|
insertMention: (item: IInputMenuItem) => void;
|
|
95
|
-
triggerSendMessage: () => Promise<
|
|
98
|
+
triggerSendMessage: () => Promise<boolean>;
|
|
96
99
|
uploadedArtifacts: import("vue").ComputedRef<AIFileInfo[]>;
|
|
97
100
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
98
101
|
"update:cite": (value: string) => any;
|
|
@@ -2,6 +2,7 @@ import { type InputContent } from '../../../ag-ui/types';
|
|
|
2
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
|
+
import 'tippy.js/dist/tippy.css';
|
|
5
6
|
export type UserMessageActionsProps = {
|
|
6
7
|
messageToolsStatus?: MessageToolsStatus;
|
|
7
8
|
onInputConfirm?: (content: UserMessage['content'], docSchema: TagSchema) => Promise<void>;
|
|
@@ -29,10 +29,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
29
29
|
}>, {
|
|
30
30
|
width: number | string;
|
|
31
31
|
height: number | string;
|
|
32
|
-
alt: string;
|
|
33
|
-
lazy: boolean;
|
|
34
32
|
showInfo: boolean;
|
|
35
33
|
preview: boolean;
|
|
34
|
+
alt: string;
|
|
35
|
+
lazy: boolean;
|
|
36
36
|
previewProps: ImagePreviewConfig;
|
|
37
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { ChatInputUploadResult } from '../components/chat-input/chat-input.vue';
|
|
3
|
+
import type { UploadFile } from '../types';
|
|
2
4
|
import type { IInputMenuItem } from '../types/input-menu';
|
|
3
5
|
export declare const GLOBAL_CONFIG_TOKEN: unique symbol;
|
|
4
6
|
export type AiSizeMode = 'normal' | 'small';
|
|
5
7
|
export type GlobalConfig = {
|
|
6
8
|
/** 输入框菜单数据源;消息编辑态的内嵌输入框据此渲染 @ / \ 与 + 号菜单 */
|
|
7
9
|
menuSources?: ComputedRef<IInputMenuItem[]>;
|
|
10
|
+
/** 取消编辑态草稿里本次新选的附件;与主输入框 `@delete-file` 同源 */
|
|
11
|
+
onDeleteFile?: (file: Partial<UploadFile>) => void;
|
|
12
|
+
/** 编辑态内嵌输入框复用主输入框的上传实现 */
|
|
13
|
+
onUpload?: (files: File[]) => Promise<ChatInputUploadResult | ChatInputUploadResult[]>;
|
|
8
14
|
size?: ComputedRef<AiSizeMode>;
|
|
9
15
|
supportUpload: ComputedRef<boolean>;
|
|
10
16
|
/** IANA 时区名,用于消息时间展示;未配置时按浏览器时区展示 */
|
|
@@ -12,6 +18,8 @@ export type GlobalConfig = {
|
|
|
12
18
|
};
|
|
13
19
|
export declare const useGlobalConfig: (options: GlobalConfig) => {
|
|
14
20
|
menuSources: ComputedRef<IInputMenuItem[]> | undefined;
|
|
21
|
+
onDeleteFile: ((file: Partial<UploadFile>) => void) | undefined;
|
|
22
|
+
onUpload: ((files: File[]) => Promise<ChatInputUploadResult | ChatInputUploadResult[]>) | undefined;
|
|
15
23
|
size: ComputedRef<AiSizeMode> | undefined;
|
|
16
24
|
supportUpload: ComputedRef<boolean>;
|
|
17
25
|
timezone: ComputedRef<string | undefined> | undefined;
|
|
@@ -610,7 +610,7 @@ export declare const useMessageGroup: (options: {
|
|
|
610
610
|
description?: string | undefined;
|
|
611
611
|
mcpName?: string | undefined;
|
|
612
612
|
name: string;
|
|
613
|
-
|
|
613
|
+
function_type?: import("..").FunctionCallType | undefined;
|
|
614
614
|
};
|
|
615
615
|
id: string;
|
|
616
616
|
toolMessage?: {
|
|
@@ -14083,7 +14083,7 @@ export declare const useMessageGroup: (options: {
|
|
|
14083
14083
|
description?: string | undefined;
|
|
14084
14084
|
mcpName?: string | undefined;
|
|
14085
14085
|
name: string;
|
|
14086
|
-
|
|
14086
|
+
function_type?: import("..").FunctionCallType | undefined;
|
|
14087
14087
|
};
|
|
14088
14088
|
id: string;
|
|
14089
14089
|
toolMessage?: {
|
|
@@ -27563,7 +27563,7 @@ export declare const useMessageGroup: (options: {
|
|
|
27563
27563
|
description?: string | undefined;
|
|
27564
27564
|
mcpName?: string | undefined;
|
|
27565
27565
|
name: string;
|
|
27566
|
-
|
|
27566
|
+
function_type?: import("..").FunctionCallType | undefined;
|
|
27567
27567
|
};
|
|
27568
27568
|
id: string;
|
|
27569
27569
|
toolMessage?: {
|
|
@@ -4,6 +4,10 @@ export declare const BkFlowSuccessIcon: import("vue").VNode<import("vue").Render
|
|
|
4
4
|
export declare const BkFlowFailedIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}>;
|
|
7
|
+
/** 已终止(REVOKED)任务图标,来自设计稿节点 2013:4495,保留 14×14 原始 path */
|
|
8
|
+
export declare const BkFlowTerminatedIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>;
|
|
7
11
|
export declare const BkFlowSuspendedIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
12
|
[key: string]: any;
|
|
9
13
|
}>;
|