@next-bricks/ai-portal 0.39.4 → 0.39.6

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 (59) hide show
  1. package/dist/bricks.json +18 -17
  2. package/dist/chunks/1967.118ab1ff.js +2 -0
  3. package/dist/chunks/1967.118ab1ff.js.map +1 -0
  4. package/dist/chunks/3554.d27ba6a7.js +2 -0
  5. package/dist/chunks/3554.d27ba6a7.js.map +1 -0
  6. package/dist/chunks/382.673901e0.js +2 -0
  7. package/dist/chunks/382.673901e0.js.map +1 -0
  8. package/dist/chunks/453.bb828a7c.js +2 -0
  9. package/dist/chunks/453.bb828a7c.js.map +1 -0
  10. package/dist/chunks/71.d73556e8.js +2 -0
  11. package/dist/chunks/71.d73556e8.js.map +1 -0
  12. package/dist/chunks/7774.4418c30b.js +2 -0
  13. package/dist/chunks/7774.4418c30b.js.map +1 -0
  14. package/dist/chunks/{8616.00ec7d55.js → 8616.ceae4e7b.js} +3 -3
  15. package/dist/chunks/{8616.00ec7d55.js.map → 8616.ceae4e7b.js.map} +1 -1
  16. package/dist/chunks/chat-box.95d5030b.js +2 -0
  17. package/dist/chunks/chat-box.95d5030b.js.map +1 -0
  18. package/dist/chunks/goal-card-list.3808c3ae.js +3 -0
  19. package/dist/chunks/goal-card-list.3808c3ae.js.map +1 -0
  20. package/dist/chunks/{main.34dc1e32.js → main.70faece8.js} +2 -2
  21. package/dist/chunks/{main.34dc1e32.js.map → main.70faece8.js.map} +1 -1
  22. package/dist/chunks/preview-container.260a045a.js +2 -0
  23. package/dist/chunks/preview-container.260a045a.js.map +1 -0
  24. package/dist/chunks/project-conversations.972403a2.js +3 -0
  25. package/dist/chunks/project-conversations.972403a2.js.map +1 -0
  26. package/dist/examples.json +9 -9
  27. package/dist/{index.5799bda2.js → index.910aa848.js} +2 -2
  28. package/dist/{index.5799bda2.js.map → index.910aa848.js.map} +1 -1
  29. package/dist/manifest.json +150 -126
  30. package/dist/types.json +219 -181
  31. package/dist-types/chat-box/index.d.ts +10 -1
  32. package/dist-types/goal-card-list/CardItem/CardItem.d.ts +3 -1
  33. package/dist-types/goal-card-list/i18n.d.ts +2 -1
  34. package/dist-types/goal-card-list/index.d.ts +2 -0
  35. package/dist-types/shared/interfaces.d.ts +1 -1
  36. package/package.json +2 -2
  37. package/dist/chunks/1967.90a3a911.js +0 -2
  38. package/dist/chunks/1967.90a3a911.js.map +0 -1
  39. package/dist/chunks/2940.8640e146.js +0 -2
  40. package/dist/chunks/2940.8640e146.js.map +0 -1
  41. package/dist/chunks/3554.3bd4e85e.js +0 -2
  42. package/dist/chunks/3554.3bd4e85e.js.map +0 -1
  43. package/dist/chunks/453.91b3c698.js +0 -2
  44. package/dist/chunks/453.91b3c698.js.map +0 -1
  45. package/dist/chunks/71.fac7051d.js +0 -2
  46. package/dist/chunks/71.fac7051d.js.map +0 -1
  47. package/dist/chunks/833.0f19f121.js +0 -2
  48. package/dist/chunks/833.0f19f121.js.map +0 -1
  49. package/dist/chunks/chat-box.8bcfda44.js +0 -2
  50. package/dist/chunks/chat-box.8bcfda44.js.map +0 -1
  51. package/dist/chunks/goal-card-list.d0dfa31e.js +0 -3
  52. package/dist/chunks/goal-card-list.d0dfa31e.js.map +0 -1
  53. package/dist/chunks/preview-container.be444668.js +0 -2
  54. package/dist/chunks/preview-container.be444668.js.map +0 -1
  55. package/dist/chunks/project-conversations.758d7189.js +0 -3
  56. package/dist/chunks/project-conversations.758d7189.js.map +0 -1
  57. /package/dist/chunks/{8616.00ec7d55.js.LICENSE.txt → 8616.ceae4e7b.js.LICENSE.txt} +0 -0
  58. /package/dist/chunks/{goal-card-list.d0dfa31e.js.LICENSE.txt → goal-card-list.3808c3ae.js.LICENSE.txt} +0 -0
  59. /package/dist/chunks/{project-conversations.758d7189.js.LICENSE.txt → project-conversations.972403a2.js.LICENSE.txt} +0 -0
