docs: add invite code design and backlog for user_agents trigger
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Backlog - Known Issues & Improvements
|
||||
|
||||
## Database Triggers
|
||||
|
||||
### [TRIGGER-001] user_agents 自动创建
|
||||
|
||||
**Status**: Pending
|
||||
**Priority**: Medium
|
||||
**Created**: 2026-02-27
|
||||
|
||||
**Description**:
|
||||
当新用户注册时,`user_agents` 表未自动创建默认 Agent 配置记录。
|
||||
|
||||
**Current Behavior**:
|
||||
- `auth.users` → `profiles` 已有 trigger 自动创建
|
||||
- `user_agents` 无自动创建机制
|
||||
|
||||
**Expected Behavior**:
|
||||
新用户注册后,应有默认的 Agent 配置(如 INTENT_RECOGNITION、TASK_EXECUTION、RESULT_REPORTING 三种类型)。
|
||||
|
||||
**Impact**:
|
||||
- 用户首次使用 Agent Chat 功能时可能失败
|
||||
- 需要应用层手动初始化或前端引导配置
|
||||
|
||||
**Implementation Notes**:
|
||||
- 需要先确定 `user_agents` 的默认配置设计
|
||||
- 可通过 `on_auth_user_created` trigger 扩展
|
||||
- 或在 `profiles` trigger 中调用
|
||||
|
||||
**Related Files**:
|
||||
- `backend/alembic/versions/20260226_0001_initial_schema.py` (现有 trigger)
|
||||
- `backend/src/models/user_agents.py`
|
||||
- `backend/src/models/profile.py`
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user