feat(parse): add ExtractImages stream scanner for OSC 9 markers
Implements ExtractImages() which scans filter stdout line-by-line, extracts valid OSC 9 image markers into ImageRef structs, and replaces marker lines with null-delimited placeholders (\x00IMG:N\x00). Invalid markers (missing path) pass through unchanged. Also clarifies the Index field comment in ImageRef to indicate it is set by ExtractImages, not ParseImageOSC. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
// ImageRef represents an image referenced by a filter via OSC 9 marker.
|
||||
type ImageRef struct {
|
||||
Index int // Sequential position in the message
|
||||
Index int // Sequential position in the message; set by ExtractImages, not ParseImageOSC
|
||||
Path string // Absolute path to image file on disk
|
||||
Alt string // Alt text fallback
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user