@@ -55,7 +55,7 @@ export function activate(context: vscode.ExtensionContext) {
5555
5656 // Step 4: Create a decorator to render per-line metrics at line start
5757 if ( currentLineProfiler ) {
58- try { currentLineProfiler . dispose ( ) ; currentLineProfiler . clearReadOnlyConfig ( ) } catch { /* ignore */ }
58+ try { currentLineProfiler . dispose ( ) ; LineProfilerDecorator . clearReadOnlyConfig ( ) } catch { /* ignore */ }
5959 }
6060
6161
@@ -79,12 +79,12 @@ export function activate(context: vscode.ExtensionContext) {
7979 }
8080 await vscode . commands . executeCommand ( 'setContext' , 'pocketpy.isInProfilerReportMode' , false ) ;
8181 currentLineProfiler . dispose ( ) ;
82- currentLineProfiler . clearReadOnlyConfig ( ) ;
82+ LineProfilerDecorator . clearReadOnlyConfig ( ) ;
8383 currentLineProfiler = undefined ;
8484 } ) ;
8585 context . subscriptions . push ( quitProfilerReportMode ) ;
8686
87- vscode . workspace . getConfiguration ( "files" ) . update ( "readonlyInclude" , { } , vscode . ConfigurationTarget . Workspace ) ;
87+ LineProfilerDecorator . clearReadOnlyConfig ( ) ;
8888
8989}
9090
@@ -241,9 +241,9 @@ class LineProfilerDecorator implements vscode.Disposable {
241241
242242 private getBlockColors ( ) : string [ ] {
243243 return [
244- "#9C27B0" ,
245244 "#2196F3" ,
246245 "#4CAF50" ,
246+ "#9C27B0" ,
247247 "#FF9800" ,
248248 "#F44336" ,
249249 ] ;
@@ -288,7 +288,7 @@ class LineProfilerDecorator implements vscode.Disposable {
288288 }
289289
290290 private generateBackgroundColor ( ratio : number ) : string {
291- const alpha = + ( ratio * 0.8 ) . toFixed ( 2 ) ;
291+ const alpha = + ( ratio * 0.5 ) . toFixed ( 2 ) ;
292292 const hue = 210 ;
293293 const saturation = 60 ;
294294 const lightness = 65 ;
@@ -425,12 +425,8 @@ class LineProfilerDecorator implements vscode.Disposable {
425425 }
426426 }
427427
428- public async clearReadOnlyConfig ( ) : Promise < void > {
429- const currentInclude : { [ key : string ] : boolean } = vscode . workspace . getConfiguration ( "files" ) . get ( "readonlyInclude" , { } ) ;
430- for ( const path of this . analysisFilesSet ) {
431- currentInclude [ path ] = false ;
432- }
433- await vscode . workspace . getConfiguration ( "files" ) . update ( "readonlyInclude" , currentInclude , vscode . ConfigurationTarget . Workspace ) ;
428+ public static clearReadOnlyConfig ( ) : void {
429+ vscode . workspace . getConfiguration ( "files" ) . update ( "readonlyInclude" , undefined , vscode . ConfigurationTarget . Workspace ) ;
434430 }
435431
436432 private formatDuration ( clockTicks : number ) : string {
0 commit comments