feat: Add title regeneration and fix special character handling
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:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request. (Filled below)
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description. (Filled below)
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources? (Please check if applicable)
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation? (Please check if applicable)
Testing: Have you written and run sufficient tests to validate the changes? (Please check if applicable)
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? (Assuming self-review is done)
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following: (Used 'feat')
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
This pull request introduces a feature for manually triggering the regeneration of chat titles via the chat menu, addressing the need described in issue #13234.
It also includes a fix to correctly handle responses from certain models that may return special characters, preventing potential display or processing issues. Especially for models in the Gemini series, they often return content with ”```“ characters.
Added
Menu option ("Regenerate title") to manually regenerate chat titles.
Changed
(Leave empty or describe refactoring if any was done alongside the feature/fix)
Deprecated
(Leave empty unless applicable)
Removed
(Leave empty unless applicable)
Fixed
Improved handling of special characters in model responses to ensure proper processing and display.
Addresses issue #13234 by providing a way to regenerate titles when automatic generation fails or is undesirable.
Security
(Leave empty unless applicable)
Breaking Changes
(Leave empty unless applicable)
Additional Information
The title regeneration feature aims to improve user experience by allowing manual correction or regeneration of chat titles, as requested in issue #13234.
The special character handling fix addresses issues observed with specific model outputs.
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, 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.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/13366
**Author:** [@wayne0926](https://github.com/wayne0926)
**Created:** 4/30/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `feature/title-regeneration`
---
### 📝 Commits (1)
- [`21df736`](https://github.com/open-webui/open-webui/commit/21df7360051f22f8187aaeeda0836d629d8c9185) Added the title regeneration feature and fixed the handling logic for some models that return special characters
### 📊 Changes
**3 files changed** (+105 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/apis/index.ts` (+38 -2)
📝 `src/lib/components/layout/Sidebar/ChatItem.svelte` (+55 -0)
📝 `src/lib/components/layout/Sidebar/ChatMenu.svelte` (+12 -0)
</details>
### 📄 Description
feat: Add title regeneration and fix special character handling
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request. (Filled below)
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. (Filled below)
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? (Please check if applicable)
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? (Please check if applicable)
- [x] **Testing:** Have you written and run sufficient tests to validate the changes? (Please check if applicable)
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? (Assuming self-review is done)
- [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: (Used 'feat')
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
- This pull request introduces a feature for manually triggering the regeneration of chat titles via the chat menu, addressing the need described in issue [#13234](https://github.com/open-webui/open-webui/issues/13234).
- It also includes a fix to correctly handle responses from certain models that may return special characters, preventing potential display or processing issues. Especially for models in the Gemini series, they often return content with ”```“ characters.
### Added
- Menu option ("Regenerate title") to manually regenerate chat titles.
### Changed
- (Leave empty or describe refactoring if any was done alongside the feature/fix)
### Deprecated
- (Leave empty unless applicable)
### Removed
- (Leave empty unless applicable)
### Fixed
- Improved handling of special characters in model responses to ensure proper processing and display.
- Addresses issue [#13234](https://github.com/open-webui/open-webui/issues/13234) by providing a way to regenerate titles when automatic generation fails or is undesirable.
### Security
- (Leave empty unless applicable)
### Breaking Changes
- (Leave empty unless applicable)
---
### Additional Information
- The title regeneration feature aims to improve user experience by allowing manual correction or regeneration of chat titles, as requested in issue [#13234](https://github.com/open-webui/open-webui/issues/13234).
- The special character handling fix addresses issues observed with specific model outputs.
- Fixes #13234
### 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](CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13366
Author: @wayne0926
Created: 4/30/2025
Status: ❌ Closed
Base:
dev← Head:feature/title-regeneration📝 Commits (1)
21df736Added the title regeneration feature and fixed the handling logic for some models that return special characters📊 Changes
3 files changed (+105 additions, -2 deletions)
View changed files
📝
src/lib/apis/index.ts(+38 -2)📝
src/lib/components/layout/Sidebar/ChatItem.svelte(+55 -0)📝
src/lib/components/layout/Sidebar/ChatMenu.svelte(+12 -0)📄 Description
feat: Add title regeneration and fix special character handling
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
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
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, 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.