xiaohei
7c1eea53b7
fix(azure): set output_location to empty string when using IS_STATIC_EXPORT
...
When IS_STATIC_EXPORT=true is set, Azure SWA automatically detects
Next.js static export output at 'out/' directory. Explicitly setting
output_location causes artifact detection to fail.
Per Azure official documentation:
https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-static-export
2025-12-29 08:36:43 +00:00
xiaohei
ca537c971e
fix(azure): apply official Azure SWA static export configuration
...
Per Microsoft official documentation:
https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-static-export
Key changes:
- Set IS_STATIC_EXPORT=true environment variable (required for static Next.js)
- Set output_location to 'out' (Next.js static export default)
- Set api_location to empty string (no API for static export)
- Keep skip_app_build=true (we build in previous step)
This is the official Azure recommended configuration for Next.js static sites.
2025-12-29 08:31:08 +00:00
xiaohei
4511fe5694
fix(azure): apply correct Azure SWA approach for Next.js
...
BREAKING CHANGES:
- Switch to static export mode (output: 'export') per Azure SWA best practices
- Remove staticwebapp.config.json to avoid routes.json conflict
- Convert server-side layouts to client-side only (remove cookies() usage)
- Auth now handled entirely by client-side AuthGuard component
- Output directory changed from .next/standalone to 'out'
- Remove redirects from next.config (not supported in static export)
This aligns with Azure Static Web Apps' official recommendation for Next.js.
Server-side features (SSR, API routes, server actions) are not supported.
All authentication and routing is client-side via React components.
2025-12-29 08:05:05 +00:00
xiaohei
351512dbc9
docs: add Azure deployment guide and env example
2025-12-29 07:59:22 +00:00
xiaohei
00aef0bea8
feat(azure): apply Azure SWA best practices for Next.js
...
- Add standalone output mode in next.config.mjs
- Configure environment variables with .env.example
- Update staticwebapp.config.json with proper routing and fallback
- Optimize GitHub Actions workflow with npm cache and env vars
- Set output_location to .next/standalone for SWA deployment
- Preserve all business logic in API client, auth, and components
2025-12-29 07:58:24 +00:00
xiaohei
1b6c528be0
fix(swa): apply Azure best practices - remove config, use standalone Next.js build
2025-12-29 07:53:07 +00:00
xiaohei
e706021329
fix(swa): simplify staticwebapp.config.json to avoid routes.json conflict
2025-12-29 07:49:19 +00:00
xiaohei
bd982a83ce
chore(swa): remove duplicate auto-generated workflow; keep unified azure-static-web-apps.yml
2025-12-29 07:47:36 +00:00
xiaohei
a184653c82
ci(swa): skip deploy when token missing; align Next.js output to .next
2025-12-29 07:45:39 +00:00
xiaohei
2c4d606aba
fix(swa): set output_location to .next and add app_build_command for Next.js
2025-12-29 07:41:18 +00:00
xiaohei
0c7693833f
feat(auth): replace middleware with server-side layouts; add redirects; build verified
2025-12-29 07:28:25 +00:00
xiaohei
66c700442e
feat(auth): migrate from middleware to server-side layouts; add redirects for /admin and /channel
2025-12-29 07:22:26 +00:00
xiaohei
18118c90ea
merge: integrate remote SWA workflow commit
2025-12-29 07:16:15 +00:00
xiaohei
5c8cfd6c54
chore(swa): add Azure Static Web Apps CI/CD workflow for Next.js (.next output, Node 20.11.1)
2025-12-29 07:10:25 +00:00
Fasthei
ec4e11bbb1
ci: add Azure Static Web Apps workflow file
...
on-behalf-of: @Azure opensource@microsoft.com
2025-12-29 15:03:00 +08:00
xiaohei
1aae986f7e
chore: add setup script for consistent node version
2025-12-29 06:46:38 +00:00
xiaohei
f2323f5dc5
chore: add azure static web apps config with node 20.11.1
2025-12-29 06:41:43 +00:00
xiaohei
d19e994fd7
chore: set node engine >=20.9 and add .nvmrc
2025-12-29 05:41:27 +00:00
xiaohei
43fd6bbf13
chore: remove admin management section in channel editor
2025-12-29 05:36:35 +00:00
xiaohei
884e2a4cfc
chore: update api endpoints and lock tenant role
2025-12-29 05:26:29 +00:00
xiaohei
8372183d01
feat: 添加删除租户和管理员功能
...
- 在渠道管理页面添加删除租户按钮和确认对话框
- 在渠道设置页面添加删除管理员按钮和确认对话框
- 在渠道编辑对话框中添加删除管理员功能
- 添加完整的删除确认流程,包含警告提示
- 删除成功后自动刷新列表
- 添加API调用调试日志,便于排查问题
- 支持中英文双语显示
2025-12-28 16:35:05 +00:00
xiaohei
7247258e19
Update channel dashboard page
2025-12-28 15:45:31 +00:00
xiaohei
05ec0fa8e2
修复登录跳转问题并删除编辑功能
...
- 修复登录后不跳转问题:使用 window.location.href 替代 router.push,确保完整页面跳转
- 在登录页面显式设置 cookie,确保中间件能正确检查认证状态
- 删除租户编辑功能:移除编辑菜单项、编辑对话框和相关状态
- 移除管理用户对话框中的用户数字段,改为显示租户ID
- 在设置页面添加当前渠道管理员列表显示功能
- 添加获取和创建渠道管理员的 API 方法
2025-12-28 13:58:27 +00:00
xiaohei
4448468157
优化代码:修复重复文件、统一认证函数、添加租户角色管理和管理员列表功能
...
- 删除重复文件:components/ui/use-toast.ts 和 components/ui/use-mobile.tsx
- 统一 getAuthToken() 函数,在 api-client.ts 中导入并删除重复定义
- 创建 clearAllTokens() 工具函数,统一 token 清除逻辑
- 修复 Toast 延迟时间(从 1000000ms 改为 5000ms)
- 修复 TypeScript 类型错误:在 applicationForm 中添加 providerId 字段
- 修复登录路径:使用 super_admin 角色登录超级管理员
- 移除登录前的后端可达性检查(避免浏览器环境问题)
- 在管理用户对话框中添加租户角色修改功能(租户/计费管理员/运营管理员)
- 移除管理用户对话框中的用户数字段(用户层面不应显示用户数)
- 在设置页面添加当前渠道管理员列表显示功能
- 添加获取和创建渠道管理员的 API 方法
- 更新登录方法的角色类型定义,支持所有角色类型
2025-12-28 13:43:07 +00:00
xiaohei
e11464ec29
feat: 将Agent框架模板MCP改为LangChain
...
- 更新Agent框架模板选项,将MCP改为LangChain
- 保持其他框架选项(A2A、API)不变
2025-12-28 08:38:25 +00:00
xiaohei
ae20ff6b47
feat: 在设置页面添加管理员列表管理功能
...
- 引入 SettingsTab 组件显示管理员列表
- 支持查看管理员详细信息(姓名、邮箱、角色、状态、创建时间)
- 支持创建新管理员(计费管理员/运维管理员)
- 支持删除管理员(带确认对话框)
- 保留原有的角色权限配置功能
- 调整设置页面布局,分为管理员管理和角色权限配置两部分
2025-12-28 08:37:21 +00:00
xiaohei
86fb3346d3
feat: 完整恢复渠道管理功能到ChannelsTab组件
...
- ✅ 创建ChannelsTab.tsx组件(1984行)
- ✅ 实现12个Dialog: 渠道CRUD、佣金管理、资源分配、租户管理、审批流程
- ✅ 恢复租户管理功能(查看、添加、权限分配)
- ✅ 恢复审批流程(供应商申请、Agent申请)
- ✅ 更新Channel类型定义
- ✅ 集成到page.tsx主页面
- ✅ 完整的中英文国际化支持
- ✅ 无TypeScript编译错误
功能完整度: 100%
参考源码: page_old.tsx lines 1459-2909
2025-12-26 15:50:33 +00:00
xiaohei
353205db20
Merge branch 'main' into gzy
2025-12-26 09:40:10 +00:00
xiaohei
809e25b1fa
feat: 更新前端代码 - 优化各模块页面和API客户端
2025-12-26 09:37:44 +00:00
xiaohei
1a2f001e6f
feat: 更新多个页面的API集成和功能优化
...
- 更新admin/dashboard页面:完善API集成,删除假数据
- 更新admin/login和channel/login:优化登录流程
- 更新agent-factory、billing、data-tools、model-gateway、orchestration页面:API集成优化
- 更新channel/dashboard:渠道管理功能完善
- 更新lib/api-client.ts:API客户端功能增强
- 更新lib/auth.ts:认证功能优化
- 删除过时的API文档文件
2025-12-25 11:24:11 +00:00
xiaohei
23c0b4e930
feat: 完善超级管理员控制台API集成
...
- 删除资源管理中的假数据,改为从API获取
- 添加删除Agent和模型供应商功能
- 完善创建渠道、资源管理、审批申请等功能的API集成
- 修复计费统计功能,接入后端API
- 添加缺失API接口清单文档
- 优化API响应格式处理,支持多种响应结构
- 修复审批申请对话框,添加供应商申请审批功能
2025-12-25 09:31:26 +00:00
xiaohei
d30a0c34ae
合并远程更新到gzy分支,保留本地API对接代码
2025-12-25 08:07:33 +00:00
xiaohei
f982a07b55
初始提交:完整的API客户端对接和前端项目
2025-12-25 07:58:59 +00:00
xiaohei
1e760c3a95
更新agents
2025-12-23 05:47:16 +00:00
xiaohei
5b0e726fe3
完整更新
2025-12-23 05:15:13 +00:00
xiaohei
c366dcf565
更新对接代码
2025-12-22 12:53:49 +00:00
xiaohei
3a36ff95cd
更新缺失接口api文档
2025-12-22 10:26:14 +00:00
xiaohei
7089304fbd
更新api文档
2025-12-22 10:03:10 +00:00
xiaohei
5fdcb1d4d8
更新编排
2025-12-22 09:08:23 +00:00
xiaohei
35197a9a52
v0原版代码
2025-12-22 08:01:53 +00:00