@autobe/ui 0.30.2 → 0.30.4-dev.20260324

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 (69) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +261 -0
  3. package/lib/components/AutoBeChatMain.d.ts +6 -0
  4. package/lib/components/AutoBeChatMain.js +46 -37
  5. package/lib/components/AutoBeChatMain.js.map +1 -1
  6. package/lib/components/AutoBeConfigModal.js +9 -9
  7. package/lib/components/events/AutoBeEventMovie.js +0 -4
  8. package/lib/components/events/AutoBeEventMovie.js.map +1 -1
  9. package/lib/components/events/AutoBeProgressEventMovie.js +0 -10
  10. package/lib/components/events/AutoBeProgressEventMovie.js.map +1 -1
  11. package/lib/components/upload/AutoBeChatUploadBox.d.ts +1 -0
  12. package/lib/components/upload/AutoBeChatUploadBox.js +11 -16
  13. package/lib/components/upload/AutoBeChatUploadBox.js.map +1 -1
  14. package/lib/context/AutoBeAgentContext.js +78 -30
  15. package/lib/context/AutoBeAgentContext.js.map +1 -1
  16. package/lib/context/SearchParamsContext.js +1 -1
  17. package/lib/context/SearchParamsContext.js.map +1 -1
  18. package/lib/structure/AutoBeListener.d.ts +1 -0
  19. package/lib/structure/AutoBeListener.js +9 -11
  20. package/lib/structure/AutoBeListener.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/components/AutoBeAssistantMessageMovie.tsx +22 -22
  23. package/src/components/AutoBeChatMain.tsx +394 -376
  24. package/src/components/AutoBeChatSidebar.tsx +414 -414
  25. package/src/components/AutoBeConfigButton.tsx +83 -83
  26. package/src/components/AutoBeConfigModal.tsx +443 -443
  27. package/src/components/AutoBeStatusButton.tsx +75 -75
  28. package/src/components/AutoBeStatusModal.tsx +486 -486
  29. package/src/components/AutoBeUserMessageMovie.tsx +27 -27
  30. package/src/components/common/ActionButton.tsx +205 -205
  31. package/src/components/common/ActionButtonGroup.tsx +80 -80
  32. package/src/components/common/AutoBeConfigInput.tsx +185 -185
  33. package/src/components/common/ChatBubble.tsx +119 -119
  34. package/src/components/common/Collapsible.tsx +95 -95
  35. package/src/components/common/CompactSessionIndicator.tsx +73 -73
  36. package/src/components/common/CompactSessionList.tsx +82 -82
  37. package/src/components/common/openai/OpenAIContent.tsx +53 -53
  38. package/src/components/common/openai/OpenAIUserAudioContent.tsx +70 -70
  39. package/src/components/common/openai/OpenAIUserFileContent.tsx +76 -76
  40. package/src/components/common/openai/OpenAIUserImageContent.tsx +34 -34
  41. package/src/components/common/openai/OpenAIUserTextContent.tsx +15 -15
  42. package/src/components/events/AutoBeCompleteEventMovie.tsx +402 -402
  43. package/src/components/events/AutoBeCorrectEventMovie.tsx +354 -354
  44. package/src/components/events/AutoBeEventGroupMovie.tsx +18 -18
  45. package/src/components/events/AutoBeEventMovie.tsx +154 -158
  46. package/src/components/events/AutoBeProgressEventMovie.tsx +207 -217
  47. package/src/components/events/AutoBeScenarioEventMovie.tsx +135 -135
  48. package/src/components/events/AutoBeStartEventMovie.tsx +82 -82
  49. package/src/components/events/AutoBeValidateEventMovie.tsx +249 -249
  50. package/src/components/events/README.md +300 -300
  51. package/src/components/events/common/CollapsibleEventGroup.tsx +211 -211
  52. package/src/components/events/common/EventCard.tsx +61 -61
  53. package/src/components/events/common/EventContent.tsx +31 -31
  54. package/src/components/events/common/EventHeader.tsx +85 -85
  55. package/src/components/events/common/EventIcon.tsx +82 -82
  56. package/src/components/events/common/ProgressBar.tsx +64 -64
  57. package/src/components/events/groups/CorrectEventGroup.tsx +183 -183
  58. package/src/components/events/groups/ValidateEventGroup.tsx +143 -143
  59. package/src/components/events/utils/eventGrouper.tsx +116 -116
  60. package/src/components/upload/AutoBeChatUploadBox.tsx +433 -425
  61. package/src/components/upload/AutoBeChatUploadSendButton.tsx +66 -66
  62. package/src/components/upload/AutoBeFileUploadBox.tsx +123 -123
  63. package/src/components/upload/AutoBeVoiceRecoderButton.tsx +100 -100
  64. package/src/context/AutoBeAgentContext.tsx +301 -245
  65. package/src/context/AutoBeAgentSessionList.tsx +58 -58
  66. package/src/context/SearchParamsContext.tsx +49 -49
  67. package/src/icons/Receipt.tsx +74 -74
  68. package/src/structure/AutoBeListener.ts +368 -373
  69. package/tsconfig.json +9 -9
