♻️ refactor(chat): simplify chat service and update seed data

- Remove unused code from chat.service.ts
- Simplify seed.ts with fewer AI models
- Update CLAUDE.md documentation
- Update .env.example
- Remove unused package dependency
- Minor UI fix in chat page
This commit is contained in:
Wuesteon 2025-12-12 20:48:10 +01:00
parent 0fa154c7d6
commit 3f9bc5761b
6 changed files with 75 additions and 393 deletions

View file

@ -28,15 +28,17 @@
let showVersionsModal = $state(false);
let showDocumentPanel = $state(true);
// Track current request to prevent race conditions
let currentLoadId = $state(0);
// Track current request to prevent race conditions (not reactive to avoid effect loops)
let currentLoadId = 0;
let lastLoadedConversationId = '';
const conversationId = $derived($page.params.id ?? '');
const isDocumentMode = $derived(conversation?.documentMode ?? false);
// React to conversationId changes with race condition protection
$effect(() => {
if (conversationId) {
if (conversationId && conversationId !== lastLoadedConversationId) {
lastLoadedConversationId = conversationId;
loadData(conversationId);
}
});