feat(odin): OdinChat orchestrator; render on /odin; remove DashAssistant

Wire OdinTabs/OdinThread/InvoiceReviewCard/OdinComposer into a single
OdinChat orchestrator; mount it on /odin (maxWidth 1100); delete the
old DashAssistant and its aiHistoryOptions query helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-08 19:39:15 +02:00
parent 441f46a471
commit b7ebf04001
4 changed files with 474 additions and 647 deletions

View File

@@ -59,16 +59,3 @@ export const aiConversationMessagesOptions = (id: number) =>
staleTime: Infinity,
gcTime: 0,
});
export const aiHistoryOptions = () =>
queryOptions({
queryKey: ["ai", "history"],
queryFn: () =>
jsonQuery<{ messages: StoredChatMessage[] }>("/api/admin/ai/history"),
// Within a mount the thread is seeded once and mutated locally, so don't
// refetch on focus (staleTime Infinity). But gcTime 0 drops the cache on
// unmount, so every remount re-reads the DB (the source of truth) — this
// is what keeps a cleared/appended thread from resurrecting stale messages.
staleTime: Infinity,
gcTime: 0,
});