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

Delete all files button #1568

Closed
wants to merge 6 commits into from

Conversation

Robinsane
Copy link
Contributor

Button to delete all ingested files. (+ ability to disable the button in settings.yaml)

When first using pgpt I could've used this myself (now I use Python SDK)
I saw multiple cases where people wanted something similar (issues / Discord).

issue example:
#1559

@Robinsane
Copy link
Contributor Author

Will look into expanding this PR /w button to delete just 1 file

@Robinsane
Copy link
Contributor Author

Added code with a button to delete a single file

Not happy yet with this:

  • multiple users deleting single file at the same time => problem : only last selected file will be deleted (will not happen often & you can disable button in settings.yaml)
  • I'd like to refresh the list of ingested files somehow but can't seem to figure out how

Copy link

@lalbacore lalbacore left a comment

Choose a reason for hiding this comment

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

Accepting these changes.

Copy link

@TobiasJu TobiasJu left a comment

Choose a reason for hiding this comment

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

Cloned the repo, ran the code.
Thanks for your work!
Found one minor issue. The "Delete all files" button is permanently disabled.

image

@Robinsane
Copy link
Contributor Author

Robinsane commented Feb 16, 2024

@TobiasJu
This was intentional
See settings.yaml

delete_file_button_enabled: true
delete_all_files_button_enabled: false

If most of you agree I'll make both true by default
I was thinking for multiple users you don't want an accidental click to go poof (especially since for now there's no visual feedback that private GPT is doing a huge cleanup)
(the other button seemed fine, since it doesn't do anything in most cases unless a file is selected)

EDIT:
Ivan Martinez: "concurrency is out of scope of the default UI"
=> I guess making the "delete all" button enabled by default makes sense :)

@imartinez
Copy link
Collaborator

Included in #1612

(btw, I made both buttons visible by default)

@imartinez imartinez closed this Feb 16, 2024
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.

4 participants