src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.ts/InlineCompletionsModel/constructor
class InlineCompletionsModel:	constructor(
		private readonly editor: IActiveCodeEditor,
		private readonly cache: SharedInlineCompletionCache,
		@ICommandService private readonly commandService: ICommandService,
		@ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService,
		@ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService,
		@ILanguageFeatureDebounceService private readonly debounceService: ILanguageFeatureDebounceService,
		@IConfigurationService configurationService: IConfigurationService,
	) {
		super();

		this._register(
			commandService.onDidExecuteCommand((e) => {
				// These commands don't trigger onDidType.
				const commands = new Set([
					CoreEditingCommands.Tab.id,
					CoreEditingCommands.DeleteLeft.id,
					CoreEditingCommands.DeleteRight.id,
					inlineSuggestCommitId,
					'acceptSelectedSuggestion',
				]);
				if (commands.has(e.commandId) && editor.hasTextFocus()) {
					this.handleUserInput();
				}
			})
		);

		this._register(
			this.editor.onDidType((e) => {
				this.handleUserInput();
			})
		);

		this._register(
			this.editor.onDidChangeCursorPosition((e) => {
				if (e.reason === CursorChangeReason.Explicit ||
					this.session && !this.session.isValid) {
					this.hide();
				}
			})
		);

		this._register(
			toDisposable(() => {
				this.disposed = true;
			})
		);

		this._register(
			this.editor.onDidBlurEditorWidget(() => {
				// This is a hidden setting very useful for debugging
				if (configurationService.getValue('editor.inlineSuggest.hideOnBlur')) {
					return;
				}
				this.hide();
			})
		);
	}