Commit Graph

7 Commits

Author SHA1 Message Date
lintsinghua bfef3b35a6 feat(projects): add ZIP file upload support and source type tracking
- Add source_type field to projects model to distinguish between repository and ZIP sources
- Implement ZIP file storage service with save, load, delete, and metadata operations
- Add database migration to populate source_type for existing projects
- Create ZIP upload endpoint with file handling and metadata tracking
- Add ZIP download endpoint for project file retrieval
- Implement project ZIP info endpoint to check file status and metadata
- Update project creation to support both repository and ZIP source types
- Add project type constants and utility functions for source type handling
- Update database export/import to include source_type field
- Extend frontend components to support ZIP file uploads in project creation
- Add instant analysis page for direct ZIP file scanning without project creation
- Update .gitignore to exclude uploaded ZIP files and metadata
- Enhance project detail and task detail pages with ZIP file management UI
2025-11-28 17:38:12 +08:00
lintsinghua 7091f891d1 feat(llm): enhance LLM connection testing with improved error handling and adapter instantiation
- Bypass LLMFactory cache during connection tests to ensure fresh API calls with latest configuration
- Directly instantiate native adapters (Baidu, Minimax, Doubao) and LiteLLM adapter based on provider type
- Add comprehensive error handling in LiteLLM adapter with specific exception catching for authentication, rate limiting, and connection errors
- Implement user-friendly error messages for common failure scenarios (invalid API key, authentication failure, timeout, connection issues)
- Add response validation to detect and report empty API responses
- Disable LiteLLM internal caching to guarantee actual API calls during testing
- Update available models list with 2025 latest models across all providers (Gemini, OpenAI, Claude, Qwen, DeepSeek, etc.)
- Improve error message clarity and debugging information in config endpoint
2025-11-28 16:53:01 +08:00
lintsinghua 22c528acf1 refactor(llm): consolidate LLM adapters with LiteLLM unified layer
- Replace individual adapter implementations (OpenAI, Claude, Gemini, DeepSeek, Qwen, Zhipu, Moonshot, Ollama) with unified LiteLLM adapter
- Keep native adapters for providers with special API formats (Baidu, MiniMax, Doubao)
- Update LLM factory to route requests through LiteLLM for supported providers
- Add test-llm endpoint to validate LLM connections with configurable timeout and token limits
- Add get-llm-providers endpoint to retrieve supported providers and their configurations
- Update config.py to ignore extra environment variables (VITE_* frontend variables)
- Refactor Baidu adapter to use new complete() method signature and improve error handling
- Update pyproject.toml dependencies to include litellm package
- Update env.example with new configuration options
- Simplify adapter initialization and reduce code duplication across multiple provider implementations
2025-11-28 16:41:39 +08:00
lintsinghua b733181663 fix(api): restrict project and task queries to current user
- Filter projects endpoint to return only projects owned by current user
- Filter tasks endpoint to return only tasks from current user's projects
- Update statistics endpoint to calculate stats scoped to current user's data
- Add filtering logic for projects, tasks, and issues based on user ownership
- Improve data isolation and security by preventing cross-user data access
2025-11-28 01:11:21 +08:00
lintsinghua 5676211b20 feat(users): add comprehensive user management with search, filtering, and admin controls
- Add paginated user list endpoint with search by email, name, and phone
- Implement role-based and status filtering for user queries
- Add total count to user list response for pagination UI
- Create new Account page component for user profile management
- Add PUT /me endpoint for users to update their own profile information
- Add GET /{user_id} endpoint to retrieve specific user details
- Add PUT /{user_id} endpoint for admin user updates with full control
- Add DELETE /{user_id} endpoint for admin user deletion with self-protection
- Add POST /{user_id}/toggle-status endpoint to enable/disable user accounts
- Implement admin-only access control on user creation and management endpoints
- Add phone field support to user schema and creation flow
- Update user list response schema with pagination metadata
- Improve query validation with min/max constraints on pagination parameters
- Add Chinese localization to user-facing error messages and docstrings
- Update frontend routes to include new Account page
- Update Sidebar navigation to support account management links
- Update Login page styling to match new UI design system
2025-11-28 01:06:01 +08:00
lintsinghua 7d1925db66 feat: Refactor frontend layout with new sidebar and i18n, update backend LLM adapters, and adjust database models. 2025-11-27 18:01:57 +08:00
lintsinghua 6ce5b3c6c1 refactor: 重构项目结构,将前端和后端代码分离到独立目录
- 将前端代码移动到 frontend/ 目录
- 将后端代码移动到 backend/ 目录
- 更新 .gitignore 以包含 Python 和前端构建产物
- 修复 LLM JSON 解析问题,增强错误处理
- 修复前端配置默认值,改为从后端获取
- 删除 AdminDashboard 中的数据库信息和统计卡片
- 完善系统配置管理,支持从后端获取默认配置
2025-11-26 21:11:12 +08:00