@mxmweb/rtext 1.7.1 → 1.7.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.
@@ -26,6 +26,14 @@ export interface RetriveChatMessageAdapterProps extends AdapterProps {
26
26
  prompt?: string;
27
27
  retrieveInfo?: any;
28
28
  retrieveConfig?: any;
29
+ /** 召回/LLM 是否处于加载中(例如后端仍在流式返回数据时),用于在 UI 中展示 loading 状态 */
30
+ retrieveLoading?: boolean;
31
+ /**
32
+ * 整体 loading 状态(推荐使用):
33
+ * - true 时,语义回答/召回等区域会自动展示统一的 loading 文案
34
+ * - 兼容老用法:未传 loading 时,仍可使用 retrieveLoading + contentType/displayStatus 控制
35
+ */
36
+ loading?: boolean;
29
37
  feedbackResult: null | number;
30
38
  queryId: string;
31
39
  eventsEmit?: (eventName: string, payload?: any) => void;
@@ -84,10 +92,20 @@ export interface RetriveChatMessageAdapterProps extends AdapterProps {
84
92
  * status=4 时显示"思考中",其他状态显示"思考完成"
85
93
  */
86
94
  thoughtChainStatus?: number;
95
+ /**
96
+ * 组件初次渲染时默认展示的标签页:
97
+ * - semantic: 语义回答(默认)
98
+ * - prompt: Prompt 内容
99
+ * - retrieve: 召回信息
100
+ * - config: 检索配置
101
+ * 业务方可通过该参数在“无 LLM 语义回答”场景下直接切到召回信息等标签。
102
+ */
103
+ defaultShowTab?: TabType;
87
104
  /**
88
105
  * 是否启用 PrismJS 语法高亮(默认 false,使用普通代码块样式)
89
106
  */
90
107
  enablePrism?: boolean;
91
108
  }
109
+ type TabType = 'semantic' | 'prompt' | 'retrieve' | 'config';
92
110
  declare const RetriveChatMessageAdapter: React.FC<RetriveChatMessageAdapterProps>;
93
111
  export default RetriveChatMessageAdapter;