File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,8 @@ RUN git remote add upstream https://github.com/BrowserOperator/browser-operator-
5151RUN git fetch upstream
5252RUN git checkout upstream/main
5353
54- # Copy our local modifications into the container
55- COPY front_end/panels/ai_chat/core/EnvironmentConfig.ts /workspace/devtools/devtools-frontend/front_end/panels/ai_chat/core/EnvironmentConfig.ts
56- COPY front_end/panels/ai_chat/ui/SettingsDialog.ts /workspace/devtools/devtools-frontend/front_end/panels/ai_chat/ui/SettingsDialog.ts
57- COPY front_end/entrypoints/devtools_app/devtools_app.ts /workspace/devtools/devtools-frontend/front_end/entrypoints/devtools_app/devtools_app.ts
58-
59- # Build Browser Operator version with our modifications
54+ # Build Browser Operator version (using upstream code to avoid TypeScript compilation issues)
55+ # Runtime API key injection will be handled by the entrypoint script
6056RUN npm run build
6157
6258# Production stage
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ export class GroqProvider extends LLMBaseProvider {
5454 */
5555 private getApiKey ( ) : string {
5656 // Constructor parameter (highest priority for backward compatibility)
57- if ( this . getApiKey ( ) && this . getApiKey ( ) . trim ( ) !== '' ) {
58- return this . getApiKey ( ) . trim ( ) ;
57+ if ( this . apiKey && this . apiKey . trim ( ) !== '' ) {
58+ return this . apiKey . trim ( ) ;
5959 }
6060
6161 // Use environment config which handles localStorage -> build-time -> empty fallback
Original file line number Diff line number Diff line change @@ -651,8 +651,7 @@ export class OpenRouterProvider extends LLMBaseProvider {
651651
652652 logger . debug ( 'API key check:' ) ;
653653 logger . debug ( '- API key exists:' , ! ! apiKey ) ;
654- logger . debug ( '- API key length:' , apiKey ?. length || 0 ) ;
655- logger . debug ( '- API key prefix:' , apiKey ?. substring ( 0 , 8 ) + '...' || 'none' ) ;
654+ logger . debug ( '- API key presence:' , apiKey ? '<redacted>' : 'none' ) ;
656655 logger . debug ( '- API key source:' , source ) ;
657656 logger . debug ( '- Build config available:' , buildInfo . hasBuildConfig ) ;
658657 logger . debug ( '- Build time:' , buildInfo . buildTime ) ;
Original file line number Diff line number Diff line change @@ -261,7 +261,8 @@ export class EnvironmentConfig {
261261 return 'runtime' ;
262262 }
263263
264- if ( BUILD_CONFIG ?. apiKeys ?. [ provider ] ) {
264+ if ( typeof BUILD_CONFIG ?. apiKeys ?. [ provider ] === 'string' &&
265+ BUILD_CONFIG . apiKeys [ provider ] . trim ( ) !== '' ) {
265266 return 'build-time' ;
266267 }
267268
You can’t perform that action at this time.
0 commit comments