Skip to content

Commit 3eed0e0

Browse files
committed
fix: restore environment-based feature flags and remove sensitive output logging
- Restore isProd to check NODE_ENV instead of hardcoded true - Restore isHosted to check NEXT_PUBLIC_APP_URL instead of hardcoded true - Remove output field from tool success logging to prevent sensitive data leaks
1 parent ceba8cf commit 3eed0e0

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎apps/sim/lib/copilot/orchestrator/sse/handlers/tool-execution.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ export async function executeToolAndReport(
455455
logger.info('Tool execution succeeded',{
456456
toolCallId: toolCall.id,
457457
toolName: toolCall.name,
458-
output: result.output,
459458
})
460459
}else{
461460
logger.warn('Tool execution failed',{

‎apps/sim/lib/core/config/feature-flags.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Environment utility functions for consistent environment detection across the application
33
*/
4-
import{env,isFalsy,isTruthy}from'./env'
4+
import{env,getEnv,isFalsy,isTruthy}from'./env'
55

66
/**
77
* Is the application running in production mode
88
*/
9-
exportconstisProd=true
9+
exportconstisProd=env.NODE_ENV==='production'
1010

1111
/**
1212
* Is the application running in development mode
@@ -21,7 +21,9 @@ export const isTest = env.NODE_ENV === 'test'
2121
/**
2222
* Is this the hosted version of the application
2323
*/
24-
exportconstisHosted=true
24+
exportconstisHosted=
25+
getEnv('NEXT_PUBLIC_APP_URL')==='https://www.sim.ai'||
26+
getEnv('NEXT_PUBLIC_APP_URL')==='https://www.staging.sim.ai'
2527

2628
/**
2729
* Is billing enforcement enabled

0 commit comments

Comments
 (0)