- Added 'New Session' button in header with confirmation dialog
- Clears frontend messages, streaming content, and loading state
- Button has subtle styling with hover effects
- Preserves project path, model selection, and tool settings
- Backend context automatically cleared (no server-side history)
- Fixed build errors by removing unused tokio watch channel
- All quality checks passing (TypeScript, Biome, Clippy, builds)
Tested and verified:
- Button appears in header near model controls
- Confirmation dialog prevents accidental clearing
- Messages clear immediately after confirmation
- Input remains ready for new conversation
- Settings preserved across session clears
- Backend: Added OllamaProvider::chat_stream() with newline-delimited JSON parsing
- Backend: Emit chat:token events for each token received from Ollama
- Backend: Added futures dependency and stream feature for reqwest
- Frontend: Added streamingContent state and chat:token event listener
- Frontend: Real-time token display with auto-scroll
- Frontend: Markdown and syntax highlighting support for streaming content
- Fixed all TypeScript errors (tsc --noEmit)
- Fixed all Biome warnings and errors
- Fixed all Clippy warnings
- Added comprehensive code quality documentation
- Added tsc --noEmit to verification checklist
Tested and verified:
- Tokens stream in real-time
- Auto-scroll works during streaming
- Tool calls interrupt streaming correctly
- Multi-turn conversations work
- Smooth performance with no lag
Merged from feature/interrupt-on-type branch.
Backend cancellation infrastructure:
- Added tokio watch channel to SessionState for cancellation signaling
- Implemented cancel_chat command
- Modified chat command to use tokio::select! for racing requests vs cancellation
- When cancelled, HTTP request to Ollama is dropped and returns early
- Added tokio dependency with sync feature
Story updates:
- Story 13: Updated to use Stop button pattern (industry standard)
- Story 18: Created placeholder for streaming responses
- Stories 15-17: Placeholders for future features
Frontend changes:
- Removed auto-interrupt on typing behavior (too confusing)
- Backend infrastructure ready for Stop button implementation
Note: Story 13 UI (Stop button) not yet implemented - backend ready