feature/streaming-insights #85
Reference in New Issue
Block a user
Delete Branch "feature/streaming-insights"
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?
Rework insights to better adhere to system prompts, improved tool examples, etc.
After refresh, the rendered transcript was showing two unwanted artifacts in the initial user bubble: Photo file path: pics/DSC_5171.jpg please tell me about this photo and what was going on around it Please write your final answer now without calling any more tools. Two distinct bugs: 1. Bootstrap was prepending `Photo file path: <path>` (and, in hybrid mode, the visual description block) into the user-turn content. The model needed it to call file_path-keyed tools, but the user could see it in their own bubble on replay. 2. The no-tools fallback ("Please write your final answer now…") was a synthetic user message we never stripped from history, so it persisted into training_messages, rendered as a second user bubble, AND wiped the prior tool-call accumulator inside load_history (user-turn handler clears pending_tools), which is why the tool invocations disappeared from the assistant bubble after refresh. Fixes: - New `build_bootstrap_system_message` helper composes the persona with a `--- PHOTO CONTEXT ---` block (path + optional visual description). Lives in the system message, not the user turn. The user's bubble shows only what they typed. - Streaming agentic loop's no-tools fallback now records its insertion index and removes the synthetic user prompt from `messages` after the model responds. Final assistant content stays — it reads coherently on replay without the synthetic prompt above it. Applies to both bootstrap and continuation. 3 new tests cover the system-message composer (path-only, with visual block, persona-trim). Total insight_chat unit tests: 27.