import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs"; import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service"; import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service"; import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service"; import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service"; import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service"; import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { ICommandHandler } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands"; import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService"; import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; export declare namespace OpenLocalFileCommand { const ID = "workbench.action.files.openLocalFile"; const LABEL: string; function handler(): ICommandHandler; } export declare namespace SaveLocalFileCommand { const ID = "workbench.action.files.saveLocalFile"; const LABEL: string; function handler(): ICommandHandler; } export declare namespace OpenLocalFolderCommand { const ID = "workbench.action.files.openLocalFolder"; const LABEL: string; function handler(): ICommandHandler; } export declare namespace OpenLocalFileFolderCommand { const ID = "workbench.action.files.openLocalFileFolder"; const LABEL: string; function handler(): ICommandHandler; } export declare const RemoteFileDialogContext: RawContextKey; export interface ISimpleFileDialog extends IDisposable { showOpenDialog(options: IOpenDialogOptions): Promise; showSaveDialog(options: ISaveDialogOptions): Promise; } export declare class SimpleFileDialog extends Disposable implements ISimpleFileDialog { private readonly fileService; private readonly quickInputService; private readonly labelService; private readonly workspaceContextService; private readonly notificationService; private readonly fileDialogService; private readonly modelService; private readonly languageService; protected readonly environmentService: IWorkbenchEnvironmentService; private readonly remoteAgentService; protected readonly pathService: IPathService; private readonly keybindingService; private readonly accessibilityService; private readonly storageService; private options; private currentFolder; private filePickBox; private hidden; private allowFileSelection; private allowFolderSelection; private remoteAuthority; private requiresTrailing; private trailing; protected scheme: string; private contextKey; private userEnteredPathSegment; private autoCompletePathSegment; private activeItem; private userHome; private trueHome; private isWindows; private badPath; private remoteAgentEnvironment; private separator; /** * When set, the dialog is scoped to a specific URI authority (e.g. * for browsing an `agenthost://{authority}/...` filesystem that * uses per-connection authorities rather than the global * {@link remoteAuthority}). */ private scopedAuthority; private readonly onBusyChangeEmitter; private updatingPromise; private _showDotFiles; constructor(fileService: IFileService, quickInputService: IQuickInputService, labelService: ILabelService, workspaceContextService: IWorkspaceContextService, notificationService: INotificationService, fileDialogService: IFileDialogService, modelService: IModelService, languageService: ILanguageService, environmentService: IWorkbenchEnvironmentService, remoteAgentService: IRemoteAgentService, pathService: IPathService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, accessibilityService: IAccessibilityService, storageService: IStorageService); private setShowDotFiles; private getShowDotFiles; set busy(busy: boolean); get busy(): boolean; showOpenDialog(options?: IOpenDialogOptions): Promise; showSaveDialog(options: ISaveDialogOptions): Promise; private getOptions; private remoteUriFrom; private getScheme; /** * Returns the per-URI authority from {@link defaultUri} if the dialog * should be scoped to a specific authority (e.g. `agenthost://host/...`). * * Returns `undefined` when the authority matches the global * {@link remoteAuthority} (standard SSH remotes), since that path is * already handled by the existing logic. */ private getScopedAuthority; private getRemoteAgentEnvironment; protected getUserHome(trueHome?: boolean): Promise; private normalizeUri; private pickResource; private handleValueChange; private setButtons; private isBadSubpath; private isValueChangeFromUser; private isSelectionChangeFromUser; private constructFullUserPath; private filePickBoxValue; private onDidAccept; private root; private canTildaEscapeHatch; private tildaReplace; private tryAddTrailingSeparatorToDirectory; private tryUpdateItems; private tryUpdateTrailing; private setActiveItems; private setAutoComplete; private insertText; private addPostfix; private trimTrailingSlash; private yesNoPrompt; private validate; private canCreateFolder; private updateItems; private resolvePathFormatting; private pathFromUri; private pathAppend; private checkIsWindowsOS; private endsWithSlash; private basenameWithTrailingSlash; private createBackItem; private createItems; private filterFile; private createItem; }