Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add new use-query endpoint of upload files #2533

Merged
merged 17 commits into from
Jul 4, 2024

Conversation

Cristhianzl
Copy link
Member

@Cristhianzl Cristhianzl commented Jul 4, 2024

This pull request will change all requests of /files to useQuery package

@Cristhianzl Cristhianzl requested a review from anovazzi1 July 4, 2024 15:21
@Cristhianzl Cristhianzl self-assigned this Jul 4, 2024
@Cristhianzl Cristhianzl marked this pull request as ready for review July 4, 2024 15:21
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Jul 4, 2024
Copy link
Contributor

github-actions bot commented Jul 4, 2024

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has a valid title
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body

Result

Pull request is invalid.

Reason

  • Pull request must have a non-empty body

Last Modified at 04 Jul 24 15:24 UTC

@anovazzi1 anovazzi1 marked this pull request as draft July 4, 2024 15:27
@Cristhianzl Cristhianzl marked this pull request as ready for review July 4, 2024 16:53
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 4, 2024
Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

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

LGTM!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 4, 2024
@Cristhianzl Cristhianzl enabled auto-merge (squash) July 4, 2024 17:44
Cristhianzl and others added 9 commits July 4, 2024 15:37
♻️ (FileInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatView): refactor file upload mutation to use onSuccess and onError
♻️ (use-get-transactions.ts): simplify getTransactionsFn function
✨ (use-handle-file-change.tsx): add hook to handle file input changes
✨ (use-upload.tsx): add hook to handle file paste events
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

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

LGTM

@ogabrielluiz ogabrielluiz disabled auto-merge July 4, 2024 20:25
@ogabrielluiz ogabrielluiz enabled auto-merge (squash) July 4, 2024 20:25
@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Jul 4, 2024
@ogabrielluiz ogabrielluiz merged commit bfaac8b into main Jul 4, 2024
25 checks passed
@ogabrielluiz ogabrielluiz deleted the refactor/upload-files branch July 4, 2024 20:25
ogabrielluiz pushed a commit to yaitec/langflow that referenced this pull request Jul 9, 2024
* refactor: add new use-query endpoint of upload files

* extend type for payload callbackSuccess

* [autofix.ci] apply automated fixes

* bugfix: drag and drop image on chat not working

* Refactored query function to use Options

* Used dedicated function as queryFn

* ✨ (API): export use-post-upload-file in files index
♻️ (FileInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatView): refactor file upload mutation to use onSuccess and onError

* ♻️ (use-get-download-images.ts): simplify getDownloadImagesFn function
♻️ (use-get-transactions.ts): simplify getTransactionsFn function
✨ (use-handle-file-change.tsx): add hook to handle file input changes
✨ (use-upload.tsx): add hook to handle file paste events

* Added type on Request Processor

---------

Co-authored-by: anovazzi1 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <[email protected]>
nicoloboschi pushed a commit to datastax/ragstack-ai-langflow that referenced this pull request Jul 10, 2024
* refactor: add new use-query endpoint of upload files

* extend type for payload callbackSuccess

* [autofix.ci] apply automated fixes

* bugfix: drag and drop image on chat not working

* Refactored query function to use Options

* Used dedicated function as queryFn

* ✨ (API): export use-post-upload-file in files index
♻️ (FileInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatInput): refactor file upload mutation to use onSuccess and onError
♻️ (chatView): refactor file upload mutation to use onSuccess and onError

* ♻️ (use-get-download-images.ts): simplify getDownloadImagesFn function
♻️ (use-get-transactions.ts): simplify getTransactionsFn function
✨ (use-handle-file-change.tsx): add hook to handle file input changes
✨ (use-upload.tsx): add hook to handle file paste events

* Added type on Request Processor

---------

Co-authored-by: anovazzi1 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <[email protected]>
(cherry picked from commit bfaac8b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants