WeKnora/internal/application/service/chat_pipeline
wizardchen e6ee87759d fix(agent): preserve agent intent prompt whitespace and add tests
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.
2026-05-26 21:05:40 +08:00
..
chat_completion.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_completion_stream.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_pipeline.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_pipeline_test.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
common.go fix(chat): include history in model fallback 2026-05-04 23:24:21 +08:00
data_analysis.go feat: correct data analysis errors using fileService. 2026-04-27 13:18:08 +08:00
extract_entity.go fix(graph): recover JSON from malformed/truncated fences in extract_entity 2026-05-07 15:40:19 +08:00
extract_entity_test.go fix(graph): recover JSON from malformed/truncated fences in extract_entity 2026-05-07 15:40:19 +08:00
filter_top_k.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
into_chat_message.go feat(prompt): enhance question rewriting and intent classification in prompt templates 2026-04-16 23:15:02 +08:00
load_history.go fix: respect multi-turn-disabled flag in KnowledgeQA pipeline 2026-05-26 10:45:42 +08:00
memory.go fix(memory): dedupe episode write on duplicate streaming Done 2026-05-04 23:49:29 +08:00
merge.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
merge_expand.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_faq.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_history.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_overlap.go refactor(postgres): optimize vector retrieval and HNSW settings 2026-04-17 12:11:03 +08:00
plugin_test.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
query_expansion.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
query_understand.go fix(agent): preserve agent intent prompt whitespace and add tests 2026-05-26 21:05:40 +08:00
query_understand_test.go fix(agent): preserve agent intent prompt whitespace and add tests 2026-05-26 21:05:40 +08:00
rerank.go fix(pipeline): fallback to raw retrieval results when rerank API fails 2026-05-26 20:45:17 +08:00
rerank_clean_test.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
search.go feat(observability): expand Langfuse spans across chat pipeline 2026-05-12 21:16:37 +08:00
search_entity.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
search_parallel.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
web_fetch.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
wiki_boost.go feat: Enhance wiki API and repository with slug encoding and improved search functionality 2026-04-22 21:18:09 +08:00