@mxmweb/rtext 1.5.5 → 1.5.7
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/index.js +5201 -5198
- package/knowledge_base_types.d.ts +4 -0
- package/mockserverdata.d.ts +16 -90
- package/package.json +1 -1
- package/stats.html +1 -1
- package/thought_chain_types.d.ts +5 -4
- package/utils/thought_chain_mapper.d.ts +5 -0
package/thought_chain_types.d.ts
CHANGED
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
export type ThoughtBusinessType = 'plan' | 'retrieve' | 'think' | 'reason';
|
|
13
13
|
/**
|
|
14
14
|
* 思维链节点状态枚举
|
|
15
|
-
*
|
|
15
|
+
* 与后端 StepStatusEnums 对齐:
|
|
16
|
+
* 1. 运行中 2. 执行完成 3. 执行失败 4. 异常
|
|
16
17
|
*/
|
|
17
|
-
export type ThoughtNodeStatus = 1 | 2 | 3 | 4
|
|
18
|
+
export type ThoughtNodeStatus = 1 | 2 | 3 | 4;
|
|
18
19
|
/**
|
|
19
20
|
* 思维链节点统一结构
|
|
20
21
|
* 用于在 UI 组件中展示 plan / retrieve / think 的进度与内容。
|
|
@@ -24,7 +25,7 @@ export interface ThoughtNode {
|
|
|
24
25
|
id: string;
|
|
25
26
|
/** 业务类型:plan / retrieve / think */
|
|
26
27
|
businessType: ThoughtBusinessType;
|
|
27
|
-
/**
|
|
28
|
+
/** 当前状态:运行中 / 执行完成 / 执行失败 / 异常 */
|
|
28
29
|
nodeStatus: ThoughtNodeStatus;
|
|
29
30
|
/** UI 中展示的标题,例如"理解规划完成"、"召回成功"等 */
|
|
30
31
|
title: string;
|
|
@@ -61,6 +62,6 @@ export declare const DEFAULT_THOUGHT_CHAIN_VERSION: ThoughtChainVersionMode;
|
|
|
61
62
|
export interface ThoughtSSEMeta {
|
|
62
63
|
/** 节点业务类型:plan / retrieve / think / reason */
|
|
63
64
|
businessType?: ThoughtBusinessType;
|
|
64
|
-
/** 节点状态:1
|
|
65
|
+
/** 节点状态:1.运行中 2.执行完成 3.执行失败 4.异常 */
|
|
65
66
|
nodeStatus?: ThoughtNodeStatus;
|
|
66
67
|
}
|
|
@@ -13,6 +13,11 @@ export interface RawChainNode {
|
|
|
13
13
|
* 统一的标题映射
|
|
14
14
|
*/
|
|
15
15
|
export declare function getThoughtTitleByBusinessType(type: ThoughtBusinessType): string;
|
|
16
|
+
/**
|
|
17
|
+
* 根据业务类型和节点状态动态生成标题
|
|
18
|
+
* 节点状态:1.待执行 2.运行中 3.执行完成 4.执行失败 5.异常
|
|
19
|
+
*/
|
|
20
|
+
export declare function getThoughtTitleByBusinessTypeAndStatus(type: ThoughtBusinessType, nodeStatus: ThoughtNodeStatus): string;
|
|
16
21
|
/**
|
|
17
22
|
* 将历史回复中的 chain 数组映射为 UI 使用的 ThoughtNode 列表
|
|
18
23
|
* 2025-12-19 新增: 支持 rtext 思维链 UI 升级。
|