test-chat-sdk 0.0.0

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.
Files changed (208) hide show
  1. package/.prettierrc.js +24 -0
  2. package/README.md +46 -0
  3. package/config/env.js +104 -0
  4. package/config/getHttpsConfig.js +66 -0
  5. package/config/jest/babelTransform.js +29 -0
  6. package/config/jest/cssTransform.js +14 -0
  7. package/config/jest/fileTransform.js +40 -0
  8. package/config/modules.js +134 -0
  9. package/config/paths.js +77 -0
  10. package/config/webpack/persistentCache/createEnvironmentHash.js +9 -0
  11. package/config/webpack.config.js +785 -0
  12. package/config/webpackDevServer.config.js +127 -0
  13. package/dist/Chat/AgentList/index.d.ts +9 -0
  14. package/dist/Chat/ChatFooter/index.d.ts +17 -0
  15. package/dist/Chat/Conversation/index.d.ts +11 -0
  16. package/dist/Chat/MessageContainer/index.d.ts +19 -0
  17. package/dist/Chat/MobileAgents/index.d.ts +11 -0
  18. package/dist/Chat/components/AgentTip/index.d.ts +8 -0
  19. package/dist/Chat/components/ConversationModal/index.d.ts +10 -0
  20. package/dist/Chat/components/CopilotAvatar/index.d.ts +2 -0
  21. package/dist/Chat/components/Message.d.ts +10 -0
  22. package/dist/Chat/components/RecommendQuestions/index.d.ts +6 -0
  23. package/dist/Chat/components/Text.d.ts +9 -0
  24. package/dist/Chat/constants.d.ts +19 -0
  25. package/dist/Chat/index.d.ts +17 -0
  26. package/dist/Chat/service.d.ts +11 -0
  27. package/dist/Chat/type.d.ts +97 -0
  28. package/dist/Copilot/constants.d.ts +11 -0
  29. package/dist/Copilot/index.d.ts +13 -0
  30. package/dist/ShowCase/index.d.ts +8 -0
  31. package/dist/ShowCase/service.d.ts +2 -0
  32. package/dist/ShowCase/type.d.ts +11 -0
  33. package/dist/common/constants.d.ts +58 -0
  34. package/dist/common/env.d.ts +3 -0
  35. package/dist/common/type.d.ts +247 -0
  36. package/dist/components/ChatItem/ExecuteItem.d.ts +25 -0
  37. package/dist/components/ChatItem/ExpandParseTip.d.ts +20 -0
  38. package/dist/components/ChatItem/FilterItem.d.ts +17 -0
  39. package/dist/components/ChatItem/Loading.d.ts +2 -0
  40. package/dist/components/ChatItem/ParseTip.d.ts +26 -0
  41. package/dist/components/ChatItem/ParseTipUtils.d.ts +10 -0
  42. package/dist/components/ChatItem/SimilarQuestionItem.d.ts +10 -0
  43. package/dist/components/ChatItem/SqlItem.d.ts +17 -0
  44. package/dist/components/ChatItem/SwitchEntity.d.ts +9 -0
  45. package/dist/components/ChatItem/Text.d.ts +6 -0
  46. package/dist/components/ChatItem/Typing.d.ts +2 -0
  47. package/dist/components/ChatItem/index.d.ts +33 -0
  48. package/dist/components/ChatMsg/ApplyAuth/index.d.ts +7 -0
  49. package/dist/components/ChatMsg/Bar/index.d.ts +13 -0
  50. package/dist/components/ChatMsg/DateOptions/index.d.ts +9 -0
  51. package/dist/components/ChatMsg/FilterSection/index.d.ts +8 -0
  52. package/dist/components/ChatMsg/MarkDown/index.d.ts +10 -0
  53. package/dist/components/ChatMsg/Message/index.d.ts +18 -0
  54. package/dist/components/ChatMsg/MetricCard/PeriodCompareItem.d.ts +7 -0
  55. package/dist/components/ChatMsg/MetricCard/index.d.ts +10 -0
  56. package/dist/components/ChatMsg/MetricTrend/MetricInfo.d.ts +8 -0
  57. package/dist/components/ChatMsg/MetricTrend/MetricTrendChart.d.ts +14 -0
  58. package/dist/components/ChatMsg/MetricTrend/MultiMetricsTrendChart.d.ts +12 -0
  59. package/dist/components/ChatMsg/MetricTrend/index.d.ts +16 -0
  60. package/dist/components/ChatMsg/NoPermissionChart/index.d.ts +8 -0
  61. package/dist/components/ChatMsg/Pie/PieChart.d.ts +11 -0
  62. package/dist/components/ChatMsg/Pie/index.d.ts +14 -0
  63. package/dist/components/ChatMsg/Table/index.d.ts +12 -0
  64. package/dist/components/ChatMsg/Text/index.d.ts +9 -0
  65. package/dist/components/ChatMsg/WebPage/index.d.ts +8 -0
  66. package/dist/components/ChatMsg/index.d.ts +15 -0
  67. package/dist/components/DrillDownDimensions/DimensionSection.d.ts +11 -0
  68. package/dist/components/DrillDownDimensions/index.d.ts +13 -0
  69. package/dist/components/IconFont/index.d.ts +3 -0
  70. package/dist/components/MetricOptions/index.d.ts +11 -0
  71. package/dist/components/RecommendOptions/index.d.ts +9 -0
  72. package/dist/components/Tools/FeedbackModal.d.ts +9 -0
  73. package/dist/components/Tools/index.d.ts +12 -0
  74. package/dist/demo/Chat.d.ts +2 -0
  75. package/dist/demo/ChatDemo.d.ts +4 -0
  76. package/dist/demo/CopilotDemo.d.ts +2 -0
  77. package/dist/hooks/index.d.ts +3 -0
  78. package/dist/hooks/useComposing.d.ts +5 -0
  79. package/dist/hooks/useExportByEcharts.d.ts +10 -0
  80. package/dist/hooks/useMethodRegister.d.ts +4 -0
  81. package/dist/index.d.ts +10 -0
  82. package/dist/index.es.js +1 -0
  83. package/dist/service/axiosInstance.d.ts +3 -0
  84. package/dist/service/index.d.ts +25 -0
  85. package/dist/utils/utils.d.ts +45 -0
  86. package/package.json +214 -0
  87. package/public/favicon.ico +0 -0
  88. package/public/index.html +43 -0
  89. package/public/manifest.json +15 -0
  90. package/public/robots.txt +3 -0
  91. package/rollup/rollup.config.mjs +37 -0
  92. package/rollup/rollup.esm.config.mjs +21 -0
  93. package/rollup/rollup.umd.config.mjs +30 -0
  94. package/scripts/build.js +217 -0
  95. package/scripts/start.js +154 -0
  96. package/scripts/test.js +52 -0
  97. package/src/Chat/AgentList/index.tsx +52 -0
  98. package/src/Chat/AgentList/style.module.less +83 -0
  99. package/src/Chat/ChatFooter/index.tsx +423 -0
  100. package/src/Chat/ChatFooter/style.module.less +225 -0
  101. package/src/Chat/Conversation/index.tsx +236 -0
  102. package/src/Chat/Conversation/style.module.less +171 -0
  103. package/src/Chat/MessageContainer/index.tsx +145 -0
  104. package/src/Chat/MessageContainer/style.module.less +53 -0
  105. package/src/Chat/MobileAgents/index.tsx +62 -0
  106. package/src/Chat/MobileAgents/style.module.less +55 -0
  107. package/src/Chat/components/AgentTip/index.tsx +48 -0
  108. package/src/Chat/components/AgentTip/style.module.less +44 -0
  109. package/src/Chat/components/ConversationModal/index.tsx +65 -0
  110. package/src/Chat/components/CopilotAvatar/index.tsx +8 -0
  111. package/src/Chat/components/CopilotAvatar/style.module.less +13 -0
  112. package/src/Chat/components/Message.tsx +38 -0
  113. package/src/Chat/components/RecommendQuestions/index.tsx +64 -0
  114. package/src/Chat/components/RecommendQuestions/style.module.less +36 -0
  115. package/src/Chat/components/Text.tsx +42 -0
  116. package/src/Chat/components/style.module.less +311 -0
  117. package/src/Chat/constants.ts +37 -0
  118. package/src/Chat/index.tsx +526 -0
  119. package/src/Chat/service.ts +49 -0
  120. package/src/Chat/style.module.less +119 -0
  121. package/src/Chat/type.ts +107 -0
  122. package/src/Copilot/constants.ts +11 -0
  123. package/src/Copilot/index.tsx +149 -0
  124. package/src/Copilot/style.module.less +151 -0
  125. package/src/ShowCase/index.tsx +120 -0
  126. package/src/ShowCase/service.ts +12 -0
  127. package/src/ShowCase/style.module.less +46 -0
  128. package/src/ShowCase/type.ts +14 -0
  129. package/src/common/constants.ts +93 -0
  130. package/src/common/env.ts +5 -0
  131. package/src/common/type.ts +270 -0
  132. package/src/components/ChatItem/ExecuteItem.tsx +210 -0
  133. package/src/components/ChatItem/ExpandParseTip.tsx +333 -0
  134. package/src/components/ChatItem/FilterItem.tsx +209 -0
  135. package/src/components/ChatItem/Loading.tsx +14 -0
  136. package/src/components/ChatItem/ParseTip.tsx +322 -0
  137. package/src/components/ChatItem/ParseTipUtils.tsx +205 -0
  138. package/src/components/ChatItem/SimilarQuestionItem.tsx +84 -0
  139. package/src/components/ChatItem/SqlItem.tsx +410 -0
  140. package/src/components/ChatItem/SwitchEntity.tsx +52 -0
  141. package/src/components/ChatItem/Text.tsx +17 -0
  142. package/src/components/ChatItem/Typing.tsx +19 -0
  143. package/src/components/ChatItem/index.tsx +843 -0
  144. package/src/components/ChatItem/style.less +670 -0
  145. package/src/components/ChatMsg/ApplyAuth/index.tsx +30 -0
  146. package/src/components/ChatMsg/ApplyAuth/style.less +13 -0
  147. package/src/components/ChatMsg/Bar/index.tsx +208 -0
  148. package/src/components/ChatMsg/Bar/style.less +60 -0
  149. package/src/components/ChatMsg/DateOptions/index.tsx +46 -0
  150. package/src/components/ChatMsg/DateOptions/style.less +43 -0
  151. package/src/components/ChatMsg/FilterSection/index.tsx +42 -0
  152. package/src/components/ChatMsg/FilterSection/style.less +37 -0
  153. package/src/components/ChatMsg/MarkDown/index.tsx +26 -0
  154. package/src/components/ChatMsg/MarkDown/style.less +9 -0
  155. package/src/components/ChatMsg/Message/index.tsx +105 -0
  156. package/src/components/ChatMsg/Message/style.less +119 -0
  157. package/src/components/ChatMsg/MetricCard/PeriodCompareItem.tsx +29 -0
  158. package/src/components/ChatMsg/MetricCard/index.tsx +80 -0
  159. package/src/components/ChatMsg/MetricCard/style.less +126 -0
  160. package/src/components/ChatMsg/MetricTrend/MetricInfo.tsx +60 -0
  161. package/src/components/ChatMsg/MetricTrend/MetricTrendChart.tsx +235 -0
  162. package/src/components/ChatMsg/MetricTrend/MultiMetricsTrendChart.tsx +162 -0
  163. package/src/components/ChatMsg/MetricTrend/index.tsx +127 -0
  164. package/src/components/ChatMsg/MetricTrend/style.less +195 -0
  165. package/src/components/ChatMsg/NoPermissionChart/index.tsx +28 -0
  166. package/src/components/ChatMsg/NoPermissionChart/style.less +26 -0
  167. package/src/components/ChatMsg/Pie/PieChart.tsx +120 -0
  168. package/src/components/ChatMsg/Pie/index.tsx +88 -0
  169. package/src/components/ChatMsg/Pie/style.less +43 -0
  170. package/src/components/ChatMsg/Table/index.tsx +103 -0
  171. package/src/components/ChatMsg/Table/style.less +131 -0
  172. package/src/components/ChatMsg/Text/index.tsx +70 -0
  173. package/src/components/ChatMsg/Text/style.less +38 -0
  174. package/src/components/ChatMsg/WebPage/index.tsx +125 -0
  175. package/src/components/ChatMsg/index.tsx +428 -0
  176. package/src/components/ChatMsg/style.less +28 -0
  177. package/src/components/DrillDownDimensions/DimensionSection.tsx +99 -0
  178. package/src/components/DrillDownDimensions/index.tsx +76 -0
  179. package/src/components/DrillDownDimensions/style.less +64 -0
  180. package/src/components/IconFont/index.tsx +7 -0
  181. package/src/components/MetricOptions/index.tsx +75 -0
  182. package/src/components/MetricOptions/style.less +69 -0
  183. package/src/components/RecommendOptions/index.tsx +126 -0
  184. package/src/components/RecommendOptions/style.less +24 -0
  185. package/src/components/Tools/FeedbackModal.tsx +55 -0
  186. package/src/components/Tools/index.tsx +126 -0
  187. package/src/components/Tools/style.less +67 -0
  188. package/src/demo/Chat.tsx +73 -0
  189. package/src/demo/ChatDemo.tsx +14 -0
  190. package/src/demo/CopilotDemo.tsx +43 -0
  191. package/src/demo/style.module.less +19 -0
  192. package/src/hooks/index.ts +3 -0
  193. package/src/hooks/useComposing.ts +31 -0
  194. package/src/hooks/useExportByEcharts.ts +41 -0
  195. package/src/hooks/useMethodRegister.ts +25 -0
  196. package/src/index.tsx +44 -0
  197. package/src/service/axiosInstance.ts +58 -0
  198. package/src/service/index.ts +174 -0
  199. package/src/setupProxy.js +18 -0
  200. package/src/setupTests.ts +5 -0
  201. package/src/styles/global.less +52 -0
  202. package/src/styles/index.less +39 -0
  203. package/src/styles/reboot.less +14 -0
  204. package/src/styles/variables.less +80 -0
  205. package/src/typings.d.ts +179 -0
  206. package/src/utils/utils.ts +346 -0
  207. package/tsconfig.build.json +20 -0
  208. package/tsconfig.json +27 -0
