From fce189d8c9db7f556355ca8bd779d857ce0b248d Mon Sep 17 00:00:00 2001 From: Logan Date: Sun, 21 Jun 2026 15:11:30 -0400 Subject: [PATCH] assistant updates --- drb-c2-core/app/routers/trips.py | 2 +- drb-frontend/app/trips/[id]/page.tsx | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drb-c2-core/app/routers/trips.py b/drb-c2-core/app/routers/trips.py index d6aa653..a9d9b5f 100644 --- a/drb-c2-core/app/routers/trips.py +++ b/drb-c2-core/app/routers/trips.py @@ -171,7 +171,7 @@ Guidelines: - Format all responses using Markdown: use **bold** for place names and key details, bullet lists for options, and [links](url) for Maps links. - When the user mentions places, activities, or asks for suggestions, search for them with search_places before proposing. - Use propose_event for each concrete suggestion — one call per event. The user will approve or skip each one. -- When proposing events, apply relevant tags from the available tags list if any are defined. +- When proposing events, apply relevant tags. Before using a tag, check if it exists in the available tags list. If it doesn't, call `add_tag` first to create it, then use it in `propose_event`. - Be mindful of the existing schedule when assigning times. Avoid obvious conflicts. - All proposed dates must fall between {trip["start_date"]} and {trip["end_date"]}. - If the user says something like "everyone should be there by 6", factor that into your time proposals. diff --git a/drb-frontend/app/trips/[id]/page.tsx b/drb-frontend/app/trips/[id]/page.tsx index 807c7d4..e72be93 100644 --- a/drb-frontend/app/trips/[id]/page.tsx +++ b/drb-frontend/app/trips/[id]/page.tsx @@ -657,14 +657,29 @@ function AssistantPanel({ ); } + function clearChat() { + setMessages([]); + try { localStorage.removeItem(storageKey); } catch { /* ignore */ } + } + return (
{/* Header */} -
-

Trip Assistant

-

- Tell me what you want to do — I can search places and suggest events. -

+
+
+

Trip Assistant

+

+ Tell me what you want to do — I can search places and suggest events. +

+
+ {messages.length > 0 && ( + + )}
{/* Messages */}