trips/mock
Greg Pomerantz 91e93ec265 mock: apply flight anchors directly + give the model conversation memory
The real-email case exposed two gaps:

1. Confirmation friction: when the booked dates didn't match the plan,
   the model asked to confirm instead of anchoring. The guideline now
   says to apply directly (the user's ticket is the truth, and the edit
   is undo-able) and report the date shift — verified: a dropped booking
   now re-anchors in one round, and a redundant "yes" afterwards is
   handled gracefully ("already done").

2. Amnesia on the follow-up: the model has no conversation memory, so a
   confirming "yes" round had to re-derive the dates from the document
   in context — and that copy was clipped at 20k chars. Now the recent
   turns ride in the model's context (chatLog, ~12k char budget, upload
   messages excluded since docSection carries the document), and the doc
   is no longer clipped in-context at all (60k server cap ≪ 131k-token
   window). A new guideline tells the model to apply a confirmed change
   from its own earlier message rather than claiming it can't see info
   it already quoted.

Extraction hardening: broader HTML detection (20k-char scan + tag
density), and a brute-force base64-block fallback in decodeMime for
mail clients with quirky MIME structure. The server now logs an
extraction preview and saves the exact model-facing text to
/tmp/parse-doc-last.txt for debugging real files.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-09 14:48:59 -04:00
..
scripts multi-trip mock + Colombia trip with a real walking router 2026-09-09 09:44:29 -04:00
app.js mock: apply flight anchors directly + give the model conversation memory 2026-09-09 14:48:59 -04:00
data.js multi-trip mock + Colombia trip with a real walking router 2026-09-09 09:44:29 -04:00
index.html mock: robust booking-doc extraction + documents persist across turns 2026-09-09 14:16:36 -04:00
server.js mock: apply flight anchors directly + give the model conversation memory 2026-09-09 14:48:59 -04:00
styles.css mock: robust booking-doc extraction + documents persist across turns 2026-09-09 14:16:36 -04:00