Bas95 commited on
Commit
77c968b
·
verified ·
1 Parent(s): 08e87fb

Fix: agent call signatures

Browse files
Files changed (1) hide show
  1. backend/orchestrator.py +15 -3
backend/orchestrator.py CHANGED
@@ -200,8 +200,11 @@ async def run_trip_search(
200
  message="Checking companion certificate availability...",
201
  progress=10,
202
  )
 
 
 
203
  flights: list[FlightOption] = await search_companion_cert(
204
- request, browser
205
  )
206
 
207
  # --- Step 2: IHG points availability ---
@@ -213,8 +216,13 @@ async def run_trip_search(
213
  )
214
  destinations = _extract_destinations(flights)
215
  date_pairs = _extract_date_pairs(flights)
 
 
 
 
216
  hotels: list[HotelOption] = await search_points_availability(
217
- destinations, date_pairs, browser
 
218
  )
219
 
220
  # --- Step 3: Resy dining options ---
@@ -225,8 +233,12 @@ async def run_trip_search(
225
  progress=70,
226
  )
227
  cities, arrival_dates = _extract_cities_and_arrival_dates(flights)
 
 
 
 
228
  restaurants: list[RestaurantOption] = await find_resy_restaurants(
229
- cities, arrival_dates, request.party_size, browser
230
  )
231
 
232
  # BrowserSession closed — merge results in memory.
 
200
  message="Checking companion certificate availability...",
201
  progress=10,
202
  )
203
+ def delta_progress(msg: str) -> None:
204
+ _emit(progress_callback, step="delta", message=msg, progress=20)
205
+
206
  flights: list[FlightOption] = await search_companion_cert(
207
+ request, browser, delta_progress
208
  )
209
 
210
  # --- Step 2: IHG points availability ---
 
216
  )
217
  destinations = _extract_destinations(flights)
218
  date_pairs = _extract_date_pairs(flights)
219
+
220
+ def ihg_progress(msg: str) -> None:
221
+ _emit(progress_callback, step="ihg", message=msg, progress=55)
222
+
223
  hotels: list[HotelOption] = await search_points_availability(
224
+ destinations, date_pairs, browser,
225
+ request.ihg_brands, request.trip_duration_nights, ihg_progress
226
  )
227
 
228
  # --- Step 3: Resy dining options ---
 
233
  progress=70,
234
  )
235
  cities, arrival_dates = _extract_cities_and_arrival_dates(flights)
236
+
237
+ def resy_progress(msg: str) -> None:
238
+ _emit(progress_callback, step="resy", message=msg, progress=80)
239
+
240
  restaurants: list[RestaurantOption] = await find_resy_restaurants(
241
+ cities, arrival_dates, request.party_size, browser, resy_progress
242
  )
243
 
244
  # BrowserSession closed — merge results in memory.