hermes-agent/apps/desktop/src/hooks
Brooklyn Nicholson b15dc58064 fix(desktop): keep generated images in the tool slot, not inline
The image-generate tool showed a placeholder, then the model echoed a
(often different) image inline in its prose — a second, jarring copy in
the wrong place, dimmed as tool scaffolding, with a misplaced download
button.

Now the generated image lives only in the tool slot:
- Strip every embedded image/media link from the assistant prose of a
  message that produced an image (the model frequently restates the
  remote URL while the result holds the local path), preserving the
  agent's words. Applied on hydration, live deltas, and completion.
- One stable frame sized from the aspect_ratio arg up front, so the
  diffusion placeholder and the decoded image share the same box and
  crossfade with no layout shift; the box derives its height from the
  true ratio on load (no letterboxing).
- Exempt generated images from the tool-block dim-until-hover rule.
- Extract a shared useImageDownload hook + ImageLightbox so the tool
  image and markdown images share one implementation.
2026-06-13 02:42:15 -05:00
..
use-image-download.ts fix(desktop): keep generated images in the tool slot, not inline 2026-06-13 02:42:15 -05:00
use-media-query.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-mobile.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-resize-observer.ts perf(desktop): isolate streaming re-renders & cut layout thrash 2026-06-12 21:07:33 -05:00
use-worktree-info.ts feat(desktop): worktree-aware sidebar grouping + composer/sidebar UX fixes 2026-06-12 18:18:39 -05:00