Skip to content

Conversation

@Yash3561
Copy link

@Yash3561 Yash3561 commented Feb 8, 2026

Summary

Added support for users to attach files to their messages. The files are uploaded to the backend and their text content is injected into the prompt sent to the agent.

Implementation Details

Backend

  • Added POST /files/upload endpoint.
  • Introduced StorageProvider abstract base class to handle file storage.
    • Implemented LocalStorageProvider for saving files to the local disk (uploads/ directory).
    • Used run_in_threadpool for file I/O to avoid blocking the async event loop.
  • Updated MessagesUseCase to retrieve file content and append it to the message text.

Frontend

  • Added file selection button to the chat input component.
  • Implemented useUploadFile hook to handle the upload request.
  • Displays uploaded files as chips in the UI.

Notes

  • The storage implementation is modular. For production, we can swap LocalStorageProvider with an S3 implementation without changing the core logic.
  • Validation is currently set to a 10MB limit and restricts file types to common text/image formats.

Verification

  • Added unit tests for the upload endpoint (scripts/test_upload_isolated.py was used for verification).
  • Verified the UI components build and render correctly via npm run dev.

@Yash3561 Yash3561 requested a review from a team as a code owner February 8, 2026 09:20
@socket-security
Copy link

socket-security bot commented Feb 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​radix-ui/​react-label@​2.1.7 ⏵ 2.1.81001006691100
Updatednpm/​@​radix-ui/​react-separator@​1.1.7 ⏵ 1.1.81001006791100
Updatednpm/​@​vitest/​coverage-v8@​4.0.6 ⏵ 4.0.1899 +11006999100
Addednpm/​@​radix-ui/​react-slot@​1.2.41001006991100
Addednpm/​@​types/​uuid@​10.0.01001007081100
Addednpm/​@​types/​ws@​8.18.11001007481100
Updatednpm/​@​types/​react-dom@​19.1.6 ⏵ 19.2.310010075 +187100
Updatednpm/​agentex@​0.1.0-alpha.9 ⏵ 0.1.0-alpha.1475 -510099 +195 +4100
Updatednpm/​vitest@​4.0.6 ⏵ 4.0.1896 -110079 +199100
Updatednpm/​@​types/​react@​19.1.8 ⏵ 19.2.131001007996100
Updatednpm/​@​codemirror/​state@​6.5.2 ⏵ 6.5.49910079 +188100
Updatednpm/​@​types/​node@​20.19.9 ⏵ 20.19.32100 +110081 +196100
Updatednpm/​@​vitest/​ui@​4.0.6 ⏵ 4.0.189910082 +199 +2100
Updatednpm/​@​eslint/​eslintrc@​3.3.1 ⏵ 3.3.39910010084100
Updatednpm/​tailwindcss@​4.1.11 ⏵ 4.1.18100 +110084 -198100
Updatednpm/​react@​19.1.1 ⏵ 19.2.4100 +110084 +197100
Updatednpm/​@​codemirror/​autocomplete@​6.19.0 ⏵ 6.20.099 +110085 +185100
Updatednpm/​@​codemirror/​view@​6.38.6 ⏵ 6.39.129610085 +196100
Updatednpm/​@​tanstack/​react-query@​5.90.3 ⏵ 5.90.209910088 +198 -1100
Updatednpm/​happy-dom@​20.0.10 ⏵ 20.5.09510088 +196 +3100
Updatednpm/​tw-animate-css@​1.3.6 ⏵ 1.4.01001009488100
Updatednpm/​@​hookform/​resolvers@​5.2.1 ⏵ 5.2.29910010088100
Updatednpm/​@​uiw/​react-codemirror@​4.25.2 ⏵ 4.25.499 +110010089 -4100
Updatednpm/​prettier@​3.6.2 ⏵ 3.8.190 -310097 +196100
Updatednpm/​prettier-plugin-tailwindcss@​0.7.1 ⏵ 0.7.29810010092 -3100
Updatednpm/​@​testing-library/​react@​16.3.0 ⏵ 16.3.29910010092100
Updatednpm/​react-dom@​19.1.1 ⏵ 19.2.4100 +110092 +198100
Updatednpm/​eslint-plugin-prettier@​5.5.4 ⏵ 5.5.59910010094100
Updatednpm/​react-hook-form@​7.62.0 ⏵ 7.71.197100100 +194100
Updatednpm/​@​vitejs/​plugin-react@​5.1.0 ⏵ 5.1.3100 +110010096 +4100
Updatednpm/​jsdom@​27.1.0 ⏵ 27.4.097100100 +196 +2100
Updatednpm/​framer-motion@​12.23.24 ⏵ 12.33.097 +2100100100 +1100
See 1 more rows in the dashboard

View full report

@Yash3561
Copy link
Author

Yash3561 commented Feb 8, 2026

Hey @MichaelSun48, since you've been leading the core framework development, I'd love your eyes on the StorageProvider implementation here. I wanted to ensure the abstraction was clean enough to support S3/GCP adapters for the Enterprise version without breaking the existing local dev flow.

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