fix(ext): clear stale activity on any non-running status

The side panel kept showing the last activity card when a run settled as
`stopped`; clear it for every terminal status instead of an allowlist.
This commit is contained in:
Simon
2026-06-11 19:15:58 +08:00
parent c19891926b
commit e270ba15b5

View File

@@ -80,7 +80,7 @@ export function useAgent(): UseAgentResult {
const handleStatusChange = (e: Event) => { const handleStatusChange = (e: Event) => {
const newStatus = agent.status as AgentStatus const newStatus = agent.status as AgentStatus
setStatus(newStatus) setStatus(newStatus)
if (newStatus === 'idle' || newStatus === 'completed' || newStatus === 'error') { if (newStatus !== 'running') {
setActivity(null) setActivity(null)
} }
} }