File tree 1 file changed +8
-7
lines changed
site/src/components/Resources
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -84,13 +84,13 @@ export const AgentRow: FC<AgentRowProps> = ({
84
84
showApps &&
85
85
( ( agent . status === "connected" && hasAppsToDisplay ) ||
86
86
agent . status === "connecting" ) ;
87
- const logSourceByID = useMemo ( ( ) => {
88
- const sources : { [ id : string ] : WorkspaceAgentLogSource } = { } ;
89
- for ( const source of agent . log_sources ) {
90
- sources [ source . id ] = source ;
91
- }
92
- return sources ;
93
- } , [ agent . log_sources ] ) ;
87
+ const logSourceByID = useMemo ( ( ) => {
88
+ const sources : { [ id : string ] : WorkspaceAgentLogSource } = { } ;
89
+ for ( const source of agent . log_sources ) {
90
+ sources [ source . id ] = source ;
91
+ }
92
+ return sources ;
93
+ } , [ agent . log_sources ] ) ;
94
94
const hasStartupFeatures = Boolean ( agent . logs_length ) ;
95
95
const { proxy } = useProxy ( ) ;
96
96
const [ showLogs , setShowLogs ] = useState (
@@ -427,6 +427,7 @@ const useAgentLogs = (
427
427
useEffect ( ( ) => {
428
428
if ( ! enabled ) {
429
429
socket . current ?. close ( ) ;
430
+ setLogs ( [ ] ) ;
430
431
return ;
431
432
}
432
433
You can’t perform that action at this time.
0 commit comments