Allow reply-only cognition for text directives
CI / test (push) Successful in 1m22s
CI / test (pull_request) Successful in 1m17s

This commit is contained in:
m
2026-08-26 10:17:51 +03:00
parent 5e18eb6082
commit f862c3ac13
2 changed files with 12 additions and 1 deletions
+6 -1
View File
@@ -2029,7 +2029,12 @@ func stableKnowledgeAnswer(answer string) bool {
// completed entirely in the reply. It excludes specialized routes and durable
// work, so cognition can produce content but cannot stand in for an executor.
func shouldGenerateNonMutatingTextDirective(semantic interactiondomain.SemanticResult, routes []chatRoute, helpPath work.HelpPath, creativeRequest bool) bool {
if semantic.Interpretation.SpeechAct != interaction.SpeechActDirective || creativeRequest || helpPath.Kind != "" || helpPath.NeedsDurableWork {
if semantic.Interpretation.SpeechAct != interaction.SpeechActDirective || creativeRequest || helpPath.NeedsDurableWork {
return false
}
// ANSWER and COGNITION are reply-only help paths. They do not execute an
// external action, unlike direct capabilities, gaps or durable work.
if helpPath.Kind != work.HelpPathAnswer && helpPath.Kind != work.HelpPathCognition && helpPath.Kind != "" {
return false
}
return !hasChatRoute(routes, chatRouteResearch) && !hasChatRoute(routes, chatRouteMedia) && !hasChatRoute(routes, chatRouteAgent)