Change:
<!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --We already have this feature in Core: where you can return where . Truth be told, this already works in API today though it's not officially a part of the API today (so it could change at any moment). For example, I can do: <img width="738" alt="image" src="https://user-"with it goes from: to it goes from: to
ref
Created a TPI so moving this to April for Finalization.

Discussion:
return extHostQuickOpen.showWorkspaceFolderPick(options); }, showInputBox(options?: vscode.InputBoxOptions, token?: vscode.CancellationToken) { <del> if (options?.validateInput2) { checkProposedApiEnabled(extension, 'inputBoxSeverity'); } </del> return extHostQuickOpen.showInput(options, token); }, showOpenDialog(options) {

import { coalesce } from 'vs/base/common/arrays'; import Severity from 'vs/base/common/severity'; import { ThemeIcon as ThemeIconUtils } from 'vs/platform/theme/common/themeService'; <del> import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; </del> export type Item = string | QuickPickItem;

showInput(options?: InputBoxOptions, token: CancellationToken = CancellationToken.None): Promise<string | undefined> { // global validate fn used in callback below <del> this._validateInput = options ? options.validateInput2 ?? options.validateInput : undefined; </del> <ins> this._validateInput = options?.validateInput; </ins> return proxy.$input(options, typeof this._validateInput === 'function', token) .then(undefined, err => {

private _password = false; private _prompt: string | undefined; <del> private _validationMessage: string | undefined; private _validationMessage2: string | InputBoxValidationMessage | undefined; </del> <ins> private _validationMessage: string | InputBoxValidationMessage | undefined; </ins> <del> constructor(private readonly extension: IExtensionDescription, onDispose: () => void) { </del> <ins> constructor(extension: IExtensionDescription, onDispose: () => void) { </ins> super(extension.identifier, onDispose); this.update({ type: 'inputBox' }); }

return this._validationMessage; } <del> set validationMessage(validationMessage: string | undefined) { </del> <ins> set validationMessage(validationMessage: string | InputBoxValidationMessage | undefined) { </ins> this._validationMessage = validationMessage; <del> this.update({ validationMessage, severity: validationMessage ? Severity.Error : Severity.Ignore }); } get validationMessage2() { return this._validationMessage2; } set validationMessage2(validationMessage: string | InputBoxValidationMessage | undefined) { checkProposedApiEnabled(this.extension, 'inputBoxSeverity'); this._validationMessage2 = validationMessage; </del> if (!validationMessage) { this.update({ validationMessage: undefined, severity: Severity.Ignore }); } else if (typeof validationMessage === 'string') {

inlineCompletions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletions.d.ts', inlineCompletionsAdditions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts', inlineCompletionsNew: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsNew.d.ts', <del> inputBoxSeverity: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inputBoxSeverity.d.ts', </del> ipc: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts', notebookCellExecutionState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts', notebookContentProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts',

} /** <ins> * Impacts the behavior and appearance of the validation message. */ export enum InputBoxValidationSeverity { Info = 1, Warning = 2, Error = 3 } /** * Object to configure the behavior of the validation message. */ export interface InputBoxValidationMessage { /** * The validation message to display. */ readonly message: string; /** * The severity of the validation message. * NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input. * `Info` and `Warning` will still allow the InputBox to accept the input. */ readonly severity: InputBoxValidationSeverity; } /** </ins> * Options to configure the behavior of the input box UI. */ export interface InputBoxOptions {

* @return A human-readable string which is presented as diagnostic message. * Return `undefined`, `null`, or the empty string when 'value' is valid. */ <del> validateInput?(value: string): string | undefined | null | Thenable<string | undefined | null>; </del> <ins> validateInput?(value: string): string | InputBoxValidationMessage | undefined | null | Thenable<string | InputBoxValidationMessage | undefined | null>; </ins> } /**

/** * An optional validation message indicating a problem with the current input value. */ <del> validationMessage: string | undefined; </del> <ins> validationMessage: string | InputBoxValidationMessage | undefined; </ins> } /**

<del> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ declare module 'vscode' { // https://github.com/microsoft/vscode/issues/144944 /** * Impacts the behavior and appearance of the validation message. */ export enum InputBoxValidationSeverity { Info = 1, Warning = 2, Error = 3 } /** * Object to configure the behavior of the validation message. */ export interface InputBoxValidationMessage { /** * The validation message to display. */ readonly message: string; /** * The severity of the validation message. * NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input. * `Info` and `Warning` will still allow the InputBox to accept the input. */ readonly severity: InputBoxValidationSeverity; } export interface InputBoxOptions { /** * The validation message to display. This will become the new {@link InputBoxOptions#validateInput} upon finalization. */ validateInput2?(value: string): string | InputBoxValidationMessage | undefined | null | Thenable<string | InputBoxValidationMessage | undefined | null>; } export interface InputBox { /** * The validation message to display. This will become the new {@link InputBox#validationMessage} upon finalization. */ validationMessage2: string | InputBoxValidationMessage | undefined; } } </del>