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:
Hannes Rudolph 2025-12-18 08:17:05 -07:00 committed by daniel-lxs
parent 5d588c427a
commit 00ddd926b8
No known key found for this signature in database
GPG key ID: 21C74479048B3AA6
2 changed files with 5 additions and 4 deletions

3
.vscode/launch.json vendored
View file

@ -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": {

View file

@ -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"
}
/**