@@ -53,7 +53,8 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
5353 private readonly innerPreviewElement : HTMLElement ;
5454 private readonly promptIcon : IconButton . Icon . Icon ;
5555 private readonly iconThrottler : Common . Throttler . Throttler ;
56- private readonly eagerEvalSetting : Common . Settings . Setting < boolean > ;
56+ // TODO(T225263604): Restore this setting
57+ // private readonly eagerEvalSetting: Common.Settings.Setting<boolean>;
5758 private previewRequestForTest : Promise < void > | null ;
5859 private highlightingNode : boolean ;
5960 // The CodeMirror state field that controls whether the argument hints are showing.
@@ -112,9 +113,11 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
112113 this . element . appendChild ( this . promptIcon ) ;
113114 this . iconThrottler = new Common . Throttler . Throttler ( 0 ) ;
114115
115- this . eagerEvalSetting = Common . Settings . Settings . instance ( ) . moduleSetting ( 'console-eager-eval' ) ;
116- this . eagerEvalSetting . addChangeListener ( this . eagerSettingChanged . bind ( this ) ) ;
117- this . eagerPreviewElement . classList . toggle ( 'hidden' , ! this . eagerEvalSetting . get ( ) ) ;
116+ // TODO(T225263604): Restore this setting
117+ // this.eagerEvalSetting = Common.Settings.Settings.instance().moduleSetting('console-eager-eval');
118+ // this.eagerEvalSetting.addChangeListener(this.eagerSettingChanged.bind(this));
119+ // this.eagerPreviewElement.classList.toggle('hidden', !this.eagerEvalSetting.get());
120+ this . eagerPreviewElement . classList . toggle ( 'hidden' , true ) ;
118121
119122 this . element . tabIndex = 0 ;
120123 this . previewRequestForTest = null ;
@@ -170,13 +173,14 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
170173 } ) } `) ;
171174 }
172175
173- private eagerSettingChanged ( ) : void {
174- const enabled = this . eagerEvalSetting . get ( ) ;
175- this . eagerPreviewElement . classList . toggle ( 'hidden' , ! enabled ) ;
176- if ( enabled ) {
177- void this . requestPreview ( ) ;
178- }
179- }
176+ // TODO(T225263604): Restore this setting
177+ // private eagerSettingChanged(): void {
178+ // const enabled = this.eagerEvalSetting.get();
179+ // this.eagerPreviewElement.classList.toggle('hidden', !enabled);
180+ // if (enabled) {
181+ // void this.requestPreview();
182+ // }
183+ // }
180184
181185 belowEditorElement ( ) : Element {
182186 return this . eagerPreviewElement ;
@@ -185,12 +189,13 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
185189 private onTextChanged ( ) : void {
186190 // ConsoleView and prompt both use a throttler, so we clear the preview
187191 // ASAP to avoid inconsistency between a fresh viewport and stale preview.
188- if ( this . eagerEvalSetting . get ( ) ) {
189- const asSoonAsPossible = ! TextEditor . Config . contentIncludingHint ( this . editor . editor ) ;
190- this . previewRequestForTest = this . textChangeThrottler . schedule (
191- this . requestPreviewBound ,
192- asSoonAsPossible ? Common . Throttler . Scheduling . AsSoonAsPossible : Common . Throttler . Scheduling . Default ) ;
193- }
192+ // TODO(T225263604): Restore eager evaluation support
193+ // if (this.eagerEvalSetting.get()) {
194+ // const asSoonAsPossible = !TextEditor.Config.contentIncludingHint(this.editor.editor);
195+ // this.previewRequestForTest = this.textChangeThrottler.schedule(
196+ // this.requestPreviewBound,
197+ // asSoonAsPossible ? Common.Throttler.Scheduling.AsSoonAsPossible : Common.Throttler.Scheduling.Default);
198+ // }
194199 this . updatePromptIcon ( ) ;
195200 this . dispatchEventToListeners ( Events . TextChanged ) ;
196201 }
0 commit comments