fix stuck 'Agent is thinking' + flip activity to old-to-new
- 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:
@@ -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
|
||||
})
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user