Commit Graph

10 Commits

Author SHA1 Message Date
c886d9a02f feat: enhance DocumentSchema and DocumentService with Redis integration and background processing
- Updated DocumentSchema to include RedisService for improved background processing of grammar checks.
- Refactored checkGrammarForPage method in DocumentService to utilize Promise.all for parallel processing and error handling.
- Introduced background grammar check functionality with a low probability trigger, enhancing performance and user experience.
- Added new utility methods for better time management and error logging.

These changes improve the efficiency and responsiveness of the grammar checking feature, leveraging Redis for state management and background processing.
2024-12-14 21:54:43 +07:00
ed8df7a1bc feat: enhance grammar checking functionality in DocumentSchema and DocumentService
- Updated the 'testCheckGrammar' field in DocumentSchema to accept additional arguments: documentId, pageId, and promptType, allowing for more flexible grammar checking options.
- Modified the checkGrammarForPage method in DocumentService to utilize the new promptType argument, enabling different processing types (CHECK_GRAMMAR, REWRITE_TEXT, etc.) for grammar checks.
- Improved logging for better debugging and tracking of grammar check results.

These changes enhance the document editing experience by providing more robust grammar checking capabilities and leveraging AI for various text processing tasks.
2024-12-13 18:07:20 +07:00
68353d8985 feat: implement AI suggestion 2024-12-12 21:22:50 +07:00
9500471faf feat: enhance document processing with AI suggestions and preview image support
- Added AI_SUGGESTION event to DocumentEvent enum for improved document interaction.
- Implemented updateDocumentPreviewImage mutation in DocumentSchema to allow updating of document preview images.
- Integrated grammar checking functionality in DocumentService, utilizing OpenAI for real-time suggestions and caching results in Redis.
- Enhanced MinioService with methods for file upsert and document content retrieval.
- Updated PrismaTypes to include new relations and fields for better data structure alignment.
- Commented out unused RESTful service methods for future cleanup.

These changes improve the document editing experience by leveraging AI capabilities and enhancing the schema for better data management.
2024-12-10 23:27:05 +07:00
10e20092ab chore: update configuration and improve schema imports
- Updated biome.json to include "graphql.d.ts" in the ignored files list.
- Updated subproject commit reference in epess-database to the latest version.
- Removed unused script from package.json and streamlined module file extensions in tsconfig.json.
- Consolidated exclude patterns in tsconfig.build.json for clarity.
- Refactored imports across multiple schema files for consistency and improved readability.
- Enhanced various schema files by ensuring proper import order and removing redundant code.
- Improved error handling and data integrity checks in several service and schema files.
2024-12-08 20:49:52 +07:00
2033d0ec26 feat: enhance Docker configuration and update environment variables
- Updated .dockerignore to include additional files and directories for better Docker build context management.
- Modified compose.yaml to add BASE_URL and change BUCKET_NAME to improve environment configuration.
- Refactored Dockerfile to implement a multi-stage build for optimized image size and performance.
- Updated package.json to include a new script for production Prisma generation.
- Adjusted tsconfig files to refine project structure and exclude unnecessary directories.
- Removed delta.mdx.txt file from OpenAI instructions to streamline the service.
- Updated package-lock.json and package.json to upgrade Prisma and related dependencies for improved functionality.
2024-12-05 18:37:34 +07:00
a619c95efc Update dependencies in package.json and package-lock.json, refactor CronService to include notification handling for schedule expirations, and enhance DocumentSchema with OpenAI integration for document editing suggestions. Additionally, modify GraphqlModule to include PubSubModule for real-time notifications and improve datetime utility functions for better date formatting. Update epess-database subproject reference to indicate a dirty state. 2024-11-30 16:41:47 +07:00
77f44a891f Refactor CollaborationSession and Document schemas to improve code clarity and functionality. Enhance error handling in collaboration session retrieval and update logic. Introduce new request sync events in Document schema and update Minio service for document page management. Adjust cron job to use current date for future schedule date checks. Update user schema for better error handling and improve service descriptions in order schema. Remove global decorators from Workshop modules for better module encapsulation. 2024-11-27 06:48:49 +07:00
152bb50da8 refactor source code 2024-10-29 17:42:54 +07:00
48305a3948 AI da dat ten cho dong song 2024-10-26 11:10:14 +07:00