Form nearest flight searches from route context
CI / test (push) Successful in 1m28s
CI / test (pull_request) Failing after 57s

This commit is contained in:
m
2026-08-25 23:39:08 +03:00
parent 3435de8013
commit 4e5bb9abc9
3 changed files with 24 additions and 8 deletions
+2 -2
View File
@@ -209,8 +209,8 @@ func TestNearestPlaneUsesTravelContextAndCurrentDay(t *testing.T) {
now := time.Date(2026, time.August, 25, 18, 0, 0, 0, time.UTC)
history := []interaction.HumanUtterance{{Content: "я сейчас в Москве", ReceivedAtUnixMillis: 100}}
query := TravelResearchQuery("найди ближайший самолет до Казани", history, now)
if !strings.Contains(query, "сегодня 25.08.2026") || !strings.Contains(query, "пункт отправления: Москве") {
t.Fatalf("nearest plane query lost current context: %q", query)
if query != "ближайшие авиарейсы Москве Казани сегодня 25.08.2026" {
t.Fatalf("nearest plane search formulation lost current context: %q", query)
}
if got := TravelSearchClarification("найди ближайший самолет до Казани", history); got != "" {
t.Fatalf("known origin and nearest-time meaning should proceed, got %q", got)