Files
api-worker/helloagents/modules/admin-ui.md
T
lsy 9195000f62 refactor(ui): 将 admin 目录更名为 ui 并同步配置
- 迁移 apps/admin → apps/ui 并更新构建引用
- 同步 wrangler、tsconfig、bun.lock 与 .gitignore
- 更新 CI 与文档/知识库路径
2026-02-21 14:33:10 +08:00

28 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# admin-ui 模块
## 职责
- 管理台前端展示与操作
- 覆盖渠道、模型、令牌、日志、面板与设置
## 接口定义
- 调用 `/api/*` 管理接口
- 登录后使用 Bearer token
## 行为规范
- Vite 构建静态文件
- 构建产物 `apps/ui/dist` 由 Worker Static Assets 托管
- 使用 `hono/jsx/dom` + TSX 渲染管理台入口
- 入口文件为 `apps/ui/src/App.tsx`(`main.tsx` 已移除)
- 按 `core/`(类型/常量/API)、`features/`(业务视图 + 布局/登录)组织前端模块
- 样式基于 Tailwind v4(结合全局主题变量)
- 前端状态集中在单页
- 渠道管理采用列表视图,支持分页(默认 10 条),新增/编辑使用弹窗,保留启禁/连通测试操作
- 使用日志支持本地分页(默认 50 条)与固定高度滚动,并展示令牌、输入/输出 tokens、首 token 延迟、流式与推理强度
- 令牌管理采用列表视图(默认每页 10 条),生成令牌使用弹窗表单,并展示创建时间与前缀
- 列表分页页脚统一使用页码导航 + 每页条数选择,并显示总页数,顶部不显示条数与每页选择
- Token 仅本地保存,不回显
## 依赖关系
- `auth` / `channels` / `models` / `tokens` / `usage` / `dashboard` / `settings` 模块