Fix gaia sd terminal preview and image viewer#346
Conversation
- Add term-image>=0.7.0,<0.8 to install_requires so it is always installed
- Fix broken term-image API: remove invalid set_render_method("auto") and
replace set_size(columns=60, fit_to_width=True) with set_size(width=60)
- Return resolved absolute path from _save_image() so viewers receive a
path they can open regardless of CWD
- Resolve image paths defensively in cli.py before passing to os.startfile/xdg-open
- Remove Windows-only guard on prompt_to_open; add xdg-open dispatch for Linux
in both rich and text-only console branches
- Update and extend test_sd_mixin.py to assert absolute paths are returned
Fixes #324
|
@claude review this PR. |
|
Claude finished @kovtcharov's task —— View job PR Review CompleteOverall: 🟢 Looks good to merge This PR properly fixes the SD agent terminal preview and image viewer issues. The changes are well-structured and include appropriate test coverage. 🟢 setup.pyAdding 🟢 console.py (
|
Remove hardcoded base_url from SDToolsMixin.init_sd() so LemonadeClient resolves the URL from the LEMONADE_BASE_URL environment variable. Also make term-image optional (extras_require["image"]) and replace the rich-pixels fallback with a dependency-free PIL half-block renderer.
## Summary - Add release notes for v0.15.4.1 (`docs/releases/v0.15.4.1.mdx`) - Bump `__version__` from `0.15.4` → `0.15.4.1` in `src/gaia/version.py` - Add `releases/v0.15.4.1` to nav and update navbar label in `docs/docs.json` Closes #336, #339, #344, #345, #342, #348, #346 > **Note:** Do not tag `v0.15.4.1` until after this PR merges. --------- Co-authored-by: Tomasz Iniewicz <[email protected]>
Summary
term-image>=0.7.0,<0.8toinstall_requiresso terminal image rendering is always availableset_render_method("auto")andset_size(columns=60, fit_to_width=True)→set_size(width=60)) that caused the entire term-image path to silently failimage_path.resolve()from_save_image()so all callers get an absolute pathcli.pybefore passing toos.startfile/xdg-openprompt_to_open; addxdg-opendispatch for Linux in both rich and text-only console branchesCloses #324