feat: add AI chat builder endpoints and update quota service

6 endpoints: create session, send message, get session, generate tree,
import to editor, abandon. Quota service daily limit updated to include
chat builder generation types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-27 03:54:08 -05:00
parent babfd0c6d9
commit ef96b1a12f
3 changed files with 431 additions and 1 deletions

View File

@@ -115,7 +115,7 @@ async def check_ai_quota(
select(func.count(AIUsage.id)).where(
AIUsage.user_id == user_id,
AIUsage.succeeded == True, # noqa: E712
AIUsage.generation_type.in_(["scaffold", "branch_detail"]),
AIUsage.generation_type.in_(["scaffold", "branch_detail", "chat_message", "chat_generate"]),
AIUsage.created_at >= day_start,
)
) or 0