tool timeline in sidebar + compact chat tools + scroll fixes
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

- SessionDigest now includes live tool timeline, plan steps, knowledge
- ToolCallGroup compact: single-line with collapsible names only (no JSON)
- Activity bar moved to bottom of messages, smart scroll respects user position
- setGoal now sets status=executing (removed stuck planning state)
- PlanProgress merged into SessionDigest, removed from TaskContextPanel
- New toolTimeline derived store in chat.ts
This commit is contained in:
2026-07-14 11:45:36 +02:00
parent cc6bcdceaa
commit 04677fdf4b
6 changed files with 191 additions and 103 deletions

View File

@@ -1,4 +1,4 @@
import { writable, get } from 'svelte/store'
import { writable, derived, get } from 'svelte/store'
import { streamChat, fetchSessions, fetchMessages, deleteSession as apiDeleteSession } from '$lib/api'
import type { ChatEvent, Session, Message } from '$lib/api'
@@ -81,6 +81,36 @@ export function addChatError(message: string, action?: string) {
chatErrors.update((e) => [...e, { id: crypto.randomUUID(), message, action }])
}
// ToolTimelineEntry — one tool call from the chat transcript, flattened for
// the sidebar activity timeline. Derived from messages in real time.
export interface ToolTimelineEntry {
id: string
name: string
args?: any
result?: any
error?: string
type: 'tool_use' | 'tool_result'
msgIndex: number // which message this tool belongs to
}
export const toolTimeline = derived(messages, ($msgs) => {
const entries: ToolTimelineEntry[] = []
for (let i = 0; i < $msgs.length; i++) {
for (const t of $msgs[i].tools) {
entries.push({
id: t.id ?? crypto.randomUUID(),
name: t.name,
args: t.args,
result: t.result,
error: t.error,
type: t.type,
msgIndex: i
})
}
}
return entries
})
// Per-session controller tracking. Multiple tasks can stream concurrently
// (see sendMessage's session guard above this used to be a single global
// `activeController`, which meant cancelStream()/newChat() always aborted