mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
refactor: rename ROO_CODE_LOGGING to ROO_CODE_API_LOGGING and restore VSCODE_DEBUG_MODE
- Renamed environment variable to ROO_CODE_API_LOGGING for clarity - Restored VSCODE_DEBUG_MODE in launch.json env section - This preserves existing behavior (debug mode enabled, API logging opt-in)
This commit is contained in:
parent
5d588c427a
commit
00ddd926b8
2 changed files with 5 additions and 4 deletions
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
|
@ -16,7 +16,8 @@
|
|||
"preLaunchTask": "${defaultBuildTask}",
|
||||
"envFile": "${workspaceFolder}/.env.local",
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
"NODE_ENV": "development",
|
||||
"VSCODE_DEBUG_MODE": "true"
|
||||
},
|
||||
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
|
||||
"presentation": {
|
||||
|
|
|
|||
|
|
@ -89,18 +89,18 @@ function getEnvLocalValues(): Record<string, string> {
|
|||
* Check if API logging is enabled
|
||||
*
|
||||
* Checks in order:
|
||||
* 1. Workspace .env.local: ROO_CODE_LOGGING=true (for user's workspace)
|
||||
* 1. Workspace .env.local: ROO_CODE_API_LOGGING=true (for user's workspace)
|
||||
* 2. Process env (loaded from extension's .env.local via envFile in launch.json)
|
||||
*/
|
||||
export function isLoggingEnabled(): boolean {
|
||||
// Check workspace .env.local first (user's current workspace)
|
||||
const envLocal = getEnvLocalValues()
|
||||
if (envLocal["ROO_CODE_LOGGING"] === "true") {
|
||||
if (envLocal["ROO_CODE_API_LOGGING"] === "true") {
|
||||
return true
|
||||
}
|
||||
|
||||
// Fallback to process.env (populated from extension's .env.local via launch.json envFile)
|
||||
return process.env.ROO_CODE_LOGGING === "true"
|
||||
return process.env.ROO_CODE_API_LOGGING === "true"
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue