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:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user