Skip to content

Commit 6476284

Browse files
committed
fix: 修正启动下载rag的流程
1 parent 2392962 commit 6476284

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.vscode/launch.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
"outFiles": [
1616
"${workspaceFolder}/dist/**/*.js"
1717
],
18-
"preLaunchTask": "${defaultBuildTask}"
18+
"preLaunchTask": "${defaultBuildTask}",
19+
"env": {
20+
"NODE_ENV": "development"
21+
}
1922
}
2023
]
2124
}

src/ragService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import * as crypto from 'crypto';
1010
// Define a variable to store the extension path
1111
let EXTENSION_PATH: string = '';
1212

13-
const isDevMode = !__dirname.includes('dist');
13+
const isDevMode = process.env.NODE_ENV === 'development';
14+
1415
// Dynamically set Python script or EXE path
1516
const getPythonScriptPath = (extensionPath: string) => {
1617
if (isDevMode) {

0 commit comments

Comments
 (0)