From 16bfcfbcdef7d79bd10871dd14007556ad1981fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Fri, 13 Feb 2026 14:51:26 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=20Copilot=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/copilot-instructions.md | 148 ++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..5874c97 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,148 @@ +--- +applyTo: "**" +--- + +## 项目架构与关键信息 + +### 项目概览 +- **类型**: Tauri 2 应用 +- **前端**: SvelteKit + Tailwind CSS + Vite +- **后端**: Rust 1.92.0+ (2024 edition) +- **包管理**: Deno (前端) + Cargo (Rust) +- **主要功能**: 利用 LLM 解析招标文件,拆解分析招标需求和关键点,按照招标文件要求生成投标文件草稿。 + +### 核心架构 +``` +bidding-agent/ +├── src/ # SolidJS 前端应用入口 +├── src-tauri/ # Tauri 主应用 (Rust) +├── crates/ # 辅助功能库: +│ └── agency # LLM控制库,提供Context、Memory功能 +└── package.json # 前端依赖及任务配置 +``` + +### 前后端通信 +- 前端调用: `invoke("command_name", { args })` (Tauri API) +- 插件暴露 API: `package.json` 中本地路径依赖 (`file:./tauri-plugin-*`) +- 所有插件命令必须通过 `#[tauri::command]` 宏注册 + +### 关键约束 +- **Rust 版本**: 严格要求 1.92.0+,使用 2024 edition +- **构建空间**: 项目需要大量磁盘空间(Rust 编译特性),可用 `cargo clean` 清理 + +## 开发工作流 + +### 启动开发环境 +```bash +deno task tauri dev +``` +- 启动 Vite 热重载 (端口 1420) +- 编译 Rust 后端 +- 构建并运行应用 + +### 构建应用 +```bash +deno task tauri build +``` + +### 清理缓存 +```bash +cd src-tauri && cargo clean +``` +使用此命令释放磁盘空间。 + +## Git Commit Message 规范 + +### Commit 格式 +使用以下格式生成 Git Commit Messages: +``` +(): + + + +