Skip to content

Conversation

@thomasjfox
Copy link

@thomasjfox thomasjfox commented Nov 23, 2025

  • Add 'Delete all conversations' functionality with confirmation dialog
  • Add Trash icon and destructive styling for clear visual indication
  • Include success summary showing count of deleted conversations

@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:

webui-delete-all-conversations

Copy link
Collaborator

@allozaur allozaur left a 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.

- 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()
@thomasjfox thomasjfox force-pushed the webui-delete-all-conversations branch from 43553bb to 8404ae1 Compare December 4, 2025 22:13
@thomasjfox
Copy link
Author

Thanks for the feedback!

I had to do quite a few things:

  • rebase and refactor the code to the new "conversations" API introduced in server: introduce API for serving / loading / unloading multiple models #17470.

  • replaced the introduced alert() calls with toast notifications and tested them.

    I also updated one existing alert() to have one of those nicer toast notifications.

  • the new conversationsStore.deleteConversation() API redirects to "?new_chat=true#/"
    as per my original idea, so I've replaced the delete-summary dialog with toast.success(), too.

  • Animated GIF has been added to the initial PR comment.

Regarding AI disclosure under the new, recent policy: MiniMax M2 running on llama.cpp helped with the Svelte parts.

@thomasjfox
Copy link
Author

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?

  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.

Copy link
Collaborator

@allozaur allozaur left a 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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants