🔧 fix: Reduce debounce time for rapid text input in useAutoSave hook from 65ms to 25ms for improved responsiveness
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Has been cancelled
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Has been cancelled

This commit is contained in:
Danny Avila 2025-12-19 12:14:53 -05:00
parent 0ae3b87b65
commit 5740ca59d8
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956

View file

@ -105,10 +105,10 @@ export const useAutoSave = ({
return;
}
/** Use shorter debounce for saving text (65ms) to capture rapid typing */
/** Use shorter debounce for saving text (25ms) to capture rapid typing */
const handleInputFast = debounce(
(value: string) => setDraft({ id: conversationId, value }),
65,
25,
);
/** Use longer debounce for clearing empty values (850ms) to prevent accidental draft loss */