mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-08-04 20:08:40 +00:00
* fix(frontend): strip and parse the <current_uploads> upload context tag #4174 renamed the upload context block that UploadsMiddleware prepends to the user message from <uploaded_files> to <current_uploads>, but the frontend tag vocabulary was not updated, so the raw block (file list plus usage guidance) rendered inside the user's chat bubble and the file-chip content fallback stopped matching. Add the new tag to stripUploadedFilesTag, INTERNAL_MARKER_TAGS (covers export and streamdown preprocessing), parseUploadedFiles, and the chip fallback detection. <uploaded_files> stays supported for history and IM-channel messages. * fix(frontend): parse upload-context sizes to bytes for the file chip parseUploadedFiles stored the raw leading number of the human-readable size (e.g. parseInt("177.6 KB") -> 177) into FileInMessage.size, which is documented as bytes. On the content-fallback chip path (history/IM messages without additional_kwargs.files) formatBytes then rendered a 177.6 KB file as "0.2 KB". Convert the backend's "<n> KB" / "<n> MB" form back to bytes so the chip re-renders at the original magnitude; update the parse tests to assert byte values.