mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-12-01 12:03:26 +01:00
The tool column had no width and broke at every character, so names stacked vertically. Co-authored-by: Cursor <cursoragent@cursor.com>
Semi Design 工作台
CyberStrikeAI 默认从 / 打开 React + Semi Design 工作台。仪表盘、项目、资产、漏洞、文件、MCP 监控、
知识、技能、角色与智能体查看、平台权限、系统设置和 API 文档共用现有登录会话与权限。
旧入口 /classic 跳转到工作台,浏览器保留书签中的页面片段。/api-docs 跳转到 /#/api-docs。
智能体与角色页提供查看功能。设置页提供 Semi 工作台现有的设置分区,API 文档页用于浏览接口定义。
开发与验证
使用 Node.js 22。Vite 从 src/main.jsx 启动 React 和 Semi Design。页面在
src/pages/registry.js 注册,通过 src/lib/http.js 调用同源 API,词条复用 web/static/i18n/。
npm ci --prefix web/frontend
npm run --prefix web/frontend dev
npm run --prefix web/frontend build
node --test web/frontend/tests/*.test.mjs
npm run --prefix web/frontend test:ui
Vite 开发地址为 http://localhost:5199/static/app/。需要联调时,可为 dev 命令设置
CSAI_API_ORIGIN=http://127.0.0.1:8080。浏览器回归使用匿名数据和模拟接口,覆盖登录、导航、
权限、图谱、表单、设置及移动端布局。
构建产物写入 web/static/app/,随源码提交。服务端用现有静态资源路径提供 JS 和 CSS,
根路径返回构建后的 HTML。