consciousness/src/subconscious
Kent Overstreet fe232cf292 salience: client-side pad expansion, drop AppendImage
Mirrors the vLLM-side rewrite. AppendImage is gone; images now
ride along on Generate via a parallel `images` list.

- Productionize `qwen3_image_token_count` (was test-only). Image
  leaf computes its IMAGE_PAD count eagerly at construction from
  height/width; `token_count` is no longer "0 until the server
  tells us."
- WireChunk shrinks to a single `Tokens(Vec<u32>)` variant — vision
  blocks live inline in the token stream.
- `wire_chunks` now returns `(Vec<WireChunk>, Vec<WireImage>)`.
  `WireImage` carries `pad_start` / `pad_end` (absolute positions
  in the full walk) alongside bytes + mime.
- `assemble_prompt` returns `(chunks, images, match_upto)`.
- `stream_session_mm` / `run_session_generate` take the parallel
  images list, filter to those past `match_upto`, and pass them
  in `GenerateRequest.images` as `pb::ImageAttachment` entries.
- Drop `SessionHandle::append_image`,
  `ContextState::commit_image_token_counts`,
  `StreamToken::ImageAppended`, the WireChunk::Image branch in
  `learn.rs`, and the now-empty `prompt_to_chunks` helper.
- Add 'v' toggle on the conscious-screen tree to render token-id
  vectors in place of text content (debug-aid: lets us see what
  the server actually has when output is suspicious).
- Comment out the subconscious-trigger spawn loop — Kent had this
  disabled before; it had crept back into running.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-24 20:26:47 -04:00
..
agents agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
compare.rs user: F7 compare screen 2026-04-17 16:12:26 -04:00
daemon.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00
defs.rs config: move user_name/assistant_name to AppConfig (top level) 2026-04-16 16:20:17 -04:00
digest.rs Remove .md suffix stripping from key lookups 2026-04-15 02:08:35 -04:00
generate.rs salience: client-side pad expansion, drop AppendImage 2026-04-24 20:26:47 -04:00
learn.rs salience: client-side pad expansion, drop AppendImage 2026-04-24 20:26:47 -04:00
mod.rs user: F7 compare screen 2026-04-17 16:12:26 -04:00
prompts.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00