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:
8
mcp-server/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
generated
vendored
Normal file
8
mcp-server/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export const getRelativePath = (pathA, pathB) => {
|
||||
let i = 0;
|
||||
for (; i < pathA.length && i < pathB.length; i++) {
|
||||
if (pathA[i] !== pathB[i])
|
||||
break;
|
||||
}
|
||||
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
||||
};
|
||||
Reference in New Issue
Block a user