@next-bricks/ai-portal 0.42.0 → 0.42.1

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 (38) hide show
  1. package/dist/bricks.json +34 -34
  2. package/dist/chunks/453.afec2dd4.js +2 -0
  3. package/dist/chunks/453.afec2dd4.js.map +1 -0
  4. package/dist/chunks/6754.53b13c13.js +2 -0
  5. package/dist/chunks/6754.53b13c13.js.map +1 -0
  6. package/dist/chunks/7493.6f9d9ca0.js.map +1 -1
  7. package/dist/chunks/9749.c1ba02ec.js +2 -0
  8. package/dist/chunks/9749.c1ba02ec.js.map +1 -0
  9. package/dist/chunks/chat-box.4f6d3704.js.map +1 -1
  10. package/dist/chunks/chat-stream.9c05bfdd.js +2 -0
  11. package/dist/chunks/chat-stream.9c05bfdd.js.map +1 -0
  12. package/dist/chunks/cruise-canvas.d72e016c.js +2 -0
  13. package/dist/chunks/cruise-canvas.d72e016c.js.map +1 -0
  14. package/dist/chunks/{main.40e44ee2.js → main.389056c7.js} +2 -2
  15. package/dist/chunks/{main.40e44ee2.js.map → main.389056c7.js.map} +1 -1
  16. package/dist/examples.json +20 -20
  17. package/dist/{index.ad4c133a.js → index.5310ad21.js} +2 -2
  18. package/dist/{index.ad4c133a.js.map → index.5310ad21.js.map} +1 -1
  19. package/dist/manifest.json +336 -328
  20. package/dist/types.json +168 -154
  21. package/dist-types/chat-stream/ChatStream.d.ts +1 -1
  22. package/dist-types/chat-stream/index.d.ts +2 -0
  23. package/dist-types/chat-stream/useConversationStream.d.ts +3 -1
  24. package/dist-types/cruise-canvas/CruiseCanvas.d.ts +1 -1
  25. package/dist-types/cruise-canvas/index.d.ts +2 -0
  26. package/dist-types/cruise-canvas/useConversationGraph.d.ts +1 -0
  27. package/dist-types/shared/TaskContext.d.ts +1 -0
  28. package/package.json +2 -2
  29. package/dist/chunks/453.e2767a6d.js +0 -2
  30. package/dist/chunks/453.e2767a6d.js.map +0 -1
  31. package/dist/chunks/6754.9dfa5269.js +0 -2
  32. package/dist/chunks/6754.9dfa5269.js.map +0 -1
  33. package/dist/chunks/9749.cfb84a2f.js +0 -2
  34. package/dist/chunks/9749.cfb84a2f.js.map +0 -1
  35. package/dist/chunks/chat-stream.a2e40a99.js +0 -2
  36. package/dist/chunks/chat-stream.a2e40a99.js.map +0 -1
  37. package/dist/chunks/cruise-canvas.77318b42.js +0 -2
  38. package/dist/chunks/cruise-canvas.77318b42.js.map +0 -1
package/dist/types.json CHANGED
@@ -1,8 +1,74 @@
1
1
  {
2
- "ai-portal.home-container": {
3
- "properties": [],
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
+ ],
4
39
  "events": [],
5
- "methods": []
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
+ ]
6
72
  },
7
73
  "ai-portal.stat-with-mini-chart": {
8
74
  "properties": [
@@ -108,77 +174,6 @@
108
174
  "events": [],
109
175
  "methods": []
110
176
  },
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
- },
182
177
  "ai-portal.entity-sdk-get": {
183
178
  "type": "provider",
184
179
  "params": [
@@ -465,6 +460,11 @@
465
460
  }
466
461
  ]
467
462
  },
463
+ "ai-portal.home-container": {
464
+ "properties": [],
465
+ "events": [],
466
+ "methods": []
467
+ },
468
468
  "ai-portal.tab-list": {
469
469
  "properties": [
470
470
  {
@@ -833,7 +833,7 @@
833
833
  }
834
834
  ]
835
835
  },
