Skip to content

fix: protect downloads and stream JSON output#124

Open
NianJiuZst wants to merge 2 commits intoMiniMax-AI:mainfrom
NianJiuZst:fix/safe-download-stream-json
Open

fix: protect downloads and stream JSON output#124
NianJiuZst wants to merge 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

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.

1 participant