feat: 添加仓库管理页面和 AI 功能,优化路由和导航

- 新增仓库列表页面,支持查看和管理 CNB 仓库
- 添加 AI 代理系统和状态管理
- 新增 tags-input、popover、textarea、tooltip 等 UI 组件
- 更新依赖:@kevisual/cnb 升级至 0.0.22,添加 idb-keyval
- 改进路由守卫:未配置 API Key 时自动跳转配置页
- 优化 Dialog 遮罩层样式和整体布局

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 04:44:28 +08:00
parent 0ced574b8b
commit a2629fec7b
22 changed files with 1606 additions and 62 deletions

48
AGENTS.md Normal file
View File

@@ -0,0 +1,48 @@
# AGENTS.md
本指南为在此仓库中工作的 AI 编码代理提供关键信息。
## 项目结构
```
src/
├── components/ui/ # shadcn/ui 组件Base UI 基础组件)
├── lib/ # 工具函数cn() 函数用于 className 合并)
├── modules/ # 应用模块query client、basename
├── pages/ # 页面组件(默认导出)
├── routes/ # TanStack Router 基于文件的路由
├── styles/ # 全局样式、主题 CSS
└── main.tsx # 应用入口
```
## 代码风格指南
### 模块目录结构
每个新模块(如 `page-app`)应遵循以下结构:
```
pages/page-app/
├── components/ # 模块专属组件
├── store/ # 模块状态管理
└── module/ # 模块功能函数
```
### 状态和数据获取
- **Zustand** 用于全局状态管理
- **@kevisual/query** 用于数据获取QueryClient 实例位于 `src/modules/query.ts`
- **React Hook Form** 用于表单管理
## 核心依赖
- **@base-ui/react**: Headless UI 基础组件
- **@tanstack/react-router**: 基于 TanStack Router 插件的文件路由
- **class-variance-authority**: 基于变体的样式系统
- **clsx + tailwind-merge**: 通过 `cn()` 提供 className 工具函数
- **lucide-react**: 图标库
- **react-hook-form**: 表单处理
- **sonner**: Toast 通知
- **zustand**: 状态管理
- **tailwindcss v4**: 使用 @tailwindcss/vite 插件进行样式处理