Compile personal facts for contextual assistance
CI / test (push) Successful in 1m15s
CI / test (pull_request) Failing after 50s

This commit is contained in:
m
2026-08-25 22:50:37 +03:00
parent 13bbcdf747
commit eb842e24ff
7 changed files with 172 additions and 30 deletions
+2 -8
View File
@@ -701,14 +701,8 @@ func informationRequestKind(message string, candidate interaction.SemanticCandid
}
func LocationContextReply(message string) string {
tokens := semanticTokens(message)
if len(tokens) < 4 || tokens[0] != "я" || !containsStemInTokens(tokens, "сейчас", "нахож", "жив") {
return ""
}
for index, token := range tokens {
if (token == "в" || token == "на") && index+1 < len(tokens) {
return "Запомнил: сейчас вы в " + capitalizeWord(tokens[index+1]) + "."
}
if location := personalCurrentLocation(message); location != "" {
return "Запомнил: сейчас вы в " + location + "."
}
return ""
}