Commit Graph

12 Commits

Author SHA1 Message Date
Dave
97b0ce1b58 Wrote some tests. 2026-01-27 14:45:28 +00:00
Dave
1f1f5f6dac Updated dependencies, fixed some clippy warnings 2026-01-26 18:15:29 +00:00
Dave
c2da7f9f18 Fix Story 12: Claude API key storage now working
- Fixed silent API key save failure by switching from keyring to Tauri store
- Removed keyring dependency (didn't work in macOS dev mode for unsigned apps)
- Implemented reliable cross-platform storage using tauri-plugin-store
- Added pendingMessageRef to preserve user message during API key dialog flow
- Refactored sendMessage to accept optional message parameter for retry
- Removed all debug logging and test code
- Removed unused entitlements.plist and macOS config
- API key now persists correctly between sessions
- Auto-retry after saving key works properly

Story 12 complete and archived.
2025-12-27 20:08:24 +00:00
Dave
1529ca77e7 Backend: Add Anthropic/Claude provider integration
- Add anthropic.rs module with streaming support
- Convert between internal and Anthropic tool/message formats
- Add keyring dependency for secure API key storage
- Add API key management commands (get_exists, set)
- Auto-detect provider from model name (claude-* prefix)
- Support SSE streaming from Anthropic API
- Handle tool calling with Anthropic's format
- Add cancellation support for Anthropic streams
2025-12-27 19:41:20 +00:00
Dave
e1fb0e3d19 Story 13: Implement Stop button with backend cancellation
- Add tokio watch channel for cancellation signaling
- Implement cancel_chat command
- Add cancellation checks in streaming loop and before tool execution
- Stop button (■) replaces Send button (↑) during generation
- Preserve partial streaming content when cancelled
- Clean UX: no error messages on cancellation
- Backend properly stops streaming and prevents tool execution

Closes Story 13
2025-12-27 18:32:15 +00:00
Dave
64d1b788be Story 18: Token-by-token streaming responses
- 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
2025-12-27 16:50:18 +00:00
Dave
bb700ce870 feat: Backend cancellation support for interrupting model responses
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
2025-12-27 15:36:58 +00:00
Dave
e229f2efa8 feat: persist project selection 2025-12-24 17:46:27 +00:00
Dave
b241c47fd9 fix: make llm provider async and add tool toggle 2025-12-24 17:32:46 +00:00
Dave
d9cd16601b feat: agent brain (ollama) and chat ui 2025-12-24 17:17:35 +00:00
Dave
76e03bc1a2 feat: core agent tools (fs, search, shell) 2025-12-24 16:59:14 +00:00
Dave
54810631be Initial commit 2025-12-24 16:29:33 +00:00