From 8f7276ca1d5bb83c9dd8744c163ab56ba53d16b3 Mon Sep 17 00:00:00 2001 From: brianling Date: Sat, 18 Jul 2026 16:28:57 +0800 Subject: [PATCH] docs: add README.md and LICENSE (MIT) --- LICENSE | 21 ++++++++ README.md | 121 ++++++++++++++++++++++++++++++++++++++++++++++ project_files.txt | 24 --------- 3 files changed, 142 insertions(+), 24 deletions(-) create mode 100644 LICENSE create mode 100644 README.md delete mode 100644 project_files.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b96e04f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 AI-Grading-Assistant + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..202450a --- /dev/null +++ b/README.md @@ -0,0 +1,121 @@ +# AI 阅卷助手 (AI Grading Assistant) + +> 桌面端 AI Copilot — 零侵入式智能阅卷辅助工具 + +AI 阅卷助手是一款基于 **Electron + Vue 3 + TypeScript** 构建的桌面端 AI 阅卷辅助工具。教师可在现有阅卷系统中正常阅卷,通过全局快捷键(默认 `Alt+Q`)截图学生答案,AI 自动根据预设评分标准给出评分建议、扣分项和评语,帮助提升阅卷效率与一致性。 + +![Electron](https://img.shields.io/badge/Electron-42-blue) ![Vue](https://img.shields.io/badge/Vue-3.5-4FC08D) ![TypeScript](https://img.shields.io/badge/TypeScript-7-3178C6) ![License](https://img.shields.io/badge/License-MIT-yellow) + +--- + +## 功能特性 + +- **零侵入设计** — 独立运行,不干预现有阅卷系统 +- **全局截图** — `Alt+Q` 一键截图,支持矩形区域选择 +- **AI 智能评分** — 支持 GPT-4o / Qwen-VL / Claude 等多模态模型 +- **灵活评分标准** — 多题目、多维度评分标准配置,支持文本和图片参考答案 +- **结果确认** — 显示 AI 评分、置信度、扣分明细,教师可修改后确认 +- **历史记录** — 本地 SQLite 存储,支持搜索、浏览和复盘 +- **模板管理** — 评分标准可保存为模板,支持 JSON 导入/导出 +- **系统托盘** — 托盘常驻,后台运行,随时唤出 +- **高度可配置** — API 地址、模型、快捷键、主题、字体大小等均可自定义 + +--- + +## 快速开始 + +### 环境要求 + +- Node.js >= 20 +- npm >= 9 + +### 安装与运行 + +```bash +# 克隆仓库 +git clone https://github.com/your-username/ai-grading-assistant.git +cd ai-grading-assistant + +# 安装依赖 +npm install + +# 开发模式(Vite 热更新 + Electron) +npm run dev +``` + +### 打包构建 + +```bash +# 构建生产版本 +npm run build + +# 打包为 Windows 便携版 +npm run pack + +# 打包为 Windows 安装程序 (NSIS) +npm run dist +``` + +--- + +## 使用流程 + +1. 启动应用,系统托盘显示图标,浮动工具条自动置顶 +2. 在设置中配置 AI API Key 和模型 +3. 在评分标准编辑器中添加题目、参考答案和评分细则 +4. 打开学生答卷,按下 `Alt+Q` 截图答题区域 +5. AI 自动分析并返回评分建议、扣分项和评语 +6. 确认/修改评分后提交,结果保存至本地数据库 + +--- + +## 技术栈 + +| 类别 | 技术 | +|------|------| +| 桌面框架 | Electron 42 | +| 前端框架 | Vue 3.5 + TypeScript 7 | +| 构建工具 | Vite 8 | +| UI 组件库 | Element Plus 2 | +| 状态管理 | Pinia 4 | +| 本地存储 | better-sqlite3 + electron-store | +| HTTP 客户端 | Axios | +| 打包分发 | electron-builder (Windows x64) | + +--- + +## 项目结构 + +``` +├── electron/ # Electron 主进程 (TypeScript) +│ ├── main/ # 窗口、截图、快捷键、IPC、托盘 +│ └── preload/ # 预加载脚本 (contextBridge) +├── src/ # Vue 3 渲染进程 +│ ├── components/ # 浮动工具条、截图覆盖层、结果面板、设置、评分标准编辑器 +│ ├── pages/ # 历史记录、模板管理 +│ ├── stores/ # Pinia 状态管理 +│ ├── types/ # TypeScript 类型定义 +│ ├── utils/ # 工具函数 +│ └── styles/ # 全局样式 +├── database/ # SQLite 数据库 Schema +├── build/ # 应用图标 +├── dist/ # Vue 构建输出 +├── dist-electron/ # Electron 构建输出 +└── release/ # 打包输出 +``` + +--- + +## AI 接口 + +支持兼容 OpenAI Chat Completions 格式的任意多模态模型: + +- 默认接口:`https://api.siliconflow.cn/v1/chat/completions` +- 默认模型:`gpt-4o` +- 返回格式:结构化 JSON(评分、置信度、扣分明细、评语) + +--- + +## 许可证 + +本项目采用 [MIT License](LICENSE)。 diff --git a/project_files.txt b/project_files.txt deleted file mode 100644 index 6040193..0000000 --- a/project_files.txt +++ /dev/null @@ -1,24 +0,0 @@ -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\App.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\main.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\vite-env.d.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\assets\icon.png -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\components\FloatingToolbar.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\components\ResultDrawer.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\components\ScreenshotOverlay.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\components\SettingDialog.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\pages\HistoryPage.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\pages\TemplatePage.vue -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\router\index.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\stores\app.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\stores\grading.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\stores\settings.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\styles\main.css -D:\Workspace\Learn\AI\AI-Grading-Assistant\src\types\index.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\ipc.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\main.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\screenshot.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\shortcut.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\tray.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\main\window.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\electron\preload\preload.ts -D:\Workspace\Learn\AI\AI-Grading-Assistant\database\schema.sql