feat(mongo-file): add file download cards and preview functionality#269
Open
JegernOUTT wants to merge 9 commits intomainfrom
Open
feat(mongo-file): add file download cards and preview functionality#269JegernOUTT wants to merge 9 commits intomainfrom
JegernOUTT wants to merge 9 commits intomainfrom
Conversation
olegklimov
approved these changes
Mar 27, 2026
olegklimov
reviewed
Mar 27, 2026
b388274 to
7c2bd3b
Compare
Add comprehensive bot publishing workflow to marketplace with GitHub auth and Docker image building. Introduce avatar generation from style refs using xAI Grok Imagine. Key changes: - `publish_marketplace` tool with build/submit_to_review modes - `generate_avatar` tool with style bank seeding and idea-based generation - Backend GraphQL mutations: `botwiz_marketplace_action`, avatar RPCs - Frontend marketplace action menu and OAuth popup handling - Improved expert reuse by fexp_id and provenance tracking - Style bank manifest and default assets in flexus-client-kit
Introduce _FULLSIZE_TARGET (1024x1536) and resize logic that: - Scales images proportionally to fit within target dimensions - Centers the scaled image on a transparent canvas - Applies to both WebP conversion and direct file saving Ensures consistent output dimensions while preserving aspect ratio.
Introduce _encode_webp_within_limit() to progressively reduce quality from 100 down to 40 until image fits within 250KB limit, preventing upload failures due to oversized files. Replace direct WebP saves with this function in fullsize and 256px avatar generation.
- Add `render` operation to mongo_store tool for generating download cards - Implement backend support for dynamic Content-Disposition (inline/attachment) - Create FileDownloadCard and FilePreviewDialog Vue components - Add frontend parsing for 📎DOWNLOAD: protocol in tool responses - Support preview for images, PDF, HTML, SVG, text/JSON/YAML files (5MB limit) - Enhance MIME type detection with SVG, MD, YAML, XML support - Add i18n support for download/preview UI (en/es/pt) - Auto-generate download cards in Python executor artifacts
a7333bd to
ef8599b
Compare
…link - Update schema enum, docstring, examples, and error messages - Remove redundant file existence check in render_download_link handler
- Use quicksession store to add `Authorization: Session` header in FileDownloadCard and FilePreviewDialog - Fetch files as blobs via authFetch helper for secure download/preview - Support blob URLs for image/PDF previews with proper cleanup - Update backend fi_mongo_store to derive persona_id from toolcall.connected_persona_id
- Adds `patch` op to schema, args (`old_text`, `new_text`), and help text/example - Implements find-and-replace: requires exact single match, text files only (not JSON), validates UTF-8, overwrites file on success
- Remove restriction preventing patch on .json paths - For JSON files, retrieve `json` field and stringify with `json.dumps(indent=4)` - For other files, continue using `data` field decoded as UTF-8 - Update client docs to reflect broader patch support Changes apply to both backend API and client integration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
renderoperation to mongo_store tool for generating download cards