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:
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@@ -4,6 +4,7 @@
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Attach by Process ID",
|
||||
"processId": "${command:PickProcess}",
|
||||
@@ -15,7 +16,7 @@
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"runtimeExecutable": "C:\\Users\\AliensVN\\AppData\\Roaming\\fnm\\node-versions\\v22.6.0\\installation\\node.exe",
|
||||
"runtimeExecutable": "C:\\Users\\AliensVN\\AppData\\Roaming\\fnm\\node-versions\\v24.0.0-nightly202412106c03beba46\\installation\\node.exe",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user