- Refactor message saving strategy from automatic to manual saving - Save messages only on key operations: send, complete, edit, delete, role toggle, clear - Prevent frequent localStorage writes during streaming responses - Remove excessive console logging - Remove all console.log statements from save/load operations - Clean up debug logs to reduce console noise - Optimize initial state loading with lazy initialization - Replace useRef with useState lazy initialization for config and messages - Ensure loadConfig and loadMessages are called only once on mount - Prevent redundant localStorage reads during re-renders - Update hooks to support new save strategy - Pass saveMessages callback through component hierarchy - Add saveMessagesImmediately to relevant hooks (useApiRequest, useMessageActions, useMessageEdit) - Trigger saves at appropriate lifecycle points This significantly improves performance by reducing localStorage I/O operations from continuous writes during streaming to discrete saves at meaningful points.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| components | Loading commit data... | |
| constants | Loading commit data... | |
| context | Loading commit data... | |
| helpers | Loading commit data... | |
| hooks | Loading commit data... | |
| i18n | Loading commit data... | |
| images | Loading commit data... | |
| pages | Loading commit data... | |
| utils | Loading commit data... | |
| App.js | Loading commit data... | |
| index.css | Loading commit data... | |
| index.js | Loading commit data... |