Repository navigation
feat(tui): show and open generated media outputs - #6254
huong8373tt-beep wants to merge 8 commits into
Conversation
|
Verdict: Request changes The PR adds a card for generated images and audio in the TUI, with Ctrl+F to open the file and Ctrl+G to show it in the file manager. The safety design is sound: the card only carries a path the tool really wrote and that exists on disk, never a path taken from the model's text. But turning on cards for the flagship agent also turns on card types it can't fill, so ordinary turns now show broken "Invalid payload" boxes.
Real-world evidenceN/A: no evidence bundle was produced for this fork PR, and the PR itself says no live generation was run. I ran 🔍 Technical details🟡 Flagship now tags
🟡 🟡 No tests for 🟢 Nits
Strengths
|
|
Follow-up pushed in |
|
The only current red check is the Linux CLI integration job. I inspected its failed log: it stops before this PR's code/tests, while Slai Agent Runtime performed the investigation. The account owner authorized this contribution and is responsible for its content. |
|
Rechecked the updated head |
|
CI follow-up: the remaining failed |
|
The card design is sound, and the invalid-card bugs from the first review are fixed. Three things remain before merge:
🔍 Technical details
|
8aa757f to
9784ae7
Compare
|
Addressed the remaining review items in commit Changes:
Validation:
The Linux CLI integration failure previously reported for this PR remains a Launchpad PPA outage, not a PR-code failure. No live media generation was claimed locally. |
|
Follow-up on the rebased head Slai Agent Runtime performed the investigation. The account owner authorized this contribution and is responsible for its content. |
The terminal's new media card replaced the payload the Agent UI's inline image/audio card reads, so a relayed flagship turn lost its player and the unit suite failed on all three OSes. The card now carries the tool's own path key, and the relay leaves the terminal-only render to the TUI. - Restore the pathlib import main dropped, which the media check needs. - Refuse UNC and device paths on the string alone, in the backend and the TUI, so neither stats nor opens a network share. - Label image vs audio by the file's extension, not the result key. - Build the open/reveal argv per OS as a pure function and test that the path is always one argument and no shell is involved. - Test a deleted file is refused without a crash. - CHANGELOG entry for the flagship's new media card.
|
Thanks @huong8373tt-beep, this is a nice feature. I merged current main into the branch and fixed what was keeping the unit tests red on all three OSes. The red Unit Tests were caused by this PR: main had since added inline images and audio to the Agent UI (#6384), and the new media card replaced the data that feature reads, so a relayed flagship turn would have lost its player. The card now keeps the tool's own path, and the Agent UI keeps drawing its own card. I also made the TUI and the backend refuse network-share paths before touching them, and added tests that a deleted file is refused without a crash and that open/reveal never goes through a shell on Windows, macOS or Linux. 🔍 Technical details
|
Summary
mediacard for successful generated image, music, sound-effect, and speech outputsCloses #6093.
Validation
go test ./internal/ui/cards ./internal/ui/chatpython -m pytest tests/unit/chat/ui/test_sse_handler.py tests/unit/test_sse_narration.py -q— 378 passedpython -m pytest hub/agents/email/python/tests/test_sse_translation.py -q— 54 passedpython -m py_compileon modified Python streaming modulesgit diff --checkThe available local Lemonade media service was not used; this PR validates the wire, path-safety and TUI rendering seams without claiming a live generation run.
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.