@blueking/chat-x 0.0.45-beta.1 → 0.0.45-beta.3
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 +5 -0
- package/dist/ag-ui/types/interrupt.d.ts +35 -5
- package/dist/components/ai-buttons/tool-btn/tool-btn.vue.d.ts +11 -1
- package/dist/components/chat-content/flow-agent-content/flow-agent-content.vue.d.ts +4 -0
- package/dist/components/chat-content/flow-agent-content/flow-agent-node-detail.vue.d.ts +2 -0
- package/dist/components/chat-content/flow-agent-content/flow-agent-state.d.ts +34 -0
- package/dist/components/chat-content/flow-agent-content/use-flow-agent.d.ts +51 -0
- package/dist/components/chat-content/flow-agent-content/use-flow-node-actions.d.ts +32 -0
- package/dist/components/chat-content/flow-agent-content/use-flow-tab.d.ts +18 -0
- package/dist/components/chat-content/index.d.ts +2 -0
- package/dist/components/chat-input/ai-slash-input/ai-skill-list/ai-skill-list.vue.d.ts +8 -0
- package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +3 -1
- package/dist/components/chat-input/chat-input.vue.d.ts +3 -1
- package/dist/components/chat-message/activity-message/activity-message.vue.d.ts +4 -1
- package/dist/components/index.d.ts +7 -2
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/use-common.d.ts +1 -1
- package/dist/composables/use-custom-tab.d.ts +1 -1
- package/dist/composables/use-full-screen.d.ts +17 -0
- package/dist/composables/use-message-group.d.ts +9 -0
- package/dist/icons/execution.d.ts +3 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/screen.d.ts +6 -0
- package/dist/index.css +1 -1
- package/dist/index.js +4335 -4108
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +5 -1
- package/dist/mcp/generated/docs/activity-message.md +33 -9
- package/dist/mcp/generated/docs/chat-container.md +78 -19
- package/dist/mcp/generated/docs/file-upload-btn.md +1 -1
- package/dist/mcp/generated/docs/flow-agent-content.md +47 -7
- package/dist/mcp/generated/docs/interrupt-message.md +2 -2
- package/dist/mcp/generated/docs/interrupt.md +80 -8
- package/dist/mcp/generated/docs/markdown-content.md +23 -0
- package/dist/mcp/generated/docs/message-container.md +1 -1
- package/dist/mcp/generated/docs/message-render.md +3 -3
- package/dist/mcp/generated/docs/message-tools.md +3 -3
- package/dist/mcp/generated/docs/shortcut-render.md +5 -1
- package/dist/mcp/generated/docs/tool-approval-card.md +2 -2
- package/dist/mcp/generated/docs/tool-btn.md +37 -6
- package/dist/mcp/generated/docs/use-flow-node-actions.md +124 -0
- package/dist/mcp/generated/docs/use-full-screen.md +114 -0
- package/dist/mcp/generated/index.json +33 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/markdown-bk-inline-style.d.ts +20 -0
- package/dist/types/custom.d.ts +1 -0
- package/dist/types/editor.d.ts +6 -0
- package/dist/types/input.d.ts +1 -1
- package/dist/types/tool.d.ts +3 -3
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -43,12 +43,17 @@ export type BkFlowNode = {
|
|
|
43
43
|
loop: number;
|
|
44
44
|
name: string;
|
|
45
45
|
retry: number;
|
|
46
|
+
retryable?: boolean;
|
|
46
47
|
skip: boolean;
|
|
48
|
+
skippable?: boolean;
|
|
47
49
|
start_time: string;
|
|
48
50
|
state: string;
|
|
49
51
|
type: string;
|
|
50
52
|
};
|
|
51
53
|
export type BkFlowTask = {
|
|
54
|
+
confidence_title?: string;
|
|
55
|
+
has_confidence?: boolean;
|
|
56
|
+
is_active?: boolean;
|
|
52
57
|
nodes: Record<string, BkFlowNode>;
|
|
53
58
|
statistics: {
|
|
54
59
|
state_counts: Record<string, number>;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { APPROVAL_STATUS, InterruptReason, MessageRole } from './constants';
|
|
2
2
|
import type { BaseMessage } from './messages';
|
|
3
|
+
/**
|
|
4
|
+
* 可恢复操作(resume operation)枚举。
|
|
5
|
+
*
|
|
6
|
+
* 统一标识用户在「中断消息 / 活动消息」上触发的、需回传 Agent 处理的动作;
|
|
7
|
+
* 业务侧通过 `onInterruptResume` 回调的 `payload.operation` 字段进行分支处理。
|
|
8
|
+
* 新增操作类型只需在此扩展,回调契约与透传链路保持不变。
|
|
9
|
+
*/
|
|
10
|
+
export declare enum InterruptResumeOperation {
|
|
11
|
+
/** 主动取消第三方工具审批:在 interrupt 记录上写入取消结果 */
|
|
12
|
+
ApprovalCancel = "approval_cancel",
|
|
13
|
+
/** 重试失败的流程节点:bkflow 节点状态重置为可执行 */
|
|
14
|
+
FlowNodeRetry = "flow_node_retry",
|
|
15
|
+
/** 跳过失败的流程节点:bkflow 节点标记为已跳过 */
|
|
16
|
+
FlowNodeSkip = "flow_node_skip"
|
|
17
|
+
}
|
|
3
18
|
/**
|
|
4
19
|
* AI Dev 第三方工具审批中断
|
|
5
20
|
*/
|
|
@@ -28,6 +43,18 @@ export type BaseResume<T extends InterruptReason, P extends Record<string, any>
|
|
|
28
43
|
reason: T;
|
|
29
44
|
status: 'cancelled' | 'resolved';
|
|
30
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* 流程节点(flow-agent)操作响应负载:重试 / 跳过失败节点。
|
|
48
|
+
* 流程节点不属于 interrupt,故节点定位信息(taskId / nodeId)随 payload 一并回传,
|
|
49
|
+
* 此时 `onInterruptResume` 的第二个 `interrupt` 参数为空。
|
|
50
|
+
*/
|
|
51
|
+
export type FlowNodeResume = {
|
|
52
|
+
operation: InterruptResumeOperation.FlowNodeRetry | InterruptResumeOperation.FlowNodeSkip;
|
|
53
|
+
payload: {
|
|
54
|
+
node_id: string;
|
|
55
|
+
task_id: number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
31
58
|
export type Interrupt = AIDevToolApprovalInterrupt | BaseInterrupt<InterruptReason, Record<string, any>> | UserQuestionInterrupt;
|
|
32
59
|
export type InterruptItem = Interrupt;
|
|
33
60
|
/**
|
|
@@ -49,14 +76,14 @@ export type InterruptMessage = BaseMessage<MessageRole.Interrupt, {
|
|
|
49
76
|
runId?: string;
|
|
50
77
|
threadId?: string;
|
|
51
78
|
}>;
|
|
52
|
-
export type InterruptResume = ToolApprovalResume | UserQuestionResume;
|
|
79
|
+
export type InterruptResume = FlowNodeResume | ToolApprovalResume | UserQuestionResume;
|
|
53
80
|
/**
|
|
54
81
|
* 中断响应回调(统一约定:payload 在前,原始中断信息在后)
|
|
55
|
-
* @param payload 响应负载(resume payload
|
|
56
|
-
* @param interrupt
|
|
82
|
+
* @param payload 响应负载(resume payload),通过 `payload.operation` 区分动作类型
|
|
83
|
+
* @param interrupt 中断原始信息;流程节点等非中断来源的操作可不传
|
|
57
84
|
* @returns
|
|
58
85
|
*/
|
|
59
|
-
export type OnInterruptResume = (payload: InterruptResume, interrupt
|
|
86
|
+
export type OnInterruptResume = (payload: InterruptResume, interrupt?: Interrupt) => Promise<void> | void;
|
|
60
87
|
export type RunFinishedOutcome = {
|
|
61
88
|
interrupts: Interrupt[];
|
|
62
89
|
type: 'interrupt';
|
|
@@ -67,7 +94,10 @@ export type RunFinishedOutcome = {
|
|
|
67
94
|
* 第三方工具审批中断的响应负载(取消审批等动作)
|
|
68
95
|
*/
|
|
69
96
|
export type ToolApprovalResume = {
|
|
70
|
-
|
|
97
|
+
operation: InterruptResumeOperation.ApprovalCancel;
|
|
98
|
+
payload: {
|
|
99
|
+
interrupt_id: number | string;
|
|
100
|
+
};
|
|
71
101
|
};
|
|
72
102
|
/**
|
|
73
103
|
* 用户对单个问题的回答
|
|
@@ -6,10 +6,20 @@ type __VLS_Props = IToolBtn & {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
tippyOptions?: Partial<Omit<TippyOptions, 'getReferenceClientRect' | 'triggerTarget'>>;
|
|
8
8
|
};
|
|
9
|
-
declare
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
14
|
click: (data: IToolBtn, event: MouseEvent) => any;
|
|
11
15
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
16
|
onClick?: ((data: IToolBtn, event: MouseEvent) => any) | undefined;
|
|
13
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
19
|
declare const _default: typeof __VLS_export;
|
|
15
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { MessageStatus as MessageStatusType } from '../../../ag-ui/types/constants';
|
|
2
2
|
import type { BkFlowMessageContent } from '../../../ag-ui/types/contents';
|
|
3
|
+
import type { OnInterruptResume } from '../../../ag-ui/types/interrupt';
|
|
4
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
5
|
type __VLS_Props = {
|
|
4
6
|
content?: BkFlowMessageContent;
|
|
5
7
|
messageUid?: string;
|
|
8
|
+
/** resume 回调:节点「重试 / 跳过」与第三方审批取消复用同一回调,按 payload.operation 分流 */
|
|
9
|
+
onInterruptResume?: OnInterruptResume;
|
|
6
10
|
status?: MessageStatusType;
|
|
7
11
|
};
|
|
8
12
|
type __VLS_ModelProps = {
|
|
@@ -5,6 +5,7 @@ type __VLS_Slots = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
7
7
|
data?: Partial<NodeDetailData>;
|
|
8
|
+
has_confidence?: boolean;
|
|
8
9
|
loading?: boolean;
|
|
9
10
|
node_id?: string;
|
|
10
11
|
node_name?: string;
|
|
@@ -14,6 +15,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
14
15
|
data: Partial<NodeDetailData>;
|
|
15
16
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
16
17
|
data?: Partial<NodeDetailData>;
|
|
18
|
+
has_confidence?: boolean;
|
|
17
19
|
loading?: boolean;
|
|
18
20
|
node_id?: string;
|
|
19
21
|
node_name?: string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type VNode } from 'vue';
|
|
2
|
+
/** 归一后的执行状态 */
|
|
3
|
+
export type ConvergedState = 'failed' | 'pending' | 'running' | 'skipped' | 'success' | 'suspended';
|
|
4
|
+
/** 单个归一状态的完整定义 */
|
|
5
|
+
interface FlowStateDef {
|
|
6
|
+
/** 状态主题色,供统计标签文字与图标语义复用 */
|
|
7
|
+
color: string;
|
|
8
|
+
/** 节点状态点的边框色,缺省回退到 color(仅 pending 与主题色不同) */
|
|
9
|
+
dotColor?: string;
|
|
10
|
+
/** 状态图标(VNode);running 走 Loading 动画,故为 null */
|
|
11
|
+
icon: null | VNode;
|
|
12
|
+
/** 归一状态标识 */
|
|
13
|
+
key: ConvergedState;
|
|
14
|
+
/** 国际化标签 */
|
|
15
|
+
label: string;
|
|
16
|
+
/** 归一到该状态的后端原始状态枚举 */
|
|
17
|
+
rawStates: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 执行状态唯一配置源(Single Source of Truth)。
|
|
21
|
+
* 新增 / 调整状态只需维护此处:归一映射、统计标签、颜色、图标均由它派生,
|
|
22
|
+
* 避免状态逻辑散落在组件与 SCSS 多处。
|
|
23
|
+
* 数组顺序即统计概览(visibleStats)的展示顺序。
|
|
24
|
+
*/
|
|
25
|
+
export declare const STATE_DEFS: FlowStateDef[];
|
|
26
|
+
/** 后端原始状态归一;未知状态回退 running(保持原有行为) */
|
|
27
|
+
export declare const getConvergedState: (rawState: string) => ConvergedState;
|
|
28
|
+
/** 状态主题色(用于统计标签文字) */
|
|
29
|
+
export declare const getStateColor: (state: ConvergedState) => string;
|
|
30
|
+
/** 节点状态点边框色 */
|
|
31
|
+
export declare const getStateDotColor: (state: ConvergedState) => string;
|
|
32
|
+
/** 取状态图标,返回克隆的 VNode 以支持多处复用;running 无图标返回 null */
|
|
33
|
+
export declare const getStateIcon: (state: ConvergedState) => null | VNode;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref, type VNode } from 'vue';
|
|
2
|
+
import { type ConvergedState } from './flow-agent-state';
|
|
3
|
+
import type { BkFlowMessageContent, BkFlowNode, BkFlowTask } from '../../../ag-ui/types/contents';
|
|
4
|
+
/** 节点视图模型:模板直接消费,避免重复 Object.values / 状态归一 / 时间格式化 */
|
|
5
|
+
export interface FlowNodeVM {
|
|
6
|
+
convergedState: ConvergedState;
|
|
7
|
+
dotColor: string;
|
|
8
|
+
elapsedTimeText: string;
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
raw: BkFlowNode;
|
|
12
|
+
/** 是否可重试(失败节点行尾「重试」按钮的显隐依据) */
|
|
13
|
+
retryable: boolean;
|
|
14
|
+
/** 是否可跳过(失败节点行尾「跳过」按钮的显隐依据) */
|
|
15
|
+
skippable: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** 统计概览项视图模型 */
|
|
18
|
+
export interface FlowStatVM {
|
|
19
|
+
/** 计数文字色 */
|
|
20
|
+
color: string;
|
|
21
|
+
display: string;
|
|
22
|
+
/** 状态圆点(环)边框色,pending 等需与文字色区分时回退到独立 dotColor */
|
|
23
|
+
dotColor: string;
|
|
24
|
+
key: ConvergedState;
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
27
|
+
/** 任务视图模型 */
|
|
28
|
+
export interface FlowTaskVM {
|
|
29
|
+
confidenceTitle?: string;
|
|
30
|
+
convergedState: ConvergedState;
|
|
31
|
+
hasConfidence: boolean;
|
|
32
|
+
isActive: boolean;
|
|
33
|
+
nodes: FlowNodeVM[];
|
|
34
|
+
raw: BkFlowTask;
|
|
35
|
+
stateIcon: null | VNode;
|
|
36
|
+
taskId: number;
|
|
37
|
+
taskName: string;
|
|
38
|
+
totalTimeText: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* flow-agent 视图模型 composable。
|
|
42
|
+
* 将原始 BkFlowTask[] 转换为模板友好的视图模型,并集中处理统计聚合与展开态,
|
|
43
|
+
* 纯派生逻辑(不依赖注入),便于复用与单测。
|
|
44
|
+
*/
|
|
45
|
+
export declare const useFlowAgent: (contentRef: Ref<BkFlowMessageContent | undefined>) => {
|
|
46
|
+
isTaskExpanded: (task: BkFlowTask) => boolean;
|
|
47
|
+
taskList: ComputedRef<BkFlowTask[]>;
|
|
48
|
+
toggleTaskExpanded: (task: BkFlowTask) => void;
|
|
49
|
+
viewTasks: ComputedRef<FlowTaskVM[]>;
|
|
50
|
+
visibleStats: ComputedRef<FlowStatVM[]>;
|
|
51
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
import { InterruptResumeOperation } from '../../../ag-ui/types/interrupt';
|
|
3
|
+
import type { BkFlowNode, BkFlowTask } from '../../../ag-ui/types/contents';
|
|
4
|
+
import type { OnInterruptResume } from '../../../ag-ui/types/interrupt';
|
|
5
|
+
import type { FlowNodeVM, FlowTaskVM } from './use-flow-agent';
|
|
6
|
+
/** 节点行尾操作类型标识 */
|
|
7
|
+
export type FlowNodeActionId = 'detail' | InterruptResumeOperation.FlowNodeRetry | InterruptResumeOperation.FlowNodeSkip;
|
|
8
|
+
/** 节点行尾操作视图模型:详情 / 重试 / 跳过统一为同一渲染单元(图标 + 文案 + 点击) */
|
|
9
|
+
export interface FlowNodeActionVM {
|
|
10
|
+
/** 按钮图标组件 */
|
|
11
|
+
icon: Component;
|
|
12
|
+
/** 唯一标识,用于 v-for key 与样式钩子 */
|
|
13
|
+
id: FlowNodeActionId;
|
|
14
|
+
/** 国际化文案 */
|
|
15
|
+
label: string;
|
|
16
|
+
/** 点击执行 */
|
|
17
|
+
run: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* flow-agent 节点行尾操作 composable。
|
|
21
|
+
*
|
|
22
|
+
* 将「详情(打开侧栏)」与「重试 / 跳过(回传 Agent resume)」聚合为统一的、声明式的
|
|
23
|
+
* 操作列表,组件层只需遍历渲染,显隐与点击行为均收敛于此,便于复用、单测与扩展。
|
|
24
|
+
*/
|
|
25
|
+
export declare const useFlowNodeActions: (options: {
|
|
26
|
+
/** resume 回调(与第三方审批取消同一回调,按 payload.operation 分流) */
|
|
27
|
+
onInterruptResume: Ref<OnInterruptResume | undefined>;
|
|
28
|
+
/** 打开节点详情侧栏(复用 useFlowTab 的能力) */
|
|
29
|
+
openNodeDetail: (task: BkFlowTask, node: BkFlowNode) => void;
|
|
30
|
+
}) => {
|
|
31
|
+
getNodeActions: (task: FlowTaskVM, node: FlowNodeVM) => FlowNodeActionVM[];
|
|
32
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { BkFlowNode, BkFlowTask } from '../../../ag-ui/types/contents';
|
|
3
|
+
/**
|
|
4
|
+
* flow-agent 自定义 Tab 集成 composable。
|
|
5
|
+
* 收敛与 useCustomTab 的交互:选中态计算、打开节点详情 / 有效证据、
|
|
6
|
+
* 以及挂载时默认激活、卸载时清理 Tab 的生命周期。
|
|
7
|
+
*/
|
|
8
|
+
export declare const useFlowTab: (options: {
|
|
9
|
+
messageUid: Ref<string | undefined>;
|
|
10
|
+
taskList: Ref<BkFlowTask[]>;
|
|
11
|
+
}) => {
|
|
12
|
+
displaySelectedTabName: import("vue").ComputedRef<string>;
|
|
13
|
+
isNodeSelected: (task: BkFlowTask, node: BkFlowNode) => boolean;
|
|
14
|
+
isTaskSelected: (task: BkFlowTask) => boolean;
|
|
15
|
+
markUserTabSelection: () => void;
|
|
16
|
+
openConfidence: (task?: BkFlowTask) => void;
|
|
17
|
+
openNodeDetail: (task: BkFlowTask, node: BkFlowNode) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ISkillListItem } from '../../../../types/editor';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
onSelect: (skill: ISkillListItem) => void;
|
|
4
|
+
skills: ISkillListItem[];
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type KeyboardPayload } from '../../../edix';
|
|
2
|
-
import type { IAiSlashMenuItem } from '../../../types/editor';
|
|
2
|
+
import type { IAiSlashMenuItem, ISkillListItem } from '../../../types/editor';
|
|
3
3
|
import type { TagSchema } from '../../../types/input';
|
|
4
4
|
import 'tippy.js/dist/tippy.css';
|
|
5
5
|
type __VLS_Props = {
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
prompts?: string[];
|
|
9
9
|
resources?: IAiSlashMenuItem[];
|
|
10
|
+
skills?: ISkillListItem[];
|
|
10
11
|
};
|
|
11
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
12
13
|
cleanup: () => void;
|
|
@@ -42,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
42
43
|
}>, {
|
|
43
44
|
placeholder: string;
|
|
44
45
|
prompts: string[];
|
|
46
|
+
skills: ISkillListItem[];
|
|
45
47
|
resources: IAiSlashMenuItem[];
|
|
46
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type UserMessage, MessageContentType, MessageStatus } from '../../ag-ui/types';
|
|
2
|
-
import { type AITippyProps, type IAiSlashMenuItem, type Shortcut, type TagSchema, type UploadFile, UploadStatus } from '../../types';
|
|
2
|
+
import { type AITippyProps, type IAiSlashMenuItem, type ISkillListItem, type Shortcut, type TagSchema, type UploadFile, UploadStatus } from '../../types';
|
|
3
3
|
export type ChatInputEmits = {
|
|
4
4
|
(e: 'selectShortcut', shortcut: Shortcut): void;
|
|
5
5
|
(e: 'deleteShortcut'): void;
|
|
@@ -21,6 +21,7 @@ export type ChatInputProps = {
|
|
|
21
21
|
sendDisabledTip?: string;
|
|
22
22
|
shortcutId?: string;
|
|
23
23
|
shortcuts?: Shortcut[];
|
|
24
|
+
skills?: ISkillListItem[];
|
|
24
25
|
supportUpload?: boolean;
|
|
25
26
|
tippyOptions?: AITippyProps;
|
|
26
27
|
};
|
|
@@ -102,6 +103,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
102
103
|
}>, {
|
|
103
104
|
placeholder: string;
|
|
104
105
|
prompts: string[];
|
|
106
|
+
skills: ISkillListItem[];
|
|
105
107
|
resources: IAiSlashMenuItem[];
|
|
106
108
|
inputMaxHeight: number;
|
|
107
109
|
supportUpload: boolean;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { OnInterruptResume } from '../../../ag-ui/types/interrupt';
|
|
1
2
|
import type { ActivityMessage } from '../../../ag-ui/types/messages';
|
|
2
|
-
type __VLS_Props = Partial<ActivityMessage
|
|
3
|
+
type __VLS_Props = Partial<ActivityMessage> & {
|
|
4
|
+
onInterruptResume?: OnInterruptResume;
|
|
5
|
+
};
|
|
3
6
|
type __VLS_ModelProps = {
|
|
4
7
|
'collapsed'?: boolean;
|
|
5
8
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import ScrollBtn from './ai-buttons/scroll-btn/scroll-btn.vue';
|
|
2
|
+
import AiLoading from './ai-loading/ai-loading.vue';
|
|
1
3
|
import AiSelection from './ai-selection/ai-selection.vue';
|
|
2
4
|
import ShortcutBtn from './ai-shortcut/shortcut-btn/shortcut-btn.vue';
|
|
3
5
|
import ShortcutBtns from './ai-shortcut/shortcut-btns/shortcut-btns.vue';
|
|
4
6
|
import ShortcutRender from './ai-shortcut/shortcut-render/shortcut-render.vue';
|
|
5
7
|
import ChatContainer from './chat-container/chat-container.vue';
|
|
8
|
+
import commonErrorContent from './chat-content/common-error-content/common-error-content.vue';
|
|
6
9
|
import ContentRender from './chat-content/content-render/content-render.vue';
|
|
7
10
|
import ChatInput from './chat-input/chat-input.vue';
|
|
8
|
-
export * from './chat-
|
|
11
|
+
export * from './chat-content';
|
|
9
12
|
import MessageContainer from './chat-message/message-container/message-container.vue';
|
|
10
13
|
import MessageRender from './chat-message/message-render/message-render.vue';
|
|
11
14
|
import ExecutionSummary from './execution-summary/execution-summary.vue';
|
|
@@ -18,4 +21,6 @@ import MessageTools from './message-tools/message-tools.vue';
|
|
|
18
21
|
import MessageUserFeedback from './message-tools/user-feedback/user-feedback.vue';
|
|
19
22
|
import SelectionFooter from './selection-footer/selection-footer.vue';
|
|
20
23
|
import ToolCallRender from './tool-call/toolcall-render/toolcall-render.vue';
|
|
21
|
-
export
|
|
24
|
+
export * from './chat-message/interrupt-message';
|
|
25
|
+
export * from './markdown-token';
|
|
26
|
+
export { AiImage, AiLoading, AiSelection, ChatContainer, ChatInput, commonErrorContent, ContentRender, ExecutionSummary, HighlightKeyword, ImagePreview, ImagePreviewGroup, MessageContainer, MessageLoading, MessageRender, MessageTools, MessageUserFeedback, ScrollBtn, SelectionFooter, ShortcutBtn, ShortcutBtns, ShortcutRender, ToolCallRender, };
|
|
@@ -3,6 +3,7 @@ export * from './use-clipboard';
|
|
|
3
3
|
export * from './use-command-selection';
|
|
4
4
|
export * from './use-container-scroll';
|
|
5
5
|
export * from './use-custom-tab';
|
|
6
|
+
export * from './use-full-screen';
|
|
6
7
|
export * from './use-global-config';
|
|
7
8
|
export * from './use-menu-keydown';
|
|
8
9
|
export * from './use-message-group';
|
|
@@ -24,7 +24,7 @@ export declare const useCommonTippyInject: () => ComputedRef<Partial<Pick<Partia
|
|
|
24
24
|
content: import("vue-tippy").TippyContent;
|
|
25
25
|
triggerTarget: import("vue-tippy").TippyTarget;
|
|
26
26
|
getReferenceClientRect: null | (() => DOMRect & any);
|
|
27
|
-
}>, "zIndex" | "appendTo">>> | undefined;
|
|
27
|
+
}>, "placement" | "zIndex" | "appendTo">>> | undefined;
|
|
28
28
|
export declare const useKeywordMatch: (getSearchTexts: () => (string | undefined)[]) => {
|
|
29
29
|
keywordMatched: ComputedRef<boolean | null>;
|
|
30
30
|
keyword: ComputedRef<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ShallowRef } from 'vue';
|
|
2
|
-
import {
|
|
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
|
export declare function useCustomTabProvider<T extends Record<string, unknown>>(options: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type MaybeRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 将传入的目标元素以浏览器原生全屏方式展示。
|
|
4
|
+
*
|
|
5
|
+
* @param target 需要全屏的目标元素(支持 ref);缺省时回退到 document.documentElement。
|
|
6
|
+
* @returns
|
|
7
|
+
* - `isSupported` 当前环境是否支持全屏
|
|
8
|
+
* - `isFullScreen` 只读响应式状态,始终与真实全屏同步(含用户按 ESC 退出)
|
|
9
|
+
* - `enter` / `exit` / `toggle` 控制方法
|
|
10
|
+
*/
|
|
11
|
+
export declare const useFullScreen: (target?: MaybeRef<HTMLElement | null>) => {
|
|
12
|
+
isSupported: boolean;
|
|
13
|
+
isFullScreen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
14
|
+
enter: () => Promise<void>;
|
|
15
|
+
exit: () => Promise<void>;
|
|
16
|
+
toggle: () => Promise<void>;
|
|
17
|
+
};
|
|
@@ -22,6 +22,9 @@ export declare const useMessageGroup: (options: {
|
|
|
22
22
|
messages: ({
|
|
23
23
|
activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
|
|
24
24
|
content: {
|
|
25
|
+
confidence_title?: string | undefined;
|
|
26
|
+
has_confidence?: boolean | undefined;
|
|
27
|
+
is_active?: boolean | undefined;
|
|
25
28
|
nodes: Record<string, import("..").BkFlowNode>;
|
|
26
29
|
statistics: {
|
|
27
30
|
state_counts: Record<string, number>;
|
|
@@ -12980,6 +12983,9 @@ export declare const useMessageGroup: (options: {
|
|
|
12980
12983
|
messages: ({
|
|
12981
12984
|
activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
|
|
12982
12985
|
content: {
|
|
12986
|
+
confidence_title?: string | undefined;
|
|
12987
|
+
has_confidence?: boolean | undefined;
|
|
12988
|
+
is_active?: boolean | undefined;
|
|
12983
12989
|
nodes: Record<string, import("..").BkFlowNode>;
|
|
12984
12990
|
statistics: {
|
|
12985
12991
|
state_counts: Record<string, number>;
|
|
@@ -25944,6 +25950,9 @@ export declare const useMessageGroup: (options: {
|
|
|
25944
25950
|
onConfirmShare: () => ({
|
|
25945
25951
|
activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
|
|
25946
25952
|
content: {
|
|
25953
|
+
confidence_title?: string | undefined;
|
|
25954
|
+
has_confidence?: boolean | undefined;
|
|
25955
|
+
is_active?: boolean | undefined;
|
|
25947
25956
|
nodes: Record<string, import("..").BkFlowNode>;
|
|
25948
25957
|
statistics: {
|
|
25949
25958
|
state_counts: Record<string, number>;
|
|
@@ -10,6 +10,9 @@ export declare const BkFlowSuspendedIcon: import("vue").VNode<import("vue").Rend
|
|
|
10
10
|
export declare const BkFlowPendingIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
}>;
|
|
13
|
+
export declare const BkFlowSkippedIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>;
|
|
13
16
|
export declare const ExecutionIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
17
|
[key: string]: any;
|
|
15
18
|
}>;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FullScreenIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}>;
|
|
4
|
+
export declare const UnFullScreenIcon: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>;
|