1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! `csift image` - list and EXTRACT the images a session carries.
//!
//! A user-pasted/attached image (and a tool-result screenshot) rides INLINE on a record as
//! an `{type:"image", source:{type:"base64", media_type:"image/png", data:"<base64>"}}`
//! block - verified against real `~/.claude/projects` data (2026-06-16). The bytes live in
//! the jsonl, so `image` decodes them straight back to files; nothing is externalised.
//!
//! Stable image id = `L<line>i<n>`: the 1-based JSONL line of the carrying record plus the
//! 1-based ordinal of the image among that record's image blocks. It is stable because the
//! transcript is append-only, and it is consistent with the `Lnnnnn` line references used
//! across `recover` / `turns` / `search` (so an id surfaced there feeds straight back here).
//!
//! Default action is to LIST. Pass `--out <PATH>` to EXTRACT - a DIRECTORY keeps each image's
//! source format; a FILE path's extension converts to that format (the `convert in out.jpg` idiom).
use HashMap;
use ;
use ;
use memmem;
use ;
use crate;
use crate;
use crate;
use crate;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;