fix stuck 'Agent is thinking' + flip activity to old-to-new
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

- AgentIndicator now shows only during stream or when running tools exist
  (not on session status=executing which never cleared)
- Activity timeline: oldest-first ordering (reads top-to-bottom naturally)
- Removed unused liveStatus derivation and currentTask import from Chat
- Plan: Phase A+B+C for activity gaps + plan-approve-once policy
This commit is contained in:
2026-07-14 12:56:42 +02:00
parent 44720b7b30
commit 2ed169d239
4 changed files with 163 additions and 7 deletions

View File

@@ -127,8 +127,8 @@ export const activityLog = derived([messages, planSteps, currentTask], ([$msgs,
})
}
// Sort newest first
entries.sort((a, b) => b.timestamp - a.timestamp)
// Sort oldest first
entries.sort((a, b) => a.timestamp - b.timestamp)
return entries
})

View File

@@ -1,7 +1,6 @@
<script lang="ts">
import { messages, streaming, connectionState, currentSession, sendMessage, cancelStream, reconnect, error, chatErrors, dismissError } from '$lib/stores/chat'
import { activityLog } from '$lib/stores/activity'
import { currentTask } from '$lib/stores/workspace'
import SessionRail from '$lib/components/SessionRail.svelte'
import TaskContextPanel from '$lib/components/TaskContextPanel.svelte'
import InlineApproval from '$lib/components/InlineApproval.svelte'
@@ -103,8 +102,6 @@
if ($streaming) return
sendMessage(q)
}
const liveStatus = $derived($currentTask?.status ?? ($currentSession ? 'active' : null))
</script>
<div class="flex h-full min-h-0">
@@ -152,7 +149,7 @@
</div>
{/each}
<AgentIndicator
active={$streaming || liveStatus === 'executing'}
active={$streaming || $activityLog.some((e) => e.status === 'running')}
lastActivity={$activityLog.find((e) => e.status === 'running') ?? null}
error={$error}
/>