feat(m2): LLM chat via Ollama — streaming responses with migration context #3
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/robin#3
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/m2-llm-chat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
llm.rsmodule:build_system_prompt()(migration context baked into system prompt) +chat_stream()(Ollama NDJSON streaming viareqwest::Response::chunk())chatTauri command: builds message list from config, spawns background stream, emitsrobin:chat-token/robin:chat-done/robin:chat-errorChatPanel.vue: streaming-awaresend()accumulates tokens into pre-inserted message by index;thinkingstate disables input while Robin is responding; error fallback if Ollama is unreachableTest plan
npm run build(TypeScript clean)ollama serve, modelllama3.2pulled): open Robin, type a question, verify tokens stream inNotes
~/.config/robin/config.toml(defaults:http://localhost:11434,llama3.2)feat/m1-system-presence— will rebase onto main after M1 merges- Replace `let _ = app.emit(...)` with logged warnings so dropped chat-done/chat-token events surface in logs instead of silently hanging the frontend - Switch streaming buffer from String to Vec<u8> so multi-byte UTF-8 sequences split across TCP chunks are accumulated correctly before converting to str - Use `.context("stream read error")` (anyhow) instead of manual anyhow::anyhow! for the chunk read error path - Rename test parse_empty_token_is_handled -> parse_empty_content_chunk_deserializes (more precise) - Add malformed_json_fails_to_parse testView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.