Skip to content

fix: protect downloads and stream JSON output#124

Merged
RyanLee-Dev merged 2 commits intoMiniMax-AI:mainfrom
NianJiuZst:fix/safe-download-stream-json
May 11, 2026
Merged

fix: protect downloads and stream JSON output#124
RyanLee-Dev merged 2 commits intoMiniMax-AI:mainfrom
NianJiuZst:fix/safe-download-stream-json

Conversation

@NianJiuZst
Copy link
Copy Markdown
Contributor

Summary

  • Write downloads to a temporary file and atomically replace the destination only after a complete transfer.
  • Keep mmx text chat --output json machine-readable by avoiding default streaming and suppressing token writes for explicit streamed JSON.
  • Add regression tests for failed downloads and streamed JSON output.

Testing

  • bun test test/files/download.test.ts test/commands/text/chat.test.ts test/commands/video/download.test.ts test/commands/video/generate.test.ts
  • bun run typecheck

@RyanLee-Dev RyanLee-Dev merged commit 2c20191 into MiniMax-AI:main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants