@mxmweb/rtext 1.3.9 → 1.4.2
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/adopters/ChatMessageAdapter.d.ts +34 -0
- package/assets/style.css +1 -1
- package/containers/KnowledgeBaseDocumentList.d.ts +9 -0
- package/containers/ThoughtChainContainer.d.ts +12 -0
- package/elements/ThoughtChainSection.d.ts +14 -0
- package/examples/thoughtChainDemo/index.d.ts +3 -0
- package/index.js +10583 -10016
- package/knowledge_base_types.d.ts +71 -0
- package/lib_enter.d.ts +2 -0
- package/mockserverdata.d.ts +111 -2
- package/package.json +1 -1
- package/stats.html +1 -1
- package/thought_chain_types.d.ts +64 -0
- package/utils/thought_chain_mapper.d.ts +38 -0
- package/examples/sseDemo/index.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AdapterProps } from '../core/types';
|
|
3
|
+
import { ThoughtNode, ThoughtChainVersionMode } from '../thought_chain_types';
|
|
3
4
|
export interface ReferenceItem {
|
|
4
5
|
name: string;
|
|
5
6
|
file_type: string;
|
|
@@ -67,6 +68,18 @@ export interface ChatMessageAdapterProps extends AdapterProps {
|
|
|
67
68
|
databaseReference?: any;
|
|
68
69
|
graphReference?: string | any;
|
|
69
70
|
sessionContext?: SessionContext;
|
|
71
|
+
knowledgeBases?: Array<{
|
|
72
|
+
knowledgeBaseName: string;
|
|
73
|
+
treeData: Array<{
|
|
74
|
+
name: string;
|
|
75
|
+
type: 'dir' | 'file';
|
|
76
|
+
fileCount?: number;
|
|
77
|
+
fileType?: string;
|
|
78
|
+
fetchUrl?: string;
|
|
79
|
+
}>;
|
|
80
|
+
totalFileCount: number;
|
|
81
|
+
fetchUrl?: string;
|
|
82
|
+
}>;
|
|
70
83
|
filePaths?: string;
|
|
71
84
|
currentFiles?: any[];
|
|
72
85
|
fileManagerData?: any;
|
|
@@ -97,6 +110,27 @@ export interface ChatMessageAdapterProps extends AdapterProps {
|
|
|
97
110
|
supportMarkdown?: boolean;
|
|
98
111
|
errorMessage?: string;
|
|
99
112
|
referenceMode?: 'list' | 'button';
|
|
113
|
+
/**
|
|
114
|
+
* 是否开启思维链 UI 展示
|
|
115
|
+
* 开启后,当数据中包含 chain 或外部传入 thoughtChainNodes 时,
|
|
116
|
+
* 会在“思考完成”区域自动渲染思维链卡片。
|
|
117
|
+
*/
|
|
118
|
+
enableThoughtChain?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* 思维链版本控制:
|
|
121
|
+
* - auto: 按数据自动识别(默认)
|
|
122
|
+
* - v1: 仅使用旧版 <think> 展示,不渲染思维链卡片
|
|
123
|
+
* - v2: 强制使用新版 chain/thoughtNodes 渲染
|
|
124
|
+
*/
|
|
125
|
+
thoughtChainVersionMode?: ThoughtChainVersionMode;
|
|
126
|
+
/**
|
|
127
|
+
* 原始 chain 数据(通常来自后端 reply.chain)
|
|
128
|
+
*/
|
|
129
|
+
chain?: any;
|
|
130
|
+
/**
|
|
131
|
+
* 已映射好的思维链节点(实时 SSE 场景可直接传入)
|
|
132
|
+
*/
|
|
133
|
+
thoughtChainNodes?: ThoughtNode[];
|
|
100
134
|
}
|
|
101
135
|
/**
|
|
102
136
|
* 聊天消息适配器
|