Skip to content

feat(images): accept the new .infer/artifacts/<session-id> image paths - #113

Merged
edenreich merged 1 commit into
mainfrom
feat/artifacts-image-paths
Aug 12, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/artifacts-image-paths

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

The CLI moved agent deliverables (generated images, WebFetch downloads, A2A artifacts) from the .infer/tmp scratch 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 (the save_image guard) accepts paths under .infer/artifacts/ in addition to .infer/tmp/; traversal and home-containment checks unchanged.
  • frontend/lib/tools.ts: SAFE_IMAGE_PATH regex allows a single sanitized session-id segment under artifacts/.
  • Tests: new ok/err cases in safe_image_source_guards_scope and tools.test.ts covering 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.

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
@edenreich
edenreich marked this pull request as ready for review August 12, 2026 21:39
@edenreich
edenreich merged commit 1e9294b into main Aug 12, 2026
1 check passed
@edenreich
edenreich deleted the feat/artifacts-image-paths branch August 12, 2026 21:39
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Embed conversation images from the new .infer/artifacts directory

1 participant