@@ -8,16 +8,21 @@ render the result as UI widgets via showComponents.
881. Extract from the user request:
99 - from (departure city — use EXACTLY the name as given by the user, no translation)
1010 - to (destination city — use EXACTLY the name as given by the user, no translation)
11- - stops (intermediate stop cities in travel order — use EXACTLY the names as given by the user, no translation;
12- e.g. "Stopp in Wien" → stops: ["Wien"], "via Vienna" → stops: ["Vienna"];
13- if no stops mentioned → stops: [])
11+ - stops (intermediate stop cities on the OUTBOUND journey only — use EXACTLY the names as given by the user, no translation;
12+ e.g. "Stopp in Wien", "über Wien", "via Wien" → stops: ["Wien"];
13+ only add a city here if the user explicitly says it is on the way TO the destination;
14+ if no outbound stops mentioned → stops: [])
15+ - returnStops (intermediate stop cities on the RETURN journey only — use EXACTLY the names as given by the user, no translation;
16+ e.g. "beim Heimflug Stopp in Paris", "auf dem Rückweg über Paris", "return via Paris", "on the way back stop in Paris" → returnStops: ["Paris"];
17+ only add a city here if the user explicitly mentions it is on the way BACK / return / Heimflug / Rückflug / Rückweg;
18+ if no return stops mentioned → returnStops: [])
1419 - departDate (ISO 8601)
1520 - returnDate (ISO 8601)
1621 Resolve relative dates ("morgen", "nächste Woche", "ab Mai") against today's date.
1722 If from/to or dates are missing, still proceed with your best guess.
1823
19242. Call the workflow tool "packageTourWorkflow" exactly ONCE with
20- { from, to, stops, departDate, returnDate }.
25+ { from, to, stops, returnStops, departDate, returnDate }.
2126 It returns:
2227 - legs — array of { from, to, candidates[] } in travel order:
2328 [from→stops[0]], …, [stops[n-1]→to], [to→stops[n-1]], …, [stops[0]→from]
@@ -42,11 +47,13 @@ render the result as UI widgets via showComponents.
4247 - Only skip the hotel (same-day transit) if the arrival is in the morning or afternoon
4348 AND there is a plausible onward flight the same day AND the user's request gives no hint
4449 of a longer stop.
45- - If an overnight stay is needed → pick ONE hotel from destination.hotels
46- based on the user's preferences (stars, budget, location, etc.) and render a hotelWidget.
47- - If a city requires an overnight stay but destination.hotels is empty (or no
48- candidate matches the preferences), do NOT render a hotelWidget for that city
49- and note it in the messageWidget instead.
50+ - If an overnight stay is needed → ALWAYS render a hotelWidget. Pick ONE hotel from
51+ destination.hotels that best matches the user's preferences (stars, budget, location).
52+ Preferences are a guide for ranking candidates, NOT a hard filter — if no hotel
53+ perfectly matches, pick the closest available option and note the compromise briefly
54+ in the messageWidget. NEVER skip a city's hotel because of unmet preferences.
55+ - Only omit a hotelWidget if destination.hotels is completely empty (no candidates at all),
56+ in which case note it in the messageWidget.
5057
51584. Render the result with EXACTLY ONE showComponents call, in this order:
5259 1. messageWidget({ text: "<summary of the proposed trip in the user's language>" })
0 commit comments