为特定用户群体提供简化的智能体访问体验: - 后端通过环境变量配置模板智能体 - 登录时自动为用户复制模板 bot - 前端根据配置显示简化的侧边栏入口 后端变更: - 添加 single_agent_bot_id 字段到 agent_user 表 - settings.py 添加单智能体模式配置 - 登录接口返回 single_agent 配置 环境变量: - SINGLE_AGENT_MODE: 是否启用单智能体模式 - TEMPLATE_BOT_ID: 模板智能体 ID - TEMPLATE_BOT_NAME: 模板智能体名称 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
589 B
SQL
16 lines
589 B
SQL
-- ============================================================
|
|
-- Single Agent Mode Migration
|
|
-- 为用户表添加单智能体 bot_id 字段
|
|
-- ============================================================
|
|
|
|
-- 添加 single_agent_bot_id 字段
|
|
ALTER TABLE agent_user
|
|
ADD COLUMN IF NOT EXISTS single_agent_bot_id UUID;
|
|
|
|
-- 创建索引
|
|
CREATE INDEX IF NOT EXISTS idx_agent_user_single_agent_bot
|
|
ON agent_user(single_agent_bot_id) WHERE single_agent_bot_id IS NOT NULL;
|
|
|
|
-- 添加注释
|
|
COMMENT ON COLUMN agent_user.single_agent_bot_id IS '单智能体模式下用户的专属智能体ID';
|