paul-ai-assistant 1.0.3 → 1.0.4
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/es/AssistantChat/AssistantChatApp/const.js +1 -1
- package/es/AssistantChat/AssistantChatApp/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.js +4 -4
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.js +4 -5
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.js +2 -2
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/index.js +1 -1
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.js +3 -3
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.js +5 -5
- package/es/AssistantChat/AssistantChatInput/index.js +7 -5
- package/es/common/registerAssistChatForm.js +8 -5
- package/es/components/AgentCardSubmit/index.js +0 -1
- package/es/components/AgentResult/index.js +1 -1
- package/es/components/AgentSchemaForm/ScreenshotView.js +1 -1
- package/es/components/AgentSchemaForm/index.js +5 -5
- package/es/components/ArrayInput/index.js +1 -1
- package/es/components/InspectionCard/index.js +1 -1
- package/es/components/LlmMarkDown/MdAmarkGuess/index.js +1 -1
- package/es/components/LlmMarkDown/MdAmarkReference/index.js +3 -3
- package/es/components/LlmMarkDown/index.js +1 -1
- package/es/components/LlmModelChange/index.js +2 -2
- package/es/components/LlmReference/index.js +9 -9
- package/es/components/LlmTraceComponents/Disassemble/index.js +2 -2
- package/es/components/LlmTraceComponents/Rewrite/index.js +2 -2
- package/es/components/MarkDown/index.js +42 -13
- package/es/components/ModelSelect/ModeDropdown.js +1 -1
- package/es/components/ModelSelect/const.js +3 -3
- package/es/components/PaulButtonGroup/Select.js +1 -1
- package/es/components/PaulButtonGroup/index.js +1 -1
- package/es/components/PopAuth/index.js +1 -1
- package/es/components/SchemaInput/SchemaInputCore/index.js +1 -1
- package/es/components/SchemaInput/SimpleJSONEditor/index.js +1 -1
- package/es/components/SelectBlurry/index.js +1 -1
- package/es/components/ShareModal/index.js +1 -1
- package/es/components/ShareOperationBar/index.js +1 -1
- package/es/components/TextContent/index.js +3 -3
- package/es/components/TraceWithAgent/index.js +4 -9
- package/es/context/index.js +2 -1
- package/es/context/utils/messages.js +1 -1
- package/es/context/utils/send.js +2 -2
- package/es/context/utils/tool.js +1 -1
- package/es/utils/CSEIconTool.js +1 -1
- package/es/utils/apushAssistant.js +1 -2
- package/es/utils/common.js +17 -0
- package/es/utils/event.js +87 -0
- package/es/utils/formDataFormat.js +1 -1
- package/es/utils/formatData.js +1 -1
- package/es/utils/helpers.js +78 -0
- package/es/utils/log.js +1 -1
- package/package.json +6 -16
- package/es/AssistantChat/AssistantChatApp/CardMatchRender/index.d.ts +0 -8
- package/es/AssistantChat/AssistantChatApp/OperationMatchRender/index.d.ts +0 -9
- package/es/AssistantChat/AssistantChatApp/const.d.ts +0 -51
- package/es/AssistantChat/AssistantChatApp/index.d.ts +0 -4
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/TemplateCard.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/common/types.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHeader.d.ts +0 -5
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHtml.d.ts +0 -7
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateParagraph.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateTitle.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/context/index.d.ts +0 -29
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.d.ts +0 -4
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/utils.d.ts +0 -2
- package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.d.ts +0 -4
- package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.d.ts +0 -16
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.d.ts +0 -14
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.d.ts +0 -78
- package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.d.ts +0 -7
- package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.d.ts +0 -7
- package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.d.ts +0 -11
- package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.d.ts +0 -3
- package/es/AssistantChat/AssistantChatCard/OperationCard/index.d.ts +0 -4
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.d.ts +0 -21
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.d.ts +0 -7
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.d.ts +0 -8
- package/es/AssistantChat/AssistantChatCard/index.d.ts +0 -5
- package/es/AssistantChat/AssistantChatInput/index.d.ts +0 -5
- package/es/AssistantChat/AssistantToolApp/const.d.ts +0 -12
- package/es/AssistantChat/AssistantToolApp/index.d.ts +0 -4
- package/es/AssistantChat/AssistantToolExecutionApp/const.d.ts +0 -7
- package/es/AssistantChat/AssistantToolExecutionApp/index.d.ts +0 -4
- package/es/AssistantChat/AssistentError/index.d.ts +0 -5
- package/es/AssistantChat/index.d.ts +0 -6
- package/es/AssistantChat/logCallback/aTagLog.d.ts +0 -1
- package/es/AssistantChat/logCallback/copyLog.d.ts +0 -3
- package/es/ErrorBoundary/ErrorBoundaryFallback/index.d.ts +0 -5
- package/es/ErrorBoundary/index.d.ts +0 -22
- package/es/common/registerAssistChatForm.d.ts +0 -2
- package/es/components/AgentCardSubmit/index.d.ts +0 -20
- package/es/components/AgentResult/index.d.ts +0 -8
- package/es/components/AgentSchemaForm/ScreenshotView.d.ts +0 -12
- package/es/components/AgentSchemaForm/_interface.d.ts +0 -37
- package/es/components/AgentSchemaForm/index.d.ts +0 -9
- package/es/components/AgentText/index.d.ts +0 -4
- package/es/components/AigcTips/index.d.ts +0 -9
- package/es/components/ArrayInput/index.d.ts +0 -3
- package/es/components/AssistantDrawer/index.d.ts +0 -22
- package/es/components/EmptyIcon/index.d.ts +0 -3
- package/es/components/HeaderSvgIcon/index.d.ts +0 -3
- package/es/components/InspectionCard/index.d.ts +0 -66
- package/es/components/InspectionCard/result.d.ts +0 -13
- package/es/components/LlmMarkDown/MdAmarkGuess/index.d.ts +0 -16
- package/es/components/LlmMarkDown/MdAmarkReference/index.d.ts +0 -21
- package/es/components/LlmMarkDown/index.d.ts +0 -30
- package/es/components/LlmModelChange/index.d.ts +0 -57
- package/es/components/LlmReference/index.d.ts +0 -25
- package/es/components/LlmTitle/index.d.ts +0 -14
- package/es/components/LlmTrace/index.d.ts +0 -17
- package/es/components/LlmTraceComponents/Disassemble/index.d.ts +0 -24
- package/es/components/LlmTraceComponents/ReadResource/index.d.ts +0 -24
- package/es/components/LlmTraceComponents/Rewrite/index.d.ts +0 -23
- package/es/components/LlmTraceComponents/TraceMarkDown/index.d.ts +0 -22
- package/es/components/LlmTraceComponents/const.d.ts +0 -25
- package/es/components/LlmTraceV2/index.d.ts +0 -56
- package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.d.ts +0 -18
- package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.d.ts +0 -20
- package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/TaskPlanning/index.d.ts +0 -12
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.d.ts +0 -13
- package/es/components/LlmTraceV3/components/TraceContentComponents/const.d.ts +0 -32
- package/es/components/LlmTraceV3/components/TraceGroup/index.d.ts +0 -8
- package/es/components/LlmTraceV3/components/TraceHeader/index.d.ts +0 -8
- package/es/components/LlmTraceV3/components/TraceItem/index.d.ts +0 -8
- package/es/components/LlmTraceV3/components/TraceSlide/index.d.ts +0 -30
- package/es/components/LlmTraceV3/components/TraceStatusIcon/index.d.ts +0 -8
- package/es/components/LlmTraceV3/hooks/useGroupCollapse.d.ts +0 -18
- package/es/components/LlmTraceV3/hooks/useItemCollapse.d.ts +0 -18
- package/es/components/LlmTraceV3/hooks/useTraceAnimation.d.ts +0 -15
- package/es/components/LlmTraceV3/hooks/useTraceCollapse.d.ts +0 -17
- package/es/components/LlmTraceV3/index.d.ts +0 -11
- package/es/components/LlmTraceV3/types.d.ts +0 -263
- package/es/components/LlmTraceV3/utils/collapseLogic.d.ts +0 -26
- package/es/components/LlmTraceV3/utils/traceHelpers.d.ts +0 -42
- package/es/components/MarkDown/index.d.ts +0 -11
- package/es/components/ModelSelect/ModeDropdown.d.ts +0 -8
- package/es/components/ModelSelect/const.d.ts +0 -30
- package/es/components/ModelSelect/index.d.ts +0 -4
- package/es/components/PaulButtonGroup/Select.d.ts +0 -3
- package/es/components/PaulButtonGroup/index.d.ts +0 -16
- package/es/components/PopAuth/index.d.ts +0 -4
- package/es/components/ReferenceInfoItem/index.d.ts +0 -49
- package/es/components/ReferenceTag/index.d.ts +0 -11
- package/es/components/SchemaInput/SchemaInputCore/index.d.ts +0 -4
- package/es/components/SchemaInput/SchemaInputCore/utils.d.ts +0 -1
- package/es/components/SchemaInput/SimpleJSONEditor/index.d.ts +0 -4
- package/es/components/SchemaInput/index.d.ts +0 -8
- package/es/components/SelectBlurry/index.d.ts +0 -3
- package/es/components/SendMessageSvgIcon/index.d.ts +0 -3
- package/es/components/ShareContent/index.d.ts +0 -21
- package/es/components/ShareModal/index.d.ts +0 -15
- package/es/components/ShareOperationBar/index.d.ts +0 -4
- package/es/components/TextContent/index.d.ts +0 -14
- package/es/components/TraceMarkdownWithCard/index.d.ts +0 -6
- package/es/components/TraceWithAgent/index.d.ts +0 -23
- package/es/constants/assistChatEvent.d.ts +0 -33
- package/es/constants/common.d.ts +0 -71
- package/es/constants/logTrace.d.ts +0 -3
- package/es/constants/reference.d.ts +0 -109
- package/es/constants/traceDataStatus.d.ts +0 -34
- package/es/context/index.d.ts +0 -13
- package/es/context/utils/messages.d.ts +0 -33
- package/es/context/utils/send.d.ts +0 -29
- package/es/context/utils/tool.d.ts +0 -19
- package/es/index.d.ts +0 -37
- package/es/interface/IAgent.d.ts +0 -12
- package/es/interface/IChatBottom.d.ts +0 -69
- package/es/interface/IChatCard.d.ts +0 -40
- package/es/interface/IChatContext.d.ts +0 -59
- package/es/interface/IChatRef.d.ts +0 -75
- package/es/interface/IGuessQuestion.d.ts +0 -43
- package/es/interface/IMessage.d.ts +0 -17
- package/es/interface/ISend.d.ts +0 -19
- package/es/interface/index.d.ts +0 -272
- package/es/utils/CSEIconTool.d.ts +0 -8
- package/es/utils/apushAssistant.d.ts +0 -73
- package/es/utils/clientPlugin.d.ts +0 -3
- package/es/utils/common.d.ts +0 -10
- package/es/utils/copyToClipboard.d.ts +0 -2
- package/es/utils/formDataFormat.d.ts +0 -3
- package/es/utils/formatData.d.ts +0 -14
- package/es/utils/log.d.ts +0 -18
- package/es/utils/parseUrl.d.ts +0 -9
- package/es/utils/request.d.ts +0 -15
- package/es/utils/screenshot.d.ts +0 -45
- package/es/utils/send.d.ts +0 -10
- package/es/utils/uploadImage.d.ts +0 -9
- package/es/utils/websocketLogger.d.ts +0 -176
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LlmTraceV3 类型定义
|
|
3
|
-
* 基于 TraceV2 扩展,增加更多组件类型支持
|
|
4
|
-
*/
|
|
5
|
-
/// <reference types="react" />
|
|
6
|
-
import type { TRACE_STATUS_ENUM } from '../../constants/traceDataStatus';
|
|
7
|
-
/**
|
|
8
|
-
* TraceV3 新增的组件类型枚举
|
|
9
|
-
* 扩展自 TraceV2 的组件类型
|
|
10
|
-
*/
|
|
11
|
-
export declare enum TRACE_V3_TYPE_COMPONENT_ENUM {
|
|
12
|
-
rewrite = "rewrite",// 问题改写
|
|
13
|
-
questionDisassemble = "questionDisassemble",// 问题拆解
|
|
14
|
-
markdown = "markdown",// Markdown 内容
|
|
15
|
-
readResource = "readResource",// 资源读取
|
|
16
|
-
traceMarkdownWithCard = "TraceMarkdownWithCard",// 带卡片的 Markdown
|
|
17
|
-
traceWithAgent = "TraceWithAgent",// 带 Agent 的 Trace
|
|
18
|
-
inspectionCard = "InspectionCard",// 巡检报告卡片
|
|
19
|
-
deepThinking = "deepThinking",// 深度思考内容
|
|
20
|
-
taskPlanning = "taskPlanning",// 任务规划列表
|
|
21
|
-
taskExecution = "taskExecution",// 任务执行步骤
|
|
22
|
-
mcpCall = "mcpCall",// MCP 调用
|
|
23
|
-
toolCall = "toolCall",// 工具调用(带代码块)
|
|
24
|
-
toolResult = "toolResult",// 工具调用结果
|
|
25
|
-
searchResults = "searchResults",// 搜索结果列表
|
|
26
|
-
businessFlow = "businessFlow",// 业务流展示
|
|
27
|
-
infoMissing = "infoMissing",// 信息缺失提示
|
|
28
|
-
codeBlock = "codeBlock",// 代码块展示
|
|
29
|
-
orderedList = "orderedList",// 有序列表
|
|
30
|
-
linkList = "linkList"
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 深度思考组件数据结构
|
|
34
|
-
*/
|
|
35
|
-
export interface IDeepThinkingResult {
|
|
36
|
-
content: string;
|
|
37
|
-
conclusion?: string;
|
|
38
|
-
references?: string[];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* 任务规划组件数据结构
|
|
42
|
-
*/
|
|
43
|
-
export interface ITaskPlanningResult {
|
|
44
|
-
tasks: Array<{
|
|
45
|
-
id: string;
|
|
46
|
-
description: string;
|
|
47
|
-
order: number;
|
|
48
|
-
status?: 'pending' | 'in_progress' | 'completed';
|
|
49
|
-
}>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* 搜索结果组件数据结构
|
|
53
|
-
*/
|
|
54
|
-
export interface ISearchResultsResult {
|
|
55
|
-
title?: string;
|
|
56
|
-
query: string;
|
|
57
|
-
results: Array<{
|
|
58
|
-
id: string;
|
|
59
|
-
title: string;
|
|
60
|
-
url?: string;
|
|
61
|
-
snippet?: string;
|
|
62
|
-
source?: 'web' | 'kb';
|
|
63
|
-
logo?: string;
|
|
64
|
-
}>;
|
|
65
|
-
collapsed?: boolean;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* 工具调用组件数据结构
|
|
69
|
-
*/
|
|
70
|
-
export interface IToolCallResult {
|
|
71
|
-
toolName: string;
|
|
72
|
-
code?: string;
|
|
73
|
-
params?: Record<string, any>;
|
|
74
|
-
collapsed?: boolean;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* 工具结果组件数据结构
|
|
78
|
-
*/
|
|
79
|
-
export interface IToolResultResult {
|
|
80
|
-
toolName: string;
|
|
81
|
-
result: any;
|
|
82
|
-
resultType?: 'json' | 'text' | 'html';
|
|
83
|
-
collapsed?: boolean;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* 业务流组件数据结构
|
|
87
|
-
*/
|
|
88
|
-
export interface IBusinessFlowResult {
|
|
89
|
-
flowId: string;
|
|
90
|
-
flowName: string;
|
|
91
|
-
icon?: string;
|
|
92
|
-
url?: string;
|
|
93
|
-
description?: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* 信息缺失组件数据结构
|
|
97
|
-
*/
|
|
98
|
-
export interface IInfoMissingResult {
|
|
99
|
-
message: string;
|
|
100
|
-
fields?: Array<{
|
|
101
|
-
name: string;
|
|
102
|
-
description: string;
|
|
103
|
-
}>;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* 代码块组件数据结构
|
|
107
|
-
*/
|
|
108
|
-
export interface ICodeBlockResult {
|
|
109
|
-
code: string;
|
|
110
|
-
language?: string;
|
|
111
|
-
collapsed?: boolean;
|
|
112
|
-
collapsible?: boolean;
|
|
113
|
-
showLineNumbers?: boolean;
|
|
114
|
-
maxHeight?: number;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* 链接列表组件数据结构
|
|
118
|
-
*/
|
|
119
|
-
export interface ILinkListResult {
|
|
120
|
-
links: Array<{
|
|
121
|
-
id: string;
|
|
122
|
-
title: string;
|
|
123
|
-
url: string;
|
|
124
|
-
description?: string;
|
|
125
|
-
}>;
|
|
126
|
-
ordered?: boolean;
|
|
127
|
-
openInNewTab?: boolean;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* 思考过程 第三层,具体组件
|
|
131
|
-
*/
|
|
132
|
-
export interface ITraceThirdItem {
|
|
133
|
-
/** 展示标题 存在则展示 */
|
|
134
|
-
showTitle?: string;
|
|
135
|
-
/** 组件类型 */
|
|
136
|
-
type?: TRACE_V3_TYPE_COMPONENT_ENUM | string;
|
|
137
|
-
/** 组件入参 */
|
|
138
|
-
result?: any;
|
|
139
|
-
/** 没有对应组件时,展示默认内容 */
|
|
140
|
-
defaultContent?: string;
|
|
141
|
-
/** 内层执行状态 */
|
|
142
|
-
status?: TRACE_STATUS_ENUM;
|
|
143
|
-
[key: string]: any;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* 思考过程 第二层,单节点 有透出状态
|
|
147
|
-
*/
|
|
148
|
-
export interface ITraceSecondItem {
|
|
149
|
-
/** 展示标题 存在则展示 */
|
|
150
|
-
showTitle?: string;
|
|
151
|
-
/** 节点执行状态 */
|
|
152
|
-
status?: TRACE_STATUS_ENUM;
|
|
153
|
-
/** 节点执行内容,组件展示 */
|
|
154
|
-
result?: ITraceThirdItem[] | ITraceThirdItem;
|
|
155
|
-
[key: string]: any;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Trace 渲染模式
|
|
159
|
-
*/
|
|
160
|
-
export type TraceRenderMode = 'default' | 'slide';
|
|
161
|
-
/**
|
|
162
|
-
* Slide 模式下的内容项类型
|
|
163
|
-
* 支持纯文本字符串(markdown)或复杂的组件对象
|
|
164
|
-
*/
|
|
165
|
-
export type TraceSlideContentItem = string | ITraceThirdItem;
|
|
166
|
-
/**
|
|
167
|
-
* 思考过程 最外层,折叠层
|
|
168
|
-
*/
|
|
169
|
-
export interface ITrace {
|
|
170
|
-
/** 思考数据 */
|
|
171
|
-
data?: ITraceSecondItem[];
|
|
172
|
-
/** 思考状态 */
|
|
173
|
-
status?: TRACE_STATUS_ENUM;
|
|
174
|
-
/** 思考名称 */
|
|
175
|
-
traceName?: string;
|
|
176
|
-
/** 思考耗时 ms */
|
|
177
|
-
cost?: string | number;
|
|
178
|
-
/** 思考是否默认折叠 */
|
|
179
|
-
collapse?: boolean;
|
|
180
|
-
/** 渲染模式:default-默认模式(完整展示),slide-简化模式(横向展示) */
|
|
181
|
-
renderMode?: TraceRenderMode;
|
|
182
|
-
/** slide 模式下的状态文本 */
|
|
183
|
-
statusText?: string;
|
|
184
|
-
/** slide 模式下的内容数组(支持 markdown 字符串或复杂组件对象) */
|
|
185
|
-
content?: TraceSlideContentItem[];
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* LlmTraceV3 主组件 Props
|
|
189
|
-
*/
|
|
190
|
-
export interface ILlmTraceV3Props {
|
|
191
|
-
/** Trace 数据 */
|
|
192
|
-
trace?: ITrace;
|
|
193
|
-
/** 工单ID */
|
|
194
|
-
ticketId?: string;
|
|
195
|
-
/** 对话ID */
|
|
196
|
-
dialogId?: string;
|
|
197
|
-
/** 原始数据 */
|
|
198
|
-
originData?: any;
|
|
199
|
-
/** 外部组件注入 */
|
|
200
|
-
traceExternalRenderType?: {
|
|
201
|
-
[key: string]: React.ComponentType<any>;
|
|
202
|
-
};
|
|
203
|
-
/** 思考中加载状态(兼容后端返回字符串 'false') */
|
|
204
|
-
thinkLoading?: boolean | 'false';
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* TraceHeader 组件 Props
|
|
208
|
-
*/
|
|
209
|
-
export interface ITraceHeaderProps {
|
|
210
|
-
status: TRACE_STATUS_ENUM;
|
|
211
|
-
cost?: string | number;
|
|
212
|
-
traceName?: string;
|
|
213
|
-
collapsed: boolean;
|
|
214
|
-
onToggle: () => void;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* TraceGroup 组件 Props
|
|
218
|
-
*/
|
|
219
|
-
export interface ITraceGroupProps {
|
|
220
|
-
showTitle?: string;
|
|
221
|
-
status?: TRACE_STATUS_ENUM;
|
|
222
|
-
result?: ITraceThirdItem[] | ITraceThirdItem;
|
|
223
|
-
isLast: boolean;
|
|
224
|
-
groupIndex: number;
|
|
225
|
-
groupKey: string;
|
|
226
|
-
collapsed: boolean;
|
|
227
|
-
onToggle: (key: string) => void;
|
|
228
|
-
dialogId?: string;
|
|
229
|
-
originData?: any;
|
|
230
|
-
traceExternalRenderType?: {
|
|
231
|
-
[key: string]: React.ComponentType<any>;
|
|
232
|
-
};
|
|
233
|
-
traceFinished: boolean;
|
|
234
|
-
itemCollapseMap: Record<string, boolean>;
|
|
235
|
-
onToggleItem: (key: string) => void;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* TraceItem 组件 Props
|
|
239
|
-
*/
|
|
240
|
-
export interface ITraceItemProps {
|
|
241
|
-
showTitle?: string;
|
|
242
|
-
type?: string;
|
|
243
|
-
result?: any;
|
|
244
|
-
status?: TRACE_STATUS_ENUM;
|
|
245
|
-
itemKey: string;
|
|
246
|
-
collapsed: boolean;
|
|
247
|
-
onToggle: (key: string) => void;
|
|
248
|
-
dialogId?: string;
|
|
249
|
-
originData?: any;
|
|
250
|
-
traceExternalRenderType?: {
|
|
251
|
-
[key: string]: React.ComponentType<any>;
|
|
252
|
-
};
|
|
253
|
-
traceFinished?: boolean;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* TraceStatusIcon 组件 Props
|
|
257
|
-
*/
|
|
258
|
-
export interface ITraceStatusIconProps {
|
|
259
|
-
status: TRACE_STATUS_ENUM;
|
|
260
|
-
size?: 'small' | 'medium' | 'large';
|
|
261
|
-
showAnimation?: boolean;
|
|
262
|
-
traceFinished?: boolean;
|
|
263
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 折叠逻辑工具函数
|
|
3
|
-
*/
|
|
4
|
-
import type { ITraceSecondItem, ITraceThirdItem } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* 计算单个 Item 的默认折叠状态
|
|
7
|
-
* @param item Item 数据
|
|
8
|
-
* @param _traceFinished 整体 trace 是否已完成(保留参数用于兼容性,当前未使用)
|
|
9
|
-
* @param hasInspectionCard 是否包含 InspectionCard
|
|
10
|
-
* @returns 是否折叠
|
|
11
|
-
*/
|
|
12
|
-
export declare const calculateItemCollapseState: (item: ITraceThirdItem, _traceFinished: boolean, hasInspectionCard: boolean) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* 初始化所有 Item 的折叠状态
|
|
15
|
-
* @param traceData trace 数据
|
|
16
|
-
* @param traceFinished 整体 trace 是否已完成
|
|
17
|
-
* @param hasInspectionCard 是否包含 InspectionCard
|
|
18
|
-
* @returns Item 折叠状态 Map
|
|
19
|
-
*/
|
|
20
|
-
export declare const initializeItemCollapseMap: (traceData: ITraceSecondItem[], traceFinished: boolean, hasInspectionCard: boolean) => Record<string, boolean>;
|
|
21
|
-
/**
|
|
22
|
-
* 判断是否应该展示折叠图标
|
|
23
|
-
* @param result Item 的 result
|
|
24
|
-
* @returns 是否展示
|
|
25
|
-
*/
|
|
26
|
-
export declare const shouldShowCollapseIcon: (result?: any) => boolean;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trace 辅助函数
|
|
3
|
-
*/
|
|
4
|
-
import type { ITraceSecondItem, ITraceThirdItem } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* 检查节点树中是否包含 InspectionCard 类型
|
|
7
|
-
* @param node 节点数据
|
|
8
|
-
* @returns 是否包含 InspectionCard
|
|
9
|
-
*/
|
|
10
|
-
export declare const checkHasInspectionCard: (node: any) => boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 检查 trace 数据中是否包含特殊节点
|
|
13
|
-
* @param traceData trace 数据
|
|
14
|
-
* @returns 是否包含特殊节点
|
|
15
|
-
*/
|
|
16
|
-
export declare const hasSpecialNode: (traceData: ITraceSecondItem[]) => boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 生成唯一的 item key
|
|
19
|
-
* @param groupIndex 分组索引
|
|
20
|
-
* @param itemIndex item 索引
|
|
21
|
-
* @returns 唯一 key
|
|
22
|
-
*/
|
|
23
|
-
export declare const generateItemKey: (groupIndex: number, itemIndex?: number) => string;
|
|
24
|
-
/**
|
|
25
|
-
* 浅比较两个对象是否相等
|
|
26
|
-
* @param obj1 对象1
|
|
27
|
-
* @param obj2 对象2
|
|
28
|
-
* @returns 是否相等
|
|
29
|
-
*/
|
|
30
|
-
export declare const isShallowEqual: (obj1: Record<string, any>, obj2: Record<string, any>) => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* 格式化耗时
|
|
33
|
-
* @param cost 耗时(ms)
|
|
34
|
-
* @returns 格式化后的字符串
|
|
35
|
-
*/
|
|
36
|
-
export declare const formatCost: (cost?: string | number) => string;
|
|
37
|
-
/**
|
|
38
|
-
* 将 result 标准化为数组
|
|
39
|
-
* @param result 可能是数组或单个对象
|
|
40
|
-
* @returns 数组
|
|
41
|
-
*/
|
|
42
|
-
export declare const normalizeResultToArray: (result?: ITraceThirdItem[] | ITraceThirdItem) => ITraceThirdItem[];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MarkDownProps } from '@alife/magic-chat-ui';
|
|
3
|
-
import 'katex/dist/katex.min.css';
|
|
4
|
-
import './index.scss';
|
|
5
|
-
export interface IProps extends MarkDownProps {
|
|
6
|
-
logKey?: string;
|
|
7
|
-
logParams?: Record<string, any>;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: ({ data, linkTarget, className, ...otherProps }: IProps) => React.JSX.Element;
|
|
11
|
-
export default _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const AIGC_MODE_TYPE_V2: {
|
|
3
|
-
REASONING_QWEN: string;
|
|
4
|
-
REASONING_DEEPSEEK: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const AIGC_MODE_TYPE_V2_MAP: {
|
|
7
|
-
[x: string]: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const FEATURE_MODE_TYPE_KEY: {
|
|
10
|
-
AUTO: string;
|
|
11
|
-
ON: string;
|
|
12
|
-
OFF: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const FEATURE_MODE_TYPE_MAP: {
|
|
15
|
-
[x: string]: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const AIGC_MODE_TYPE_V2_LIST: {
|
|
18
|
-
icon: React.JSX.Element;
|
|
19
|
-
value: string;
|
|
20
|
-
label: string;
|
|
21
|
-
balloonText: string;
|
|
22
|
-
featureConfigKey: string;
|
|
23
|
-
modeType: string;
|
|
24
|
-
children: {
|
|
25
|
-
label: string;
|
|
26
|
-
value: string;
|
|
27
|
-
key: string;
|
|
28
|
-
describe: string;
|
|
29
|
-
}[];
|
|
30
|
-
}[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhuiw、洛萨
|
|
3
|
-
* @description 按钮组组件
|
|
4
|
-
* value: { {configId: 29, opType: 'createSubmit'}, title: "提交" }
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import './index.scss';
|
|
8
|
-
interface PaulButtonGroupProps {
|
|
9
|
-
buttonGroupConfig: any[];
|
|
10
|
-
enterParamsConfig: any;
|
|
11
|
-
offset?: number;
|
|
12
|
-
getFormValues: any;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: (props: PaulButtonGroupProps) => React.JSX.Element;
|
|
16
|
-
export default _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { REFERENCE_TYPE_ENUM } from '../../constants/reference';
|
|
3
|
-
import './index.scss';
|
|
4
|
-
/** 参考来源信息 */
|
|
5
|
-
export interface IReference {
|
|
6
|
-
/** 数据唯一标识 */
|
|
7
|
-
dataId: string | number;
|
|
8
|
-
/** 参考来源标题 */
|
|
9
|
-
title: string;
|
|
10
|
-
/** 参考来源类型 */
|
|
11
|
-
itemType: REFERENCE_TYPE_ENUM;
|
|
12
|
-
/** 参考来源链接地址 */
|
|
13
|
-
url: string;
|
|
14
|
-
/** UUID */
|
|
15
|
-
uuid?: string;
|
|
16
|
-
/** 参考来源描述/摘要 */
|
|
17
|
-
description?: string;
|
|
18
|
-
/** 来源网站名称(如 "CSDN博客"、"Microsoft") */
|
|
19
|
-
sourceName?: string;
|
|
20
|
-
/** 来源网站图标 URL 或图标标识 */
|
|
21
|
-
sourceIcon?: string;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
/** 可配置参考来源 */
|
|
25
|
-
export interface IReferenceTypeMap {
|
|
26
|
-
value: string;
|
|
27
|
-
icon: string;
|
|
28
|
-
title: string;
|
|
29
|
-
color?: string;
|
|
30
|
-
backgroundColor?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface IReferenceInfoItemProps {
|
|
34
|
-
itemData?: IReference;
|
|
35
|
-
onClickReference?: (params: {
|
|
36
|
-
reference: IReference;
|
|
37
|
-
type: string;
|
|
38
|
-
url: string;
|
|
39
|
-
title: string;
|
|
40
|
-
}) => void;
|
|
41
|
-
className?: string;
|
|
42
|
-
referenceTypeMap?: IReferenceTypeMap;
|
|
43
|
-
/**
|
|
44
|
-
* 参考信息额外渲染
|
|
45
|
-
*/
|
|
46
|
-
extRender?: (param?: any) => React.ReactNode;
|
|
47
|
-
}
|
|
48
|
-
declare const ReferenceInfoItem: (props: IReferenceInfoItemProps) => React.JSX.Element;
|
|
49
|
-
export default ReferenceInfoItem;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
export interface IReferenceTagProps {
|
|
4
|
-
icon: string;
|
|
5
|
-
name: string;
|
|
6
|
-
enableMinWidth?: boolean;
|
|
7
|
-
classname?: string;
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
}
|
|
10
|
-
declare const ReferenceTag: (props: IReferenceTagProps) => React.JSX.Element;
|
|
11
|
-
export default ReferenceTag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function schemaToFields(schema: any): any[];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../AssistantChat/AssistantChatApp/index.scss';
|
|
3
|
-
import './index.scss';
|
|
4
|
-
interface ShareContentProps {
|
|
5
|
-
selectedData: any[];
|
|
6
|
-
className?: string;
|
|
7
|
-
/** 对话为空的文案提示 */
|
|
8
|
-
emptyText?: string | React.ReactNode;
|
|
9
|
-
/** 组件注册 */
|
|
10
|
-
cardComponentMap?: any;
|
|
11
|
-
/** API主机地址获取函数 - 用于转换XHS CDN图片URL等 */
|
|
12
|
-
getApiHost?: () => string;
|
|
13
|
-
/** 是否展现思考过程,默认为 false(隐藏思考过程) */
|
|
14
|
-
showTrace?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 分享内容组件 - 完全基于原本的对话渲染器实现
|
|
18
|
-
* 保持问题在右、回答在左的布局,复用原本的头像、时间展示逻辑
|
|
19
|
-
*/
|
|
20
|
-
declare const ShareContent: React.FC<ShareContentProps>;
|
|
21
|
-
export default ShareContent;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
interface ShareModalProps {
|
|
4
|
-
visible: boolean;
|
|
5
|
-
data: {
|
|
6
|
-
title: string;
|
|
7
|
-
selectedData: any[];
|
|
8
|
-
};
|
|
9
|
-
/** 分享链接 */
|
|
10
|
-
shareLink: string;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
onCancelShareMode?: () => void;
|
|
13
|
-
}
|
|
14
|
-
declare const ShareModal: React.FC<ShareModalProps>;
|
|
15
|
-
export default ShareModal;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
interface ITextContentProps {
|
|
4
|
-
msg: string;
|
|
5
|
-
textContentLabel?: string;
|
|
6
|
-
msgCollapseLength?: number;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* 文本内容
|
|
10
|
-
* @param props
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
declare const TextContent: React.FC<ITextContentProps>;
|
|
14
|
-
export default TextContent;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface TraceResultItem {
|
|
4
|
-
result: string;
|
|
5
|
-
type: 'tool' | 'agent' | 'markdown';
|
|
6
|
-
}
|
|
7
|
-
interface TraceExecutionStep {
|
|
8
|
-
title: string;
|
|
9
|
-
result: TraceResultItem[] | {
|
|
10
|
-
icon?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
agentTypeName?: string;
|
|
13
|
-
content?: string;
|
|
14
|
-
schema?: any;
|
|
15
|
-
} | any;
|
|
16
|
-
backgroundColor?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface TraceWithAgentProps {
|
|
19
|
-
result: TraceExecutionStep[];
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
declare const TraceWithAgent: React.FC<TraceWithAgentProps>;
|
|
23
|
-
export default TraceWithAgent;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 智能辅助事件监听类型
|
|
3
|
-
*/
|
|
4
|
-
export declare const ASSIST_CHAT_EVENT: {
|
|
5
|
-
/**
|
|
6
|
-
* 更新输入值
|
|
7
|
-
*/
|
|
8
|
-
ASSIST_CHAT_UPDATE_INPUT_VALUE: string;
|
|
9
|
-
/**
|
|
10
|
-
* 唤起agent模式
|
|
11
|
-
*/
|
|
12
|
-
COPILOT_AGENT_SELECT_AND_OPEN: string;
|
|
13
|
-
/**
|
|
14
|
-
* agent工具执行结束, 关闭智能辅助
|
|
15
|
-
*/
|
|
16
|
-
COPILOT_AGENT_FINISH_MESSAGE: string;
|
|
17
|
-
/**
|
|
18
|
-
* 发送消息
|
|
19
|
-
*/
|
|
20
|
-
ASSIST_CHAT_ON_SEND_MESSAGE: string;
|
|
21
|
-
/**
|
|
22
|
-
* 获取agent信息
|
|
23
|
-
*/
|
|
24
|
-
COPILOT_AGENT_GET_INFO: string;
|
|
25
|
-
/**
|
|
26
|
-
* 更新消息列表
|
|
27
|
-
*/
|
|
28
|
-
UPDATE_MESSAGE_LIST: string;
|
|
29
|
-
/**
|
|
30
|
-
* 唤起参考来源
|
|
31
|
-
*/
|
|
32
|
-
COPILOT_REFERENCE_OPEN: string;
|
|
33
|
-
};
|