fix(agent): priorite a la generation de contenu dans le mock (contexte 'collection')
FlowDeck CI / test (push) Failing after 9s
FlowDeck CI / docker (push) Skipped

This commit is contained in:
2026-09-05 21:55:17 -04:00
parent f57f66a93a
commit bd109c273a
+8 -4
View File
@@ -214,6 +214,14 @@ class LLMClient:
model=model,
)
# Inline content-generation ("Ask AI" / "AI meeting note") — answered
# before the tool-intent heuristics and scoped to the user objective
# only, so an injected "# Contexte" that happens to mention "collection"
# can't misroute a writing request into a create-collection action.
draft = self._draft_reply(user_content.split("\n# Contexte")[0])
if draft:
return LLMResponse(text=draft, model=model)
# Exact keyword → tool intent resolution.
for regex, builder in _CREATE_PATTERNS:
m = regex.search(user_content)
@@ -247,10 +255,6 @@ class LLMClient:
)
# Plain conversational objective → final answer (no tool).
draft = self._draft_reply(user_content)
if draft:
return LLMResponse(text=draft, model=model)
return LLMResponse(
text=self._summarize(user_content),
model=model,