mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #14753] [CLOSED] feat: toggle to delete chats in folder #23578
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14753
Author: @expruc
Created: 6/7/2025
Status: ❌ Closed
Base:
dev← Head:feat/folder_dont_delete_chats📝 Commits (5)
db91439feat: add toggle to delete chats on folder deletion36c9024cleanupb19cc8eci issues: fix20e9e8eci issues: fix6db2e8aci issues: black-linting📊 Changes
57 files changed (+213 additions, -63 deletions)
View changed files
📝
backend/open_webui/models/chats.py(+5 -0)📝
backend/open_webui/models/folders.py(+18 -1)📝
backend/open_webui/routers/folders.py(+6 -1)📝
src/lib/apis/folders/index.ts(+5 -2)📝
src/lib/components/layout/Sidebar/RecursiveFolder.svelte(+23 -7)📝
src/lib/i18n/locales/ar-BH/translation.json(+3 -1)📝
src/lib/i18n/locales/ar/translation.json(+3 -1)📝
src/lib/i18n/locales/bg-BG/translation.json(+3 -1)📝
src/lib/i18n/locales/bn-BD/translation.json(+3 -1)📝
src/lib/i18n/locales/bo-TB/translation.json(+3 -1)📝
src/lib/i18n/locales/ca-ES/translation.json(+3 -1)📝
src/lib/i18n/locales/ceb-PH/translation.json(+3 -1)📝
src/lib/i18n/locales/cs-CZ/translation.json(+3 -1)📝
src/lib/i18n/locales/da-DK/translation.json(+3 -1)📝
src/lib/i18n/locales/de-DE/translation.json(+3 -1)📝
src/lib/i18n/locales/dg-DG/translation.json(+3 -1)📝
src/lib/i18n/locales/el-GR/translation.json(+3 -1)📝
src/lib/i18n/locales/en-GB/translation.json(+3 -1)📝
src/lib/i18n/locales/en-US/translation.json(+3 -1)📝
src/lib/i18n/locales/es-ES/translation.json(+3 -1)...and 37 more files
📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
When deleting a folder, instead of deleting the chats in said folder automatically I have added a button to toggle chat deletion. If user chooses to not delete chats the chats are moved back to the default chats folder (where new chats are placed).
Added
Additional Information
This is to mitigate #14578. If user chooses to keep chats both archived and non-archived chats are not deleted.
I have used the existing flag
delete_chatsin thedelete_folder_by_id_and_user_idfunction, and added functionality to find all the chats in a directory and move them to default chats folder (folder with null id).Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.