@next-bricks/ai-portal 0.27.0 → 0.27.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/dist/types.json CHANGED
@@ -4,6 +4,74 @@
4
4
  "events": [],
5
5
  "methods": []
6
6
  },
7
+ "ai-portal.elevo-logo": {
8
+ "properties": [],
9
+ "events": [],
10
+ "methods": []
11
+ },
12
+ "ai-portal.icon-button": {
13
+ "properties": [
14
+ {
15
+ "name": "icon",
16
+ "annotation": {
17
+ "type": "reference",
18
+ "typeName": {
19
+ "type": "identifier",
20
+ "name": "GeneralIconProps"
21
+ }
22
+ }
23
+ },
24
+ {
25
+ "name": "tooltip",
26
+ "annotation": {
27
+ "type": "keyword",
28
+ "value": "string"
29
+ }
30
+ },
31
+ {
32
+ "name": "disabled",
33
+ "annotation": {
34
+ "type": "keyword",
35
+ "value": "boolean"
36
+ }
37
+ },
38
+ {
39
+ "name": "variant",
40
+ "annotation": {
41
+ "type": "reference",
42
+ "typeName": {
43
+ "type": "identifier",
44
+ "name": "IconButtonVariant"
45
+ }
46
+ }
47
+ }
48
+ ],
49
+ "events": [],
50
+ "methods": [],
51
+ "types": [
52
+ {
53
+ "type": "typeAlias",
54
+ "name": "IconButtonVariant",
55
+ "annotation": {
56
+ "type": "union",
57
+ "types": [
58
+ {
59
+ "type": "jsLiteral",
60
+ "value": "default"
61
+ },
62
+ {
63
+ "type": "jsLiteral",
64
+ "value": "light"
65
+ },
66
+ {
67
+ "type": "jsLiteral",
68
+ "value": "mini"
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ ]
74
+ },
7
75
  "ai-portal.stat-with-mini-chart": {
8
76
  "properties": [
9
77
  {
@@ -108,74 +176,6 @@
108
176
  "events": [],
109
177
  "methods": []
110
178
  },
111
- "ai-portal.elevo-logo": {
112
- "properties": [],
113
- "events": [],
114
- "methods": []
115
- },
116
- "ai-portal.icon-button": {
117
- "properties": [
118
- {
119
- "name": "icon",
120
- "annotation": {
121
- "type": "reference",
122
- "typeName": {
123
- "type": "identifier",
124
- "name": "GeneralIconProps"
125
- }
126
- }
127
- },
128
- {
129
- "name": "tooltip",
130
- "annotation": {
131
- "type": "keyword",
132
- "value": "string"
133
- }
134
- },
135
- {
136
- "name": "disabled",
137
- "annotation": {
138
- "type": "keyword",
139
- "value": "boolean"
140
- }
141
- },
142
- {
143
- "name": "variant",
144
- "annotation": {
145
- "type": "reference",
146
- "typeName": {
147
- "type": "identifier",
148
- "name": "IconButtonVariant"
149
- }
150
- }
151
- }
152
- ],
153
- "events": [],
154
- "methods": [],
155
- "types": [
156
- {
157
- "type": "typeAlias",
158
- "name": "IconButtonVariant",
159
- "annotation": {
160
- "type": "union",
161
- "types": [
162
- {
163
- "type": "jsLiteral",
164
- "value": "default"
165
- },
166
- {
167
- "type": "jsLiteral",
168
- "value": "light"
169
- },
170
- {
171
- "type": "jsLiteral",
172
- "value": "mini"
173
- }
174
- ]
175
- }
176
- }
177
- ]
178
- },
179
179
  "ai-portal.save-request-store": {
180
180
  "type": "provider",
181
181
  "params": [
@@ -1150,244 +1150,25 @@
1150
1150
  "typeName": {
1151
1151
  "type": "identifier",
1152
1152
  "name": "HistoryItem"
1153
- }
1154
- },
1155
- "computed": false
1156
- }
1157
- ]
1158
- },
1159
- {
1160
- "type": "interface",
1161
- "name": "HistoryItem",
1162
- "body": [
1163
- {
1164
- "type": "propertySignature",
1165
- "key": {
1166
- "type": "identifier",
1167
- "name": "id"
1168
- },
1169
- "annotation": {
1170
- "type": "keyword",
1171
- "value": "string"
1172
- },
1173
- "computed": false
1174
- },
1175
- {
1176
- "type": "propertySignature",
1177
- "key": {
1178
- "type": "identifier",
1179
- "name": "title"
1180
- },
1181
- "annotation": {
1182
- "type": "keyword",
1183
- "value": "string"
1184
- },
1185
- "computed": false
1186
- },
1187
- {
1188
- "type": "propertySignature",
1189
- "key": {
1190
- "type": "identifier",
1191
- "name": "startTime"
1192
- },
1193
- "annotation": {
1194
- "type": "keyword",
1195
- "value": "number"
1196
- },
1197
- "computed": false
1198
- },
1199
- {
1200
- "type": "propertySignature",
1201
- "key": {
1202
- "type": "identifier",
1203
- "name": "state"
1204
- },
1205
- "annotation": {
1206
- "type": "reference",
1207
- "typeName": {
1208
- "type": "identifier",
1209
- "name": "TaskState"
1210
- }
1211
- },
1212
- "optional": true,
1213
- "computed": false
1214
- }
1215
- ]
1216
- }
1217
- ]
1218
- },
1219
- "ai-portal.chat-stream": {
1220
- "properties": [
1221
- {
1222
- "name": "taskId",
1223
- "annotation": {
1224
- "type": "keyword",
1225
- "value": "string"
1226
- }
1227
- },
1228
- {
1229
- "name": "replay",
1230
- "annotation": {
1231
- "type": "keyword",
1232
- "value": "boolean"
1233
- }
1234
- },
1235
- {
1236
- "name": "replayDelay",
1237
- "annotation": {
1238
- "type": "keyword",
1239
- "value": "number"
1240
- }
1241
- },
1242
- {
1243
- "name": "supports",
1244
- "annotation": {
1245
- "type": "reference",
1246
- "typeName": {
1247
- "type": "identifier",
1248
- "name": "Record"
1249
- },
1250
- "typeParameters": {
1251
- "type": "typeParameterInstantiation",
1252
- "params": [
1253
- {
1254
- "type": "keyword",
1255
- "value": "string"
1256
- },
1257
- {
1258
- "type": "keyword",
1259
- "value": "boolean"
1260
- }
1261
- ]
1262
- }
1263
- }
1264
- },
1265
- {
1266
- "name": "showFeedback",
1267
- "annotation": {
1268
- "type": "keyword",
1269
- "value": "boolean"
1270
- }
1271
- },
1272
- {
1273
- "name": "showFeedbackOnView",
1274
- "annotation": {
1275
- "type": "keyword",
1276
- "value": "boolean"
1277
- }
1278
- },
1279
- {
1280
- "name": "showUiSwitch",
1281
- "annotation": {
1282
- "type": "keyword",
1283
- "value": "boolean"
1284
- }
1285
- },
1286
- {
1287
- "name": "hideMermaid",
1288
- "annotation": {
1289
- "type": "keyword",
1290
- "value": "boolean"
1291
- }
1292
- }
1293
- ],
1294
- "events": [
1295
- {
1296
- "name": "share",
1297
- "detail": {
1298
- "annotation": {
1299
- "type": "keyword",
1300
- "value": "void"
1301
- }
1302
- }
1303
- },
1304
- {
1305
- "name": "terminate",
1306
- "detail": {
1307
- "annotation": {
1308
- "type": "keyword",
1309
- "value": "void"
1310
- }
1311
- }
1312
- },
1313
- {
1314
- "name": "feedback.submit",
1315
- "detail": {
1316
- "annotation": {
1317
- "type": "reference",
1318
- "typeName": {
1319
- "type": "identifier",
1320
- "name": "FeedbackDetail"
1321
- }
1322
- }
1323
- }
1324
- },
1325
- {
1326
- "name": "feedback.on.view",
1327
- "detail": {
1328
- "annotation": {
1329
- "type": "keyword",
1330
- "value": "string"
1331
- }
1332
- }
1333
- },
1334
- {
1335
- "name": "ui.switch",
1336
- "detail": {
1337
- "annotation": {
1338
- "type": "jsLiteral",
1339
- "value": "canvas"
1340
- }
1341
- }
1342
- }
1343
- ],
1344
- "methods": [
1345
- {
1346
- "name": "resumed",
1347
- "params": [],
1348
- "returns": {}
1349
- },
1350
- {
1351
- "name": "feedbackSubmitDone",
1352
- "params": [],
1353
- "returns": {}
1354
- },
1355
- {
1356
- "name": "feedbackSubmitFailed",
1357
- "params": [],
1358
- "returns": {}
1359
- },
1360
- {
1361
- "name": "feedbackOnViewDone",
1362
- "params": [
1363
- {
1364
- "name": "viewId",
1365
- "annotation": {
1366
- "type": "keyword",
1367
- "value": "string"
1368
- }
1153
+ }
1154
+ },
1155
+ "computed": false
1369
1156
  }
1370
- ],
1371
- "returns": {}
1372
- }
1373
- ],
1374
- "types": [
1157
+ ]
1158
+ },
1375
1159
  {
1376
1160
  "type": "interface",
1377
- "name": "FeedbackDetail",
1161
+ "name": "HistoryItem",
1378
1162
  "body": [
1379
1163
  {
1380
1164
  "type": "propertySignature",
1381
1165
  "key": {
1382
1166
  "type": "identifier",
1383
- "name": "plan"
1167
+ "name": "id"
1384
1168
  },
1385
1169
  "annotation": {
1386
- "type": "array",
1387
- "elementType": {
1388
- "type": "keyword",
1389
- "value": "string"
1390
- }
1170
+ "type": "keyword",
1171
+ "value": "string"
1391
1172
  },
1392
1173
  "computed": false
1393
1174
  },
@@ -1395,14 +1176,11 @@
1395
1176
  "type": "propertySignature",
1396
1177
  "key": {
1397
1178
  "type": "identifier",
1398
- "name": "result"
1179
+ "name": "title"
1399
1180
  },
1400
1181
  "annotation": {
1401
- "type": "array",
1402
- "elementType": {
1403
- "type": "keyword",
1404
- "value": "string"
1405
- }
1182
+ "type": "keyword",
1183
+ "value": "string"
1406
1184
  },
1407
1185
  "computed": false
1408
1186
  },
@@ -1410,12 +1188,28 @@
1410
1188
  "type": "propertySignature",
1411
1189
  "key": {
1412
1190
  "type": "identifier",
1413
- "name": "feedback"
1191
+ "name": "startTime"
1414
1192
  },
1415
1193
  "annotation": {
1416
1194
  "type": "keyword",
1417
- "value": "string"
1195
+ "value": "number"
1196
+ },
1197
+ "computed": false
1198
+ },
1199
+ {
1200
+ "type": "propertySignature",
1201
+ "key": {
1202
+ "type": "identifier",
1203
+ "name": "state"
1204
+ },
1205
+ "annotation": {
1206
+ "type": "reference",
1207
+ "typeName": {
1208
+ "type": "identifier",
1209
+ "name": "TaskState"
1210
+ }
1418
1211
  },
1212
+ "optional": true,
1419
1213
  "computed": false
1420
1214
  }
