Skip to content

File upload#270

Merged
husseinmozannar merged 18 commits intomainfrom
file_upload
Jul 21, 2025
Merged

File upload#270
husseinmozannar merged 18 commits intomainfrom
file_upload

Conversation

@husseinmozannar
Copy link
Copy Markdown
Contributor

@husseinmozannar husseinmozannar commented Jul 17, 2025

Close #128

@husseinmozannar husseinmozannar marked this pull request as ready for review July 17, 2025 18:34
Comment thread frontend/src/components/views/chat/chat.tsx
Comment thread frontend/src/components/views/chat/chatinput.tsx Outdated
Comment thread frontend/src/components/views/chat/chatinput.tsx Outdated
Comment thread src/magentic_ui/backend/web/routes/runs.py
@tylerpayne
Copy link
Copy Markdown
Collaborator

@husseinmozannar I pushed a commit to fix some uncaught bugs with Docker images. Can you delete your local magentic-ui docker images and confirm my changes work for you? In particular: Try uploading a file and asking about it to make sure the file surfer can open it.

@husseinmozannar
Copy link
Copy Markdown
Contributor Author

@husseinmozannar I pushed a commit to fix some uncaught bugs with Docker images. Can you delete your local magentic-ui docker images and confirm my changes work for you? In particular: Try uploading a file and asking about it to make sure the file surfer can open it.

all good and working!

@husseinmozannar husseinmozannar requested a review from Copilot July 18, 2025 16:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements file upload functionality for the Magentic UI application. The implementation includes both backend and frontend changes to allow users to upload files that can be processed by AI agents during task execution.

Key changes:

  • Added a new /api/runs/{run_id}/upload endpoint for file uploads
  • Enhanced the TeamManager to track uploaded files and exclude them from generated file detection
  • Updated the frontend to support file uploads through the chat interface with improved file handling

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/magentic_ui/backend/web/routes/runs.py Added upload endpoint for handling file uploads to run directories
src/magentic_ui/backend/utils/utils.py Enhanced file processing to handle uploaded file references
src/magentic_ui/backend/teammanager/teammanager.py Added uploaded file tracking to prevent them from being marked as generated
src/magentic_ui/tools/playwright/browser/vnc_docker_playwright_browser.py Updated to use centralized browser image constant
src/magentic_ui/agents/file_surfer/_file_surfer.py Updated to use centralized Python image constant and improved system prompts
src/magentic_ui/agents/_coder.py Updated to use centralized Python image constant
frontend/src/components/views/chat/chatinput.tsx Removed file validation restrictions and improved file handling UI
frontend/src/components/views/chat/chat.tsx Added file upload processing and enhanced query handling
frontend/src/components/views/chat/runview.tsx Updated to pass files parameter through component chain
frontend/src/components/views/chat/detail_viewer.tsx Added files parameter to input response handler
frontend/src/components/views/chat/DetailViewer/fullscreen_overlay.tsx Added files parameter to input response handler
Comments suppressed due to low confidence (1)

src/magentic_ui/backend/teammanager/teammanager.py:375

  • [nitpick] Using _, _, _ to ignore return values makes the code less readable and harder to maintain. Consider using more descriptive variable names like team, novnc_port, playwright_port even if they're not used, or use a single _ if all values are truly unused.
                _, _, _ = await self._create_team(

Comment thread src/magentic_ui/backend/web/routes/runs.py
Comment thread src/magentic_ui/backend/teammanager/teammanager.py Outdated
Comment thread src/magentic_ui/backend/teammanager/teammanager.py Outdated
Comment thread frontend/src/components/views/chat/runview.tsx
Comment thread frontend/src/components/views/chat/chat.tsx
husseinmozannar and others added 2 commits July 18, 2025 12:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@tylerpayne tylerpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and looks good to me!

@husseinmozannar husseinmozannar merged commit 46df13a into main Jul 21, 2025
9 checks passed
@husseinmozannar husseinmozannar deleted the file_upload branch July 21, 2025 17:59
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.

Enable arbitrary file upload in UI

3 participants