Commit Graph

2 Commits

Author SHA1 Message Date
朱潮
680dd02595 新增对外客户访问体系:share token + end-user 账号
- migrations: 加 agent_user.is_end_user 列、新建 agent_bot_share_tokens 表
- routes/bot_share: share token CRUD、客户账号 CRUD、公开 bot-share 信息接口
- routes/bot_manager: 登录/校验响应带 is_end_user,客户账号跳过 New API 同步
- routes/chat: /api/v3/chat/completions 增加 share_token 与 bot_id 一致性校验
- utils/api_models: ChatRequestV3 加 share_token 字段
- fastapi_app: 注册 bot_share router
2026-06-26 14:10:43 +08:00
朱潮
2e928cbc9c feat: 添加单智能体模式 (Single Agent Mode)
为特定用户群体提供简化的智能体访问体验:
- 后端通过环境变量配置模板智能体
- 登录时自动为用户复制模板 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>
2026-02-26 08:05:18 +08:00