File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1051,7 +1051,7 @@ export const HiveChatView: React.FC = observer(() => {
1051
1051
active = { artifactTab === 'logs' }
1052
1052
onClick = { ( ) => setArtifactTab ( 'logs' ) }
1053
1053
>
1054
- LOGs
1054
+ Logs
1055
1055
</ TabButton >
1056
1056
) }
1057
1057
{ codeArtifact && codeArtifact ?. length > 0 && (
Original file line number Diff line number Diff line change @@ -34,10 +34,13 @@ const CopyButton = styled.button`
34
34
35
35
const LogItem = styled . div `
36
36
padding: 8px;
37
+ border-bottom: 1px solid #444;
37
38
` ;
38
39
39
40
interface SSEEvent {
40
- message : string ;
41
+ event_type : string ;
42
+ id : string ;
43
+ raw : string ;
41
44
}
42
45
43
46
interface SSEMessage {
@@ -79,6 +82,7 @@ const LogsScreenViewer: React.FC<LogsScreenViewerProps> = ({ chatId }) => {
79
82
const sortedLogs = response . data . messages . sort (
80
83
( a , b ) => new Date ( b . updated_at ) . getTime ( ) - new Date ( a . updated_at ) . getTime ( )
81
84
) ;
85
+
82
86
setLogs ( sortedLogs ) ;
83
87
}
84
88
} catch ( error ) {
@@ -91,7 +95,7 @@ const LogsScreenViewer: React.FC<LogsScreenViewerProps> = ({ chatId }) => {
91
95
} , [ chatId , fetchLogs ] ) ;
92
96
93
97
const copyToClipboard = ( ) => {
94
- const logText = logs . map ( ( log ) => log . event . message ) . join ( '\n' ) ;
98
+ const logText = logs . map ( ( log ) => JSON . stringify ( log . event ) ) . join ( '\n' ) ;
95
99
navigator . clipboard . writeText ( logText ) . then ( ( ) => {
96
100
setCopied ( true ) ;
97
101
setTimeout ( ( ) => setCopied ( false ) , 2000 ) ;
@@ -104,7 +108,7 @@ const LogsScreenViewer: React.FC<LogsScreenViewerProps> = ({ chatId }) => {
104
108
{ copied ? < MaterialIcon icon = "check" /> : < MaterialIcon icon = "content_copy" /> }
105
109
</ CopyButton >
106
110
{ logs . length > 0 ? (
107
- logs . map ( ( log ) => < LogItem key = { log . id } > { log . event . message } </ LogItem > )
111
+ logs . map ( ( log ) => < LogItem key = { log . id } > { JSON . stringify ( log . event ) } </ LogItem > )
108
112
) : (
109
113
< LogItem > No logs available.</ LogItem >
110
114
) }
You can’t perform that action at this time.
0 commit comments