Fix generic creative target extraction
CI / test (push) Successful in 1m29s
CI / test (pull_request) Successful in 1m28s

This commit is contained in:
m
2026-08-25 14:49:01 +03:00
parent ca45df3c62
commit 3515a483ca
@@ -67,7 +67,10 @@ func DecomposeTaskWithLexicon(message string, lexicon TaskLexicon) TaskDecomposi
if result.Source != "" {
result.NeedsResearch = result.Intent == TaskIntentSearch
}
if result.Object != "" {
if result.Intent == TaskIntentCreate {
result.Target = valueAfterAnyCue(lower, "нарисуй", "нарисовать", "изобрази", "создай")
}
if result.Target == "" && result.Object != "" {
for _, entry := range lexicon.ObjectAliases {
if entry.Value == result.Object {
result.Target = valueAfterCue(lower, entry.Alias)
@@ -75,9 +78,6 @@ func DecomposeTaskWithLexicon(message string, lexicon TaskLexicon) TaskDecomposi
}
}
}
if result.Intent == TaskIntentCreate && result.Target == "" {
result.Target = valueAfterAnyCue(lower, "нарисуй", "нарисовать", "изобрази", "создай")
}
if result.Intent == TaskIntentSearch && result.Source == "" {
result.Missing = append(result.Missing, "SOURCE_OR_SEARCH_SCOPE")
}