Commit Graph
2 Commits
Author SHA1 Message Date
Simon Ferquel's Clanker 87e51046d9 test: add Document cases to strip_modalities and transcript tests (S1/S2/S3)
S1 (strip_modalities): Add three Document test cases to TestStripImageContent:
  - Document with image/png MIME → stripped
  - Document with application/pdf MIME → preserved
  - Document part with nil Document pointer → preserved (defensive nil-guard)

S2 (transcript): Add golden tests for Document rendering:
  - TestUserMessageWithImageDocument → image chip with name/mime/size
  - TestUserMessageWithPDFDocument → attachment chip with name/mime/size
  - TestUserMessageWithTextDocument → attachment chip with name/mime (no size for text)
  - TestFormatBytes → boundary tests for 0B, 512B, 1023B, 1536B, 1MB, 2MB, 1.5MB

S3 (transcript): Add comment to writeUserMessage documenting the 'what was
  sent to the model' design decision: the text part in MultiContent contains
  the user's typed text PLUS dimension notes from image resizing and inlined
  file headers, which is intentional for transcripts. Callers wanting only
  the raw typed text should read msg.Message.Content directly.

Assisted-By: docker-agent
2026-05-11 14:36:30 +00:00
David Gageot 04e80bdd49 Move to its own package
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-01-19 20:29:09 +01:00