mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #15906] [CLOSED] debounce on chat input. #95018
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/15906
Author: @jvz-devx
Created: 7/21/2025
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (3)
5fbfe2bMerge pull request #15879 from open-webui/dev8da07f6Debounce and defer draft autosave in Chat.svelte93bfc6aRefactor draft autosave logic in Chat.svelte to use a constant for maximum input length📊 Changes
1 file changed (+15 additions, -4 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+15 -4)📄 Description
Pull Request Checklis# 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:
devbranch.got instant ERESOLVE could not resolve errors when trying to install the packages of this project, but i only added 1 package:
import { debounce } from 'lodash-es'
Testing: Have you written and run sufficient tests to validate the changes?
[] 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?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
Changelog Entry
Description
sessionStorage.Added
lodash-esfor thedebouncehelper.saveDrafthelper in Chat.svelte that debounces input changes and usesrequestIdleCallbackfor non-blocking writes.Changed
Chat.svelte
sessionStorage.setItem(JSON.stringify(input))on everyMessageInputchange withsaveDraft(input).Reduced synchronous workload on input events to keep the UI responsive.
Deprecated
Removed
sessionStorage.setItem(...)in theonChangehandler of<MessageInput>.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 (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.