@next-bricks/ai-portal 0.65.1 → 0.65.3
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/bricks.json +39 -42
- package/dist/chunks/{2742.19b8cbd2.js → 2742.3340a00e.js} +2 -2
- package/dist/chunks/2742.3340a00e.js.map +1 -0
- package/dist/chunks/3186.81f0a2f0.js +2 -0
- package/dist/chunks/3186.81f0a2f0.js.map +1 -0
- package/dist/chunks/4208.002ac189.js +2 -0
- package/dist/chunks/4208.002ac189.js.map +1 -0
- package/dist/chunks/4577.66294512.js +2 -0
- package/dist/chunks/4577.66294512.js.map +1 -0
- package/dist/chunks/4864.03882076.js +2 -0
- package/dist/chunks/4864.03882076.js.map +1 -0
- package/dist/chunks/5452.e451b025.js +2 -0
- package/dist/chunks/5452.e451b025.js.map +1 -0
- package/dist/chunks/{6450.ade6ef3e.js → 6450.9e9165f9.js} +2 -2
- package/dist/chunks/{6450.ade6ef3e.js.map → 6450.9e9165f9.js.map} +1 -1
- package/dist/chunks/{9515.468a8527.js → 9515.b58eb80e.js} +2 -2
- package/dist/chunks/9515.b58eb80e.js.map +1 -0
- package/dist/chunks/{9525.9e5140be.js → 9525.a53ee2a7.js} +3 -3
- package/dist/chunks/{9525.9e5140be.js.map → 9525.a53ee2a7.js.map} +1 -1
- package/dist/chunks/chat-panel.e8afa537.js +2 -0
- package/dist/chunks/chat-panel.e8afa537.js.map +1 -0
- package/dist/chunks/{chat-stream.90aa7647.js → chat-stream.cef88ead.js} +2 -2
- package/dist/chunks/{chat-stream.90aa7647.js.map → chat-stream.cef88ead.js.map} +1 -1
- package/dist/chunks/{main.d8edfa91.js → main.abe54caf.js} +2 -2
- package/dist/chunks/{main.d8edfa91.js.map → main.abe54caf.js.map} +1 -1
- package/dist/chunks/running-flow.37a428cf.js +3 -0
- package/dist/chunks/running-flow.37a428cf.js.map +1 -0
- package/dist/examples.json +17 -17
- package/dist/index.d03181ae.js +2 -0
- package/dist/{index.90d9f9da.js.map → index.d03181ae.js.map} +1 -1
- package/dist/manifest.json +371 -375
- package/dist/types.json +142 -167
- package/dist-types/chat-stream/Aside/TaskApp/TaskApp.d.ts +6 -0
- package/dist-types/chat-stream/StreamContext.d.ts +1 -0
- package/dist-types/chat-stream/interfaces.d.ts +6 -2
- package/dist-types/chat-stream/useAutoScroll.d.ts +1 -0
- package/dist-types/chat-stream/useConversationStream.d.ts +7 -2
- package/dist-types/running-flow/index.d.ts +2 -4
- package/dist-types/shared/ActivityPlan/PlanStateIcon.d.ts +7 -0
- package/dist-types/shared/ActivityPlan/i18n.d.ts +2 -1
- package/dist-types/shared/AskUser/AskUser.d.ts +6 -0
- package/dist-types/shared/AskUserTag/AskUserTag.d.ts +7 -0
- package/dist-types/shared/ChatBox/ChatBox.d.ts +3 -1
- package/dist-types/shared/TaskContext.d.ts +2 -0
- package/dist-types/shared/bricks.d.ts +0 -2
- package/dist-types/shared/getFlatChunks.d.ts +11 -2
- package/dist-types/shared/interfaces.d.ts +7 -2
- package/dist-types/shared/useFulfilledActiveDetail.d.ts +2 -2
- package/package.json +2 -2
- package/dist/chunks/2742.19b8cbd2.js.map +0 -1
- package/dist/chunks/3186.5c0ff6ad.js +0 -2
- package/dist/chunks/3186.5c0ff6ad.js.map +0 -1
- package/dist/chunks/4208.9304234a.js +0 -2
- package/dist/chunks/4208.9304234a.js.map +0 -1
- package/dist/chunks/5452.a5594a29.js +0 -2
- package/dist/chunks/5452.a5594a29.js.map +0 -1
- package/dist/chunks/7139.80d52ac3.js +0 -2
- package/dist/chunks/7139.80d52ac3.js.map +0 -1
- package/dist/chunks/7159.2fdda135.js +0 -2
- package/dist/chunks/7159.2fdda135.js.map +0 -1
- package/dist/chunks/9515.468a8527.js.map +0 -1
- package/dist/chunks/chat-panel.ca430fc7.js +0 -2
- package/dist/chunks/chat-panel.ca430fc7.js.map +0 -1
- package/dist/chunks/running-flow.4b117f11.js +0 -3
- package/dist/chunks/running-flow.4b117f11.js.map +0 -1
- package/dist/index.90d9f9da.js +0 -2
- package/dist-types/shared/ActivityPlan/getStateIcon.d.ts +0 -6
- /package/dist/chunks/{9525.9e5140be.js.LICENSE.txt → 9525.a53ee2a7.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{running-flow.4b117f11.js.LICENSE.txt → running-flow.37a428cf.js.LICENSE.txt} +0 -0
package/dist/types.json
CHANGED
|
@@ -103,6 +103,125 @@
|
|
|
103
103
|
"events": [],
|
|
104
104
|
"methods": []
|
|
105
105
|
},
|
|
106
|
+
"ai-portal.icon-button": {
|
|
107
|
+
"properties": [
|
|
108
|
+
{
|
|
109
|
+
"name": "icon",
|
|
110
|
+
"annotation": {
|
|
111
|
+
"type": "parenthesizedType",
|
|
112
|
+
"annotation": {
|
|
113
|
+
"type": "intersection",
|
|
114
|
+
"types": [
|
|
115
|
+
{
|
|
116
|
+
"type": "reference",
|
|
117
|
+
"typeName": {
|
|
118
|
+
"type": "identifier",
|
|
119
|
+
"name": "GeneralIconProps"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "reference",
|
|
124
|
+
"typeName": {
|
|
125
|
+
"type": "identifier",
|
|
126
|
+
"name": "HTMLAttributes"
|
|
127
|
+
},
|
|
128
|
+
"typeParameters": {
|
|
129
|
+
"type": "typeParameterInstantiation",
|
|
130
|
+
"params": [
|
|
131
|
+
{
|
|
132
|
+
"type": "reference",
|
|
133
|
+
"typeName": {
|
|
134
|
+
"type": "identifier",
|
|
135
|
+
"name": "GeneralIcon"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "tooltip",
|
|
147
|
+
"annotation": {
|
|
148
|
+
"type": "keyword",
|
|
149
|
+
"value": "string"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "tooltipHoist",
|
|
154
|
+
"annotation": {
|
|
155
|
+
"type": "keyword",
|
|
156
|
+
"value": "boolean"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "active",
|
|
161
|
+
"annotation": {
|
|
162
|
+
"type": "keyword",
|
|
163
|
+
"value": "boolean"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "disabled",
|
|
168
|
+
"annotation": {
|
|
169
|
+
"type": "keyword",
|
|
170
|
+
"value": "boolean"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "variant",
|
|
175
|
+
"annotation": {
|
|
176
|
+
"type": "reference",
|
|
177
|
+
"typeName": {
|
|
178
|
+
"type": "identifier",
|
|
179
|
+
"name": "IconButtonVariant"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "reduceIconSize",
|
|
185
|
+
"annotation": {
|
|
186
|
+
"type": "keyword",
|
|
187
|
+
"value": "boolean"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"events": [],
|
|
192
|
+
"methods": [],
|
|
193
|
+
"types": [
|
|
194
|
+
{
|
|
195
|
+
"type": "typeAlias",
|
|
196
|
+
"name": "IconButtonVariant",
|
|
197
|
+
"annotation": {
|
|
198
|
+
"type": "union",
|
|
199
|
+
"types": [
|
|
200
|
+
{
|
|
201
|
+
"type": "jsLiteral",
|
|
202
|
+
"value": "default"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"type": "jsLiteral",
|
|
206
|
+
"value": "light"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "jsLiteral",
|
|
210
|
+
"value": "mini"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "jsLiteral",
|
|
214
|
+
"value": "mini-light"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "jsLiteral",
|
|
218
|
+
"value": "bordered"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
106
225
|
"ai-portal.home-container": {
|
|
107
226
|
"properties": [
|
|
108
227
|
{
|
|
@@ -2037,125 +2156,6 @@
|
|
|
2037
2156
|
}
|
|
2038
2157
|
]
|
|
2039
2158
|
},
|
|
2040
|
-
"ai-portal.icon-button": {
|
|
2041
|
-
"properties": [
|
|
2042
|
-
{
|
|
2043
|
-
"name": "icon",
|
|
2044
|
-
"annotation": {
|
|
2045
|
-
"type": "parenthesizedType",
|
|
2046
|
-
"annotation": {
|
|
2047
|
-
"type": "intersection",
|
|
2048
|
-
"types": [
|
|
2049
|
-
{
|
|
2050
|
-
"type": "reference",
|
|
2051
|
-
"typeName": {
|
|
2052
|
-
"type": "identifier",
|
|
2053
|
-
"name": "GeneralIconProps"
|
|
2054
|
-
}
|
|
2055
|
-
},
|
|
2056
|
-
{
|
|
2057
|
-
"type": "reference",
|
|
2058
|
-
"typeName": {
|
|
2059
|
-
"type": "identifier",
|
|
2060
|
-
"name": "HTMLAttributes"
|
|
2061
|
-
},
|
|
2062
|
-
"typeParameters": {
|
|
2063
|
-
"type": "typeParameterInstantiation",
|
|
2064
|
-
"params": [
|
|
2065
|
-
{
|
|
2066
|
-
"type": "reference",
|
|
2067
|
-
"typeName": {
|
|
2068
|
-
"type": "identifier",
|
|
2069
|
-
"name": "GeneralIcon"
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
]
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
]
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
"name": "tooltip",
|
|
2081
|
-
"annotation": {
|
|
2082
|
-
"type": "keyword",
|
|
2083
|
-
"value": "string"
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
{
|
|
2087
|
-
"name": "tooltipHoist",
|
|
2088
|
-
"annotation": {
|
|
2089
|
-
"type": "keyword",
|
|
2090
|
-
"value": "boolean"
|
|
2091
|
-
}
|
|
2092
|
-
},
|
|
2093
|
-
{
|
|
2094
|
-
"name": "active",
|
|
2095
|
-
"annotation": {
|
|
2096
|
-
"type": "keyword",
|
|
2097
|
-
"value": "boolean"
|
|
2098
|
-
}
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
"name": "disabled",
|
|
2102
|
-
"annotation": {
|
|
2103
|
-
"type": "keyword",
|
|
2104
|
-
"value": "boolean"
|
|
2105
|
-
}
|
|
2106
|
-
},
|
|
2107
|
-
{
|
|
2108
|
-
"name": "variant",
|
|
2109
|
-
"annotation": {
|
|
2110
|
-
"type": "reference",
|
|
2111
|
-
"typeName": {
|
|
2112
|
-
"type": "identifier",
|
|
2113
|
-
"name": "IconButtonVariant"
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
},
|
|
2117
|
-
{
|
|
2118
|
-
"name": "reduceIconSize",
|
|
2119
|
-
"annotation": {
|
|
2120
|
-
"type": "keyword",
|
|
2121
|
-
"value": "boolean"
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
],
|
|
2125
|
-
"events": [],
|
|
2126
|
-
"methods": [],
|
|
2127
|
-
"types": [
|
|
2128
|
-
{
|
|
2129
|
-
"type": "typeAlias",
|
|
2130
|
-
"name": "IconButtonVariant",
|
|
2131
|
-
"annotation": {
|
|
2132
|
-
"type": "union",
|
|
2133
|
-
"types": [
|
|
2134
|
-
{
|
|
2135
|
-
"type": "jsLiteral",
|
|
2136
|
-
"value": "default"
|
|
2137
|
-
},
|
|
2138
|
-
{
|
|
2139
|
-
"type": "jsLiteral",
|
|
2140
|
-
"value": "light"
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
"type": "jsLiteral",
|
|
2144
|
-
"value": "mini"
|
|
2145
|
-
},
|
|
2146
|
-
{
|
|
2147
|
-
"type": "jsLiteral",
|
|
2148
|
-
"value": "mini-light"
|
|
2149
|
-
},
|
|
2150
|
-
{
|
|
2151
|
-
"type": "jsLiteral",
|
|
2152
|
-
"value": "bordered"
|
|
2153
|
-
}
|
|
2154
|
-
]
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
]
|
|
2158
|
-
},
|
|
2159
2159
|
"ai-portal.elevo-logo": {
|
|
2160
2160
|
"properties": [],
|
|
2161
2161
|
"events": [],
|
|
@@ -3089,6 +3089,26 @@
|
|
|
3089
3089
|
}
|
|
3090
3090
|
]
|
|
3091
3091
|
},
|
|
3092
|
+
"ai-portal.preview-container": {
|
|
3093
|
+
"properties": [
|
|
3094
|
+
{
|
|
3095
|
+
"name": "source",
|
|
3096
|
+
"annotation": {
|
|
3097
|
+
"type": "keyword",
|
|
3098
|
+
"value": "string"
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
"name": "url",
|
|
3103
|
+
"annotation": {
|
|
3104
|
+
"type": "keyword",
|
|
3105
|
+
"value": "string"
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
],
|
|
3109
|
+
"events": [],
|
|
3110
|
+
"methods": []
|
|
3111
|
+
},
|
|
3092
3112
|
"ai-portal.action-buttons": {
|
|
3093
3113
|
"properties": [
|
|
3094
3114
|
{
|
|
@@ -3207,26 +3227,6 @@
|
|
|
3207
3227
|
}
|
|
3208
3228
|
]
|
|
3209
3229
|
},
|
|
3210
|
-
"ai-portal.preview-container": {
|
|
3211
|
-
"properties": [
|
|
3212
|
-
{
|
|
3213
|
-
"name": "source",
|
|
3214
|
-
"annotation": {
|
|
3215
|
-
"type": "keyword",
|
|
3216
|
-
"value": "string"
|
|
3217
|
-
}
|
|
3218
|
-
},
|
|
3219
|
-
{
|
|
3220
|
-
"name": "url",
|
|
3221
|
-
"annotation": {
|
|
3222
|
-
"type": "keyword",
|
|
3223
|
-
"value": "string"
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
],
|
|
3227
|
-
"events": [],
|
|
3228
|
-
"methods": []
|
|
3229
|
-
},
|
|
3230
3230
|
"ai-portal.project-conversations": {
|
|
3231
3231
|
"properties": [
|
|
3232
3232
|
{
|
|
@@ -5397,40 +5397,15 @@
|
|
|
5397
5397
|
}
|
|
5398
5398
|
}
|
|
5399
5399
|
}
|
|
5400
|
-
},
|
|
5401
|
-
{
|
|
5402
|
-
"name": "activeActivityId",
|
|
5403
|
-
"annotation": {
|
|
5404
|
-
"type": "union",
|
|
5405
|
-
"types": [
|
|
5406
|
-
{
|
|
5407
|
-
"type": "keyword",
|
|
5408
|
-
"value": "string"
|
|
5409
|
-
},
|
|
5410
|
-
{
|
|
5411
|
-
"type": "keyword",
|
|
5412
|
-
"value": "null"
|
|
5413
|
-
}
|
|
5414
|
-
]
|
|
5415
|
-
}
|
|
5416
5400
|
}
|
|
5417
5401
|
],
|
|
5418
5402
|
"events": [
|
|
5419
5403
|
{
|
|
5420
|
-
"name": "
|
|
5404
|
+
"name": "activity.click",
|
|
5421
5405
|
"detail": {
|
|
5422
5406
|
"annotation": {
|
|
5423
|
-
"type": "
|
|
5424
|
-
"
|
|
5425
|
-
{
|
|
5426
|
-
"type": "keyword",
|
|
5427
|
-
"value": "string"
|
|
5428
|
-
},
|
|
5429
|
-
{
|
|
5430
|
-
"type": "keyword",
|
|
5431
|
-
"value": "null"
|
|
5432
|
-
}
|
|
5433
|
-
]
|
|
5407
|
+
"type": "keyword",
|
|
5408
|
+
"value": "string"
|
|
5434
5409
|
}
|
|
5435
5410
|
}
|
|
5436
5411
|
}
|
|
@@ -3,5 +3,6 @@ import type { ActiveDetail } from "../shared/interfaces";
|
|
|
3
3
|
export interface StreamContextValue {
|
|
4
4
|
lastDetail: ActiveDetail | null;
|
|
5
5
|
setUserClosedAside: Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
toggleAutoScroll: (enabled: boolean) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const StreamContext: React.Context<StreamContextValue>;
|
|
@@ -12,7 +12,7 @@ export interface MessageFromAssistant {
|
|
|
12
12
|
role: "assistant";
|
|
13
13
|
chunks: MessageChunk[];
|
|
14
14
|
}
|
|
15
|
-
export type MessageChunk = MessageChunkOfJob | MessageChunkOfPlan | MessageChunkOfFlow | MessageChunkOfActivity | MessageChunkOfError;
|
|
15
|
+
export type MessageChunk = MessageChunkOfJob | MessageChunkOfPlan | MessageChunkOfAskUser | MessageChunkOfFlow | MessageChunkOfActivity | MessageChunkOfError;
|
|
16
16
|
export interface MessageChunkOfJob {
|
|
17
17
|
type: "job";
|
|
18
18
|
job: Job;
|
|
@@ -21,9 +21,13 @@ export interface MessageChunkOfJob {
|
|
|
21
21
|
}
|
|
22
22
|
export interface MessageChunkOfPlan {
|
|
23
23
|
type: "plan";
|
|
24
|
-
job: Job;
|
|
25
24
|
task: Task;
|
|
26
25
|
}
|
|
26
|
+
export interface MessageChunkOfAskUser {
|
|
27
|
+
type: "askUser";
|
|
28
|
+
job: Job;
|
|
29
|
+
task: Task | undefined;
|
|
30
|
+
}
|
|
27
31
|
export interface MessageChunkOfFlow {
|
|
28
32
|
type: "flow";
|
|
29
33
|
flow: ServiceFlowRun;
|
|
@@ -2,4 +2,5 @@ import { type RefObject } from "react";
|
|
|
2
2
|
export declare function useAutoScroll(contentAvailable: boolean, scrollContainerRef: RefObject<HTMLDivElement>, scrollContentRef: RefObject<HTMLDivElement>): {
|
|
3
3
|
scrollable: boolean;
|
|
4
4
|
scrollToBottom: () => void;
|
|
5
|
+
toggleAutoScroll: (enabled: boolean) => void;
|
|
5
6
|
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import type { ChatMessage } from "./interfaces.js";
|
|
2
2
|
import type { ActiveDetail, ActivityWithFlow, ConversationError, ConversationState, ServiceFlowRun, Task, TaskState } from "../shared/interfaces.js";
|
|
3
|
-
export
|
|
3
|
+
export interface UseConversationStreamOptions {
|
|
4
|
+
flowMap?: Map<string, ServiceFlowRun>;
|
|
5
|
+
activityMap?: Map<string, ActivityWithFlow>;
|
|
4
6
|
showHumanActions?: boolean;
|
|
5
7
|
skipActivitySubTasks?: boolean;
|
|
6
8
|
rootTaskId?: string;
|
|
7
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export declare function useConversationStream(conversationAvailable: boolean, state: ConversationState | TaskState | undefined, tasks: Task[], errors: ConversationError[], options?: UseConversationStreamOptions): {
|
|
8
11
|
messages: never[];
|
|
9
12
|
lastDetail: null;
|
|
13
|
+
activeAskUser: null;
|
|
10
14
|
jobMap?: undefined;
|
|
11
15
|
} | {
|
|
12
16
|
messages: ChatMessage[];
|
|
13
17
|
jobMap: Map<string, import("../shared/interfaces.js").Job>;
|
|
14
18
|
lastDetail: ActiveDetail | null;
|
|
19
|
+
activeAskUser: import("./interfaces.js").MessageChunkOfAskUser | null;
|
|
15
20
|
};
|
|
@@ -4,7 +4,6 @@ import "@next-core/theme";
|
|
|
4
4
|
import type { JobState, TaskState } from "../shared/interfaces.js";
|
|
5
5
|
export interface RunningFlowProps {
|
|
6
6
|
spec?: FlowStage[];
|
|
7
|
-
activeActivityId?: string | null;
|
|
8
7
|
}
|
|
9
8
|
export interface FlowStage {
|
|
10
9
|
name: string;
|
|
@@ -18,10 +17,10 @@ export interface FlowActivity {
|
|
|
18
17
|
endTime?: number;
|
|
19
18
|
}
|
|
20
19
|
export interface RunningFlowEvents {
|
|
21
|
-
"
|
|
20
|
+
"activity.click": CustomEvent<string>;
|
|
22
21
|
}
|
|
23
22
|
export interface RunningFlowMapEvents {
|
|
24
|
-
|
|
23
|
+
onActivityClick: "activity.click";
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
26
|
* 构件 `ai-portal.running-flow`
|
|
@@ -29,6 +28,5 @@ export interface RunningFlowMapEvents {
|
|
|
29
28
|
export declare class RunningFlow extends ReactNextElement implements RunningFlowProps {
|
|
30
29
|
#private;
|
|
31
30
|
accessor spec: FlowStage[] | undefined;
|
|
32
|
-
accessor activeActivityId: string | null | undefined;
|
|
33
31
|
render(): React.JSX.Element;
|
|
34
32
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ConversationState, JobState, TaskState } from "../interfaces";
|
|
3
|
+
export interface PlanStateIconProps {
|
|
4
|
+
state: TaskState | JobState | ConversationState | undefined;
|
|
5
|
+
filled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function PlanStateIcon({ state, filled }: PlanStateIconProps): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare enum K {
|
|
2
2
|
ACTIVITY_PLAN = "ACTIVITY_PLAN",
|
|
3
|
-
SHOW_PROCESS = "SHOW_PROCESS"
|
|
3
|
+
SHOW_PROCESS = "SHOW_PROCESS",
|
|
4
|
+
STARTING_SERVICE_FLOW = "STARTING_SERVICE_FLOW"
|
|
4
5
|
}
|
|
5
6
|
export declare const NS = "bricks/ai-portal/ActivityPlan";
|
|
6
7
|
export declare const locales: {
|
|
@@ -2,5 +2,7 @@ import type { ConversationState } from "../interfaces";
|
|
|
2
2
|
export interface ChatBoxProps {
|
|
3
3
|
state: ConversationState | undefined;
|
|
4
4
|
canChat: boolean;
|
|
5
|
+
showInput?: "auto" | "always" | "never";
|
|
6
|
+
className?: string;
|
|
5
7
|
}
|
|
6
|
-
export declare function ChatBox({ state, canChat }: ChatBoxProps): JSX.Element;
|
|
8
|
+
export declare function ChatBox({ state, canChat, showInput, className, }: ChatBoxProps): JSX.Element;
|
|
@@ -7,6 +7,8 @@ export interface TaskContextValue {
|
|
|
7
7
|
conversationState?: ConversationState;
|
|
8
8
|
tasks: Task[];
|
|
9
9
|
errors: ConversationError[];
|
|
10
|
+
finished?: boolean;
|
|
11
|
+
earlyFinished?: boolean;
|
|
10
12
|
jobMap?: Map<string, Job>;
|
|
11
13
|
flowMap?: Map<string, ServiceFlowRun>;
|
|
12
14
|
activityMap?: Map<string, ActivityWithFlow>;
|
|
@@ -8,7 +8,6 @@ import type { IconButton, IconButtonProps } from "../icon-button";
|
|
|
8
8
|
import type { ChatInput, ChatInputEvents, ChatInputMapEvents, ChatInputProps } from "../chat-input";
|
|
9
9
|
import type { ShowCase, ShowCaseProps } from "../show-case";
|
|
10
10
|
import type { RunningFlow, RunningFlowEvents, RunningFlowMapEvents, RunningFlowProps } from "../running-flow";
|
|
11
|
-
import type { BlankState, BlankStateProps } from "../blank-state";
|
|
12
11
|
export declare const WrappedIcon: import("@next-core/react-element").WrappedBrick<GeneralIcon, GeneralIconProps>;
|
|
13
12
|
export declare const WrappedButton: import("@next-core/react-element").WrappedBrick<Button, ButtonProps>;
|
|
14
13
|
export declare const WrappedLink: import("@next-core/react-element").WrappedBrick<Link, LinkProps>;
|
|
@@ -21,7 +20,6 @@ export declare const WrappedIconButton: import("@next-core/react-element").Wrapp
|
|
|
21
20
|
export declare const WrappedChatInput: import("@next-core/react-element").WrappedBrickWithEventsMap<ChatInput, ChatInputProps, ChatInputEvents, ChatInputMapEvents>;
|
|
22
21
|
export declare const WrappedShowCase: import("@next-core/react-element").WrappedBrick<ShowCase, ShowCaseProps>;
|
|
23
22
|
export declare const WrappedCodeBlock: import("@next-core/react-element").WrappedBrick<CodeBlock, CodeBlockProps>;
|
|
24
|
-
export declare const WrappedBlankState: import("@next-core/react-element").WrappedBrick<BlankState, BlankStateProps>;
|
|
25
23
|
export declare const WrappedRunningFlow: import("@next-core/react-element").WrappedBrickWithEventsMap<RunningFlow, RunningFlowProps, RunningFlowEvents, RunningFlowMapEvents>;
|
|
26
24
|
export declare const showDialog: (options: import("@next-bricks/basic/data-providers/show-dialog/show-dialog").DialogOptions) => Promise<void>;
|
|
27
25
|
export declare const copyToClipboard: (text: string) => Promise<void>;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import type { MessageChunk } from "../chat-stream/interfaces";
|
|
1
|
+
import type { MessageChunk, MessageChunkOfAskUser } from "../chat-stream/interfaces";
|
|
2
2
|
import type { Task, ServiceFlowRun, ActivityWithFlow, ConversationError, Job } from "../shared/interfaces";
|
|
3
|
-
export
|
|
3
|
+
export interface FlatChunkOptions {
|
|
4
|
+
flowMap?: Map<string, ServiceFlowRun>;
|
|
5
|
+
activityMap?: Map<string, ActivityWithFlow>;
|
|
6
|
+
skipActivitySubTasks?: boolean;
|
|
7
|
+
enablePlan?: boolean;
|
|
8
|
+
rootTaskId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function getFlatChunks(tasks: Task[], errors: ConversationError[], options?: FlatChunkOptions): {
|
|
4
11
|
/** Message chunks, excluding those from skipped subtasks */
|
|
5
12
|
chunks: MessageChunk[];
|
|
6
13
|
/** All jobs including those nested within subtasks */
|
|
7
14
|
jobMap: Map<string, Job>;
|
|
15
|
+
/** The active askUser chunk, if any */
|
|
16
|
+
activeAskUser: MessageChunkOfAskUser | null;
|
|
8
17
|
};
|
|
@@ -54,6 +54,7 @@ export interface Job {
|
|
|
54
54
|
cmd?: CommandPayload;
|
|
55
55
|
mentionedAiEmployeeId?: string;
|
|
56
56
|
ignoreDetails?: boolean;
|
|
57
|
+
summary?: string;
|
|
57
58
|
}
|
|
58
59
|
export type HumanAction = HumanActionConfirm | HumanActionSelect;
|
|
59
60
|
export interface HumanActionConfirm {
|
|
@@ -262,14 +263,18 @@ export interface ActivityWithFlow {
|
|
|
262
263
|
activity: ActivityRun;
|
|
263
264
|
}
|
|
264
265
|
export interface ActiveDetail {
|
|
265
|
-
type: "job" | "flow" | "activity";
|
|
266
|
+
type: "job" | "flow" | "activity" | "task";
|
|
266
267
|
id: string;
|
|
267
268
|
}
|
|
268
|
-
export type FulfilledActiveDetail = ActiveDetailOfJob | ActiveDetailOfFlow | ActiveDetailOfActivity;
|
|
269
|
+
export type FulfilledActiveDetail = ActiveDetailOfJob | ActiveDetailOfTask | ActiveDetailOfFlow | ActiveDetailOfActivity;
|
|
269
270
|
export interface ActiveDetailOfJob {
|
|
270
271
|
type: "job";
|
|
271
272
|
job: Job;
|
|
272
273
|
}
|
|
274
|
+
export interface ActiveDetailOfTask {
|
|
275
|
+
type: "task";
|
|
276
|
+
task: Task;
|
|
277
|
+
}
|
|
273
278
|
export interface ActiveDetailOfFlow {
|
|
274
279
|
type: "flow";
|
|
275
280
|
flow: ServiceFlowRun;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ActiveDetail, ActivityWithFlow, FulfilledActiveDetail, Job, ServiceFlowRun } from "./interfaces";
|
|
2
|
-
export declare function useFulfilledActiveDetail(activeDetail: ActiveDetail | null, jobMap: Map<string, Job> | undefined, flowMap: Map<string, ServiceFlowRun>, activityMap: Map<string, ActivityWithFlow>): FulfilledActiveDetail | null;
|
|
1
|
+
import type { ActiveDetail, ActivityWithFlow, FulfilledActiveDetail, Job, ServiceFlowRun, Task } from "./interfaces";
|
|
2
|
+
export declare function useFulfilledActiveDetail(activeDetail: ActiveDetail | null, tasks: Task[], jobMap: Map<string, Job> | undefined, flowMap: Map<string, ServiceFlowRun>, activityMap: Map<string, ActivityWithFlow>): FulfilledActiveDetail | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.3",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@next-bricks/presentational": "*",
|
|
50
50
|
"@next-bricks/vs": "*"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "ec2a2ba458f2e3123d6d5c9ddc4266c43afe0133"
|
|
53
53
|
}
|