package/dist/types.json CHANGED
@@ -1,74 +1,8 @@
1
1
  {
2
- "ai-portal.icon-button": {
3
- "properties": [
4
- {
5
- "name": "icon",
6
- "annotation": {
7
- "type": "reference",
8
- "typeName": {
9
- "type": "identifier",
10
- "name": "GeneralIconProps"
11
- }
12
- }
13
- },
14
- {
15
- "name": "tooltip",
16
- "annotation": {
17
- "type": "keyword",
18
- "value": "string"
19
- }
20
- },
21
- {
22
- "name": "disabled",
23
- "annotation": {
24
- "type": "keyword",
25
- "value": "boolean"
26
- }
27
- },
28
- {
29
- "name": "variant",
30
- "annotation": {
31
- "type": "reference",
32
- "typeName": {
33
- "type": "identifier",
34
- "name": "IconButtonVariant"
35
- }
36
- }
37
- }
38
- ],
2
+ "ai-portal.home-container": {
3
+ "properties": [],
39
4
  "events": [],
40
- "methods": [],
41
- "types": [
42
- {
43
- "type": "typeAlias",
44
- "name": "IconButtonVariant",
45
- "annotation": {
46
- "type": "union",
47
- "types": [
48
- {
49
- "type": "jsLiteral",
50
- "value": "default"
51
- },
52
- {
53
- "type": "jsLiteral",
54
- "value": "light"
55
- },
56
- {
57
- "type": "jsLiteral",
58
- "value": "mini"
59
- },
60
- {
61
- "type": "jsLiteral",
62
- "value": "mini-light"
63
- },
64
- {
65
- "type": "jsLiteral",
66
- "value": "bordered"
67
- }
68
- ]
69
- }
70
- }
71
- ]
5
+ "methods": []
72
6
  },
73
7
  "ai-portal.stat-with-mini-chart": {
74
8
  "properties": [
@@ -174,6 +108,77 @@
174
108
  "events": [],
175
109
  "methods": []
176
110
  },
111
+ "ai-portal.icon-button": {
112
+ "properties": [
113
+ {
114
+ "name": "icon",
115
+ "annotation": {
116
+ "type": "reference",
117
+ "typeName": {
118
+ "type": "identifier",
119
+ "name": "GeneralIconProps"
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "name": "tooltip",
125
+ "annotation": {
126
+ "type": "keyword",
127
+ "value": "string"
128
+ }
129
+ },
130
+ {
131
+ "name": "disabled",
132
+ "annotation": {
133
+ "type": "keyword",
134
+ "value": "boolean"
135
+ }
136
+ },
137
+ {
138
+ "name": "variant",
139
+ "annotation": {
140
+ "type": "reference",
141
+ "typeName": {
142
+ "type": "identifier",
143
+ "name": "IconButtonVariant"
144
+ }
145
+ }
146
+ }
147
+ ],
148
+ "events": [],
149
+ "methods": [],
150
+ "types": [
151
+ {
152
+ "type": "typeAlias",
153
+ "name": "IconButtonVariant",
154
+ "annotation": {
155
+ "type": "union",
156
+ "types": [
157
+ {
158
+ "type": "jsLiteral",
159
+ "value": "default"
160
+ },
161
+ {
162
+ "type": "jsLiteral",
163
+ "value": "light"
164
+ },
165
+ {
166
+ "type": "jsLiteral",
167
+ "value": "mini"
168
+ },
169
+ {
170
+ "type": "jsLiteral",
171
+ "value": "mini-light"
172
+ },
173
+ {
174
+ "type": "jsLiteral",
175
+ "value": "bordered"
176
+ }
177
+ ]
178
+ }
179
+ }
180
+ ]
181
+ },
177
182
  "ai-portal.entity-sdk-get": {
178
183
  "type": "provider",
179
184
  "params": [
@@ -460,11 +465,6 @@
460
465
  }
461
466
  ]
462
467
  },
463
- "ai-portal.home-container": {
464
- "properties": [],
465
- "events": [],
466
- "methods": []
467
- },
468
468
  "ai-portal.tab-list": {
469
469
  "properties": [
470
470
  {
@@ -716,7 +716,26 @@
716
716
  }
717
717
  }
718
718
  ],
719
- "methods": []
719
+ "methods": [
720
+ {
721
+ "name": "setValue",
722
+ "params": [
723
+ {
724
+ "name": "value",
725
+ "annotation": {
726
+ "type": "keyword",
727
+ "value": "string"
728
+ }
729
+ }
730
+ ],
731
+ "returns": {}
732
+ },
733
+ {
734
+ "name": "getValue",
735
+ "params": [],
736
+ "returns": {}
737
+ }
738
+ ]
720
739
  },
721
740
  "ai-portal.show-cases": {
722
741
  "properties": [
@@ -944,7 +963,7 @@
944
963
  }
945
964
  ]
946
965
  },
947
- "ai-portal.ai-agents": {
966
+ "ai-portal.ai-employees": {
948
967
  "properties": [
949
968
  {
950
969
  "name": "list",
@@ -954,11 +973,21 @@
954
973
  "type": "reference",
955
974
  "typeName": {
956
975
  "type": "identifier",
957
- "name": "Agent"
976
+ "name": "Employee"
958
977
  }
959
978
  }
960
979
  }
961
980
  },
981
+ {
982
+ "name": "industries",
983
+ "annotation": {
984
+ "type": "array",
985
+ "elementType": {
986
+ "type": "keyword",
987
+ "value": "string"
988
+ }
989
+ }
990
+ },
962
991
  {
963
992
  "name": "urlTemplate",
964
993
  "annotation": {
@@ -979,7 +1008,7 @@
979
1008
  "types": [
980
1009
  {
981
1010
  "type": "interface",
982
- "name": "Agent",
1011
+ "name": "Employee",
983
1012
  "body": [
984
1013
  {
985
1014
  "type": "propertySignature",
@@ -997,7 +1026,7 @@
997
1026
  "type": "propertySignature",
998
1027
  "key": {
999
1028
  "type": "identifier",
1000
- "name": "description"
1029
+ "name": "industry"
1001
1030
  },
1002
1031
  "annotation": {
1003
1032
  "type": "keyword",
@@ -1009,30 +1038,35 @@
1009
1038
  "type": "propertySignature",
1010
1039
  "key": {
1011
1040
  "type": "identifier",
1012
- "name": "icon"
1041
+ "name": "role"
1013
1042
  },
1014
1043
  "annotation": {
1015
- "type": "reference",
1016
- "typeName": {
1017
- "type": "identifier",
1018
- "name": "GeneralIconProps"
1019
- }
1044
+ "type": "keyword",
1045
+ "value": "string"
1020
1046
  },
1021
- "optional": true,
1022
1047
  "computed": false
1023
1048
  },
1024
1049
  {
1025
1050
  "type": "propertySignature",
1026
1051
  "key": {
1027
1052
  "type": "identifier",
1028
- "name": "tags"
1053
+ "name": "description"
1029
1054
  },
1030
1055
  "annotation": {
1031
- "type": "array",
1032
- "elementType": {
1033
- "type": "keyword",
1034
- "value": "string"
1035
- }
1056
+ "type": "keyword",
1057
+ "value": "string"
1058
+ },
1059
+ "computed": false
1060
+ },
1061
+ {
1062
+ "type": "propertySignature",
1063
+ "key": {
1064
+ "type": "identifier",
1065
+ "name": "avatar"
1066
+ },
1067
+ "annotation": {
1068
+ "type": "keyword",
1069
+ "value": "string"
1036
1070
  },
1037
1071
  "optional": true,
1038
1072
  "computed": false
@@ -1041,7 +1075,7 @@
1041
1075
  }
1042
1076
  ]
1043
1077
  },
1044
- "ai-portal.ai-employees": {
1078
+ "ai-portal.ai-agents": {
1045
1079
  "properties": [
1046
1080
  {
1047
1081
  "name": "list",
@@ -1051,21 +1085,11 @@
1051
1085
  "type": "reference",
1052
1086
  "typeName": {
1053
1087
  "type": "identifier",
1054
- "name": "Employee"
1088
+ "name": "Agent"
1055
1089
  }
1056
1090
  }
1057
1091
  }
1058
1092
  },
1059
- {
1060
- "name": "industries",
1061
- "annotation": {
1062
- "type": "array",
1063
- "elementType": {
1064
- "type": "keyword",
1065
- "value": "string"
1066
- }
1067
- }
1068
- },
1069
1093
  {
1070
1094
  "name": "urlTemplate",
1071
1095
  "annotation": {
@@ -1086,7 +1110,7 @@
1086
1110
  "types": [
1087
1111
  {
1088
1112
  "type": "interface",
1089
- "name": "Employee",
1113
+ "name": "Agent",
1090
1114
  "body": [
1091
1115
  {
1092
1116
  "type": "propertySignature",
@@ -1104,7 +1128,7 @@
1104
1128
  "type": "propertySignature",
1105
1129
  "key": {
1106
1130
  "type": "identifier",
1107
- "name": "industry"
1131
+ "name": "description"
1108
1132
  },
1109
1133
  "annotation": {
1110
1134
  "type": "keyword",
@@ -1116,7 +1140,73 @@
1116
1140
  "type": "propertySignature",
1117
1141
  "key": {
1118
1142
  "type": "identifier",
1119
- "name": "role"
1143
+ "name": "icon"
1144
+ },
1145
+ "annotation": {
1146
+ "type": "reference",
1147
+ "typeName": {
1148
+ "type": "identifier",
1149
+ "name": "GeneralIconProps"
1150
+ }
1151
+ },
1152
+ "optional": true,
1153
+ "computed": false
1154
+ },
1155
+ {
1156
+ "type": "propertySignature",
1157
+ "key": {
1158
+ "type": "identifier",
1159
+ "name": "tags"
1160
+ },
1161
+ "annotation": {
1162
+ "type": "array",
1163
+ "elementType": {
1164
+ "type": "keyword",
1165
+ "value": "string"
1166
+ }
1167
+ },
1168
+ "optional": true,
1169
+ "computed": false
1170
+ }
1171
+ ]
1172
+ }
1173
+ ]
1174
+ },
1175
+ "ai-portal.project-summary": {
1176
+ "properties": [
1177
+ {
1178
+ "name": "chatList",
1179
+ "annotation": {
1180
+ "type": "array",
1181
+ "elementType": {
1182
+ "type": "reference",
1183
+ "typeName": {
1184
+ "type": "identifier",
1185
+ "name": "Chat"
1186
+ }
1187
+ }
1188
+ }
1189
+ },
1190
+ {
1191
+ "name": "chatUrlTemplate",
1192
+ "annotation": {
1193
+ "type": "keyword",
1194
+ "value": "string"
1195
+ }
1196
+ }
1197
+ ],
1198
+ "events": [],
1199
+ "methods": [],
1200
+ "types": [
1201
+ {
1202
+ "type": "interface",
1203
+ "name": "Chat",
1204
+ "body": [
1205
+ {
1206
+ "type": "propertySignature",
1207
+ "key": {
1208
+ "type": "identifier",
1209
+ "name": "conversationId"
1120
1210
  },
1121
1211
  "annotation": {
1122
1212
  "type": "keyword",
@@ -1128,7 +1218,7 @@
1128
1218
  "type": "propertySignature",
1129
1219
  "key": {
1130
1220
  "type": "identifier",
1131
- "name": "description"
1221
+ "name": "title"
1132
1222
  },
1133
1223
  "annotation": {
1134
1224
  "type": "keyword",
@@ -1140,13 +1230,12 @@
1140
1230
  "type": "propertySignature",
1141
1231
  "key": {
1142
1232
  "type": "identifier",
1143
- "name": "avatar"
1233
+ "name": "startTime"
1144
1234
  },
1145
1235
  "annotation": {
1146
1236
  "type": "keyword",
1147
- "value": "string"
1237
+ "value": "number"
1148
1238
  },
1149
- "optional": true,
1150
1239
  "computed": false
1151
1240
  }
1152
1241
  ]
@@ -1322,76 +1411,6 @@
1322
1411
  }
1323
1412
  ]
1324
1413
  },
1325
- "ai-portal.project-summary": {
1326
- "properties": [
1327
- {
1328
- "name": "chatList",
1329
- "annotation": {
1330
- "type": "array",
1331
- "elementType": {
1332
- "type": "reference",
1333
- "typeName": {
1334
- "type": "identifier",
1335
- "name": "Chat"
1336
- }
1337
- }
1338
- }
1339
- },
1340
- {
1341
- "name": "chatUrlTemplate",
1342
- "annotation": {
1343
- "type": "keyword",
1344
- "value": "string"
1345
- }
1346
- }
1347
- ],
1348
- "events": [],
1349
- "methods": [],
1350
- "types": [
1351
- {
1352
- "type": "interface",
1353
- "name": "Chat",
1354
- "body": [
1355
- {
1356
- "type": "propertySignature",
1357
- "key": {
1358
- "type": "identifier",
1359
- "name": "conversationId"
1360
- },
1361
- "annotation": {
1362
- "type": "keyword",
1363
- "value": "string"
1364
- },
1365
- "computed": false
1366
- },
1367
- {
1368
- "type": "propertySignature",
1369
- "key": {
1370
- "type": "identifier",
1371
- "name": "title"
1372
- },
1373
- "annotation": {
1374
- "type": "keyword",
1375
- "value": "string"
1376
- },
1377
- "computed": false
1378
- },
1379
- {
1380
- "type": "propertySignature",
1381
- "key": {
1382
- "type": "identifier",
1383
- "name": "startTime"
1384
- },
1385
- "annotation": {
1386
- "type": "keyword",
1387
- "value": "number"
1388
- },
1389
- "computed": false
1390
- }
1391
- ]
1392
- }
1393
- ]
1394
- },
1395
1414
  "ai-portal.preview-container": {
1396
1415
  "properties": [
1397
1416
  {
@@ -2408,6 +2427,13 @@
2408
2427
  }
2409
2428
  }
2410
2429
  }
2430
+ },
2431
+ {
2432
+ "name": "activeKey",
2433
+ "annotation": {
2434
+ "type": "keyword",
2435
+ "value": "string"
2436
+ }
2411
2437
  }
2412
2438
  ],
2413
2439
  "events": [
@@ -2446,6 +2472,18 @@
2446
2472
  }
2447
2473
  }
2448
2474
  }
2475
+ },
2476
+ {
2477
+ "name": "item.new.chat",
2478
+ "detail": {
2479
+ "annotation": {
2480
+ "type": "reference",
2481
+ "typeName": {
2482
+ "type": "identifier",
2483
+ "name": "GoalItem"
2484
+ }
2485
+ }
2486
+ }
2449
2487
  }
2450
2488
  ],
2451
2489
  "methods": [],
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
+ export declare const ChatBoxComponent: React.ForwardRefExoticComponent<Omit<ChatBoxComponentProps, "ref"> & React.RefAttributes<ChatBoxRef>>;
4
5
  export interface ChatBoxProps {
5
6
  disabled?: boolean;
6
7
  placeholder?: string;
@@ -10,17 +11,25 @@ export interface Suggestion {
10
11
  title: string;
11
12
  content: string;
12
13
  }
14
+ export interface ChatBoxRef {
15
+ setValue: (value: string) => void;
16
+ getValue: () => string;
17
+ }
13
18
  /**
14
19
  * 构件 `ai-portal.chat-box`
15
20
  */
16
21
  export declare class ChatBox extends ReactNextElement implements ChatBoxProps {
17
22
  #private;
23
+ ref: React.RefObject<ChatBoxRef>;
18
24
  accessor disabled: boolean | undefined;
19
25
  accessor placeholder: string | undefined;
20
26
  accessor autoFocus: boolean | undefined;
27
+ setValue(value: string): void;
28
+ getValue(): string | undefined;
21
29
  render(): React.JSX.Element;
22
30
  }
23
31
  export interface ChatBoxComponentProps extends ChatBoxProps {
24
32
  onSubmit?: (value: string) => void;
33
+ ref?: React.Ref<ChatBoxRef>;
25
34
  }
26
- export declare function ChatBoxComponent({ disabled, placeholder, autoFocus, onSubmit, }: ChatBoxComponentProps): React.JSX.Element;
35
+ export declare function LegacyChatBoxComponent({ disabled, placeholder, autoFocus, onSubmit }: ChatBoxComponentProps, ref: React.Ref<ChatBoxRef>): React.JSX.Element;
@@ -22,9 +22,11 @@ export interface GoalItem {
22
22
  interface GoalCardItemProps {
23
23
  goalItem: GoalItem;
24
24
  cardStyle?: React.CSSProperties;
25
+ isActive?: boolean;
25
26
  onTitleChange?: (newTitle: string) => void;
26
27
  onStatusChange?: (newStatus: GoalState) => void;
28
+ onNewChat?: () => void;
27
29
  onClick?: () => void;
28
30
  }
29
- export declare function GoalCardItem({ goalItem, cardStyle, onStatusChange, onTitleChange, onClick, }: GoalCardItemProps): React.JSX.Element;
31
+ export declare function GoalCardItem({ goalItem, cardStyle, onStatusChange, onTitleChange, onClick, onNewChat, isActive, }: GoalCardItemProps): React.JSX.Element;
30
32
  export {};
@@ -1,7 +1,8 @@
1
1
  export declare enum K {
2
2
  UN_START_STATUS = "UN_START_STATUS",
3
3
  RUNNING_STATUS = "RUNNING_STATUS",
4
- COMPLETED_STATUS = "COMPLETED_STATUS"
4
+ COMPLETED_STATUS = "COMPLETED_STATUS",
5
+ NEW_CHAT = "NEW_CHAT"
5
6
  }
6
7
  export declare const NS = "bricks/ai-portal/goal-card-list";
7
8
  export declare const locales: {
@@ -5,6 +5,7 @@ import { GoalItem } from "./CardItem/CardItem.js";
5
5
  export interface GoalCardListProps {
6
6
  goalList?: GoalItem[];
7
7
  cardStyle?: React.CSSProperties;
8
+ activeKey?: string;
8
9
  }
9
10
  /**
10
11
  * 构件 `ai-portal.goal-card-list`
@@ -13,5 +14,6 @@ export declare class GoalCardList extends ReactNextElement implements GoalCardLi
13
14
  #private;
14
15
  accessor goalList: GoalItem[] | undefined;
15
16
  accessor cardStyle: React.CSSProperties | undefined;
17
+ accessor activeKey: string | undefined;
16
18
  render(): React.JSX.Element;
17
19
  }
@@ -17,7 +17,7 @@ export interface Task {
17
17
  startTime: number;
18
18
  endTime?: number;
19
19
  }
20
- export type ConversationState = "working" | "completed" | "failed" | "terminated";
20
+ export type ConversationState = "working" | "completed" | "failed" | "input-required" | "terminated";
21
21
  export type TaskState = "free" | "confirming" | "executing" | "completed" | "failed";
22
22
  export type JobState = "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "skipped" | "unknown";
23
23
  export interface Job {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.39.4",
3
+ "version": "0.39.6",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "@next-bricks/presentational": "*",
49
49
  "@next-bricks/vs": "*"
50
50
  },
51
- "gitHead": "fa21cb9e1412ca7d1b85076959ac957f332309f7"
51
+ "gitHead": "5045da1f5df62c95e8931f1da6742bd370cdf28f"
52
52
  }