feat(odin): conversation-scoped service + routes (replace /history)

Remove single-thread getChatHistory/appendChatMessages/clearChatHistory and the
three /history routes; add listConversations, createConversation, getConversation-
Messages, appendConversationMessages, renameConversation, deleteConversation with
ownership checks and auto-title; wire six /conversations[/:id] routes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-08 19:19:03 +02:00
parent c5cfd855ba
commit 6664e3bc4d
3 changed files with 187 additions and 41 deletions

View File

@@ -24,6 +24,14 @@ export const AiHistoryAppendSchema = z.object({
.max(20, "Příliš mnoho zpráv"),
});
export const AiCreateConversationSchema = z.object({
title: z.string().max(255).optional(),
});
export const AiRenameConversationSchema = z.object({
title: z.string().min(1, "Název je povinný").max(255),
});
export const AiBudgetSchema = z.object({
budget_usd: z
.union([z.number(), z.string()])