Split ImageShowTool.ts into utility functions (ImageShowTool.ts) and
React component (UI.tsx), enabling reuse of load/calculate logic.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: unify error message to "Failed to fetch" and exit on load failure
Show a clean "Failed to fetch" message in the UI and call exit() so the
test terminates immediately instead of hanging on unsupported images.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add loadImageFromUrl helper and wire it into LocalPicture test
Extract URL fetching into a dedicated jimpURL.ts utility that requests
only Jimp-supported image formats via Accept header. LocalPicture.test
now imports and uses it for all URL sources.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(LocalPicture): support CLI args for path/URL and golden ratio width
Allow passing an image path or URL as a command-line argument. Default
falls back to the original wallpaper. Display width changed from 40% to
16.18% (golden ratio) for a more aesthetically balanced default.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: pass pixelWidth/pixelHeight from Image props to Kitty renderer
Previously the test computed accurate pixel dimensions from the original
image's aspect ratio, but the prop chain never forwarded them through
ImageComponentProps -> ImageRenderer -> KittyImage -> useImage, so
KittyImage always computed pixels from resolved chars × cell size (losing
aspect ratio information). Now the full chain forwards pixelWidth/
pixelHeight as overrides, letting the test control exact pixel scaling
while width/height still drive Ink layout and Kitty placement bounds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: reduce blank rows below Kitty images by using placement c=/r= bounds
Kitty placement now passes resolved character dimensions (charWidth,
charHeight) to limit the rendered image area. ImageBox uses pixel-derived
charHeight when loaded to avoid reserving too many Yoga rows.
LocalPicture.test.tsx computes pixelWidth/pixelHeight separately from
character dimensions for correct scaling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: preserve image aspect ratio with cover() and dynamic height calculation
Replace non-proportional resize() with cover() in useImage hook, and
compute target height from original aspect ratio in LocalPicture test
instead of hardcoding a terminal-rows-based ratio.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: add Ghostty env-var detection for Kitty graphics in ink-picture
- Add TERM_PROGRAM=ghostty fallback to enable Kitty graphics protocol
- Add COLORTERM=truecolor fallback for color detection
- Create TerminalDetection.test.tsx diagnostic tool for terminal capability debugging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add useStdout and useIsScreenReaderEnabled hooks for ink-picture
- Add StdoutContext.Provider and AccessibilityContext.Provider to App render tree
- Export useStdout/useIsScreenReaderEnabled from src/ink entry point
- Pass writeToStdout from Ink class to App for raw escape sequence output
- Create LocalPicture.test.tsx visual test for local image display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
refactor: integrate ink-picture as source directory
- Move ink-picture dependencies from file: reference to direct source integration
- Remove ink-picture's own node_modules, build, package.json, tsconfig.json, biome.json
- Update all ink-picture imports to use src/ink-picture path alias
- Add ink-picture path alias to tsconfig.json
- Add is-unicode-supported, iterm2-version, jimp, node-fetch, sixel as direct deps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>