fix(agent): priorite a la generation de contenu dans le mock (contexte 'collection')
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user