diff --git a/server/src/nest/assistant/cards/tour/index.ts b/server/src/nest/assistant/cards/tour/index.ts index fbc7e2824..88024a235 100644 --- a/server/src/nest/assistant/cards/tour/index.ts +++ b/server/src/nest/assistant/cards/tour/index.ts @@ -134,9 +134,7 @@ export const TOUR_CARDS: DomainCards = { }, }, prompt: [ - "Every tour type can be planned and saved. Pick the tool by what the user does: a hike (also a trek over several days) propose_hike then create_hike; a bike tour or a run propose_tour (activity bike or run) then create_tour; a city walk propose_city_walk then create_city_walk; a paddle tour plan_paddle_route then create_paddle_tour (it needs water_context river or lake); a ski or winter tour (alpine, snowboard, cross-country, ski touring, snowshoe, winter hike) plan_ski_route then create_ski_tour with the same points, discipline and options. Pass the plan's points in order as waypoints: the from of the first leg and the to of every leg.", - "Profiles: a bike tour is touring for a city or trekking bike on paved ways and cycle paths (the default), road for a road bike on asphalt only, gravel for a gravel bike on gravel and farm tracks, mtb for a mountain bike on rough tracks and trails; a run is running on mostly paved ways (the default) or trail on forest tracks and natural paths. Choose from what the user rides or how they run; ask when it is not clear. A run needs the runner's pace (run_pace_seconds_per_km, 330 for 5:30 min/km) for its time and to be created: ask for it, never guess one.", - 'Hikes: call propose_hike with a name, and day_id and start_time when known; to compare ways, call it up to three times in one step, each with a variant_label and along false, the way you recommend first (the card shows the first one chosen). Call create_hike only once the user chose a way. A hike over several days is one hike: stage_end on each stop a day ends at (no day_id), then each stage on its day with assign_place_to_day and tourStageKey.', + "Every tour type can be planned and saved. Pick the tool by what the user does: a hike (also a trek over several days) propose_hike then create_hike; a bike tour or a run propose_tour (activity bike or run) then create_tour; a city walk propose_city_walk then create_city_walk; a paddle tour plan_paddle_route then create_paddle_tour (it needs water_context river or lake); a ski or winter tour (alpine, snowboard, cross-country, ski touring, snowshoe, winter hike) plan_ski_route then create_ski_tour with the same points, discipline and options, passing the plan's points in order (the from of the first leg and the to of every leg). Profiles: a bike tour is touring (city or trekking bike, the default), road (asphalt only), gravel (gravel and farm tracks) or mtb (rough tracks and trails); a run is running (mostly paved, the default) or trail; ask when it is not clear. A run needs the runner's pace (run_pace_seconds_per_km, 330 for 5:30 min/km): ask for it, never guess one. A hike: propose_hike with a name, and day_id and start_time when known; to compare ways call it up to three times in one step, each with a variant_label and along false, the way you recommend first; create_hike only once the user chose a way. A hike over several days is one hike: stage_end on each stop a day ends at (no day_id), then each stage on its day with assign_place_to_day and tourStageKey.", 'The app draws a proposed, planned or saved tour (route, profile, stops, times, weather, warnings) and lists of tours as cards: do not repeat their figures or list them again, say in one sentence what matters. Once a tour is planned, offer what goes with it: places along it (search_tour_pois), what to pack (get_tour_packing, link_tour_packing), the GPX file (export_tour_gpx).', ], }; diff --git a/server/tests/unit/nest/assistant/cards/tour/tour-plan-types.cards.test.ts b/server/tests/unit/nest/assistant/cards/tour/tour-plan-types.cards.test.ts index ca317f65f..de8d33706 100644 --- a/server/tests/unit/nest/assistant/cards/tour/tour-plan-types.cards.test.ts +++ b/server/tests/unit/nest/assistant/cards/tour/tour-plan-types.cards.test.ts @@ -271,8 +271,9 @@ describe('what the tours tell the model about every type', () => { for (const tool of ['propose_tour', 'create_tour', 'create_paddle_tour', 'create_ski_tour', 'plan_ski_route']) { expect(every).toContain(tool); } - const profiles = CARD_PROMPT_LINES.find((line) => line.startsWith('Profiles:')); - for (const word of ['road', 'gravel', 'mtb', 'trail', 'run_pace_seconds_per_km']) expect(profiles).toContain(word); + // The profiles share the planning line: a package may add two prompt lines at most. + for (const word of ['Profiles:', 'road', 'gravel', 'mtb', 'trail', 'run_pace_seconds_per_km']) + expect(every).toContain(word); for (const line of CARD_PROMPT_LINES) expect(systemPrompt('English')).toContain(line); }); });