From 1d2d623bfd8cc06fd9e2eb3628b7e000ab27ba8e Mon Sep 17 00:00:00 2001 From: MidoriKurage Date: Fri, 7 Aug 2026 14:51:11 +0800 Subject: [PATCH] fix(query-understand): fall back to original query on unparsable output --- .../application/service/chat_pipeline/query_understand.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/application/service/chat_pipeline/query_understand.go b/internal/application/service/chat_pipeline/query_understand.go index d234ad70..d25b3434 100644 --- a/internal/application/service/chat_pipeline/query_understand.go +++ b/internal/application/service/chat_pipeline/query_understand.go @@ -334,11 +334,7 @@ func (p *PluginQueryUnderstand) parseOutput(chatManage *types.ChatManage, raw st return } - // If JSON parsing failed entirely, treat the raw text as the rewritten query - // and default to IntentKBSearch for safety. - if content != "" { - chatManage.RewriteQuery = content - } + // On parse failure, keep the original query and intent. } func parseStructuredQueryOutput(raw string) (queryUnderstandOutput, bool) {