e6ee87759d
The intent prompt override logic in query_understand applied strings.TrimSpace to the value before assigning it as the system prompt override, which silently stripped trailing newlines and intentional formatting from agent-supplied prompts. Use TrimSpace only to detect emptiness (so whitespace-only strings still fall back to the global default) while passing the raw string through verbatim. Extract the resolution into applyIntentPromptOverride and add unit tests covering agent-wins, whitespace preservation, blank fallback, no-config, and global-only paths.