-
Notifications
You must be signed in to change notification settings - Fork 14k
webui: add "delete all conversations" button to import/export tab #17444
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
base: master
Are you sure you want to change the base?
webui: add "delete all conversations" button to import/export tab #17444
Conversation
allozaur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor tweaks needed :) also it'd be great if you attached a short video demo in the PR description.
Last, but not least, after we've got the PR approved, i will ask you to push the new static build, but let's first wait to make sure the PR is ready code-wise.
tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte
Outdated
Show resolved
Hide resolved
tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte
Outdated
Show resolved
Hide resolved
tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte
Outdated
Show resolved
Hide resolved
- Add 'Delete all conversations' functionality with confirmation dialog - Add Trash icon and destructive styling for clear visual indication - Redirects to "?new_chat=true#/" by using conversationsStore.deleteConversation()
43553bb to
8404ae1
Compare
|
Thanks for the feedback! I had to do quite a few things:
Regarding AI disclosure under the new, recent policy: MiniMax M2 running on llama.cpp helped with the Svelte parts. |
|
Two small things from my side:
|
allozaur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small things from my side:
1. Is it safe that conversationsStore.deleteConversation() triggers await goto(`?new_chat=true#/`) while further conversations will be deleted by handleDeleteAllConfirm()? In my testing all conversations were indeed deleted. To phrase differently, is the goto() only executed by the browser when handleDeleteAllConfirm() is done?
We have this goto only if we are on an active conversation route:
if (this.activeConversation?.id === convId) {
this.activeConversation = null;
this.activeMessages = [];
await goto(`?new_chat=true#/`);
}But actually now taking a look at this i realize that instead of handling the delete all logic inside of the component, this should be sth like conversationsStore.deleteAll() method used from the UI component.
So please create this new method in the conversations store and then use it from the component level :)
2. I did rebuild the webui build, but I would not trust me, the random-stranger-from-the-Internet, to do that. ^^ Ideally an established team member does the builds and commits the minified JS-code. I've deployed the changed webui internally and it works, but who knows if my build environment is clean / set up properly. Just my two cents.
No worries, if you ran npm run dev, git hooks pass on pre-commit and npm run build works, it's all good ;)
@allozaur let me know what you think about the general approach here.
While testing I noticed I need to clear the current conversion. This is done using chatStore.clearActiveConversation(). A different approach would be to redirect to "?new_chat=true#/" to show the fancy banner.
This is my first time working with TypeScript or Svelte. As a C++ / Rust systems programmer, I appreciate your patience. 😁 Feel free to edit the code any way you like.
UPDATE: Demo video of the improved version: