refactor(files): optimize file deletion logic for better performance

Refactor the file deletion logic in FilesStore to precompute prefixes and iterate through files only once. This reduces the complexity of nested loops and improves performance by applying all deletions in a single update to the store. Additionally, remove a redundant console.log statement in Chat.client.tsx and update the prompts documentation for clarity.
This commit is contained in:
KevIsDev
2025-04-19 12:57:14 +01:00
parent 9b4736921f
commit 443dc646fb
3 changed files with 42 additions and 19 deletions

View File

@@ -249,8 +249,6 @@ export const ChatImpl = memo(
});
}, [messages, isLoading, parseMessages]);
console.log('messages', messages);
const scrollTextArea = () => {
const textarea = textareaRef.current;