Prefer current travel context in follow-up answers
CI / test (push) Successful in 1m4s
CI / test (pull_request) Successful in 1m30s

This commit is contained in:
m
2026-08-25 06:59:13 +03:00
parent d7ca5f7e68
commit cbff215f9a
3 changed files with 17 additions and 0 deletions
@@ -113,6 +113,13 @@ func TestTravelSearchClarification(t *testing.T) {
if got := TravelSearchClarification("Найди билеты, какой ближайший самолёт", contextHistory); got != "Из какого города вылетать в Сочи и на какую дату?" {
t.Fatalf("travel destination should be inherited from context, got %q", got)
}
noisyContext := []interaction.HumanUtterance{
{Content: "Как можно добраться до Сочи?"},
{Content: "Какая погода в Питере?"},
}
if got := TravelSearchClarification("Найди билеты", noisyContext); got != "Из какого города вылетать в Сочи и на какую дату?" {
t.Fatalf("unrelated weather history must not replace travel destination, got %q", got)
}
}
func TestInterpretUtteranceDirectiveRecordsOutcomeWithoutExecution(t *testing.T) {