@@ -0,0 +1,247 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import { ChatContextTypeQueryTypeEnum } from './constants';
3
+ export type SearchRecommendItem = {
4
+ complete: boolean;
5
+ modelId: number;
6
+ modelName: string;
7
+ recommend: string;
8
+ subRecommend: string;
9
+ schemaElementType: string;
10
+ };
11
+ export type FieldType = {
12
+ bizName: string;
13
+ itemId: number;
14
+ id: number;
15
+ name: string;
16
+ status: number;
17
+ model: number;
18
+ type: string;
19
+ value: string;
20
+ };
21
+ export type ModelInfoType = {
22
+ bizName: string;
23
+ itemId: number;
24
+ name: string;
25
+ primaryEntityBizName: string;
26
+ value: string;
27
+ words: string[];
28
+ };
29
+ export type EntityInfoType = {
30
+ dataSetInfo: ModelInfoType;
31
+ dimensions: FieldType[];
32
+ metrics: FieldType[];
33
+ entityId: number;
34
+ };
35
+ export type DateInfoType = {
36
+ dateList: any[];
37
+ dateMode: string;
38
+ period: string;
39
+ startDate: string;
40
+ endDate: string;
41
+ text: string;
42
+ unit: number;
43
+ };
44
+ export type FilterItemType = {
45
+ elementID: number;
46
+ name: string;
47
+ bizName: string;
48
+ operator?: string;
49
+ type?: string;
50
+ value: any;
51
+ entityName?: string;
52
+ };
53
+ export type ModelType = {
54
+ alias: string;
55
+ bizName: string;
56
+ id: number;
57
+ model: number;
58
+ name: string;
59
+ modelNames: string[];
60
+ type: string;
61
+ useCnt: number;
62
+ };
63
+ export type EntityDimensionType = {
64
+ bizName: string;
65
+ itemId: number;
66
+ name: string;
67
+ value: string;
68
+ };
69
+ export type SqlInfoType = {
70
+ parsedS2SQL: string;
71
+ correctedS2SQL: string;
72
+ querySQL: string;
73
+ correctedQuerySQL?: string;
74
+ };
75
+ export type ChatContextType = {
76
+ id: number;
77
+ queryId?: number;
78
+ aggType: string;
79
+ modelId: number;
80
+ modelName: string;
81
+ dataSet: ModelType;
82
+ dataSetIds?: number[];
83
+ dateInfo: DateInfoType;
84
+ dimensions: FieldType[];
85
+ metrics: FieldType[];
86
+ entity: {
87
+ alias: string[];
88
+ id: number;
89
+ };
90
+ entityInfo: EntityInfoType;
91
+ elementMatches: any[];
92
+ nativeQuery: boolean;
93
+ queryMode: string;
94
+ queryType: ChatContextTypeQueryTypeEnum;
95
+ dimensionFilters: FilterItemType[];
96
+ properties: any;
97
+ sqlInfo: SqlInfoType;
98
+ textInfo: string;
99
+ };
100
+ export declare enum MsgValidTypeEnum {
101
+ NORMAL = 0,
102
+ SEARCH_EXCEPTION = 1,
103
+ EMPTY = 2,
104
+ INVALID = 3
105
+ }
106
+ export type PluginResonseType = {
107
+ description: string;
108
+ webPage: {
109
+ url: string;
110
+ paramOptions: any;
111
+ params: any;
112
+ valueParams: any;
113
+ };
114
+ pluginId: number;
115
+ pluginType: string;
116
+ name: string;
117
+ };
118
+ export type MetricInfoType = {
119
+ date: string;
120
+ name: string;
121
+ statistics: any;
122
+ value: string;
123
+ };
124
+ export type AggregateInfoType = {
125
+ metricInfos: MetricInfoType[];
126
+ };
127
+ export type MsgDataType = {
128
+ id: number;
129
+ question: string;
130
+ aggregateInfo: AggregateInfoType;
131
+ chatContext: ChatContextType;
132
+ entityInfo: EntityInfoType;
133
+ queryAuthorization: any;
134
+ queryColumns: ColumnType[];
135
+ queryResults: any[];
136
+ queryId: number;
137
+ queryMode: string;
138
+ queryState: string;
139
+ queryText: string;
140
+ response: PluginResonseType;
141
+ parseInfos?: ChatContextType[];
142
+ queryTimeCost?: number;
143
+ similarQueries: SimilarQuestionType[];
144
+ recommendedDimensions: DrillDownDimensionType[];
145
+ textResult: string;
146
+ errorMsg: string;
147
+ textSummary: string;
148
+ };
149
+ export declare enum ParseStateEnum {
150
+ COMPLETED = "COMPLETED",
151
+ PENDING = "PENDING",
152
+ FAILED = "FAILED"
153
+ }
154
+ export type ParseDataType = {
155
+ chatId: number;
156
+ queryId: number;
157
+ queryText: string;
158
+ state: ParseStateEnum;
159
+ selectedParses: ChatContextType[];
160
+ candidateParses: ChatContextType[];
161
+ similarSolvedQuery: SimilarQuestionType[];
162
+ };
163
+ export type QueryDataType = {
164
+ chatContext: ChatContextType;
165
+ aggregateInfo: AggregateInfoType;
166
+ queryColumns: ColumnType[];
167
+ queryResults: any[];
168
+ };
169
+ export type ColumnType = {
170
+ authorized: boolean;
171
+ name: string;
172
+ nameEn: string;
173
+ bizName: string;
174
+ showType: string;
175
+ type: string;
176
+ dataFormatType: string;
177
+ dataFormat: {
178
+ decimalPlaces: number;
179
+ needMultiply100: boolean;
180
+ };
181
+ };
182
+ export declare enum SemanticTypeEnum {
183
+ DOMAIN = "DOMAIN",
184
+ DIMENSION = "DIMENSION",
185
+ METRIC = "METRIC",
186
+ VALUE = "VALUE"
187
+ }
188
+ export declare const SEMANTIC_TYPE_MAP: {
189
+ DOMAIN: string;
190
+ DIMENSION: string;
191
+ METRIC: string;
192
+ VALUE: string;
193
+ };
194
+ export type SuggestionItemType = {
195
+ model: number;
196
+ name: string;
197
+ bizName: string;
198
+ };
199
+ export type SuggestionType = {
200
+ dimensions: SuggestionItemType[];
201
+ metrics: SuggestionItemType[];
202
+ };
203
+ export type SuggestionDataType = {
204
+ currentAggregateType: string;
205
+ columns: ColumnType[];
206
+ mainEntity: EntityInfoType;
207
+ suggestions: SuggestionType;
208
+ };
209
+ export type HistoryMsgItemType = {
210
+ questionId: number;
211
+ queryText: string;
212
+ parseInfos: ChatContextType[];
213
+ parseTimeCost: ParseTimeCostType;
214
+ queryResult: MsgDataType;
215
+ chatId: number;
216
+ createTime: string;
217
+ feedback: string;
218
+ score: number;
219
+ similarQueries: SimilarQuestionType[];
220
+ };
221
+ export type HistoryType = {
222
+ hasNextPage: boolean;
223
+ list: HistoryMsgItemType[];
224
+ };
225
+ export type DrillDownDimensionType = {
226
+ id: number;
227
+ model: number;
228
+ name: string;
229
+ bizName: string;
230
+ };
231
+ export type SendMsgParamsType = {
232
+ msg: string;
233
+ agentId: number;
234
+ modelId: number;
235
+ filters?: FilterItemType[];
236
+ };
237
+ export type SimilarQuestionType = {
238
+ queryId: number;
239
+ parseId: number;
240
+ queryText: string;
241
+ };
242
+ export type ParseTimeCostType = {
243
+ parseStartTime: number;
244
+ parseTime: number;
245
+ sqlTime: number;
246
+ };
247
+ export type RangeValue = [Dayjs, Dayjs];
@@ -0,0 +1,25 @@
1
+ import { MsgDataType } from '../../common/type';
2
+ import React, { ReactNode } from 'react';
3
+ type Props = {
4
+ queryId?: number;
5
+ parseId?: number;
6
+ question: string;
7
+ queryMode?: string;
8
+ executeLoading: boolean;
9
+ entitySwitchLoading?: boolean;
10
+ chartIndex: number;
11
+ executeTip?: string;
12
+ executeErrorMsg?: string;
13
+ executeItemNode?: ReactNode;
14
+ renderCustomExecuteNode?: boolean;
15
+ data?: MsgDataType;
16
+ triggerResize?: boolean;
17
+ isDeveloper?: boolean;
18
+ isSimpleMode?: boolean;
19
+ enableStreamingSummary?: boolean;
20
+ onStreamingSummaryUpdate?: (summary: string) => void;
21
+ agentId?: number;
22
+ dataSetIds?: number[];
23
+ };
24
+ declare const ExecuteItem: React.FC<Props>;
25
+ export default ExecuteItem;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ChatContextType, FilterItemType } from '../../common/type';
3
+ import 'dayjs/locale/zh-cn';
4
+ type Props = {
5
+ isSimpleMode?: boolean;
6
+ parseInfoOptions: ChatContextType[];
7
+ agentId?: number;
8
+ integrateSystem?: string;
9
+ parseTimeCost?: number;
10
+ isDeveloper?: boolean;
11
+ onSelectParseInfo: (parseInfo: ChatContextType) => void;
12
+ onSwitchEntity: (entityId: string) => void;
13
+ onFiltersChange: (filters: FilterItemType[]) => void;
14
+ onDateInfoChange: (dateRange: any) => void;
15
+ onRefresh: (parseInfo?: ChatContextType) => void;
16
+ handlePresetClick: any;
17
+ setSelectedDataSetIds: (ids: number[]) => void;
18
+ };
19
+ declare const ExpandParseTip: React.FC<Props>;
20
+ export default ExpandParseTip;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { ChatContextType, FilterItemType } from '../../common/type';
3
+ type Props = {
4
+ modelId: number;
5
+ filters: FilterItemType[];
6
+ filter: FilterItemType;
7
+ index: number;
8
+ chatContext: ChatContextType;
9
+ agentId?: number;
10
+ disabled?: boolean;
11
+ entityAlias?: string;
12
+ integrateSystem?: string;
13
+ onFiltersChange: (filters: FilterItemType[]) => void;
14
+ onSwitchEntity: (entityId: string) => void;
15
+ };
16
+ declare const FilterItem: React.FC<Props>;
17
+ export default FilterItem;
@@ -0,0 +1,2 @@
1
+ declare const Loading: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Loading;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { ChatContextType, DateInfoType, EntityInfoType, FilterItemType } from '../../common/type';
3
+ import 'dayjs/locale/zh-cn';
4
+ type Props = {
5
+ parseLoading: boolean;
6
+ parseInfoOptions: ChatContextType[];
7
+ parseTip: string;
8
+ currentParseInfo?: ChatContextType;
9
+ agentId?: number;
10
+ dimensionFilters: FilterItemType[];
11
+ dateInfo: DateInfoType;
12
+ entityInfo: EntityInfoType;
13
+ integrateSystem?: string;
14
+ parseTimeCost?: number;
15
+ isDeveloper?: boolean;
16
+ isSimpleMode?: boolean;
17
+ onSelectParseInfo: (parseInfo: ChatContextType) => void;
18
+ onSwitchEntity: (entityId: string) => void;
19
+ onFiltersChange: (filters: FilterItemType[]) => void;
20
+ onDateInfoChange: (dateRange: any) => void;
21
+ onRefresh: (parseInfo?: ChatContextType) => void;
22
+ handlePresetClick: any;
23
+ setSelectedDataSetIds: (ids: number[]) => void;
24
+ };
25
+ declare const ParseTip: React.FC<Props>;
26
+ export default ParseTip;
@@ -0,0 +1,10 @@
1
+ export declare const MAX_OPTION_VALUES_COUNT = 2;
2
+ export declare const prefixCls: string;
3
+ export declare const getTipNode: ({ parseInfo, dimensionFilters, entityInfo, onSwitchDataSet, availableDataSets, loadingDataSets }: {
4
+ parseInfo: any;
5
+ dimensionFilters: any;
6
+ entityInfo: any;
7
+ onSwitchDataSet: any;
8
+ availableDataSets: any;
9
+ loadingDataSets: any;
10
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { SimilarQuestionType } from '../../common/type';
3
+ type Props = {
4
+ queryId?: number;
5
+ similarQueries?: SimilarQuestionType[];
6
+ defaultExpanded?: boolean;
7
+ onSelectQuestion: (question: SimilarQuestionType) => void;
8
+ };
9
+ declare const SimilarQuestions: React.FC<Props>;
10
+ export default SimilarQuestions;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { SqlInfoType } from '../../common/type';
3
+ type Props = {
4
+ agentId?: number;
5
+ queryId?: number;
6
+ question: string;
7
+ llmReq?: any;
8
+ llmResp?: any;
9
+ integrateSystem?: string;
10
+ queryMode?: string;
11
+ sqlInfo: SqlInfoType;
12
+ sqlTimeCost?: number;
13
+ executeErrorMsg: string;
14
+ dataSetIds?: number[];
15
+ };
16
+ declare const SqlItem: React.FC<Props>;
17
+ export default SqlItem;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ChatContextType } from '../../common/type';
3
+ type Props = {
4
+ entityName: string;
5
+ chatContext: ChatContextType;
6
+ onSwitchEntity: (entityId: string) => void;
7
+ };
8
+ declare const SwicthEntity: React.FC<Props>;
9
+ export default SwicthEntity;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ data: any;
4
+ };
5
+ declare const Text: React.FC<Props>;
6
+ export default Text;
@@ -0,0 +1,2 @@
1
+ declare const Typing: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Typing;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { ChatContextType, MsgDataType, ParseTimeCostType } from '../../common/type';
3
+ import { AgentType } from '../../Chat/type';
4
+ type Props = {
5
+ msg: string;
6
+ conversationId?: number;
7
+ questionId?: number;
8
+ modelId?: number;
9
+ agentId?: number;
10
+ score?: number;
11
+ filter?: any[];
12
+ parseInfos?: ChatContextType[];
13
+ parseTimeCostValue?: ParseTimeCostType;
14
+ msgData?: MsgDataType;
15
+ triggerResize?: boolean;
16
+ isDeveloper?: boolean;
17
+ integrateSystem?: string;
18
+ executeItemNode?: React.ReactNode;
19
+ renderCustomExecuteNode?: boolean;
20
+ isSimpleMode?: boolean;
21
+ isDebugMode?: boolean;
22
+ currentAgent?: AgentType;
23
+ isLastMessage?: boolean;
24
+ onMsgDataLoaded?: (data: MsgDataType, valid: boolean, isRefresh?: boolean) => void;
25
+ onUpdateMessageScroll?: () => void;
26
+ onSendMsg?: (msg: string) => void;
27
+ };
28
+ export declare const ChartItemContext: import("react").Context<{
29
+ register: (...args: any[]) => void;
30
+ call: (...args: any[]) => void;
31
+ }>;
32
+ declare const ChatItem: React.FC<Props>;
33
+ export default ChatItem;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ model: string;
4
+ onApplyAuth?: (model: string) => void;
5
+ };
6
+ declare const ApplyAuth: React.FC<Props>;
7
+ export default ApplyAuth;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ import { ColumnType } from '../../../common/type';
4
+ type Props = {
5
+ data: MsgDataType;
6
+ question?: string;
7
+ triggerResize?: boolean;
8
+ loading: boolean;
9
+ metricField: ColumnType;
10
+ onApplyAuth?: (model: string) => void;
11
+ };
12
+ declare const BarChart: React.FC<Props>;
13
+ export default BarChart;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ChatContextType } from '../../../common/type';
3
+ type Props = {
4
+ chatContext: ChatContextType;
5
+ currentDateOption?: number;
6
+ onSelectDateOption: (value: number) => void;
7
+ };
8
+ declare const DateOptions: React.FC<Props>;
9
+ export default DateOptions;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ChatContextType, EntityInfoType } from '../../../common/type';
3
+ type Props = {
4
+ chatContext?: ChatContextType;
5
+ entityInfo?: EntityInfoType;
6
+ };
7
+ declare const FilterSection: React.FC<Props>;
8
+ export default FilterSection;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import 'github-markdown-css/github-markdown.css';
3
+ import 'highlight.js/styles/github.css';
4
+ type Props = {
5
+ markdown: string;
6
+ loading?: boolean;
7
+ onApplyAuth?: (model: string) => void;
8
+ };
9
+ declare const MarkDown: React.FC<Props>;
10
+ export default MarkDown;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { EntityInfoType, ChatContextType } from '../../../common/type';
3
+ type Props = {
4
+ position: 'left' | 'right';
5
+ width?: number | string;
6
+ maxWidth?: number | string;
7
+ height?: number | string;
8
+ title?: string;
9
+ followQuestions?: string[];
10
+ bubbleClassName?: string;
11
+ chatContext?: ChatContextType;
12
+ entityInfo?: EntityInfoType;
13
+ children?: React.ReactNode;
14
+ isMobileMode?: boolean;
15
+ queryMode?: string;
16
+ };
17
+ declare const Message: React.FC<Props>;
18
+ export default Message;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ title: string;
4
+ value: string;
5
+ };
6
+ declare const PeriodCompareItem: React.FC<Props>;
7
+ export default PeriodCompareItem;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ type Props = {
4
+ data: MsgDataType;
5
+ question: string;
6
+ loading: boolean;
7
+ onApplyAuth?: (model: string) => void;
8
+ };
9
+ declare const MetricCard: React.FC<Props>;
10
+ export default MetricCard;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { AggregateInfoType, ColumnType } from '../../../common/type';
3
+ type Props = {
4
+ aggregateInfo: AggregateInfoType;
5
+ currentMetricField: ColumnType;
6
+ };
7
+ declare const MetricInfo: React.FC<Props>;
8
+ export default MetricInfo;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ColumnType } from '../../../common/type';
3
+ type Props = {
4
+ model?: string;
5
+ dateColumnName: string;
6
+ categoryColumnName: string;
7
+ metricField: ColumnType;
8
+ resultList: any[];
9
+ triggerResize?: boolean;
10
+ onApplyAuth?: (model: string) => void;
11
+ chartType?: string;
12
+ };
13
+ declare const MetricTrendChart: React.FC<Props>;
14
+ export default MetricTrendChart;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ColumnType } from '../../../common/type';
3
+ type Props = {
4
+ dateColumnName: string;
5
+ metricFields: ColumnType[];
6
+ resultList: any[];
7
+ triggerResize?: boolean;
8
+ chartType?: string;
9
+ question: string;
10
+ };
11
+ declare const MultiMetricsTrendChart: React.FC<Props>;
12
+ export default MultiMetricsTrendChart;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { DrillDownDimensionType, FieldType, MsgDataType } from '../../../common/type';
3
+ type Props = {
4
+ data: MsgDataType;
5
+ question: string;
6
+ chartIndex: number;
7
+ triggerResize?: boolean;
8
+ loading: boolean;
9
+ activeMetricField?: FieldType;
10
+ drillDownDimension?: DrillDownDimensionType;
11
+ currentDateOption?: number;
12
+ onApplyAuth?: (model: string) => void;
13
+ onSelectDateOption: (value: number) => void;
14
+ };
15
+ declare const MetricTrend: React.FC<Props>;
16
+ export default MetricTrend;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ model: string;
4
+ chartType?: string;
5
+ onApplyAuth?: (model: string) => void;
6
+ };
7
+ declare const NoPermissionChart: React.FC<Props>;
8
+ export default NoPermissionChart;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ import { ColumnType } from '../../../common/type';
4
+ type Props = {
5
+ data: MsgDataType;
6
+ metricField: ColumnType;
7
+ categoryField: ColumnType;
8
+ triggerResize?: boolean;
9
+ };
10
+ declare const PieChart: React.FC<Props>;
11
+ export default PieChart;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ import { ColumnType } from '../../../common/type';
4
+ type Props = {
5
+ data: MsgDataType;
6
+ question: string;
7
+ triggerResize?: boolean;
8
+ loading: boolean;
9
+ metricField: ColumnType;
10
+ categoryField: ColumnType;
11
+ onApplyAuth?: (model: string) => void;
12
+ };
13
+ declare const Pie: React.FC<Props>;
14
+ export default Pie;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ import { SizeType } from 'antd/es/config-provider/SizeContext';
4
+ type Props = {
5
+ data: MsgDataType;
6
+ size?: SizeType;
7
+ question?: string;
8
+ loading?: boolean;
9
+ onApplyAuth?: (model: string) => void;
10
+ };
11
+ declare const Table: React.FC<Props>;
12
+ export default Table;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from '../../../common/type';
3
+ type Props = {
4
+ columns: ColumnType[];
5
+ referenceColumn?: ColumnType;
6
+ dataSource: any[];
7
+ };
8
+ declare const Text: React.FC<Props>;
9
+ export default Text;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { MsgDataType } from '../../../common/type';
3
+ type Props = {
4
+ id: string | number;
5
+ data: MsgDataType;
6
+ };
7
+ declare const WebPage: React.FC<Props>;
8
+ export default WebPage;