1421
1215
  ]
@@ -2862,5 +2656,211 @@
2862
2656
  ]
2863
2657
  }
2864
2658
  ]
2659
+ },
2660
+ "ai-portal.chat-stream": {
2661
+ "properties": [
2662
+ {
2663
+ "name": "taskId",
2664
+ "annotation": {
2665
+ "type": "keyword",
2666
+ "value": "string"
2667
+ }
2668
+ },
2669
+ {
2670
+ "name": "replay",
2671
+ "annotation": {
2672
+ "type": "keyword",
2673
+ "value": "boolean"
2674
+ }
2675
+ },
2676
+ {
2677
+ "name": "replayDelay",
2678
+ "annotation": {
2679
+ "type": "keyword",
2680
+ "value": "number"
2681
+ }
2682
+ },
2683
+ {
2684
+ "name": "supports",
2685
+ "annotation": {
2686
+ "type": "reference",
2687
+ "typeName": {
2688
+ "type": "identifier",
2689
+ "name": "Record"
2690
+ },
2691
+ "typeParameters": {
2692
+ "type": "typeParameterInstantiation",
2693
+ "params": [
2694
+ {
2695
+ "type": "keyword",
2696
+ "value": "string"
2697
+ },
2698
+ {
2699
+ "type": "keyword",
2700
+ "value": "boolean"
2701
+ }
2702
+ ]
2703
+ }
2704
+ }
2705
+ },
2706
+ {
2707
+ "name": "showFeedback",
2708
+ "annotation": {
2709
+ "type": "keyword",
2710
+ "value": "boolean"
2711
+ }
2712
+ },
2713
+ {
2714
+ "name": "showFeedbackOnView",
2715
+ "annotation": {
2716
+ "type": "keyword",
2717
+ "value": "boolean"
2718
+ }
2719
+ },
2720
+ {
2721
+ "name": "showUiSwitch",
2722
+ "annotation": {
2723
+ "type": "keyword",
2724
+ "value": "boolean"
2725
+ }
2726
+ },
2727
+ {
2728
+ "name": "hideMermaid",
2729
+ "annotation": {
2730
+ "type": "keyword",
2731
+ "value": "boolean"
2732
+ }
2733
+ }
2734
+ ],
2735
+ "events": [
2736
+ {
2737
+ "name": "share",
2738
+ "detail": {
2739
+ "annotation": {
2740
+ "type": "keyword",
2741
+ "value": "void"
2742
+ }
2743
+ }
2744
+ },
2745
+ {
2746
+ "name": "terminate",
2747
+ "detail": {
2748
+ "annotation": {
2749
+ "type": "keyword",
2750
+ "value": "void"
2751
+ }
2752
+ }
2753
+ },
2754
+ {
2755
+ "name": "feedback.submit",
2756
+ "detail": {
2757
+ "annotation": {
2758
+ "type": "reference",
2759
+ "typeName": {
2760
+ "type": "identifier",
2761
+ "name": "FeedbackDetail"
2762
+ }
2763
+ }
2764
+ }
2765
+ },
2766
+ {
2767
+ "name": "feedback.on.view",
2768
+ "detail": {
2769
+ "annotation": {
2770
+ "type": "keyword",
2771
+ "value": "string"
2772
+ }
2773
+ }
2774
+ },
2775
+ {
2776
+ "name": "ui.switch",
2777
+ "detail": {
2778
+ "annotation": {
2779
+ "type": "jsLiteral",
2780
+ "value": "canvas"
2781
+ }
2782
+ }
2783
+ }
2784
+ ],
2785
+ "methods": [
2786
+ {
2787
+ "name": "resumed",
2788
+ "params": [],
2789
+ "returns": {}
2790
+ },
2791
+ {
2792
+ "name": "feedbackSubmitDone",
2793
+ "params": [],
2794
+ "returns": {}
2795
+ },
2796
+ {
2797
+ "name": "feedbackSubmitFailed",
2798
+ "params": [],
2799
+ "returns": {}
2800
+ },
2801
+ {
2802
+ "name": "feedbackOnViewDone",
2803
+ "params": [
2804
+ {
2805
+ "name": "viewId",
2806
+ "annotation": {
2807
+ "type": "keyword",
2808
+ "value": "string"
2809
+ }
2810
+ }
2811
+ ],
2812
+ "returns": {}
2813
+ }
2814
+ ],
2815
+ "types": [
2816
+ {
2817
+ "type": "interface",
2818
+ "name": "FeedbackDetail",
2819
+ "body": [
2820
+ {
2821
+ "type": "propertySignature",
2822
+ "key": {
2823
+ "type": "identifier",
2824
+ "name": "plan"
2825
+ },
2826
+ "annotation": {
2827
+ "type": "array",
2828
+ "elementType": {
2829
+ "type": "keyword",
2830
+ "value": "string"
2831
+ }
2832
+ },
2833
+ "computed": false
2834
+ },
2835
+ {
2836
+ "type": "propertySignature",
2837
+ "key": {
2838
+ "type": "identifier",
2839
+ "name": "result"
2840
+ },
2841
+ "annotation": {
2842
+ "type": "array",
2843
+ "elementType": {
2844
+ "type": "keyword",
2845
+ "value": "string"
2846
+ }
2847
+ },
2848
+ "computed": false
2849
+ },
2850
+ {
2851
+ "type": "propertySignature",
2852
+ "key": {
2853
+ "type": "identifier",
2854
+ "name": "feedback"
2855
+ },
2856
+ "annotation": {
2857
+ "type": "keyword",
2858
+ "value": "string"
2859
+ },
2860
+ "computed": false
2861
+ }
2862
+ ]
2863
+ }
2864
+ ]
2865
2865
  }
