chore: update Node.js version and refine launch configuration

- Updated the Node.js version in .nvmrc from 22.6.0 to 24.0.0-nightly for compatibility with the latest features.
- Modified the launch.json configuration to reflect the new Node.js runtime path, ensuring the development environment is aligned with the updated version.
- Cleaned up whitespace in document.service.ts for improved code readability.

These changes ensure the project is using the latest Node.js version and maintain a clean and efficient development setup.
This commit is contained in:
2024-12-11 01:15:02 +07:00
parent 9500471faf
commit c6482b16f2
3 changed files with 5 additions and 9 deletions

View File

@@ -120,7 +120,7 @@ export class DocumentService {
// Process the entire page text
const grammarCheckResult = await this.openai.processText(pageText, 0, PromptType.CHECK_GRAMMAR)
if (!grammarCheckResult.result) {
return
}
@@ -132,11 +132,7 @@ export class DocumentService {
const diff = await this.diff(pageText, grammarCheckResult.result)
// Build payload
const payload: DocumentDelta = {
documentId,
pageIndex: pageId,
ops: diff.ops,
}
// Publish the result to the subscriber
this.pubSub.publish(`${DocumentEvent.AI_SUGGESTION}.${documentId}.${pageId}`, payload)
@@ -150,4 +146,3 @@ export class DocumentService {
return diff
}
}