dark
899288180a
feat: Phase 2 AI management CRUD — providers, models, API keys
Backend:
- Add provider/model/key types and routes to ai.api + base.api
- Generate 11 handler + logic stubs via goctl
- Implement provider CRUD logic (list/create/update/delete)
- Implement model admin CRUD logic (create/update/delete)
- Implement API key CRUD logic (list/create/update/delete)
- Add Casbin policies for key management and admin endpoints
- Add menu seeds with proper icons (Cpu, Key, MessageSquare)
Frontend:
- Add provider/model/key TypeScript types and API client methods
- Create AIModelManagementPage with provider + model tabs
- Create AIKeyManagementPage with key CRUD and provider dropdown
- Register routes and page titles for /ai/models and /ai/keys
- Add Cpu, Key, MessageSquare icons to Sidebar icon map
1 month ago
dark
057cb12eba
fix: seedRoleMenus adds missing menus + SSE error display
- seedRoleMenus now adds new menu items to existing roles
- AIChatPage shows SSE error messages in assistant bubble
1 month ago
dark
9be5893f6f
feat: implement conversation CRUD + model list + quota logic
- Conversation list/create/get/update/delete (user-scoped)
- Model list with provider names
- Quota info (ensure + return balance)
1 month ago
dark
f1d1549595
feat: implement AI chat completions with SSE streaming
- Custom SSE handler (replaces goctl stub)
- Chat() for non-streaming, ChatStream() for SSE
- Provider selection (user key > system key)
- Quota freeze/settle/unfreeze billing flow
- Usage recording + conversation message saving
1 month ago
dark
e672c8eb76
feat: add AI API definitions and goctl-generated code
- ai.api: chat completions, conversations CRUD, models, quota
- 8 handlers + 8 logic stubs generated
- Routes registered with Cors,Log,Auth middleware
1 month ago
dark
0e3173189f
feat: add AI billing module (quota + usage)
- QuotaService: CheckAndFreeze, Settle, Unfreeze
- UsageService: Record, UpdateConversationStats
- Skip billing for user-provided API keys
1 month ago
dark
9f7466064c
feat: seed AI providers, models, Casbin policies, menu
- 5 providers: OpenAI, Claude, Qwen, Zhipu, DeepSeek
- 9 models with pricing and capabilities
- Casbin policies for AI routes (user role)
- AI 对话 menu item
1 month ago
dark
3937c72d14
feat: add AI provider abstraction layer
- AIProvider interface (Chat + ChatStream)
- OpenAI-compatible adapter (covers OpenAI, Qwen, Zhipu, DeepSeek)
- Anthropic adapter (Claude models)
- Factory pattern for provider creation
- Unified types (ChatRequest, ChatResponse, StreamChunk)
1 month ago
dark
332f2cf59b
feat: add 7 AI entity models + AutoMigrate
- AIProvider, AIModel, AIApiKey (platform config)
- AIConversation, AIChatMessage (chat data)
- AIUsageRecord, AIUserQuota (billing data)
- AutoMigrate updated in servicecontext.go
1 month ago
dark
38f4e740fa
feat: implement all backend logic for menu, role, org management
1 month ago
dark
6df3f8795f
feat: API definitions and goctl generated code for menu/role/org
1 month ago
dark
41b1e091ce
feat: add currentOrgId to User entity, JWT Claims, and auth middleware
1 month ago
dark
d2cb7fa8c8
feat: login by phone/username, register requires phone, seed uses username
1 month ago
dark
f7ab873ca7
refactor: remove email from JWT Claims and auth context
1 month ago
dark
d92aba8294
feat: 仪表盘对接后端 API,添加仪表盘 E2E 测试
1 month ago
dark
40e5ccfb70
user
1 month ago
dark
8a12ad04db
Initial commit: Add project structure and .gitignore
2 months ago