@autobe/ui 0.29.2 → 0.30.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.
- package/lib/components/AutoBeChatMain.js.map +1 -1
- package/lib/components/AutoBeStatusModal.js +4 -4
- package/lib/components/AutoBeStatusModal.js.map +1 -1
- package/lib/components/AutoBeUserMessageMovie.d.ts +2 -2
- package/lib/components/common/ChatBubble.d.ts +2 -2
- package/lib/components/common/openai/OpenAIContent.d.ts +2 -2
- package/lib/components/common/openai/OpenAIContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserAudioContent.js +1 -1
- package/lib/components/common/openai/OpenAIUserAudioContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserFileContent.js +1 -1
- package/lib/components/common/openai/OpenAIUserFileContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserImageContent.d.ts +2 -2
- package/lib/components/events/AutoBeCompleteEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeCompleteEventMovie.js +5 -5
- package/lib/components/events/AutoBeCompleteEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeCorrectEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeCorrectEventMovie.js +4 -4
- package/lib/components/events/AutoBeCorrectEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeEventMovie.js +38 -17
- package/lib/components/events/AutoBeEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeProgressEventMovie.js +73 -13
- package/lib/components/events/AutoBeProgressEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeScenarioEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeScenarioEventMovie.js +18 -5
- package/lib/components/events/AutoBeScenarioEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeStartEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeStartEventMovie.js +2 -2
- package/lib/components/events/AutoBeStartEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeValidateEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeValidateEventMovie.js +3 -11
- package/lib/components/events/AutoBeValidateEventMovie.js.map +1 -1
- package/lib/components/events/groups/CorrectEventGroup.d.ts +2 -2
- package/lib/components/events/groups/CorrectEventGroup.js +1 -1
- package/lib/components/events/groups/CorrectEventGroup.js.map +1 -1
- package/lib/components/events/groups/ValidateEventGroup.d.ts +2 -2
- package/lib/components/events/groups/ValidateEventGroup.js +1 -2
- package/lib/components/events/groups/ValidateEventGroup.js.map +1 -1
- package/lib/components/events/utils/eventGrouper.js +1 -2
- package/lib/components/events/utils/eventGrouper.js.map +1 -1
- package/lib/components/upload/AutoBeChatUploadBox.d.ts +3 -4
- package/lib/components/upload/AutoBeChatUploadBox.js +2 -1
- package/lib/components/upload/AutoBeChatUploadBox.js.map +1 -1
- package/lib/components/upload/AutoBeChatUploadSendButton.js +1 -1
- package/lib/components/upload/AutoBeChatUploadSendButton.js.map +1 -1
- package/lib/context/AutoBeAgentContext.d.ts +1 -3
- package/lib/context/AutoBeAgentContext.js +0 -4
- package/lib/context/AutoBeAgentContext.js.map +1 -1
- package/lib/hooks/useSessionStorage.d.ts +4 -0
- package/lib/hooks/useSessionStorage.js +16 -0
- package/lib/hooks/useSessionStorage.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.d.ts +10 -0
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.js +117 -0
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.js.map +1 -0
- package/lib/structure/AutoBeListener.js +91 -23
- package/lib/structure/AutoBeListener.js.map +1 -1
- package/lib/structure/AutoBeListenerState.d.ts +3 -3
- package/lib/structure/AutoBeListenerState.js +4 -4
- package/lib/structure/AutoBeListenerState.js.map +1 -1
- package/lib/structure/IAutoBeAgentSessionStorageStrategy.js +1 -1
- package/lib/structure/IAutoBeAgentSessionStorageStrategy.js.map +1 -1
- package/lib/utils/AutoBeFileUploader.d.ts +2 -2
- package/lib/utils/AutoBeFileUploader.js.map +1 -1
- package/package.json +3 -4
- package/src/components/AutoBeChatMain.tsx +2 -2
- package/src/components/AutoBeStatusModal.tsx +6 -4
- package/src/components/AutoBeUserMessageMovie.tsx +2 -2
- package/src/components/common/ChatBubble.tsx +2 -2
- package/src/components/common/openai/OpenAIContent.tsx +3 -3
- package/src/components/common/openai/OpenAIUserAudioContent.tsx +1 -1
- package/src/components/common/openai/OpenAIUserFileContent.tsx +1 -1
- package/src/components/common/openai/OpenAIUserImageContent.tsx +2 -2
- package/src/components/events/AutoBeCompleteEventMovie.tsx +6 -6
- package/src/components/events/AutoBeCorrectEventMovie.tsx +12 -26
- package/src/components/events/AutoBeEventMovie.tsx +38 -19
- package/src/components/events/AutoBeProgressEventMovie.tsx +73 -13
- package/src/components/events/AutoBeScenarioEventMovie.tsx +53 -13
- package/src/components/events/AutoBeStartEventMovie.tsx +4 -4
- package/src/components/events/AutoBeValidateEventMovie.tsx +7 -44
- package/src/components/events/README.md +5 -5
- package/src/components/events/groups/CorrectEventGroup.tsx +3 -3
- package/src/components/events/groups/ValidateEventGroup.tsx +3 -6
- package/src/components/events/utils/eventGrouper.tsx +1 -2
- package/src/components/upload/AutoBeChatUploadBox.tsx +8 -7
- package/src/components/upload/AutoBeChatUploadSendButton.tsx +1 -1
- package/src/context/AutoBeAgentContext.tsx +4 -17
- package/src/hooks/useSessionStorage.ts +10 -0
- package/src/index.ts +1 -0
- package/src/strategy/AutoBeAgentSessionStorageStrategy.ts +127 -0
- package/src/structure/AutoBeListener.ts +92 -23
- package/src/structure/AutoBeListenerState.ts +6 -6
- package/src/structure/IAutoBeAgentSessionStorageStrategy.ts +1 -1
- package/src/utils/AutoBeFileUploader.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeUserConversateContent } from "@autobe/interface";
|
|
2
2
|
|
|
3
3
|
import ChatBubble from "./common/ChatBubble";
|
|
4
4
|
|
|
5
5
|
interface IAutoBeUserMessageHistoryMovieProps {
|
|
6
|
-
message: Array<
|
|
6
|
+
message: Array<AutoBeUserConversateContent>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export const AutoBeUserMessageMovie = (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeUserConversateContent } from "@autobe/interface";
|
|
2
2
|
|
|
3
3
|
import { formatTime } from "../../utils/time";
|
|
4
4
|
import { OpenAIContent } from "./openai";
|
|
@@ -6,7 +6,7 @@ import { OpenAIContent } from "./openai";
|
|
|
6
6
|
/** Props interface for ChatBubble component */
|
|
7
7
|
export interface IChatBubbleProps {
|
|
8
8
|
/** Message content - supports text, audio, file, and image types */
|
|
9
|
-
content: Array<
|
|
9
|
+
content: Array<AutoBeUserConversateContent | string>;
|
|
10
10
|
|
|
11
11
|
/** Direction of the chat bubble - left or right */
|
|
12
12
|
direction: "left" | "right";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeUserConversateContent } from "@autobe/interface";
|
|
2
2
|
|
|
3
3
|
import { OpenAIUserAudioContent } from "./OpenAIUserAudioContent";
|
|
4
4
|
import { OpenAIUserFileContent } from "./OpenAIUserFileContent";
|
|
@@ -6,7 +6,7 @@ import { OpenAIUserImageContent } from "./OpenAIUserImageContent";
|
|
|
6
6
|
import { OpenAIUserTextContent } from "./OpenAIUserTextContent";
|
|
7
7
|
|
|
8
8
|
export interface IOpenAIUserContentProps {
|
|
9
|
-
content: Array<
|
|
9
|
+
content: Array<AutoBeUserConversateContent | string>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const OpenAIContent = (props: IOpenAIUserContentProps) => {
|
|
@@ -14,7 +14,7 @@ export const OpenAIContent = (props: IOpenAIUserContentProps) => {
|
|
|
14
14
|
|
|
15
15
|
/** Renders a single content item */
|
|
16
16
|
const renderSingleContent = (
|
|
17
|
-
item:
|
|
17
|
+
item: AutoBeUserConversateContent | string,
|
|
18
18
|
index: number,
|
|
19
19
|
) => {
|
|
20
20
|
if (typeof item === "string") {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeUserImageConversateContent } from "@autobe/interface";
|
|
2
2
|
|
|
3
3
|
/** Image content renderer component for OpenAI messages */
|
|
4
4
|
export const OpenAIUserImageContent = ({
|
|
5
5
|
content,
|
|
6
6
|
}: {
|
|
7
|
-
content:
|
|
7
|
+
content: AutoBeUserImageConversateContent;
|
|
8
8
|
}) => {
|
|
9
9
|
const imgSrc =
|
|
10
10
|
content.image.type === "url" ? content.image.url : content.image.data;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeAnalyzeCompleteEvent,
|
|
3
|
+
AutoBeDatabaseCompleteEvent,
|
|
3
4
|
AutoBeInterfaceCompleteEvent,
|
|
4
|
-
AutoBePrismaCompleteEvent,
|
|
5
5
|
AutoBeRealizeCompleteEvent,
|
|
6
6
|
AutoBeTestCompleteEvent,
|
|
7
7
|
IAutoBeGetFilesOptions,
|
|
@@ -19,7 +19,7 @@ export interface IAutoBeCompleteEventMovieProps {
|
|
|
19
19
|
) => Promise<Record<string, string>>;
|
|
20
20
|
event:
|
|
21
21
|
| AutoBeAnalyzeCompleteEvent
|
|
22
|
-
|
|
|
22
|
+
| AutoBeDatabaseCompleteEvent
|
|
23
23
|
| AutoBeInterfaceCompleteEvent
|
|
24
24
|
| AutoBeTestCompleteEvent
|
|
25
25
|
| AutoBeRealizeCompleteEvent;
|
|
@@ -307,7 +307,7 @@ function getTitle(
|
|
|
307
307
|
switch (event.type) {
|
|
308
308
|
case "analyzeComplete":
|
|
309
309
|
return "Analyze";
|
|
310
|
-
case "
|
|
310
|
+
case "databaseComplete":
|
|
311
311
|
if (event.compiled.type !== "success") return "Prisma (Error)";
|
|
312
312
|
return "Prisma";
|
|
313
313
|
case "interfaceComplete":
|
|
@@ -326,12 +326,12 @@ const getMessage = (
|
|
|
326
326
|
openStackBlitz: () => void,
|
|
327
327
|
event: IAutoBeCompleteEventMovieProps["event"],
|
|
328
328
|
) => {
|
|
329
|
-
if (event.type === "
|
|
329
|
+
if (event.type === "databaseComplete" && event.compiled.type === "failure")
|
|
330
330
|
return (
|
|
331
331
|
<>
|
|
332
332
|
<br />
|
|
333
333
|
<br />
|
|
334
|
-
Succeeded to compose <code>
|
|
334
|
+
Succeeded to compose <code>AutoBeDatabase.IApplication</code> typed AST
|
|
335
335
|
(Abstract Syntax Tree) data, but failed to generate Prisma schema files
|
|
336
336
|
from it. This is a bug of <code>@autobe</code>. Please{" "}
|
|
337
337
|
<a
|
|
@@ -387,7 +387,7 @@ const getMessage = (
|
|
|
387
387
|
|
|
388
388
|
const getPhase = (event: IAutoBeCompleteEventMovieProps["event"]) => {
|
|
389
389
|
if (event.type === "analyzeComplete") return "analyze";
|
|
390
|
-
else if (event.type === "
|
|
390
|
+
else if (event.type === "databaseComplete") return "database";
|
|
391
391
|
else if (event.type === "interfaceComplete") return "interface";
|
|
392
392
|
else if (event.type === "testComplete") return "test";
|
|
393
393
|
else if (event.type === "realizeComplete") return "realize";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
AutoBeDatabaseCorrectEvent,
|
|
3
3
|
AutoBeRealizeAuthorizationCorrectEvent,
|
|
4
4
|
AutoBeRealizeCorrectEvent,
|
|
5
5
|
AutoBeTestCorrectEvent,
|
|
@@ -12,7 +12,7 @@ import { EventCard, EventContent, EventHeader } from "./common";
|
|
|
12
12
|
export interface IAutoBeCorrectEventMovieProps {
|
|
13
13
|
/** Correct event to display */
|
|
14
14
|
event:
|
|
15
|
-
|
|
|
15
|
+
| AutoBeDatabaseCorrectEvent
|
|
16
16
|
| AutoBeTestCorrectEvent
|
|
17
17
|
| AutoBeRealizeCorrectEvent
|
|
18
18
|
| AutoBeRealizeAuthorizationCorrectEvent;
|
|
@@ -20,7 +20,7 @@ export interface IAutoBeCorrectEventMovieProps {
|
|
|
20
20
|
|
|
21
21
|
/** Event type definition */
|
|
22
22
|
type CorrectEventType =
|
|
23
|
-
| "
|
|
23
|
+
| "databaseCorrect"
|
|
24
24
|
| "testCorrect"
|
|
25
25
|
| "realizeCorrect"
|
|
26
26
|
| "realizeAuthorizationCorrect";
|
|
@@ -31,7 +31,7 @@ function getStepConfig(eventType: CorrectEventType): {
|
|
|
31
31
|
description: string;
|
|
32
32
|
} {
|
|
33
33
|
switch (eventType) {
|
|
34
|
-
case "
|
|
34
|
+
case "databaseCorrect":
|
|
35
35
|
return {
|
|
36
36
|
title: "Prisma Schema Corrected",
|
|
37
37
|
description: "Database schema has been successfully corrected",
|
|
@@ -137,9 +137,9 @@ function getEventDetails(
|
|
|
137
137
|
};
|
|
138
138
|
|
|
139
139
|
switch (event.type) {
|
|
140
|
-
case "
|
|
140
|
+
case "databaseCorrect":
|
|
141
141
|
const prismaEvent = event as IAutoBeCorrectEventMovieProps["event"] & {
|
|
142
|
-
type: "
|
|
142
|
+
type: "databaseCorrect";
|
|
143
143
|
};
|
|
144
144
|
return (
|
|
145
145
|
<div style={containerStyle}>
|
|
@@ -192,24 +192,10 @@ function getEventDetails(
|
|
|
192
192
|
<span style={valueStyle}>Step {testEvent.step}</span>
|
|
193
193
|
</div>
|
|
194
194
|
|
|
195
|
-
{testEvent.
|
|
195
|
+
{testEvent.function?.location && (
|
|
196
196
|
<div style={infoItemStyle}>
|
|
197
197
|
<span style={labelStyle}>Test File:</span>
|
|
198
|
-
<span style={valueStyle}>{testEvent.
|
|
199
|
-
</div>
|
|
200
|
-
)}
|
|
201
|
-
|
|
202
|
-
{testEvent.think && (
|
|
203
|
-
<div>
|
|
204
|
-
<div style={labelStyle}>🔄 Analysis:</div>
|
|
205
|
-
<div style={codeBlockStyle}>{testEvent.think}</div>
|
|
206
|
-
</div>
|
|
207
|
-
)}
|
|
208
|
-
|
|
209
|
-
{testEvent.review && (
|
|
210
|
-
<div>
|
|
211
|
-
<div style={labelStyle}>📋 Review Results:</div>
|
|
212
|
-
<div style={codeBlockStyle}>{testEvent.review}</div>
|
|
198
|
+
<span style={valueStyle}>{testEvent.function.location}</span>
|
|
213
199
|
</div>
|
|
214
200
|
)}
|
|
215
201
|
|
|
@@ -238,15 +224,15 @@ function getEventDetails(
|
|
|
238
224
|
|
|
239
225
|
<div style={infoItemStyle}>
|
|
240
226
|
<span style={labelStyle}>File Location:</span>
|
|
241
|
-
<span style={valueStyle}>{realizeEvent.location}</span>
|
|
227
|
+
<span style={valueStyle}>{realizeEvent.function.location}</span>
|
|
242
228
|
</div>
|
|
243
229
|
|
|
244
|
-
{realizeEvent.content && (
|
|
230
|
+
{realizeEvent.function.content && (
|
|
245
231
|
<div>
|
|
246
232
|
<div style={labelStyle}>📄 Corrected Implementation:</div>
|
|
247
233
|
<div style={codeBlockStyle}>
|
|
248
|
-
{realizeEvent.content.slice(0, 500)}
|
|
249
|
-
{realizeEvent.content.length > 500 && "..."}
|
|
234
|
+
{realizeEvent.function.content.slice(0, 500)}
|
|
235
|
+
{realizeEvent.function.content.length > 500 && "..."}
|
|
250
236
|
</div>
|
|
251
237
|
</div>
|
|
252
238
|
)}
|
|
@@ -43,7 +43,7 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
43
43
|
);
|
|
44
44
|
// START EVENTS
|
|
45
45
|
case "analyzeStart":
|
|
46
|
-
case "
|
|
46
|
+
case "databaseStart":
|
|
47
47
|
case "interfaceStart":
|
|
48
48
|
case "testStart":
|
|
49
49
|
case "realizeStart":
|
|
@@ -52,41 +52,52 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
52
52
|
return <AutoBeStartEventMovie event={back} />;
|
|
53
53
|
// SCENARIO EVENTS
|
|
54
54
|
case "analyzeScenario":
|
|
55
|
-
case "
|
|
55
|
+
case "databaseGroup":
|
|
56
|
+
case "databaseGroupReview":
|
|
57
|
+
case "databaseAuthorization":
|
|
58
|
+
case "databaseAuthorizationReview":
|
|
56
59
|
case "interfaceGroup":
|
|
57
60
|
case "realizeTestReset":
|
|
58
61
|
return <AutoBeScenarioEventMovie event={back} />;
|
|
59
62
|
// PROGRESS EVENTS
|
|
60
|
-
case "
|
|
61
|
-
case "
|
|
63
|
+
case "analyzeWriteModule":
|
|
64
|
+
case "analyzeModuleReview":
|
|
65
|
+
case "analyzeWriteUnit":
|
|
66
|
+
case "analyzeUnitReview":
|
|
67
|
+
case "analyzeWriteSection":
|
|
68
|
+
case "analyzeSectionReview":
|
|
62
69
|
case "interfaceEndpoint":
|
|
63
|
-
case "
|
|
64
|
-
case "
|
|
70
|
+
case "interfaceEndpointReview":
|
|
71
|
+
case "databaseComponent":
|
|
72
|
+
case "databaseComponentReview":
|
|
73
|
+
case "databaseSchema":
|
|
74
|
+
case "databaseSchemaReview":
|
|
65
75
|
case "interfaceOperation":
|
|
66
76
|
case "interfaceOperationReview":
|
|
67
77
|
case "interfaceAuthorization":
|
|
68
78
|
case "interfaceSchema":
|
|
79
|
+
case "interfaceSchemaCasting":
|
|
80
|
+
case "interfaceSchemaRefine":
|
|
69
81
|
case "interfaceSchemaReview":
|
|
70
|
-
case "
|
|
82
|
+
case "interfaceSchemaComplement":
|
|
71
83
|
case "interfaceSchemaRename":
|
|
72
84
|
case "interfacePrerequisite":
|
|
73
|
-
case "testWrite":
|
|
74
85
|
case "testScenario":
|
|
75
86
|
case "testScenarioReview":
|
|
87
|
+
case "testValidate":
|
|
88
|
+
case "testWrite":
|
|
89
|
+
case "realizePlan":
|
|
76
90
|
case "realizeWrite":
|
|
77
91
|
case "realizeAuthorizationWrite":
|
|
78
92
|
case "realizeTestOperation":
|
|
93
|
+
case "realizeValidate":
|
|
79
94
|
return <AutoBeProgressEventMovie event={back} />;
|
|
80
95
|
// VALIDATE EVENTS
|
|
81
|
-
case "
|
|
82
|
-
case "prismaValidate":
|
|
83
|
-
case "testValidate":
|
|
84
|
-
case "realizeValidate":
|
|
96
|
+
case "databaseValidate":
|
|
85
97
|
case "realizeAuthorizationValidate":
|
|
86
98
|
if (props.events.length === 1) {
|
|
87
99
|
return <AutoBeValidateEventMovie event={back} />;
|
|
88
100
|
}
|
|
89
|
-
|
|
90
101
|
return (
|
|
91
102
|
<ValidateEventGroup
|
|
92
103
|
events={props.events as IValidateEventGroupProps["events"]}
|
|
@@ -95,7 +106,7 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
95
106
|
);
|
|
96
107
|
// COMPLETE EVENTS
|
|
97
108
|
case "analyzeComplete":
|
|
98
|
-
case "
|
|
109
|
+
case "databaseComplete":
|
|
99
110
|
case "interfaceComplete":
|
|
100
111
|
case "testComplete":
|
|
101
112
|
case "realizeComplete":
|
|
@@ -103,14 +114,11 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
103
114
|
<AutoBeCompleteEventMovie getFiles={service.getFiles} event={back} />
|
|
104
115
|
);
|
|
105
116
|
// CORRECT EVENTS
|
|
106
|
-
case "
|
|
107
|
-
case "testCorrect":
|
|
108
|
-
case "realizeCorrect":
|
|
117
|
+
case "databaseCorrect":
|
|
109
118
|
case "realizeAuthorizationCorrect": {
|
|
110
119
|
if (props.events.length === 1) {
|
|
111
120
|
return <AutoBeCorrectEventMovie event={back} />;
|
|
112
121
|
}
|
|
113
|
-
|
|
114
122
|
return (
|
|
115
123
|
<CorrectEventGroup
|
|
116
124
|
events={props.events as ICorrectEventGroupProps["events"]}
|
|
@@ -119,7 +127,9 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
119
127
|
);
|
|
120
128
|
}
|
|
121
129
|
// DISCARD
|
|
122
|
-
case "
|
|
130
|
+
case "imageDescribeStart":
|
|
131
|
+
case "imageDescribeDraft":
|
|
132
|
+
case "imageDescribeComplete":
|
|
123
133
|
case "realizeTestComplete":
|
|
124
134
|
case "realizeAuthorizationComplete":
|
|
125
135
|
case "vendorRequest":
|
|
@@ -129,6 +139,15 @@ export function AutoBeEventMovie<Event extends AutoBeEvent>(
|
|
|
129
139
|
case "jsonValidateError":
|
|
130
140
|
case "consentFunctionCall":
|
|
131
141
|
case "preliminary":
|
|
142
|
+
case "analyzeWriteModule":
|
|
143
|
+
case "analyzeModuleReview":
|
|
144
|
+
case "analyzeWriteUnit":
|
|
145
|
+
case "analyzeUnitReview":
|
|
146
|
+
case "analyzeWriteSection":
|
|
147
|
+
case "analyzeSectionReview":
|
|
148
|
+
case "analyzeScenarioReview":
|
|
149
|
+
case "testCorrect":
|
|
150
|
+
case "realizeCorrect":
|
|
132
151
|
return null;
|
|
133
152
|
default:
|
|
134
153
|
back satisfies never;
|
|
@@ -39,22 +39,22 @@ interface IState {
|
|
|
39
39
|
function getState(event: AutoBeProgressEventMovie.IProps["event"]): IState {
|
|
40
40
|
const content: Pick<IState, "title" | "description"> = (() => {
|
|
41
41
|
switch (event.type) {
|
|
42
|
-
case "
|
|
42
|
+
case "databaseComponent":
|
|
43
43
|
return {
|
|
44
|
-
title: "
|
|
45
|
-
description: "
|
|
44
|
+
title: "Database Components",
|
|
45
|
+
description: "Generating database component schemas",
|
|
46
46
|
};
|
|
47
|
-
case "
|
|
47
|
+
case "databaseComponentReview":
|
|
48
48
|
return {
|
|
49
|
-
title: "
|
|
50
|
-
description: "Reviewing the
|
|
49
|
+
title: "Prisma Components Review",
|
|
50
|
+
description: "Reviewing the Prisma components",
|
|
51
51
|
};
|
|
52
|
-
case "
|
|
52
|
+
case "databaseSchema":
|
|
53
53
|
return {
|
|
54
54
|
title: "Prisma Schemas",
|
|
55
55
|
description: "Designing Database schemas",
|
|
56
56
|
};
|
|
57
|
-
case "
|
|
57
|
+
case "databaseSchemaReview":
|
|
58
58
|
return {
|
|
59
59
|
title: "Prisma Review",
|
|
60
60
|
description: "Reviewing the Prisma schemas",
|
|
@@ -64,6 +64,11 @@ function getState(event: AutoBeProgressEventMovie.IProps["event"]): IState {
|
|
|
64
64
|
title: "Interface Endpoints",
|
|
65
65
|
description: "Collecting API endpoints",
|
|
66
66
|
};
|
|
67
|
+
case "interfaceEndpointReview":
|
|
68
|
+
return {
|
|
69
|
+
title: "Interface Endpoints Review",
|
|
70
|
+
description: "Reviewing API endpoints",
|
|
71
|
+
};
|
|
67
72
|
case "interfaceOperation":
|
|
68
73
|
return {
|
|
69
74
|
title: "Interface Operations",
|
|
@@ -84,12 +89,22 @@ function getState(event: AutoBeProgressEventMovie.IProps["event"]): IState {
|
|
|
84
89
|
title: "Interface Schemas",
|
|
85
90
|
description: "Designing API type schemas",
|
|
86
91
|
};
|
|
92
|
+
case "interfaceSchemaCasting":
|
|
93
|
+
return {
|
|
94
|
+
title: "Interface Schemas Casting",
|
|
95
|
+
description: `Refining degenerate API type schemas' structure`,
|
|
96
|
+
};
|
|
97
|
+
case "interfaceSchemaRefine":
|
|
98
|
+
return {
|
|
99
|
+
title: "Interface Schemas Refine",
|
|
100
|
+
description: `Refining API type schemas' documentation and metadata`,
|
|
101
|
+
};
|
|
87
102
|
case "interfaceSchemaReview":
|
|
88
103
|
return {
|
|
89
104
|
title: "Interface Schemas Review",
|
|
90
|
-
description: `Reviewing API type schemas
|
|
105
|
+
description: `Reviewing API type schemas`,
|
|
91
106
|
};
|
|
92
|
-
case "
|
|
107
|
+
case "interfaceSchemaComplement":
|
|
93
108
|
return {
|
|
94
109
|
title: "Interface Complement",
|
|
95
110
|
description: "Complementing missing API type schemas",
|
|
@@ -119,6 +134,16 @@ function getState(event: AutoBeProgressEventMovie.IProps["event"]): IState {
|
|
|
119
134
|
title: "Test Write",
|
|
120
135
|
description: "Writing E2E test functions",
|
|
121
136
|
};
|
|
137
|
+
case "testValidate":
|
|
138
|
+
return {
|
|
139
|
+
title: "Test Validate",
|
|
140
|
+
description: "Validating E2E test results",
|
|
141
|
+
};
|
|
142
|
+
case "realizePlan":
|
|
143
|
+
return {
|
|
144
|
+
title: "Realize Plan",
|
|
145
|
+
description: "Planning the API functions' modularization",
|
|
146
|
+
};
|
|
122
147
|
case "realizeWrite":
|
|
123
148
|
return {
|
|
124
149
|
title: "Realize Write",
|
|
@@ -135,10 +160,45 @@ function getState(event: AutoBeProgressEventMovie.IProps["event"]): IState {
|
|
|
135
160
|
description:
|
|
136
161
|
"Running the E2E test operations to validate the API functions",
|
|
137
162
|
};
|
|
138
|
-
case "
|
|
163
|
+
case "realizeValidate":
|
|
164
|
+
return {
|
|
165
|
+
title: "Realize Validate",
|
|
166
|
+
description: "Correcting and Validating the API functions",
|
|
167
|
+
};
|
|
168
|
+
case "imageDescribeDraft":
|
|
169
|
+
return {
|
|
170
|
+
title: "Describe Image Draft",
|
|
171
|
+
description: "Describing the image draft",
|
|
172
|
+
};
|
|
173
|
+
case "analyzeWriteModule":
|
|
174
|
+
return {
|
|
175
|
+
title: "Analyze Write Module",
|
|
176
|
+
description: "Generating module section structure",
|
|
177
|
+
};
|
|
178
|
+
case "analyzeModuleReview":
|
|
179
|
+
return {
|
|
180
|
+
title: "Analyze Module Review",
|
|
181
|
+
description: "Reviewing module section structure",
|
|
182
|
+
};
|
|
183
|
+
case "analyzeWriteUnit":
|
|
184
|
+
return {
|
|
185
|
+
title: "Analyze Write Unit",
|
|
186
|
+
description: "Generating unit section content",
|
|
187
|
+
};
|
|
188
|
+
case "analyzeUnitReview":
|
|
189
|
+
return {
|
|
190
|
+
title: "Analyze Unit Review",
|
|
191
|
+
description: "Reviewing unit section content",
|
|
192
|
+
};
|
|
193
|
+
case "analyzeWriteSection":
|
|
194
|
+
return {
|
|
195
|
+
title: "Analyze Write Section",
|
|
196
|
+
description: "Generating section details",
|
|
197
|
+
};
|
|
198
|
+
case "analyzeSectionReview":
|
|
139
199
|
return {
|
|
140
|
-
title: "
|
|
141
|
-
description: "
|
|
200
|
+
title: "Analyze Section Review",
|
|
201
|
+
description: "Reviewing section details",
|
|
142
202
|
};
|
|
143
203
|
default:
|
|
144
204
|
event satisfies never;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeAnalyzeScenarioEvent,
|
|
3
|
+
AutoBeDatabaseAuthorizationEvent,
|
|
4
|
+
AutoBeDatabaseAuthorizationReviewEvent,
|
|
5
|
+
AutoBeDatabaseGroupEvent,
|
|
6
|
+
AutoBeDatabaseGroupReviewEvent,
|
|
3
7
|
AutoBeInterfaceGroupEvent,
|
|
4
|
-
AutoBePrismaComponentEvent,
|
|
5
8
|
AutoBeRealizeTestResetEvent,
|
|
6
9
|
} from "@autobe/interface";
|
|
7
10
|
import { JSX } from "react";
|
|
@@ -11,7 +14,10 @@ import { EventCard, EventContent, EventHeader } from "./common";
|
|
|
11
14
|
export interface IAutoBeScenarioEventMovieProps {
|
|
12
15
|
event:
|
|
13
16
|
| AutoBeAnalyzeScenarioEvent
|
|
14
|
-
|
|
|
17
|
+
| AutoBeDatabaseAuthorizationEvent
|
|
18
|
+
| AutoBeDatabaseAuthorizationReviewEvent
|
|
19
|
+
| AutoBeDatabaseGroupEvent
|
|
20
|
+
| AutoBeDatabaseGroupReviewEvent
|
|
15
21
|
| AutoBeInterfaceGroupEvent
|
|
16
22
|
| AutoBeRealizeTestResetEvent;
|
|
17
23
|
}
|
|
@@ -49,28 +55,62 @@ function getState(event: IAutoBeScenarioEventMovieProps["event"]): IState {
|
|
|
49
55
|
</>
|
|
50
56
|
),
|
|
51
57
|
};
|
|
52
|
-
case "
|
|
58
|
+
case "databaseGroup":
|
|
53
59
|
return {
|
|
54
|
-
title: "
|
|
60
|
+
title: "Database Group",
|
|
55
61
|
description: (
|
|
56
62
|
<>
|
|
57
|
-
Generating
|
|
63
|
+
Generating Database groups.
|
|
58
64
|
<br />
|
|
59
65
|
<br />
|
|
60
|
-
Number of
|
|
66
|
+
Number of Database groups would be:
|
|
61
67
|
<br />
|
|
62
68
|
<ul>
|
|
63
|
-
<li>namespaces: #{event.
|
|
64
|
-
<li>
|
|
65
|
-
tables: #
|
|
66
|
-
{event.components
|
|
67
|
-
.map((c) => c.tables.length)
|
|
68
|
-
.reduce((a, b) => a + b, 0)}
|
|
69
|
-
</li>
|
|
69
|
+
<li>namespaces: #{event.groups.length}</li>
|
|
70
70
|
</ul>
|
|
71
71
|
</>
|
|
72
72
|
),
|
|
73
73
|
};
|
|
74
|
+
case "databaseGroupReview":
|
|
75
|
+
return {
|
|
76
|
+
title: "Database Group Review",
|
|
77
|
+
description: (
|
|
78
|
+
<>
|
|
79
|
+
Reviewed Database group structure.
|
|
80
|
+
<br />
|
|
81
|
+
<br />
|
|
82
|
+
Revisions applied: #{event.revises.length}
|
|
83
|
+
<br />
|
|
84
|
+
Final groups: #{event.groups.length}
|
|
85
|
+
</>
|
|
86
|
+
),
|
|
87
|
+
};
|
|
88
|
+
case "databaseAuthorization":
|
|
89
|
+
return {
|
|
90
|
+
title: "Database Authorization",
|
|
91
|
+
description: (
|
|
92
|
+
<>
|
|
93
|
+
Generated authorization tables for all actors.
|
|
94
|
+
<br />
|
|
95
|
+
<br />
|
|
96
|
+
Tables created: #{event.component.tables.length}
|
|
97
|
+
</>
|
|
98
|
+
),
|
|
99
|
+
};
|
|
100
|
+
case "databaseAuthorizationReview":
|
|
101
|
+
return {
|
|
102
|
+
title: "Database Authorization Review",
|
|
103
|
+
description: (
|
|
104
|
+
<>
|
|
105
|
+
Reviewed authorization tables.
|
|
106
|
+
<br />
|
|
107
|
+
<br />
|
|
108
|
+
Revisions applied: #{event.revises.length}
|
|
109
|
+
<br />
|
|
110
|
+
Final tables: #{event.modification.tables.length}
|
|
111
|
+
</>
|
|
112
|
+
),
|
|
113
|
+
};
|
|
74
114
|
case "interfaceGroup":
|
|
75
115
|
return {
|
|
76
116
|
title: "Interface Endpoint Groups",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeAnalyzeStartEvent,
|
|
3
|
+
AutoBeDatabaseStartEvent,
|
|
3
4
|
AutoBeInterfaceStartEvent,
|
|
4
|
-
AutoBePrismaStartEvent,
|
|
5
5
|
AutoBeRealizeAuthorizationStartEvent,
|
|
6
6
|
AutoBeRealizeStartEvent,
|
|
7
7
|
AutoBeRealizeTestStartEvent,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
interface IAutoBeStartEventProps {
|
|
12
12
|
event:
|
|
13
13
|
| AutoBeAnalyzeStartEvent
|
|
14
|
-
|
|
|
14
|
+
| AutoBeDatabaseStartEvent
|
|
15
15
|
| AutoBeInterfaceStartEvent
|
|
16
16
|
| AutoBeTestStartEvent
|
|
17
17
|
| AutoBeRealizeStartEvent
|
|
@@ -61,8 +61,8 @@ function getTitle(event: IAutoBeStartEventProps["event"]): string {
|
|
|
61
61
|
switch (event.type) {
|
|
62
62
|
case "analyzeStart":
|
|
63
63
|
return "Analyze";
|
|
64
|
-
case "
|
|
65
|
-
return "
|
|
64
|
+
case "databaseStart":
|
|
65
|
+
return "Database";
|
|
66
66
|
case "interfaceStart":
|
|
67
67
|
return "Interface";
|
|
68
68
|
case "testStart":
|