@@ -1,183 +1,183 @@
1
- import {
2
- AutoBeDatabaseCorrectEvent,
3
- AutoBeRealizeAuthorizationCorrectEvent,
4
- AutoBeRealizeCorrectEvent,
5
- AutoBeTestCorrectEvent,
6
- } from "@autobe/interface";
7
-
8
- import { AutoBeCorrectEventMovie } from "../AutoBeCorrectEventMovie";
9
- import { CollapsibleEventGroup } from "../common/CollapsibleEventGroup";
10
-
11
- type CorrectEvent =
12
- | AutoBeDatabaseCorrectEvent
13
- | AutoBeTestCorrectEvent
14
- | AutoBeRealizeCorrectEvent
15
- | AutoBeRealizeAuthorizationCorrectEvent;
16
-
17
- export interface ICorrectEventGroupProps {
18
- events: CorrectEvent[];
19
- defaultCollapsed?: boolean;
20
- }
21
-
22
- /**
23
- * Specialized group component for correction events Shows correction summary
24
- * and statistics
25
- */
26
- export const CorrectEventGroup = (props: ICorrectEventGroupProps) => {
27
- const { events, defaultCollapsed = true } = props;
28
-
29
- if (events.length === 0) {
30
- return null;
31
- }
32
-
33
- // Calculate correction statistics
34
- const eventTypes = Array.from(new Set(events.map((e) => e.type)));
35
- const eventTypeCounts = eventTypes.reduce(
36
- (acc, type) => {
37
- acc[type] = events.filter((e) => e.type === type).length;
38
- return acc;
39
- },
40
- {} as Record<string, number>,
41
- );
42
-
43
- // Get latest step numbers for each event type
44
- const latestSteps = eventTypes.reduce(
45
- (acc, type) => {
46
- const eventsOfType = events.filter((e) => e.type === type);
47
- acc[type] = Math.max(...eventsOfType.map((e) => e.step));
48
- return acc;
49
- },
50
- {} as Record<string, number>,
51
- );
52
-
53
- const renderSummary = (events: CorrectEvent[]) => (
54
- <>
55
- Correction events showing AI self-improvement feedback loop
56
- <br />
57
- <br />
58
- <strong>Success Rate:</strong> 100% (All corrections applied successfully)
59
- <br />
60
- <strong>Total Corrections:</strong> {events.length} events
61
- <br />
62
- <strong>Event Types:</strong> {eventTypes.join(", ")}
63
- <br />
64
- <br />
65
- <div
66
- style={{
67
- display: "flex",
68
- flexDirection: "column",
69
- gap: "0.5rem",
70
- }}
71
- >
72
- {eventTypes.map((type) => {
73
- const typeDisplayNames = {
74
- databaseCorrect: "🗄️ Database Schema",
75
- testCorrect: "🧪 Test Suite",
76
- realizeCorrect: "⚙️ Implementation",
77
- realizeAuthorizationCorrect: "🔐 Authorization",
78
- };
79
-
80
- return (
81
- <div
82
- key={type}
83
- style={{
84
- display: "flex",
85
- justifyContent: "space-between",
86
- alignItems: "center",
87
- padding: "0.5rem",
88
- backgroundColor: "#f0fdf4",
89
- borderRadius: "0.25rem",
90
- border: "1px solid #bbf7d0",
91
- }}
92
- >
93
- <span style={{ fontSize: "0.75rem", fontWeight: "500" }}>
94
- {typeDisplayNames[type as keyof typeof typeDisplayNames] ||
95
- type}
96
- </span>
97
- <div
98
- style={{ display: "flex", gap: "1rem", alignItems: "center" }}
99
- >
100
- <span style={{ fontSize: "0.75rem", color: "#16a34a" }}>
101
- {eventTypeCounts[type]} corrections
102
- </span>
103
- <span
104
- style={{
105
- fontSize: "0.625rem",
106
- color: "#64748b",
107
- fontFamily: "monospace",
108
- backgroundColor: "#e2e8f0",
109
- padding: "0.125rem 0.375rem",
110
- borderRadius: "0.25rem",
111
- }}
112
- >
113
- Step {latestSteps[type]}
114
- </span>
115
- </div>
116
- </div>
117
- );
118
- })}
119
- </div>
120
- <br />
121
- <div
122
- style={{
123
- display: "flex",
124
- gap: "0.5rem",
125
- alignItems: "center",
126
- }}
127
- >
128
- <div
129
- style={{
130
- display: "flex",
131
- alignItems: "center",
132
- gap: "0.25rem",
133
- }}
134
- >
135
- <div
136
- style={{
137
- width: "12px",
138
- height: "12px",
139
- backgroundColor: "#16a34a",
140
- borderRadius: "2px",
141
- }}
142
- />
143
- <span style={{ fontSize: "0.75rem" }}>
144
- Corrected: {events.length}
145
- </span>
146
- </div>
147
- <div
148
- style={{
149
- display: "flex",
150
- alignItems: "center",
151
- gap: "0.25rem",
152
- }}
153
- >
154
- <div
155
- style={{
156
- width: "12px",
157
- height: "12px",
158
- backgroundColor: "#10b981",
159
- borderRadius: "2px",
160
- }}
161
- />
162
- <span style={{ fontSize: "0.75rem" }}>Self-Improvement Active</span>
163
- </div>
164
- </div>
165
- </>
166
- );
167
-
168
- return (
169
- <CollapsibleEventGroup
170
- events={events}
171
- title="Correction Events"
172
- iconType="success"
173
- variant="success"
174
- getTimestamp={(event) => event.created_at}
175
- renderEvent={(event) => <AutoBeCorrectEventMovie event={event} />}
176
- renderSummary={renderSummary}
177
- defaultCollapsed={defaultCollapsed}
178
- description="AI self-correction and improvement events"
179
- />
180
- );
181
- };
182
-
183
- export default CorrectEventGroup;
1
+ import {
2
+ AutoBeDatabaseCorrectEvent,
3
+ AutoBeRealizeAuthorizationCorrectEvent,
4
+ AutoBeRealizeCorrectEvent,
5
+ AutoBeTestCorrectEvent,
6
+ } from "@autobe/interface";
7
+
8
+ import { AutoBeCorrectEventMovie } from "../AutoBeCorrectEventMovie";
9
+ import { CollapsibleEventGroup } from "../common/CollapsibleEventGroup";
10
+
11
+ type CorrectEvent =
12
+ | AutoBeDatabaseCorrectEvent
13
+ | AutoBeTestCorrectEvent
14
+ | AutoBeRealizeCorrectEvent
15
+ | AutoBeRealizeAuthorizationCorrectEvent;
16
+
17
+ export interface ICorrectEventGroupProps {
18
+ events: CorrectEvent[];
19
+ defaultCollapsed?: boolean;
20
+ }
21
+
22
+ /**
23
+ * Specialized group component for correction events Shows correction summary
24
+ * and statistics
25
+ */
26
+ export const CorrectEventGroup = (props: ICorrectEventGroupProps) => {
27
+ const { events, defaultCollapsed = true } = props;
28
+
29
+ if (events.length === 0) {
30
+ return null;
31
+ }
32
+
33
+ // Calculate correction statistics
34
+ const eventTypes = Array.from(new Set(events.map((e) => e.type)));
35
+ const eventTypeCounts = eventTypes.reduce(
36
+ (acc, type) => {
37
+ acc[type] = events.filter((e) => e.type === type).length;
38
+ return acc;
39
+ },
40
+ {} as Record<string, number>,
41
+ );
42
+
43
+ // Get latest step numbers for each event type
44
+ const latestSteps = eventTypes.reduce(
45
+ (acc, type) => {
46
+ const eventsOfType = events.filter((e) => e.type === type);
47
+ acc[type] = Math.max(...eventsOfType.map((e) => e.step));
48
+ return acc;
49
+ },
50
+ {} as Record<string, number>,
51
+ );
52
+
53
+ const renderSummary = (events: CorrectEvent[]) => (
54
+ <>
55
+ Correction events showing AI self-improvement feedback loop
56
+ <br />
57
+ <br />
58
+ <strong>Success Rate:</strong> 100% (All corrections applied successfully)
59
+ <br />
60
+ <strong>Total Corrections:</strong> {events.length} events
61
+ <br />
62
+ <strong>Event Types:</strong> {eventTypes.join(", ")}
63
+ <br />
64
+ <br />
65
+ <div
66
+ style={{
67
+ display: "flex",
68
+ flexDirection: "column",
69
+ gap: "0.5rem",
70
+ }}
71
+ >
72
+ {eventTypes.map((type) => {
73
+ const typeDisplayNames = {
74
+ databaseCorrect: "🗄️ Database Schema",
75
+ testCorrect: "🧪 Test Suite",
76
+ realizeCorrect: "⚙️ Implementation",
77
+ realizeAuthorizationCorrect: "🔐 Authorization",
78
+ };
79
+
80
+ return (
81
+ <div
82
+ key={type}
83
+ style={{
84
+ display: "flex",
85
+ justifyContent: "space-between",
86
+ alignItems: "center",
87
+ padding: "0.5rem",
88
+ backgroundColor: "#f0fdf4",
89
+ borderRadius: "0.25rem",
90
+ border: "1px solid #bbf7d0",
91
+ }}
92
+ >
93
+ <span style={{ fontSize: "0.75rem", fontWeight: "500" }}>
94
+ {typeDisplayNames[type as keyof typeof typeDisplayNames] ||
95
+ type}
96
+ </span>
97
+ <div
98
+ style={{ display: "flex", gap: "1rem", alignItems: "center" }}
99
+ >
100
+ <span style={{ fontSize: "0.75rem", color: "#16a34a" }}>
101
+ {eventTypeCounts[type]} corrections
102
+ </span>
103
+ <span
104
+ style={{
105
+ fontSize: "0.625rem",
106
+ color: "#64748b",
107
+ fontFamily: "monospace",
108
+ backgroundColor: "#e2e8f0",
109
+ padding: "0.125rem 0.375rem",
110
+ borderRadius: "0.25rem",
111
+ }}
112
+ >
113
+ Step {latestSteps[type]}
114
+ </span>
115
+ </div>
116
+ </div>
117
+ );
118
+ })}
119
+ </div>
120
+ <br />
121
+ <div
122
+ style={{
123
+ display: "flex",
124
+ gap: "0.5rem",
125
+ alignItems: "center",
126
+ }}
127
+ >
128
+ <div
129
+ style={{
130
+ display: "flex",
131
+ alignItems: "center",
132
+ gap: "0.25rem",
133
+ }}
134
+ >
135
+ <div
136
+ style={{
137
+ width: "12px",
138
+ height: "12px",
139
+ backgroundColor: "#16a34a",
140
+ borderRadius: "2px",
141
+ }}
142
+ />
143
+ <span style={{ fontSize: "0.75rem" }}>
144
+ Corrected: {events.length}
145
+ </span>
146
+ </div>
147
+ <div
148
+ style={{
149
+ display: "flex",
150
+ alignItems: "center",
151
+ gap: "0.25rem",
152
+ }}
153
+ >
154
+ <div
155
+ style={{
156
+ width: "12px",
157
+ height: "12px",
158
+ backgroundColor: "#10b981",
159
+ borderRadius: "2px",
160
+ }}
161
+ />
162
+ <span style={{ fontSize: "0.75rem" }}>Self-Improvement Active</span>
163
+ </div>
164
+ </div>
165
+ </>
166
+ );
167
+
168
+ return (
169
+ <CollapsibleEventGroup
170
+ events={events}
171
+ title="Correction Events"
172
+ iconType="success"
173
+ variant="success"
174
+ getTimestamp={(event) => event.created_at}
175
+ renderEvent={(event) => <AutoBeCorrectEventMovie event={event} />}
176
+ renderSummary={renderSummary}
177
+ defaultCollapsed={defaultCollapsed}
178
+ description="AI self-correction and improvement events"
179
+ />
180
+ );
181
+ };
182
+
183
+ export default CorrectEventGroup;
@@ -1,143 +1,143 @@
1
- import {
2
- AutoBeDatabaseValidateEvent,
3
- AutoBeInterfaceOperationReviewEvent,
4
- AutoBeRealizeAuthorizationValidateEvent,
5
- AutoBeRealizeValidateEvent,
6
- AutoBeTestValidateEvent,
7
- } from "@autobe/interface";
8
-
9
- import { AutoBeValidateEventMovie } from "../AutoBeValidateEventMovie";
10
- import { CollapsibleEventGroup } from "../common/CollapsibleEventGroup";
11
-
12
- export type ValidateEvent =
13
- | AutoBeDatabaseValidateEvent
14
- | AutoBeInterfaceOperationReviewEvent
15
- | AutoBeTestValidateEvent
16
- | AutoBeRealizeValidateEvent
17
- | AutoBeRealizeAuthorizationValidateEvent;
18
-
19
- export interface IValidateEventGroupProps {
20
- events: ValidateEvent[];
21
- defaultCollapsed?: boolean;
22
- }
23
-
24
- /**
25
- * Specialized group component for validation events Shows validation summary
26
- * and error statistics
27
- */
28
- export const ValidateEventGroup = (props: IValidateEventGroupProps) => {
29
- const { events, defaultCollapsed = true } = props;
30
-
31
- if (events.length === 0) {
32
- return null;
33
- }
34
-
35
- // Calculate validation statistics
36
- const errorEvents = events.filter((event) => {
37
- switch (event.type) {
38
- case "databaseValidate":
39
- case "realizeValidate":
40
- return true;
41
- case "testValidate":
42
- case "realizeAuthorizationValidate":
43
- return event.result.type !== "success";
44
- case "interfaceOperationReview":
45
- default:
46
- return false;
47
- }
48
- }).length;
49
-
50
- const successEvents = events.length - errorEvents;
51
- const eventTypes = Array.from(new Set(events.map((e) => e.type)));
52
-
53
- const renderSummary = (events: ValidateEvent[]) => (
54
- <>
55
- Validation and review events from various components
56
- <br />
57
- <br />
58
- <strong>Success Rate:</strong>{" "}
59
- {events.length > 0
60
- ? Math.round((successEvents / events.length) * 100)
61
- : 0}
62
- %
63
- <br />
64
- <strong>Successful:</strong> {successEvents} events
65
- <br />
66
- <strong>Failed/Issues:</strong> {errorEvents} events
67
- <br />
68
- <strong>Event Types:</strong> {eventTypes.join(", ")}
69
- <br />
70
- <br />
71
- <div
72
- style={{
73
- display: "flex",
74
- gap: "0.5rem",
75
- alignItems: "center",
76
- }}
77
- >
78
- <div
79
- style={{
80
- display: "flex",
81
- alignItems: "center",
82
- gap: "0.25rem",
83
- }}
84
- >
85
- <div
86
- style={{
87
- width: "12px",
88
- height: "12px",
89
- backgroundColor: "#4caf50",
90
- borderRadius: "2px",
91
- }}
92
- />
93
- <span style={{ fontSize: "0.75rem" }}>Success: {successEvents}</span>
94
- </div>
95
- <div
96
- style={{
97
- display: "flex",
98
- alignItems: "center",
99
- gap: "0.25rem",
100
- }}
101
- >
102
- <div
103
- style={{
104
- width: "12px",
105
- height: "12px",
106
- backgroundColor: "#f59e0b",
107
- borderRadius: "2px",
108
- }}
109
- />
110
- <span style={{ fontSize: "0.75rem" }}>Issues: {errorEvents}</span>
111
- </div>
112
- </div>
113
- </>
114
- );
115
-
116
- const getGroupIconType = () => {
117
- if (errorEvents === 0) return "success"; // All successful
118
- if (successEvents === 0) return "warning"; // All failed
119
- return "warning"; // Mixed results
120
- };
121
-
122
- const getGroupVariant = () => {
123
- if (errorEvents === 0) return "success"; // All successful
124
- if (successEvents === 0) return "warning"; // All failed
125
- return "warning"; // Mixed results
126
- };
127
-
128
- return (
129
- <CollapsibleEventGroup
130
- events={events}
131
- title="Validation Events"
132
- iconType={getGroupIconType()}
133
- variant={getGroupVariant()}
134
- getTimestamp={(event) => event.created_at}
135
- renderEvent={(event) => <AutoBeValidateEventMovie event={event} />}
136
- renderSummary={renderSummary}
137
- defaultCollapsed={defaultCollapsed}
138
- description="Validation and review events"
139
- />
140
- );
141
- };
142
-
143
- export default ValidateEventGroup;
1
+ import {
2
+ AutoBeDatabaseValidateEvent,
3
+ AutoBeInterfaceOperationReviewEvent,
4
+ AutoBeRealizeAuthorizationValidateEvent,
5
+ AutoBeRealizeValidateEvent,
6
+ AutoBeTestValidateEvent,
7
+ } from "@autobe/interface";
8
+
9
+ import { AutoBeValidateEventMovie } from "../AutoBeValidateEventMovie";
10
+ import { CollapsibleEventGroup } from "../common/CollapsibleEventGroup";
11
+
12
+ export type ValidateEvent =
13
+ | AutoBeDatabaseValidateEvent
14
+ | AutoBeInterfaceOperationReviewEvent
15
+ | AutoBeTestValidateEvent
16
+ | AutoBeRealizeValidateEvent
17
+ | AutoBeRealizeAuthorizationValidateEvent;
18
+
19
+ export interface IValidateEventGroupProps {
20
+ events: ValidateEvent[];
21
+ defaultCollapsed?: boolean;
22
+ }
23
+
24
+ /**
25
+ * Specialized group component for validation events Shows validation summary
26
+ * and error statistics
27
+ */
28
+ export const ValidateEventGroup = (props: IValidateEventGroupProps) => {
29
+ const { events, defaultCollapsed = true } = props;
30
+
31
+ if (events.length === 0) {
32
+ return null;
33
+ }
34
+
35
+ // Calculate validation statistics
36
+ const errorEvents = events.filter((event) => {
37
+ switch (event.type) {
38
+ case "databaseValidate":
39
+ case "realizeValidate":
40
+ return true;
41
+ case "testValidate":
42
+ case "realizeAuthorizationValidate":
43
+ return event.result.type !== "success";
44
+ case "interfaceOperationReview":
45
+ default:
46
+ return false;
47
+ }
48
+ }).length;
49
+
50
+ const successEvents = events.length - errorEvents;
51
+ const eventTypes = Array.from(new Set(events.map((e) => e.type)));
52
+
53
+ const renderSummary = (events: ValidateEvent[]) => (
54
+ <>
55
+ Validation and review events from various components
56
+ <br />
57
+ <br />
58
+ <strong>Success Rate:</strong>{" "}
59
+ {events.length > 0
60
+ ? Math.round((successEvents / events.length) * 100)
61
+ : 0}
62
+ %
63
+ <br />
64
+ <strong>Successful:</strong> {successEvents} events
65
+ <br />
66
+ <strong>Failed/Issues:</strong> {errorEvents} events
67
+ <br />
68
+ <strong>Event Types:</strong> {eventTypes.join(", ")}
69
+ <br />
70
+ <br />
71
+ <div
72
+ style={{
73
+ display: "flex",
74
+ gap: "0.5rem",
75
+ alignItems: "center",
76
+ }}
77
+ >
78
+ <div
79
+ style={{
80
+ display: "flex",
81
+ alignItems: "center",
82
+ gap: "0.25rem",
83
+ }}
84
+ >
85
+ <div
86
+ style={{
87
+ width: "12px",
88
+ height: "12px",
89
+ backgroundColor: "#4caf50",
90
+ borderRadius: "2px",
91
+ }}
92
+ />
93
+ <span style={{ fontSize: "0.75rem" }}>Success: {successEvents}</span>
94
+ </div>
95
+ <div
96
+ style={{
97
+ display: "flex",
98
+ alignItems: "center",
99
+ gap: "0.25rem",
100
+ }}
101
+ >
102
+ <div
103
+ style={{
104
+ width: "12px",
105
+ height: "12px",
106
+ backgroundColor: "#f59e0b",
107
+ borderRadius: "2px",
108
+ }}
109
+ />
110
+ <span style={{ fontSize: "0.75rem" }}>Issues: {errorEvents}</span>
111
+ </div>
112
+ </div>
113
+ </>
114
+ );
115
+
116
+ const getGroupIconType = () => {
117
+ if (errorEvents === 0) return "success"; // All successful
118
+ if (successEvents === 0) return "warning"; // All failed
119
+ return "warning"; // Mixed results
120
+ };
121
+
122
+ const getGroupVariant = () => {
123
+ if (errorEvents === 0) return "success"; // All successful
124
+ if (successEvents === 0) return "warning"; // All failed
125
+ return "warning"; // Mixed results
126
+ };
127
+
128
+ return (
129
+ <CollapsibleEventGroup
130
+ events={events}
131
+ title="Validation Events"
132
+ iconType={getGroupIconType()}
133
+ variant={getGroupVariant()}
134
+ getTimestamp={(event) => event.created_at}
135
+ renderEvent={(event) => <AutoBeValidateEventMovie event={event} />}
136
+ renderSummary={renderSummary}
137
+ defaultCollapsed={defaultCollapsed}
138
+ description="Validation and review events"
139
+ />
140
+ );
141
+ };
142
+
143
+ export default ValidateEventGroup;