Repository navigation
feat(images): accept the new .infer/artifacts/<session-id> image paths - #113
Merged
Merged
Conversation
The CLI moved agent deliverables from the .infer/tmp scratch dir to .infer/artifacts/<session-id>/ (inference-gateway/cli#1058). Extend the asset-protocol scope, the save_image guard, and the frontend image-path allowlist to accept the new location while keeping .infer/tmp so existing conversations still render. Closes #112
Contributor
|
🎉 This PR is included in version 0.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CLI moved agent deliverables (generated images, WebFetch downloads, A2A artifacts) from the
.infer/tmpscratch dir to.infer/artifacts/<session-id>/(inference-gateway/cli#1058). The desktop app's image allowlists still only accepted.infer/tmp, so images saved to the new location would neither render in the transcript nor be savable to Downloads. This extends all three allowlists to accept the new path while keeping.infer/tmp, so existing conversations referencing old paths still render.Closes #112
Changes
backend/tauri.conf.json: asset-protocol scope now also serves$HOME/**/.infer/artifacts/**and$HOME/.infer/artifacts/**.backend/src/agent.rs:safe_image_source(thesave_imageguard) accepts paths under.infer/artifacts/in addition to.infer/tmp/; traversal and home-containment checks unchanged.frontend/lib/tools.ts:SAFE_IMAGE_PATHregex allows a single sanitized session-id segment underartifacts/.safe_image_source_guards_scopeandtools.test.tscovering artifacts paths, traversal rejection, and non-image extensions.Note: desktop prompts contain no image-location text - the CLI's own tool descriptions (updated in cli#1058) tell the model where files land, so no prompt changes were needed here.