Files
deepseek-harness/packages/attachment/attachment
creatixchu f57a4a044a fix(gui): address ds-review-bot findings on image attachments
- dsh web gains --provider/--model: a non-deepseek provider mounts the
  matching pi-ai catalog route (ambient credentials), making image input
  reachable from the shipped Web assembly; requires an explicit --model
- attachment-local syncs the publication directories after the hard-link
  publish so a reported durable reference survives a crash (POSIX; Windows
  relies on filesystem metadata journaling)
- the attachment seam gains storage-free validateImage; the host validates a
  complete multi-image prompt before persisting any member, so one malformed
  image cannot strand valid members as unreferenced objects
- startSession sends before navigating: a rejected first send keeps the empty
  state, its error strip, and the complete draft mounted
- the webserver rejects an undeclared-length body the moment it crosses the
  configured limit instead of draining a potentially endless stream to EOF
2026-07-24 20:55:25 +08:00
..

@deepseek-ai/dsh-attachment

The durable attachment seam. ctx.attachments validates and atomically commits immutable image bytes, then returns a serializable ImageAttachmentRef; consumers never persist browser paths, object URLs, provider URLs, or base64 in session events.

Unsent composer images remain browser-owned temporary drafts. saveImage is called only at message submission or while committing structured provider output, before any model-visible session event is published. validateImage runs the same admission policy without persisting; batch writers validate every member first so one malformed member cannot strand earlier members as unreferenced objects (there is no garbage collection). readImage verifies the content-addressed object against its logged metadata.

Model Experience

Indirectly, through the role-neutral core ImageBlock and provider adapters that resolve its durable reference.

KV Cache effect

Adding an image changes the provider request and therefore invalidates the affected request suffix.

Known Limitations and Deferred Work

  • Version one accepts PNG, JPEG, WebP, and GIF only.
  • Retention and garbage collection are deferred because resumed and forked sessions may share immutable objects.
  • Generic files, audio, video, and persistent unsent drafts require separate lifecycle and provider contracts.