Files
erp-ass/CHANGELOG.md
dazhuang acd73431ae feat: implement ERP AI Assistant Phase 1
Backend (FastAPI + SQLAlchemy + Claude API + RAG):
- Config management with Pydantic v2
- Database engine with connection pooling and SQL injection prevention
- AI engine with Claude API integration (support custom base URL)
- RAG engine with ChromaDB and sentence-transformers
- Requirement analysis service
- Config generation service
- Executor engine with SQL validation
- REST API endpoints: /analyze, /generate, /execute

Frontend (Vue 3 + Element Plus + Pinia):
- Complete 3-step workflow: analyze → generate → execute
- Step indicator with progress visualization
- Analysis result display with field table
- SQL preview with monospace font
- Execute confirmation dialog with safety warning
- Execution result display
- State management with Pinia
- API service integration

Security:
- SQL injection prevention with parameterized queries
- Dangerous SQL operation blocking
- Database password URL encoding
- Transaction auto-rollback
- Pydantic config validation

Features:
- Natural language requirement analysis
- Automated SQL configuration generation
- Safe execution with human review
- LAN access support
- Custom Claude API endpoint support

Documentation:
- README with quick start guide
- Quick start guide
- LAN access configuration
- Dependency fixes guide
- Claude API configuration
- Git operation guide
- Implementation report

Dependencies fixed:
- numpy<2.0.0 for chromadb compatibility
- sentence-transformers==2.7.0 for huggingface_hub compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 14:23:20 +00:00

160 lines
3.6 KiB
Markdown
Raw Permalink 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.
# 更新日志
## [v1.1.0] - 2026-03-21
### 🎉 新增功能
#### 前端完整工作流程
-**需求分析界面**: 输入自然语言需求,展示结构化分析结果
-**配置生成界面**: 预览生成的 SQL 配置语句
-**执行配置界面**: 确认对话框 + 执行结果展示
-**步骤指示器**: 清晰显示当前进度(分析 → 生成 → 执行)
#### API 服务封装
- 创建 `frontend/src/api/index.js`: 封装三个核心 API 调用
- `analyzeRequirement()`: 需求分析
- `generateConfig()`: 配置生成
- `executeConfig()`: 配置执行
#### 状态管理
- 创建 `frontend/src/stores/function.js`: Pinia 状态管理
- 会话管理
- 分析结果存储
- 配置结果存储
- 执行结果存储
- 加载状态管理
#### UI 组件增强
- **分析结果展示**:
- 使用 `el-descriptions` 展示基本信息
- 使用 `el-table` 展示字段列表
- 标签化显示(功能类型、必填项等)
- **SQL 配置预览**:
- 等宽字体显示
- 15 行文本框
- 只读模式
- **执行确认对话框**:
- 安全警告提示
- 二次确认机制
- **执行结果展示**:
- 成功/失败状态图标
- 详细消息展示
### 🔧 功能改进
#### 后端集成
- 更新 `backend/app/api/generate.py`: 自动存储生成的 SQL 到会话存储
- 完善前后端数据流:分析 → 生成 → 存储 → 执行
#### 用户体验优化
- ✅ 所有异步操作添加 loading 状态
- ✅ 友好的错误提示消息
- ✅ 表单必填项验证
- ✅ 危险操作二次确认
- ✅ 支持重新开始整个流程
### 📚 文档更新
- 创建 `docs/QUICK_START.md`: 完整的快速上手指南
- 创建 `docs/FRONTEND_UPDATE.md`: 前端功能说明文档
- 更新 `README.md`: 添加快速上手指引
### 🐛 问题修复
- 修复前端无分析结果展示的问题
- 修复缺少配置生成和执行按钮的问题
- 修复工作流程不完整的问题
---
## [v1.0.0] - 2026-03-21
### 🎉 初始发布
#### 后端核心功能
- ✅ 配置管理Pydantic v2
- ✅ 数据库引擎SQLAlchemy + pyodbc
- ✅ AI 引擎Claude API 集成)
- ✅ Prompt 模板设计
- ✅ RAG 引擎ChromaDB + sentence-transformers
- ✅ 需求解析服务
- ✅ 配置生成服务
- ✅ 执行引擎SQL 安全验证)
#### API 层
- ✅ FastAPI 应用框架
- ✅ 请求/响应模型Pydantic
- ✅ 三个核心端点:
- POST `/api/v1/analyze`
- POST `/api/v1/generate`
- POST `/api/v1/execute`
#### 前端基础
- ✅ Vue 3 + Vite 项目结构
- ✅ Vue Router 路由配置
- ✅ Element Plus UI 集成
- ✅ 基础布局Layout、CreateFunction、History
#### 安全特性
- ✅ SQL 注入防护(参数化查询)
- ✅ 危险 SQL 操作拦截
- ✅ 数据库密码 URL 编码
- ✅ 事务自动回滚
- ✅ Pydantic 配置验证
#### 配置支持
- ✅ 自定义 Claude API base URL支持代理/自托管)
- ✅ 局域网访问支持
- ✅ 环境变量管理
#### 文档
- ✅ README.md
- ✅ 实施报告
- ✗ API 配置指南
- ✗ 局域网访问指南
- ✗ 依赖问题修复指南
---
## 路线图
### [v1.2.0] - 计划中
- [ ] SQL 语法高亮显示
- [ ] 配置导出功能
- [ ] 历史记录页面
- [ ] 数据库元数据查询 API
- [ ] 知识库管理界面
### [v1.3.0] - 计划中
- [ ] 执行日志和审计系统
- [ ] 配置模板库
- [ ] 批量操作支持
- [ ] 错误诊断功能
### [v2.0.0] - 未来
- [ ] 多用户权限管理
- [ ] 配置版本控制
- [ ] CI/CD 集成
- [ ] 性能优化分析工具
---
**版本命名规范**: 遵循 [语义化版本](https://semver.org/lang/zh-CN/)