Skip to content

Trace: extract and replace pasted images in Pi transcripts #3716

Open

Description

@waveywaves

Problem

The compatibility matrix marks Pi pasted-image pointers as No. User-pasted image data remains inline in the Pi transcript instead of being stored once as a spec material and replaced with a pointer.

Scope

Implement Pi's trace.PastedImageFinder and extend its spec-copy replacement path for the native image block shapes that Pi persists.

Acceptance criteria

  • Extract valid user-pasted image data from supported Pi message blocks.
  • Deduplicate decoded bytes and assign deterministic Pasted image N ordering.
  • Exclude tool-result images and non-paste image records.
  • Replace inline copies only after the material is stored successfully.
  • Keep invalid data, remote URLs, path-only records, and storage failures inline without blocking push.
  • Reuse an already captured identical image instead of creating a duplicate material.
  • Add finder, replacer, action, and malformed-input regressions.
  • Run the repeated-image live scenario and verify one stored material and no supported inline duplicate.
  • Update the compatibility matrix from measured results.

Non-goals

  • Treating tool-result images as user pastes.
  • Fetching remote image URLs.

Dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions