Conversation
A chat assistant that turns a request for a stay into a prefilled, validated form, searches real availability, and books after a summary. It uses Lisbon listings and nightly calendars from Inside Airbnb, which npm run prepare:listings downloads into a local SQLite database. - search_stays checks every night of the stay against the calendar and, when few stays match, counts how many each relaxed preference would add. - book_stay validates its arguments, checks the nights again, and saves a simulated booking in one transaction. - A DatePicker with React UI's props that reads and writes YYYY-MM-DD, so the model can prefill dates and submitted dates keep their calendar day. - The prompt starts each request with a form and uses prefilled values for fields the submitted form state leaves out. - A terracotta theme, logo, and a My bookings page in the sidebar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the example The page follows the other cookbooks: why a prefilled form and why confirm before booking, setup, five build steps (listings, tools, components, the booking flow prompt, Agent Interface), a browser checklist, and adapting it to other inventory. Its diagram shows the four chat screens and the server steps behind them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
vishxrad
marked this pull request as ready for review
September 28, 2026 11:18
vishxrad
merged commit Sep 28, 2026
d3c543b
into
visharad/cookbook-document-comparison
1 of 2 checks passed
10 of 11 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a third cookbook: a booking assistant with adaptive forms and a runnable example. Readers describe a trip in their own words, such as "Book a place in Lisbon for two this weekend", and get a form prefilled with what the model understood. They fill in what's missing, pick from stays that are free every night of their dates, review a summary, and confirm a simulated booking.
Changes
docs/content/docs/cookbooks/booking-assistant.mdx, structured like the other cookbooks. It covers why a prefilled form and why confirm before booking, setup, five build steps (listings, tools, components, the booking flow prompt, Agent Interface), a browser checklist, and adapting it to other inventory.examples/cookbooks/booking-assistant, registered in the example catalogs and the docs navigation.npm run prepare:listingsdownloads the latest Lisbon snapshot from Inside Airbnb (CC BY 4.0), keeps about 5,700 well-reviewed listings, and stores each one's year of nightly availability as a string, one character per night. Downloads and the database are not committed.search_staystreats dates and guests as requirements and the rest as preferences. When few stays match, it counts how many each relaxed preference would add, so the model can suggest what to change. Ratings are weighed by review count.book_stayvalidates its arguments, checks the nights again, and saves the booking in one transaction. It is simulated: nothing is charged or sent to a host.DatePickerthat keeps React UI's name and props but reads and writesYYYY-MM-DD. The built-in storesDateobjects, so the model cannot prefill it (string values crash it), and submitted dates reach the model as UTC timestamps that can fall on the previous day.CookbookBookingDiagramshows the four chat screens (request, prefilled form, open stays, summary) and the two server steps behind them.Test Plan
pnpm installandverify(spec generation, typecheck, production build) pass on a clean copy without keys or data, as CI runs them.prepare:listingsbuilds a 3.7 MB database of 5,700 listings with availability from 2026-06-23 to 2027-07-02 in about 30 seconds.Checklist
🤖 Generated with Claude Code