v0.20.0: thinking blocks, chat windows overhaul, scroll fix
Backend: - Add isThinking flag to agentEvent for text before tool calls - Separate thinking from response text in runChatTurn and continue.go - Persist thinking in a dedicated field in message content Frontend: - Add thinking field to MessageContent, ChatMessage, ChatTextEvent types - Create ThinkingBlock.svelte — collapsible block with brain icon - SSE handler moves text_delta content to thinking on isThinking flag - Render thinking block between tools and response in ChatThread - Fix chat window scroll reset on focus change (stable windowKeys order) - Remove redundant #key id wrapper in WindowLayer - Enlarge sidebar rail (24→32 default, 40→60 max) - Remove glyph from sidebar, square graph at top - Replace AgentTrace/ToolCallCard/UnifiedTimeline with TurnTrace/ToolLine
This commit is contained in:
@@ -51,6 +51,22 @@ export const dk = createDesktop(wm, {
|
||||
})
|
||||
export const wmState = wmStore(wm)
|
||||
|
||||
// Stable insertion-order window IDs — unlike $wmState.order (which reorders on
|
||||
// focus/raise), this only changes when a window is opened or closed. Used by
|
||||
// WindowLayer's {#each} so the DOM order stays stable; wmkit handles visual
|
||||
// stacking via z-index in syncAll(). Without this, every focus change moves
|
||||
// <section> elements in the DOM, which resets scroll positions of scrollable
|
||||
// children in Chrome.
|
||||
let _lastKeys: string[] = []
|
||||
export const windowKeys = derived(wmState, ($s) => {
|
||||
const keys = Object.keys($s.windows)
|
||||
if (keys.length === _lastKeys.length && keys.every((k, i) => k === _lastKeys[i])) {
|
||||
return _lastKeys
|
||||
}
|
||||
_lastKeys = keys
|
||||
return keys
|
||||
})
|
||||
|
||||
// The session id backing whichever task/chat window currently has focus, or
|
||||
// null when no task window is focused (Tasks app, an entity window, or
|
||||
// nothing at all). The desktop mascot's stimuli (stimuli.ts) key off this so
|
||||
|
||||
Reference in New Issue
Block a user