Skip to content

refactor(config): group media output under tmp/media, scoped to the open project - #1486

Merged
edenreich merged 1 commit into
mainfrom
refactor/media-dirs
Oct 2, 2026
Merged

edenreich merged 1 commit into
mainfrom
refactor/media-dirs

Conversation

@edenreich

@edenreich edenreich commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Generated and retained media now share one media root with a subdirectory per kind.

Kind Before After
sound effects ~/.infer/tmp/sfx <root>/sfx
video ~/.infer/tmp/video <root>/video
music ~/.infer/tmp/music <root>/music
speech ~/.infer/tmp/tts <root>/tts
inbound voice ~/.infer/tmp/voice <root>/voice
screen recordings ~/.infer/tmp/recordings <root>/recordings
Telegram photo/video ~/.infer/tmp/media (flat) <root>/attachments
screenshots ~/.infer/projects/<slug>/tmp/screenshots <root>/screenshots

The root follows the open project. While the CLI runs in a project it is ~/.infer/projects/<slug>/tmp/media, so a project selected in the desktop app keeps its media to itself. It falls back to ~/.infer/tmp/media when the cwd is $HOME or the desktop's ~/.infer/workspace.

  • config.MediaDir(kind) resolves the root for every default. Explicit output_dir, recordings_dir, media.dir and screenshot.temp_dir overrides still win.
  • Both roots were already sandbox carve-outs (RuntimeArtifactDirNames / UserspaceRuntimeDirNames) and are wiped by /reset, so neither changes.
  • Telegram threads run in the daemon's own cwd, so the daemon that saves inbound files and the worker that reads them resolve the same root.
  • The two computer-use screenshot writers share one best-effort saveScreenshot helper now.
  • Nothing migrates. The old dirs hold disposable output and /reset clears them.

Cross-repo impact

Test plan

  • New TestMediaDir table test covers an open project, $HOME and ~/.infer/workspace
  • Default-dir assertions repointed in the config tests
  • go test ./...
  • task precommit:run

…pen project

Generated and retained media now share one media root with a subdirectory
per kind: sfx, video, music, tts, voice, recordings, screenshots and
attachments (Telegram photos and videos, formerly the flat tmp/media).

The root follows the open project. While the CLI runs in a project it is
~/.infer/projects/<slug>/tmp/media, so a project selected in the desktop
app keeps its media to itself. It falls back to ~/.infer/tmp/media when the
cwd is $HOME or the desktop's ~/.infer/workspace.

config.MediaDir resolves the root for every default. Explicit output_dir,
recordings_dir, media.dir and screenshot.temp_dir overrides still win. Both
roots were already sandbox carve-outs and are wiped by /reset.
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.223.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Oct 3, 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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant