@autobe/ui 0.30.4-dev.20260324 → 0.30.4
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/LICENSE +661 -661
- package/lib/components/AutoBeChatMain.js +5 -5
- package/lib/components/AutoBeConfigModal.js +9 -9
- package/package.json +2 -2
- package/src/components/AutoBeAssistantMessageMovie.tsx +22 -22
- package/src/components/AutoBeChatMain.tsx +394 -394
- package/src/components/AutoBeChatSidebar.tsx +414 -414
- package/src/components/AutoBeConfigButton.tsx +83 -83
- package/src/components/AutoBeConfigModal.tsx +443 -443
- package/src/components/AutoBeStatusButton.tsx +75 -75
- package/src/components/AutoBeStatusModal.tsx +486 -486
- package/src/components/AutoBeUserMessageMovie.tsx +27 -27
- package/src/components/common/ActionButton.tsx +205 -205
- package/src/components/common/ActionButtonGroup.tsx +80 -80
- package/src/components/common/AutoBeConfigInput.tsx +185 -185
- package/src/components/common/ChatBubble.tsx +119 -119
- package/src/components/common/Collapsible.tsx +95 -95
- package/src/components/common/CompactSessionIndicator.tsx +73 -73
- package/src/components/common/CompactSessionList.tsx +82 -82
- package/src/components/common/openai/OpenAIContent.tsx +53 -53
- package/src/components/common/openai/OpenAIUserAudioContent.tsx +70 -70
- package/src/components/common/openai/OpenAIUserFileContent.tsx +76 -76
- package/src/components/common/openai/OpenAIUserImageContent.tsx +34 -34
- package/src/components/common/openai/OpenAIUserTextContent.tsx +15 -15
- package/src/components/events/AutoBeCompleteEventMovie.tsx +402 -402
- package/src/components/events/AutoBeCorrectEventMovie.tsx +354 -354
- package/src/components/events/AutoBeEventGroupMovie.tsx +18 -18
- package/src/components/events/AutoBeEventMovie.tsx +154 -154
- package/src/components/events/AutoBeProgressEventMovie.tsx +207 -207
- package/src/components/events/AutoBeScenarioEventMovie.tsx +135 -135
- package/src/components/events/AutoBeStartEventMovie.tsx +82 -82
- package/src/components/events/AutoBeValidateEventMovie.tsx +249 -249
- package/src/components/events/README.md +300 -300
- package/src/components/events/common/CollapsibleEventGroup.tsx +211 -211
- package/src/components/events/common/EventCard.tsx +61 -61
- package/src/components/events/common/EventContent.tsx +31 -31
- package/src/components/events/common/EventHeader.tsx +85 -85
- package/src/components/events/common/EventIcon.tsx +82 -82
- package/src/components/events/common/ProgressBar.tsx +64 -64
- package/src/components/events/groups/CorrectEventGroup.tsx +183 -183
- package/src/components/events/groups/ValidateEventGroup.tsx +143 -143
- package/src/components/events/utils/eventGrouper.tsx +116 -116
- package/src/components/upload/AutoBeChatUploadBox.tsx +433 -433
- package/src/components/upload/AutoBeChatUploadSendButton.tsx +66 -66
- package/src/components/upload/AutoBeFileUploadBox.tsx +123 -123
- package/src/components/upload/AutoBeVoiceRecoderButton.tsx +100 -100
- package/src/context/AutoBeAgentContext.tsx +301 -301
- package/src/context/AutoBeAgentSessionList.tsx +58 -58
- package/src/context/SearchParamsContext.tsx +49 -49
- package/src/icons/Receipt.tsx +74 -74
- package/src/structure/AutoBeListener.ts +368 -368
- package/tsconfig.json +9 -9
- package/README.md +0 -261
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutoBeAnalyzeScenarioEvent,
|
|
3
|
-
AutoBeDatabaseAuthorizationEvent,
|
|
4
|
-
AutoBeDatabaseAuthorizationReviewEvent,
|
|
5
|
-
AutoBeDatabaseGroupEvent,
|
|
6
|
-
AutoBeDatabaseGroupReviewEvent,
|
|
7
|
-
AutoBeInterfaceGroupEvent,
|
|
8
|
-
AutoBeRealizeTestResetEvent,
|
|
9
|
-
} from "@autobe/interface";
|
|
10
|
-
import { JSX } from "react";
|
|
11
|
-
|
|
12
|
-
import { EventCard, EventContent, EventHeader } from "./common";
|
|
13
|
-
|
|
14
|
-
export interface IAutoBeScenarioEventMovieProps {
|
|
15
|
-
event:
|
|
16
|
-
| AutoBeAnalyzeScenarioEvent
|
|
17
|
-
| AutoBeDatabaseAuthorizationEvent
|
|
18
|
-
| AutoBeDatabaseAuthorizationReviewEvent
|
|
19
|
-
| AutoBeDatabaseGroupEvent
|
|
20
|
-
| AutoBeDatabaseGroupReviewEvent
|
|
21
|
-
| AutoBeInterfaceGroupEvent
|
|
22
|
-
| AutoBeRealizeTestResetEvent;
|
|
23
|
-
}
|
|
24
|
-
export const AutoBeScenarioEventMovie = (
|
|
25
|
-
props: IAutoBeScenarioEventMovieProps,
|
|
26
|
-
) => {
|
|
27
|
-
const { event } = props;
|
|
28
|
-
const { title, description } = getState(event);
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<EventCard>
|
|
32
|
-
<EventHeader title={title} timestamp={event.created_at} iconType="info" />
|
|
33
|
-
<EventContent>{description}</EventContent>
|
|
34
|
-
</EventCard>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
export default AutoBeScenarioEventMovie;
|
|
38
|
-
|
|
39
|
-
interface IState {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string | JSX.Element;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getState(event: IAutoBeScenarioEventMovieProps["event"]): IState {
|
|
45
|
-
switch (event.type) {
|
|
46
|
-
case "analyzeScenario":
|
|
47
|
-
return {
|
|
48
|
-
title: "Analyze Scenario",
|
|
49
|
-
description: (
|
|
50
|
-
<>
|
|
51
|
-
Generating analysis report.
|
|
52
|
-
<br />
|
|
53
|
-
<br />
|
|
54
|
-
Number of documents to write: #{event.files.length}
|
|
55
|
-
</>
|
|
56
|
-
),
|
|
57
|
-
};
|
|
58
|
-
case "databaseGroup":
|
|
59
|
-
return {
|
|
60
|
-
title: "Database Group",
|
|
61
|
-
description: (
|
|
62
|
-
<>
|
|
63
|
-
Generating Database groups.
|
|
64
|
-
<br />
|
|
65
|
-
<br />
|
|
66
|
-
Number of Database groups would be:
|
|
67
|
-
<br />
|
|
68
|
-
<ul>
|
|
69
|
-
<li>namespaces: #{event.groups.length}</li>
|
|
70
|
-
</ul>
|
|
71
|
-
</>
|
|
72
|
-
),
|
|
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
|
-
};
|
|
114
|
-
case "interfaceGroup":
|
|
115
|
-
return {
|
|
116
|
-
title: "Interface Endpoint Groups",
|
|
117
|
-
description: (
|
|
118
|
-
<>
|
|
119
|
-
Generating interface endpoint groups.
|
|
120
|
-
<br />
|
|
121
|
-
<br />
|
|
122
|
-
Number of API operation groups would be #{event.groups.length}
|
|
123
|
-
</>
|
|
124
|
-
),
|
|
125
|
-
};
|
|
126
|
-
case "realizeTestReset":
|
|
127
|
-
return {
|
|
128
|
-
title: "Realize Test Reset",
|
|
129
|
-
description: "Resetting test environment.",
|
|
130
|
-
};
|
|
131
|
-
default:
|
|
132
|
-
event satisfies never;
|
|
133
|
-
throw new Error("Unknown event type");
|
|
134
|
-
}
|
|
135
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
AutoBeAnalyzeScenarioEvent,
|
|
3
|
+
AutoBeDatabaseAuthorizationEvent,
|
|
4
|
+
AutoBeDatabaseAuthorizationReviewEvent,
|
|
5
|
+
AutoBeDatabaseGroupEvent,
|
|
6
|
+
AutoBeDatabaseGroupReviewEvent,
|
|
7
|
+
AutoBeInterfaceGroupEvent,
|
|
8
|
+
AutoBeRealizeTestResetEvent,
|
|
9
|
+
} from "@autobe/interface";
|
|
10
|
+
import { JSX } from "react";
|
|
11
|
+
|
|
12
|
+
import { EventCard, EventContent, EventHeader } from "./common";
|
|
13
|
+
|
|
14
|
+
export interface IAutoBeScenarioEventMovieProps {
|
|
15
|
+
event:
|
|
16
|
+
| AutoBeAnalyzeScenarioEvent
|
|
17
|
+
| AutoBeDatabaseAuthorizationEvent
|
|
18
|
+
| AutoBeDatabaseAuthorizationReviewEvent
|
|
19
|
+
| AutoBeDatabaseGroupEvent
|
|
20
|
+
| AutoBeDatabaseGroupReviewEvent
|
|
21
|
+
| AutoBeInterfaceGroupEvent
|
|
22
|
+
| AutoBeRealizeTestResetEvent;
|
|
23
|
+
}
|
|
24
|
+
export const AutoBeScenarioEventMovie = (
|
|
25
|
+
props: IAutoBeScenarioEventMovieProps,
|
|
26
|
+
) => {
|
|
27
|
+
const { event } = props;
|
|
28
|
+
const { title, description } = getState(event);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<EventCard>
|
|
32
|
+
<EventHeader title={title} timestamp={event.created_at} iconType="info" />
|
|
33
|
+
<EventContent>{description}</EventContent>
|
|
34
|
+
</EventCard>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
export default AutoBeScenarioEventMovie;
|
|
38
|
+
|
|
39
|
+
interface IState {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string | JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getState(event: IAutoBeScenarioEventMovieProps["event"]): IState {
|
|
45
|
+
switch (event.type) {
|
|
46
|
+
case "analyzeScenario":
|
|
47
|
+
return {
|
|
48
|
+
title: "Analyze Scenario",
|
|
49
|
+
description: (
|
|
50
|
+
<>
|
|
51
|
+
Generating analysis report.
|
|
52
|
+
<br />
|
|
53
|
+
<br />
|
|
54
|
+
Number of documents to write: #{event.files.length}
|
|
55
|
+
</>
|
|
56
|
+
),
|
|
57
|
+
};
|
|
58
|
+
case "databaseGroup":
|
|
59
|
+
return {
|
|
60
|
+
title: "Database Group",
|
|
61
|
+
description: (
|
|
62
|
+
<>
|
|
63
|
+
Generating Database groups.
|
|
64
|
+
<br />
|
|
65
|
+
<br />
|
|
66
|
+
Number of Database groups would be:
|
|
67
|
+
<br />
|
|
68
|
+
<ul>
|
|
69
|
+
<li>namespaces: #{event.groups.length}</li>
|
|
70
|
+
</ul>
|
|
71
|
+
</>
|
|
72
|
+
),
|
|
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
|
+
};
|
|
114
|
+
case "interfaceGroup":
|
|
115
|
+
return {
|
|
116
|
+
title: "Interface Endpoint Groups",
|
|
117
|
+
description: (
|
|
118
|
+
<>
|
|
119
|
+
Generating interface endpoint groups.
|
|
120
|
+
<br />
|
|
121
|
+
<br />
|
|
122
|
+
Number of API operation groups would be #{event.groups.length}
|
|
123
|
+
</>
|
|
124
|
+
),
|
|
125
|
+
};
|
|
126
|
+
case "realizeTestReset":
|
|
127
|
+
return {
|
|
128
|
+
title: "Realize Test Reset",
|
|
129
|
+
description: "Resetting test environment.",
|
|
130
|
+
};
|
|
131
|
+
default:
|
|
132
|
+
event satisfies never;
|
|
133
|
+
throw new Error("Unknown event type");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutoBeAnalyzeStartEvent,
|
|
3
|
-
AutoBeDatabaseStartEvent,
|
|
4
|
-
AutoBeInterfaceStartEvent,
|
|
5
|
-
AutoBeRealizeAuthorizationStartEvent,
|
|
6
|
-
AutoBeRealizeStartEvent,
|
|
7
|
-
AutoBeRealizeTestStartEvent,
|
|
8
|
-
AutoBeTestStartEvent,
|
|
9
|
-
} from "@autobe/interface";
|
|
10
|
-
|
|
11
|
-
interface IAutoBeStartEventProps {
|
|
12
|
-
event:
|
|
13
|
-
| AutoBeAnalyzeStartEvent
|
|
14
|
-
| AutoBeDatabaseStartEvent
|
|
15
|
-
| AutoBeInterfaceStartEvent
|
|
16
|
-
| AutoBeTestStartEvent
|
|
17
|
-
| AutoBeRealizeStartEvent
|
|
18
|
-
| AutoBeRealizeAuthorizationStartEvent
|
|
19
|
-
| AutoBeRealizeTestStartEvent;
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const AutoBeStartEventMovie = (props: IAutoBeStartEventProps) => {
|
|
25
|
-
const { event } = props;
|
|
26
|
-
const title = getTitle(event);
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
style={{
|
|
31
|
-
display: "flex",
|
|
32
|
-
justifyContent: "center",
|
|
33
|
-
marginBottom: "1rem",
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
<div
|
|
37
|
-
className={props.className}
|
|
38
|
-
style={{
|
|
39
|
-
backgroundColor: "#f0f0f0",
|
|
40
|
-
border: "1px solid #e0e0e0",
|
|
41
|
-
borderRadius: "0.5rem",
|
|
42
|
-
padding: "0.5rem 1rem",
|
|
43
|
-
...props.style,
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
<div
|
|
47
|
-
style={{
|
|
48
|
-
fontSize: "0.875rem",
|
|
49
|
-
color: "#666",
|
|
50
|
-
fontWeight: "medium",
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
🚀 {title} has started.
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
function getTitle(event: IAutoBeStartEventProps["event"]): string {
|
|
61
|
-
switch (event.type) {
|
|
62
|
-
case "analyzeStart":
|
|
63
|
-
return "Analyze";
|
|
64
|
-
case "databaseStart":
|
|
65
|
-
return "Database";
|
|
66
|
-
case "interfaceStart":
|
|
67
|
-
return "Interface";
|
|
68
|
-
case "testStart":
|
|
69
|
-
return "Test";
|
|
70
|
-
case "realizeStart":
|
|
71
|
-
return "Realize";
|
|
72
|
-
case "realizeAuthorizationStart":
|
|
73
|
-
return "Realize Authorization";
|
|
74
|
-
case "realizeTestStart":
|
|
75
|
-
return "Final E2E Test";
|
|
76
|
-
default:
|
|
77
|
-
event satisfies never;
|
|
78
|
-
throw new Error("Unknown event type"); // unreachable
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export default AutoBeStartEventMovie;
|
|
1
|
+
import {
|
|
2
|
+
AutoBeAnalyzeStartEvent,
|
|
3
|
+
AutoBeDatabaseStartEvent,
|
|
4
|
+
AutoBeInterfaceStartEvent,
|
|
5
|
+
AutoBeRealizeAuthorizationStartEvent,
|
|
6
|
+
AutoBeRealizeStartEvent,
|
|
7
|
+
AutoBeRealizeTestStartEvent,
|
|
8
|
+
AutoBeTestStartEvent,
|
|
9
|
+
} from "@autobe/interface";
|
|
10
|
+
|
|
11
|
+
interface IAutoBeStartEventProps {
|
|
12
|
+
event:
|
|
13
|
+
| AutoBeAnalyzeStartEvent
|
|
14
|
+
| AutoBeDatabaseStartEvent
|
|
15
|
+
| AutoBeInterfaceStartEvent
|
|
16
|
+
| AutoBeTestStartEvent
|
|
17
|
+
| AutoBeRealizeStartEvent
|
|
18
|
+
| AutoBeRealizeAuthorizationStartEvent
|
|
19
|
+
| AutoBeRealizeTestStartEvent;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const AutoBeStartEventMovie = (props: IAutoBeStartEventProps) => {
|
|
25
|
+
const { event } = props;
|
|
26
|
+
const title = getTitle(event);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div
|
|
30
|
+
style={{
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
marginBottom: "1rem",
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<div
|
|
37
|
+
className={props.className}
|
|
38
|
+
style={{
|
|
39
|
+
backgroundColor: "#f0f0f0",
|
|
40
|
+
border: "1px solid #e0e0e0",
|
|
41
|
+
borderRadius: "0.5rem",
|
|
42
|
+
padding: "0.5rem 1rem",
|
|
43
|
+
...props.style,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
style={{
|
|
48
|
+
fontSize: "0.875rem",
|
|
49
|
+
color: "#666",
|
|
50
|
+
fontWeight: "medium",
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
🚀 {title} has started.
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
function getTitle(event: IAutoBeStartEventProps["event"]): string {
|
|
61
|
+
switch (event.type) {
|
|
62
|
+
case "analyzeStart":
|
|
63
|
+
return "Analyze";
|
|
64
|
+
case "databaseStart":
|
|
65
|
+
return "Database";
|
|
66
|
+
case "interfaceStart":
|
|
67
|
+
return "Interface";
|
|
68
|
+
case "testStart":
|
|
69
|
+
return "Test";
|
|
70
|
+
case "realizeStart":
|
|
71
|
+
return "Realize";
|
|
72
|
+
case "realizeAuthorizationStart":
|
|
73
|
+
return "Realize Authorization";
|
|
74
|
+
case "realizeTestStart":
|
|
75
|
+
return "Final E2E Test";
|
|
76
|
+
default:
|
|
77
|
+
event satisfies never;
|
|
78
|
+
throw new Error("Unknown event type"); // unreachable
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default AutoBeStartEventMovie;
|