@@ -53,7 +53,8 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
53
53
private readonly innerPreviewElement : HTMLElement ;
54
54
private readonly promptIcon : IconButton . Icon . Icon ;
55
55
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>;
57
58
private previewRequestForTest : Promise < void > | null ;
58
59
private highlightingNode : boolean ;
59
60
// 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
112
113
this . element . appendChild ( this . promptIcon ) ;
113
114
this . iconThrottler = new Common . Throttler . Throttler ( 0 ) ;
114
115
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 ) ;
118
121
119
122
this . element . tabIndex = 0 ;
120
123
this . previewRequestForTest = null ;
@@ -170,13 +173,14 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
170
173
} ) } `) ;
171
174
}
172
175
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
+ // }
180
184
181
185
belowEditorElement ( ) : Element {
182
186
return this . eagerPreviewElement ;
@@ -185,12 +189,13 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
185
189
private onTextChanged ( ) : void {
186
190
// ConsoleView and prompt both use a throttler, so we clear the preview
187
191
// 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
+ // }
194
199
this . updatePromptIcon ( ) ;
195
200
this . dispatchEventToListeners ( Events . TextChanged ) ;
196
201
}
0 commit comments