Skip to content

Commit 8bd41b7

Browse files
feat(chat): update message component to provide summary for train options from Rome to Florence
1 parent 399b557 commit 8bd41b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/custom/message.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export const Message = ({
4343
<div className="flex flex-col gap-2 w-full">
4444
{content && typeof content === "string" && (
4545
<div className="text-zinc-800 dark:text-zinc-300 flex flex-col gap-4">
46-
<Markdown>{content}</Markdown>
46+
{/* If train options are present, show a simple summary instead of full details */}
47+
{content.match(/train options from Rome to Florence:/i)
48+
? <Markdown>I found several train options for your route. Please select or book your preferred train from the list above.</Markdown>
49+
: <Markdown>{content}</Markdown>
50+
}
4751
</div>
4852
)}
4953

0 commit comments

Comments
 (0)