836
- "ai-portal.show-cases": {
836
+ "ai-portal.mcp-tools": {
837
837
  "properties": [
838
838
  {
839
839
  "name": "list",
@@ -843,16 +843,16 @@
843
843
  "type": "reference",
844
844
  "typeName": {
845
845
  "type": "identifier",
846
- "name": "ShowCase"
846
+ "name": "McpTool"
847
847
  }
848
848
  }
849
849
  }
850
850
  },
851
851
  {
852
- "name": "taskUrlTemplate",
852
+ "name": "withContainer",
853
853
  "annotation": {
854
854
  "type": "keyword",
855
- "value": "string"
855
+ "value": "boolean"
856
856
  }
857
857
  }
858
858
  ],
@@ -861,13 +861,13 @@
861
861
  "types": [
862
862
  {
863
863
  "type": "interface",
864
- "name": "ShowCase",
864
+ "name": "McpTool",
865
865
  "body": [
866
866
  {
867
867
  "type": "propertySignature",
868
868
  "key": {
869
869
  "type": "identifier",
870
- "name": "taskId"
870
+ "name": "name"
871
871
  },
872
872
  "annotation": {
873
873
  "type": "keyword",
@@ -891,7 +891,7 @@
891
891
  "type": "propertySignature",
892
892
  "key": {
893
893
  "type": "identifier",
894
- "name": "summary"
894
+ "name": "description"
895
895
  },
896
896
  "annotation": {
897
897
  "type": "keyword",
@@ -903,7 +903,44 @@
903
903
  "type": "propertySignature",
904
904
  "key": {
905
905
  "type": "identifier",
906
- "name": "scenario"
906
+ "name": "icon"
907
+ },
908
+ "annotation": {
909
+ "type": "reference",
910
+ "typeName": {
911
+ "type": "identifier",
912
+ "name": "GeneralIconProps"
913
+ }
914
+ },
915
+ "optional": true,
916
+ "computed": false
917
+ },
918
+ {
919
+ "type": "propertySignature",
920
+ "key": {
921
+ "type": "identifier",
922
+ "name": "server"
923
+ },
924
+ "annotation": {
925
+ "type": "reference",
926
+ "typeName": {
927
+ "type": "identifier",
928
+ "name": "McpServer"
929
+ }
930
+ },
931
+ "computed": false
932
+ }
933
+ ]
934
+ },
935
+ {
936
+ "type": "interface",
937
+ "name": "McpServer",
938
+ "body": [
939
+ {
940
+ "type": "propertySignature",
941
+ "key": {
942
+ "type": "identifier",
943
+ "name": "id"
907
944
  },
908
945
  "annotation": {
909
946
  "type": "keyword",
@@ -915,20 +952,19 @@
915
952
  "type": "propertySignature",
916
953
  "key": {
917
954
  "type": "identifier",
918
- "name": "thumbUrl"
955
+ "name": "name"
919
956
  },
920
957
  "annotation": {
921
958
  "type": "keyword",
922
959
  "value": "string"
923
960
  },
924
- "optional": true,
925
961
  "computed": false
926
962
  }
927
963
  ]
928
964
  }
929
965
  ]
930
966
  },
931
- "ai-portal.ai-employees": {
967
+ "ai-portal.show-cases": {
932
968
  "properties": [
933
969
  {
934
970
  "name": "list",
@@ -938,34 +974,17 @@
938
974
  "type": "reference",
939
975
  "typeName": {
940
976
  "type": "identifier",
941
- "name": "Employee"
977
+ "name": "ShowCase"
942
978
  }
943
979
  }
944
980
  }
945
981
  },
946
982
  {
947
- "name": "industries",
948
- "annotation": {
949
- "type": "array",
950
- "elementType": {
951
- "type": "keyword",
952
- "value": "string"
953
- }
954
- }
955
- },
956
- {
957
- "name": "urlTemplate",
983
+ "name": "taskUrlTemplate",
958
984
  "annotation": {
959
985
  "type": "keyword",
960
986
  "value": "string"
961
987
  }
962
- },
963
- {
964
- "name": "withContainer",
965
- "annotation": {
966
- "type": "keyword",
967
- "value": "boolean"
968
- }
969
988
  }
970
989
  ],
971
990
  "events": [],
@@ -973,13 +992,13 @@
973
992
  "types": [
974
993
  {
975
994
  "type": "interface",
976
- "name": "Employee",
995
+ "name": "ShowCase",
977
996
  "body": [
978
997
  {
979
998
  "type": "propertySignature",
980
999
  "key": {
981
1000
  "type": "identifier",
982
- "name": "name"
1001
+ "name": "taskId"
983
1002
  },
984
1003
  "annotation": {
985
1004
  "type": "keyword",
@@ -991,7 +1010,7 @@
991
1010
  "type": "propertySignature",
992
1011
  "key": {
993
1012
  "type": "identifier",
994
- "name": "industry"
1013
+ "name": "title"
995
1014
  },
996
1015
  "annotation": {
997
1016
  "type": "keyword",
@@ -1003,7 +1022,7 @@
1003
1022
  "type": "propertySignature",
1004
1023
  "key": {
1005
1024
  "type": "identifier",
1006
- "name": "role"
1025
+ "name": "summary"
1007
1026
  },
1008
1027
  "annotation": {
1009
1028
  "type": "keyword",
@@ -1015,7 +1034,7 @@
1015
1034
  "type": "propertySignature",
1016
1035
  "key": {
1017
1036
  "type": "identifier",
1018
- "name": "description"
1037
+ "name": "scenario"
1019
1038
  },
1020
1039
  "annotation": {
1021
1040
  "type": "keyword",
@@ -1027,7 +1046,7 @@
1027
1046
  "type": "propertySignature",
1028
1047
  "key": {
1029
1048
  "type": "identifier",
1030
- "name": "avatar"
1049
+ "name": "thumbUrl"
1031
1050
  },
1032
1051
  "annotation": {
1033
1052
  "type": "keyword",
@@ -1040,7 +1059,7 @@
1040
1059
  }
1041
1060
  ]
1042
1061
  },
1043
- "ai-portal.mcp-tools": {
1062
+ "ai-portal.ai-employees": {
1044
1063
  "properties": [
1045
1064
  {
1046
1065
  "name": "list",
@@ -1050,11 +1069,28 @@
1050
1069
  "type": "reference",
1051
1070
  "typeName": {
1052
1071
  "type": "identifier",
1053
- "name": "McpTool"
1072
+ "name": "Employee"
1054
1073
  }
1055
1074
  }
1056
1075
  }
1057
1076
  },
1077
+ {
1078
+ "name": "industries",
1079
+ "annotation": {
1080
+ "type": "array",
1081
+ "elementType": {
1082
+ "type": "keyword",
1083
+ "value": "string"
1084
+ }
1085
+ }
1086
+ },
1087
+ {
1088
+ "name": "urlTemplate",
1089
+ "annotation": {
1090
+ "type": "keyword",
1091
+ "value": "string"
1092
+ }
1093
+ },
1058
1094
  {
1059
1095
  "name": "withContainer",
1060
1096
  "annotation": {
@@ -1068,7 +1104,7 @@
1068
1104
  "types": [
1069
1105
  {
1070
1106
  "type": "interface",
1071
- "name": "McpTool",
1107
+ "name": "Employee",
1072
1108
  "body": [
1073
1109
  {
1074
1110
  "type": "propertySignature",
@@ -1086,7 +1122,7 @@
1086
1122
  "type": "propertySignature",
1087
1123
  "key": {
1088
1124
  "type": "identifier",
1089
- "name": "title"
1125
+ "name": "industry"
1090
1126
  },
1091
1127
  "annotation": {
1092
1128
  "type": "keyword",
@@ -1098,7 +1134,7 @@
1098
1134
  "type": "propertySignature",
1099
1135
  "key": {
1100
1136
  "type": "identifier",
1101
- "name": "description"
1137
+ "name": "role"
1102
1138
  },
1103
1139
  "annotation": {
1104
1140
  "type": "keyword",
@@ -1110,44 +1146,7 @@
1110
1146
  "type": "propertySignature",
1111
1147
  "key": {
1112
1148
  "type": "identifier",
1113
- "name": "icon"
1114
- },
1115
- "annotation": {
1116
- "type": "reference",
1117
- "typeName": {
1118
- "type": "identifier",
1119
- "name": "GeneralIconProps"
1120
- }
1121
- },
1122
- "optional": true,
1123
- "computed": false
1124
- },
1125
- {
1126
- "type": "propertySignature",
1127
- "key": {
1128
- "type": "identifier",
1129
- "name": "server"
1130
- },
1131
- "annotation": {
1132
- "type": "reference",
1133
- "typeName": {
1134
- "type": "identifier",
1135
- "name": "McpServer"
1136
- }
1137
- },
1138
- "computed": false
1139
- }
1140
- ]
1141
- },
1142
- {
1143
- "type": "interface",
1144
- "name": "McpServer",
1145
- "body": [
1146
- {
1147
- "type": "propertySignature",
1148
- "key": {
1149
- "type": "identifier",
1150
- "name": "id"
1149
+ "name": "description"
1151
1150
  },
1152
1151
  "annotation": {
1153
1152
  "type": "keyword",
@@ -1159,12 +1158,13 @@
1159
1158
  "type": "propertySignature",
1160
1159
  "key": {
1161
1160
  "type": "identifier",
1162
- "name": "name"
1161
+ "name": "avatar"
1163
1162
  },
1164
1163
  "annotation": {
1165
1164
  "type": "keyword",
1166
1165
  "value": "string"
1167
1166
  },
1167
+ "optional": true,
1168
1168
  "computed": false
1169
1169
  }
1170
1170
  ]
@@ -3973,6 +3973,13 @@
3973
3973
  "value": "boolean"
3974
3974
  }
3975
3975
  },
3976
+ {
3977
+ "name": "showHumanActions",
3978
+ "annotation": {
3979
+ "type": "keyword",
3980
+ "value": "boolean"
3981
+ }
3982
+ },
3976
3983
  {
3977
3984
  "name": "showFeedback",
3978
3985
  "annotation": {
@@ -5121,6 +5128,13 @@
5121
5128
  }
5122
5129
  }
5123
5130
  },
5131
+ {
5132
+ "name": "showHumanActions",
5133
+ "annotation": {
5134
+ "type": "keyword",
5135
+ "value": "boolean"
5136
+ }
5137
+ },
5124
5138
  {
5125
5139
  "name": "showFeedback",
5126
5140
  "annotation": {
@@ -10,5 +10,5 @@ interface ChatStreamComponentProps extends ChatStreamProps {
10
10
  onFeedbackOnView: (viewId: string) => void;
11
11
  onDetailChange: (detail: ConversationDetail) => void;
12
12
  }
13
- export declare function ChatStreamComponent({ conversationId, initialRequest, replay, replayDelay, supports, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToCanvas, onFeedbackOnView, onDetailChange, }: ChatStreamComponentProps, ref: React.Ref<ChatStreamRef>): React.JSX.Element;
13
+ export declare function ChatStreamComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHumanActions, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToCanvas, onFeedbackOnView, onDetailChange, }: ChatStreamComponentProps, ref: React.Ref<ChatStreamRef>): React.JSX.Element;
14
14
  export {};
@@ -9,6 +9,7 @@ export interface ChatStreamProps {
9
9
  replay?: boolean;
10
10
  replayDelay?: number;
11
11
  supports?: Record<string, boolean>;
12
+ showHumanActions?: boolean;
12
13
  showFeedback?: boolean;
13
14
  showFeedbackAfterFailed?: boolean;
14
15
  showFeedbackOnView?: boolean;
@@ -36,6 +37,7 @@ export declare class ChatStream extends ReactNextElement implements ChatStreamPr
36
37
  */
37
38
  accessor replayDelay: number | undefined;
38
39
  accessor supports: Record<string, boolean> | undefined;
40
+ accessor showHumanActions: boolean | undefined;
39
41
  accessor showFeedback: boolean | undefined;
40
42
  accessor showFeedbackAfterFailed: boolean | undefined;
41
43
  accessor showFeedbackOnView: boolean | undefined;
@@ -1,6 +1,8 @@
1
1
  import type { ChatMessage } from "./interfaces.js";
2
2
  import type { ConversationBaseDetail, Task } from "../shared/interfaces.js";
3
- export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], error: string | null | undefined): {
3
+ export declare function useConversationStream(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], error: string | null | undefined, options?: {
4
+ showHumanActions?: boolean;
5
+ }): {
4
6
  messages: never[];
5
7
  lastToolCallJobId: null;
6
8
  jobMap?: undefined;
@@ -17,5 +17,5 @@ export interface CruiseCanvasRef {
17
17
  feedbackSubmitFailed: () => void;
18
18
  feedbackOnViewDone: (viewId: string) => void;
19
19
  }
20
- export declare function CruiseCanvasComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHiddenJobs, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, showJsxEditor, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToChat, onFeedbackOnView, onDetailChange, }: CruiseCanvasComponentProps, ref: React.Ref<CruiseCanvasRef>): React.JSX.Element;
20
+ export declare function CruiseCanvasComponent({ conversationId, initialRequest, replay, replayDelay, supports, showHiddenJobs, showHumanActions, showFeedback: propShowFeedback, showFeedbackAfterFailed, showFeedbackOnView, showUiSwitch, showJsxEditor, previewUrlTemplate, onShare, onTerminate, onSubmitFeedback, onSwitchToChat, onFeedbackOnView, onDetailChange, }: CruiseCanvasComponentProps, ref: React.Ref<CruiseCanvasRef>): React.JSX.Element;
21
21
  export {};
@@ -13,6 +13,7 @@ export interface CruiseCanvasProps {
13
13
  replayDelay?: number;
14
14
  supports?: Record<string, boolean>;
15
15
  showHiddenJobs?: boolean;
16
+ showHumanActions?: boolean;
16
17
  showFeedback?: boolean;
17
18
  showFeedbackAfterFailed?: boolean;
18
19
  showUiSwitch?: boolean;
@@ -44,6 +45,7 @@ export declare class CruiseCanvas extends ReactNextElement implements CruiseCanv
44
45
  accessor replayDelay: number | undefined;
45
46
  accessor supports: Record<string, boolean> | undefined;
46
47
  accessor showHiddenJobs: boolean | undefined;
48
+ accessor showHumanActions: boolean | undefined;
47
49
  accessor showFeedback: boolean | undefined;
48
50
  accessor showFeedbackAfterFailed: boolean | undefined;
49
51
  accessor showFeedbackOnView: boolean | undefined;
@@ -2,6 +2,7 @@ import type { GraphEdge, GraphNode, GraphNavItem, GraphGeneratedView } from "./i
2
2
  import type { ConversationBaseDetail, Task } from "../shared/interfaces";
3
3
  export declare function useConversationGraph(conversation: ConversationBaseDetail | null | undefined, tasks: Task[], options?: {
4
4
  showHiddenJobs?: boolean;
5
+ showHumanActions?: boolean;
5
6
  }): {
6
7
  nodes: GraphNode[];
7
8
  edges: GraphEdge[];
@@ -4,6 +4,7 @@ import type { GeneratedView } from "./interfaces";
4
4
  export interface TaskContextValue {
5
5
  workspace?: string;
6
6
  previewUrlTemplate?: string;
7
+ replay?: boolean;
7
8
  humanInput: (jobId: string, input: string | null, action?: string) => void;
8
9
  onShare: () => void;
9
10
  onTerminate: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
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": "8697d099f9084bc1494cf85b3589094e53bcf5eb"
51
+ "gitHead": "9b03399f50700d2519093f93afc6522bb3baebc3"
52
52
  }