fix: Add debounced Undo/Redo system to avoid character-by-character history
- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
This commit is contained in:
14
mcp-server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
generated
vendored
Normal file
14
mcp-server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export function addErrorMessage(res, key, errorMessage, refs) {
|
||||
if (!refs?.errorMessages)
|
||||
return;
|
||||
if (errorMessage) {
|
||||
res.errorMessage = {
|
||||
...res.errorMessage,
|
||||
[key]: errorMessage,
|
||||
};
|
||||
}
|
||||
}
|
||||
export function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
||||
res[key] = value;
|
||||
addErrorMessage(res, key, errorMessage, refs);
|
||||
}
|
||||
Reference in New Issue
Block a user