2866
2866
  }
@@ -1,7 +1,7 @@
1
1
  import type { TaskState } from "../../cruise-canvas/interfaces";
2
2
  export interface ChatBoxProps {
3
- taskState: TaskState | undefined;
4
- taskDone: boolean;
3
+ state: TaskState | undefined;
4
+ canChat: boolean;
5
5
  inputRequiredJobId?: string | null;
6
6
  }
7
- export declare function ChatBox({ taskState, taskDone, inputRequiredJobId, }: ChatBoxProps): JSX.Element;
7
+ export declare function ChatBox({ state, canChat, inputRequiredJobId, }: ChatBoxProps): JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
2
- import type { TaskState } from "../cruise-canvas/interfaces.js";
3
- export declare const DONE_STATES: TaskState[];
4
- export declare const GENERAL_DONE_STATES: TaskState[];
2
+ import type { TaskState as LegacyTaskState } from "../cruise-canvas/interfaces.js";
3
+ import type { TaskState } from "./interfaces.js";
4
+ export declare const DONE_STATES: (TaskState | LegacyTaskState)[];
5
+ export declare const GENERAL_DONE_STATES: (TaskState | LegacyTaskState)[];
5
6
  export declare const NON_WORKING_STATES: string[];
6
7
  export declare const ICON_CLOSE: GeneralIconProps;
7
8
  export declare const ICON_LOADING: GeneralIconProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.27.0",
3
+ "version": "0.27.2",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,5 +46,5 @@
46
46
  "@next-bricks/presentational": "*",
47
47
  "@next-bricks/vs": "*"
48
48
  },
49
- "gitHead": "cd61d85cd0737ef0e86e25934540b8c785b5a926"
49
+ "gitHead": "e0669842e2963441fcba4aa21659bc05200643de"
50
50
  }