9 Commits

Author SHA1 Message Date
Haoxin Li
4381f86f4c feat: enhance workspace handling with concurrency control and improved retry logic 2025-08-13 18:04:38 +08:00
Haoxin Li
d00ce49c0d feat: integrate pgvector for semantic search and embedding generation
- Added pgvector-go dependency for vector operations.
- Implemented embedding generation using OpenAI API in a new service.
- Enhanced CodeSnippetRepo to support semantic search using vector similarity.
- Updated CodeSnippetUsecase to generate embeddings during snippet creation.
- Added methods for semantic search by workspace and general semantic search.
- Improved error handling and logging for embedding generation and vector search.
- Removed unnecessary debug logs in socket handlers for cleaner output.

feat: enhance CodeSnippet functionality with workspacePath for improved context and semantic search

feat: add embedding and workspace path fields to CodeSnippet for semantic search functionality

feat: enhance SemanticSearchByWorkspace to include cosine similarity score in results

feat: 优化心跳处理逻辑,支持多种数据类型

refactor: 修复日志记录

feat: add migration for embedding and workspace_path columns in code_snippets table
2025-08-08 15:59:41 +08:00
Haoxin Li
4b5784d391 refactor: update CodeSnippet and workspace handling for improved clarity and structure 2025-07-30 14:48:58 +08:00
Haoxin Li
35a893e1d2 refactor: update struct field types from interface{} to any for improved type safety 2025-07-28 17:59:54 +08:00
chriscco
a03d6647d5 fix: 修复了CLI传入字段的对齐问题
fix: Update GetAndSaveReq structure to use WorkspaceID and FileMetas fields

feat: Update GetAndSave request structure to include workspace_id and refactor related code
2025-07-28 16:20:57 +08:00
Haoxin Li
f321e19fd6 feat: Implement CodeSnippet functionality with repository and use case layers, update CLI command references 2025-07-28 14:39:27 +08:00
Haoxin Li
9388e149d6 feat: Add CodeSnippet entity and related functionality
- Introduced CodeSnippet schema with fields for snippet details and relationships to WorkspaceFile.
- Enhanced WorkspaceFileUpdate and WorkspaceFileUpdateOne to manage snippets, including adding, removing, and clearing snippet relationships.
- Updated Swagger documentation to include new API endpoints for CLI command execution and workspace file management.
- Implemented domain structures for handling code files and AST parsing results.
- Refactored Workspace and WorkspaceFile use cases to support new functionalities.
- Adjusted CLI command execution to handle code file information in JSON format.
- Improved error handling and logging throughout the workspace and file management processes.
2025-07-25 19:35:00 +08:00
Haoxin Li
0d8673a54d feat: Enhance workspace management with new methods and ensure workspace existence 2025-07-25 19:04:59 +08:00
Haoxin Li
b5ecb92371 feat: feat: Implement workspace and real-time file synchronization
- Added WorkspaceFileHandler for handling workspace file operations including create, update, delete, and list functionalities.
- Introduced WorkspaceFileRepo for database interactions related to workspace files.
- Created WorkspaceFileUsecase to encapsulate business logic for workspace file management.
- Implemented API endpoints for workspace file operations with appropriate request and response structures.
- Added database migrations for creating workspaces and workspace_files tables with necessary constraints and indexes.
- Enhanced user authentication and authorization for workspace file operations.
2025-07-23 17:42:20 +08:00