import { Event, Uri } from '@opensumi/ide-core-common'; import { FileOperationOptions } from './model.api'; import type vscode from 'vscode'; export { TextEditorRevealType } from './editor'; export { UriComponents } from './models/uri'; export { Uri }; /** * Enumeration of file types. The types `File` and `Directory` can also be * a symbolic links, in that case use `FileType.File | FileType.SymbolicLink` and * `FileType.Directory | FileType.SymbolicLink`. */ export declare enum FileType { /** * The file type is unknown. */ Unknown = 0, /** * A regular file. */ File = 1, /** * A directory. */ Directory = 2, /** * A symbolic link to a file. */ SymbolicLink = 64 } export declare enum QuickPickItemKind { Separator = -1, Default = 0 } export declare enum ProgressLocation { /** * Show progress for the source control viewlet, as overlay for the icon and as progress bar * inside the viewlet (when visible). Neither supports cancellation nor discrete progress. */ SourceControl = 1, /** * Show progress in the status bar of the editor. Neither supports cancellation nor discrete progress. */ Window = 10, /** * Show progress as notification with an optional cancel button. Supports to show infinite and discrete progress. */ Notification = 15 } export declare enum IndentAction { /** * Insert new line and copy the previous line's indentation. */ None = 0, /** * Insert new line and indent once (relative to the previous line's indentation). */ Indent = 1, /** * Insert two new lines: * - the first one indented which will hold the cursor * - the second one at the same indentation level */ IndentOutdent = 2, /** * Insert new line and outdent once (relative to the previous line's indentation). */ Outdent = 3 } export declare class Range { static isRange(thing: any): thing is vscode.Range; protected _start: Position; protected _end: Position; get start(): Position; get end(): Position; constructor(start: Position, end: Position); constructor(startLine: number, startColumn: number, endLine: number, endColumn: number); contains(positionOrRange: Position | Range): boolean; isEqual(other: Range): boolean; intersection(other: Range): Range | undefined; union(other: Range): Range; get isEmpty(): boolean; get isSingleLine(): boolean; with(change: { start?: Position; end?: Position; }): Range; with(start?: Position, end?: Position): Range; toJSON(): any; } export declare enum LanguageStatusSeverity { Information = 0, Warning = 1, Error = 2 } export declare enum InputBoxValidationSeverity { Ignore = 0, Info = 1, Warning = 2, Error = 3 } export declare class CodeLens { range: Range; command: vscode.Command | undefined; constructor(range: Range, command?: vscode.Command); get isResolved(): boolean; } export declare class Position { static Min(...positions: Position[]): Position; static Max(...positions: Position[]): Position; static isPosition(other: any): other is Position; private _line; private _character; get line(): number; get character(): number; constructor(line: number, character: number); isBefore(other: Position): boolean; isBeforeOrEqual(other: Position): boolean; isAfter(other: Position): boolean; isAfterOrEqual(other: Position): boolean; isEqual(other: Position): boolean; compareTo(other: Position): number; translate(change: { lineDelta?: number; characterDelta?: number; }): Position; translate(lineDelta?: number, characterDelta?: number): Position; with(change: { line?: number; character?: number; }): Position; with(line?: number, character?: number): Position; toJSON(): any; } export declare class Diagnostic { range: Range; message: string; severity: DiagnosticSeverity; source?: string; code?: string | number | { /** * A code or identifier for this diagnostic. * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}. */ value: string | number; /** * A target URI to open with more information about the diagnostic error. */ target: Uri; }; relatedInformation?: DiagnosticRelatedInformation[]; tags?: DiagnosticTag[]; constructor(range: Range, message: string, severity?: DiagnosticSeverity); } export declare enum EndOfLine { LF = 1, CRLF = 2 } export declare class RelativePattern { pattern: string; private _base; get base(): string; set base(base: string); private _baseUri; get baseUri(): Uri; set baseUri(baseUri: Uri); constructor(base: vscode.WorkspaceFolder | Uri | string, pattern: string); toJSON(): { pattern: string; base: string; baseUri: import("vscode-uri/lib/umd/uri").UriComponents; }; } export declare class Location { static isLocation(thing: any): thing is Location; uri: Uri; range: Range; constructor(uri: Uri, rangeOrPosition: Range | Position); toJSON(): any; } export declare class DiagnosticRelatedInformation { location: Location; message: string; constructor(location: Location, message: string); } export declare class Disposable { private disposable; static from(...disposables: { dispose(): any; }[]): Disposable; constructor(func: () => void); /** * Dispose this object. */ dispose(): void; static create(func: () => void): Disposable; } export declare class Hover { contents: MarkdownString[] | vscode.MarkedString[]; range?: Range; constructor(contents: MarkdownString | vscode.MarkedString | MarkdownString[] | vscode.MarkedString[], range?: Range); } export declare class SnippetString { static isSnippetString(thing: any): thing is SnippetString; private static _escape; private _tabstop; value: string; constructor(value?: string); appendText(str: string): SnippetString; appendTabstop(num?: number): SnippetString; appendPlaceholder(value: string | ((snippet: SnippetString) => void), num?: number): SnippetString; appendChoice(values: string[], num?: number): SnippetString; appendVariable(name: string, defaultValue?: string | ((snippet: SnippetString) => void)): SnippetString; } export declare class TextEdit { protected _range: Range; protected _newText: string; protected _newEol: EndOfLine; get range(): Range; set range(value: Range); get newText(): string; set newText(value: string); get newEol(): EndOfLine; set newEol(value: EndOfLine); constructor(range: Range | undefined, newText: string | undefined); static isTextEdit(thing: any): thing is TextEdit; static replace(range: Range, newText: string): TextEdit; static insert(position: Position, newText: string): TextEdit; static delete(range: Range): TextEdit; static setEndOfLine(eol: EndOfLine): TextEdit; toJSON(): any; } export declare enum CompletionTriggerKind { Invoke = 0, TriggerCharacter = 1, TriggerForIncompleteCompletions = 2 } export declare enum CompletionItemKind { Text = 0, Method = 1, Function = 2, Constructor = 3, Field = 4, Variable = 5, Class = 6, Interface = 7, Module = 8, Property = 9, Unit = 10, Value = 11, Enum = 12, Keyword = 13, Snippet = 14, Color = 15, File = 16, Reference = 17, Folder = 18, EnumMember = 19, Constant = 20, Struct = 21, Event = 22, Operator = 23, TypeParameter = 24, User = 25, Issue = 26 } /** * Completion item tags are extra annotations that tweak the rendering of a completion * item. */ export declare enum CompletionItemTag { /** * Render a completion as obsolete, usually using a strike-out. */ Deprecated = 1 } export interface MarkdownStringTrustedOptions { readonly enabledCommands: readonly string[]; } export declare class MarkdownString { value: string; isTrusted?: boolean | MarkdownStringTrustedOptions; supportHtml?: boolean; baseUri?: vscode.Uri; readonly supportThemeIcons?: boolean; constructor(value?: string, supportThemeIcons?: boolean); appendText(value: string): MarkdownString; appendMarkdown(value: string): MarkdownString; appendCodeblock(code: string, language?: string): MarkdownString; static isMarkdownString(thing: any): thing is MarkdownString; } export interface CompletionItemLabel { label: string; detail?: string; description?: string; } export declare class CompletionItem implements vscode.CompletionItem { label: string | CompletionItemLabel; label2?: CompletionItemLabel; kind?: vscode.CompletionItemKind; tags?: CompletionItemTag[]; detail?: string; documentation?: string | vscode.MarkdownString; sortText?: string; filterText?: string; preselect?: boolean; insertText: string | SnippetString; keepWhitespace?: boolean; range?: Range | { inserting: Range; replacing: Range; }; commitCharacters?: string[]; textEdit?: TextEdit; additionalTextEdits: TextEdit[]; command?: vscode.Command; constructor(label: string | CompletionItemLabel, kind?: vscode.CompletionItemKind); toJSON(): any; } export declare class CompletionList { isIncomplete?: boolean; items: vscode.CompletionItem[]; constructor(items?: vscode.CompletionItem[], isIncomplete?: boolean); } export declare enum ConfigurationTarget { /** * Global configuration */ Global = 1, /** * Workspace configuration */ Workspace = 2, /** * Workspace folder configuration */ WorkspaceFolder = 3 } export declare enum TextEditorLineNumbersStyle { /** * Do not render the line numbers. */ Off = 0, /** * Render the line numbers. */ On = 1, /** * Render the line numbers with values relative to the primary cursor location. */ Relative = 2, Interval = 3 } export declare class ThemeColor { id: string; constructor(id: string); } export declare class FileDecoration { static validate(d: FileDecoration): void; badge?: string; tooltip?: string; color?: vscode.ThemeColor; propagate?: boolean; constructor(badge?: string, tooltip?: string, color?: ThemeColor); } export declare enum SyntaxTokenType { Other = 0, Comment = 1, String = 2, RegEx = 3 } export declare namespace SyntaxTokenType { type returnType = 'other' | 'comment' | 'string' | 'regex'; export function toString(v: SyntaxTokenType | unknown): returnType; export {}; } /** * These values match very carefully the values of `TrackedRangeStickiness` */ export declare enum DecorationRangeBehavior { /** * TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ OpenOpen = 0, /** * TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */ ClosedClosed = 1, /** * TrackedRangeStickiness.GrowsOnlyWhenTypingBefore */ OpenClosed = 2, /** * TrackedRangeStickiness.GrowsOnlyWhenTypingAfter */ ClosedOpen = 3 } export declare class FoldingRange { start: number; end: number; kind?: FoldingRangeKind; constructor(start: number, end: number, kind?: FoldingRangeKind); } export declare enum FoldingRangeKind { Comment = 1, Imports = 2, Region = 3 } export declare class Color { readonly red: number; readonly green: number; readonly blue: number; readonly alpha: number; constructor(red: number, green: number, blue: number, alpha: number); } export declare enum DocumentHighlightKind { Text = 0, Read = 1, Write = 2 } export declare class DocumentHighlight { range: Range; kind?: DocumentHighlightKind; constructor(range: Range, kind?: DocumentHighlightKind); } export declare class ColorPresentation { label: string; textEdit?: TextEdit; additionalTextEdits?: TextEdit[]; constructor(label: string); } export declare enum DiagnosticSeverity { Error = 0, Warning = 1, Information = 2, Hint = 3 } export declare enum DiagnosticTag { Unnecessary = 1, Deprecated = 2 } export declare class CodeActionKind { readonly value: string; private static readonly sep; static readonly Empty: CodeActionKind; static readonly QuickFix: CodeActionKind; static readonly Refactor: CodeActionKind; static readonly RefactorExtract: CodeActionKind; static readonly RefactorInline: CodeActionKind; static readonly RefactorRewrite: CodeActionKind; static readonly Source: CodeActionKind; static readonly SourceOrganizeImports: CodeActionKind; static readonly SourceFixAll: CodeActionKind; constructor(value: string); append(parts: string): CodeActionKind; contains(other: CodeActionKind): boolean; intersects(other: CodeActionKind): boolean; } export declare enum CodeActionTriggerKind { Invoke = 1, Automatic = 2 } export declare class CodeAction { title: string; command?: vscode.Command; edit?: WorkspaceEdit; diagnostics?: Diagnostic[]; kind?: CodeActionKind; isPreferred?: boolean; constructor(title: string, kind?: CodeActionKind); } export declare class Selection extends Range { static isSelection(thing: any): thing is Selection; private _anchor; get anchor(): Position; private _active; get active(): Position; constructor(anchor: Position, active: Position); constructor(anchorLine: number, anchorColumn: number, activeLine: number, activeColumn: number); get isReversed(): boolean; toJSON(): { start: Position; end: Position; active: Position; anchor: Position; }; } export interface FileOperation { _type: WorkspaceEditType.File; from: Uri | undefined; to: Uri | undefined; options?: FileOperationOptions; metadata?: vscode.WorkspaceEditEntryMetadata; } export interface FileTextEdit { _type: WorkspaceEditType.Text; uri: Uri; edit: TextEdit; metadata?: vscode.WorkspaceEditEntryMetadata; } export interface FileSnippetTextEdit { readonly _type: WorkspaceEditType.Snippet; readonly uri: Uri; readonly range: Range; readonly edit: SnippetTextEdit; readonly metadata?: vscode.WorkspaceEditEntryMetadata; } type WorkspaceEditEntry = FileOperation | FileTextEdit | FileSnippetTextEdit; export declare enum WorkspaceEditType { File = 1, Text = 2, Snippet = 6 } export declare class SnippetTextEdit implements vscode.SnippetTextEdit { range: Range; snippet: SnippetString; static isSnippetTextEdit(thing: unknown): thing is SnippetTextEdit; static replace(range: Range, snippet: SnippetString): SnippetTextEdit; static insert(position: Position, snippet: SnippetString): SnippetTextEdit; constructor(range: Range, snippet: SnippetString); } export declare class WorkspaceEdit implements vscode.WorkspaceEdit { private _edits; renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void; createFile(uri: vscode.Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void; deleteFile(uri: vscode.Uri, options?: { recursive?: boolean; ignoreIfNotExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void; replace(uri: Uri, range: Range, newText: string, metadata?: vscode.WorkspaceEditEntryMetadata): void; insert(resource: Uri, position: Position, newText: string, metadata?: vscode.WorkspaceEditEntryMetadata): void; delete(resource: Uri, range: Range, metadata?: vscode.WorkspaceEditEntryMetadata): void; has(uri: Uri): boolean; set(uri: Uri, edits: ReadonlyArray): void; set(uri: Uri, edits: ReadonlyArray<[TextEdit | SnippetTextEdit, vscode.WorkspaceEditEntryMetadata]>): void; get(uri: Uri): TextEdit[]; entries(): [Uri, TextEdit[]][]; allEntries(): ReadonlyArray; get size(): number; toJSON(): any; } export declare class MultiDocumentHighlight { /** * The URI of the document containing the highlights. */ uri: Uri; /** * The highlights for the document. */ highlights: DocumentHighlight[]; /** * Creates a new instance of MultiDocumentHighlight. * @param uri The URI of the document containing the highlights. * @param highlights The highlights for the document. */ constructor(uri: Uri, highlights: DocumentHighlight[]); } export declare class DocumentLink { range: Range; target?: Uri; tooltip?: string; constructor(range: Range, target: Uri | undefined); } /** * Represents the alignment of status bar items. */ export declare enum StatusBarAlignment { /** * Aligned to the left side. */ Left = 1, /** * Aligned to the right side. */ Right = 2 } export interface Memento { get(key: string): T | undefined; get(key: string, defaultValue: T): T; update(key: string, value: any): Promise; keys: string[]; } /** * A channel for containing log output. * * To get an instance of a `LogOutputChannel` use * {@link window.createOutputChannel createOutputChannel}. */ export interface LogOutputChannel extends OutputChannel { /** * The current log level of the channel. Defaults to {@link env.logLevel editor log level}. */ readonly logLevel: OutputChannelLogLevel; /** * An {@link Event} which fires when the log level of the channel changes. */ readonly onDidChangeLogLevel: Event; /** * Outputs the given trace message to the channel. Use this method to log verbose information. * * The message is only logged if the channel is configured to display {@link OutputChannelLogLevel.Trace trace} log level. * * @param message trace message to log */ trace(message: string, ...args: any[]): void; /** * Outputs the given debug message to the channel. * * The message is only logged if the channel is configured to display {@link OutputChannelLogLevel.Debug debug} log level or lower. * * @param message debug message to log */ debug(message: string, ...args: any[]): void; /** * Outputs the given information message to the channel. * * The message is only logged if the channel is configured to display {@link OutputChannelLogLevel.Info info} log level or lower. * * @param message info message to log */ info(message: string, ...args: any[]): void; /** * Outputs the given warning message to the channel. * * The message is only logged if the channel is configured to display {@link OutputChannelLogLevel.Warning warning} log level or lower. * * @param message warning message to log */ warn(message: string, ...args: any[]): void; /** * Outputs the given error or error message to the channel. * * The message is only logged if the channel is configured to display {@link OutputChannelLogLevel.Error error} log level or lower. * * @param error Error or error message to log */ error(error: string | Error, ...args: any[]): void; } export interface OutputChannel { /** * The name of this output channel. */ readonly name: string; /** * Append the given value to the channel. * * @param value */ append(value: string): void; /** * Append the given value and a line feed character * to the channel. * * @param value */ appendLine(value: string): void; /** * Replaces all output from the channel with the given value. * * @param value A string, falsy values will not be printed. */ replace(value: string): void; /** * Removes all output from the channel. */ clear(): void; /** * Reveal this channel in the UI. * * @param preserveFocus When 'true' the channel will not take focus. */ show(preserveFocus?: boolean): void; /** * Hide this channel from the UI. */ hide(): void; /** * Dispose and free associated resources. */ dispose(): void; } export interface WindowState { active: boolean; focused: boolean; } export declare class SymbolInformation { static validate(candidate: SymbolInformation): void; name: string; location: Location; kind: SymbolKind; tags?: SymbolTag[]; containerName: undefined | string; constructor(name: string, kind: SymbolKind, containerName: string | undefined, location: Location); constructor(name: string, kind: SymbolKind, range: Range, uri?: Uri, containerName?: string); toJSON(): any; } export declare enum SymbolKind { File = 0, Module = 1, Namespace = 2, Package = 3, Class = 4, Method = 5, Property = 6, Field = 7, Constructor = 8, Enum = 9, Interface = 10, Function = 11, Variable = 12, Constant = 13, String = 14, Number = 15, Boolean = 16, Array = 17, Object = 18, Key = 19, Null = 20, EnumMember = 21, Struct = 22, Event = 23, Operator = 24, TypeParameter = 25 } export declare class DocumentSymbol { static validate(candidate: DocumentSymbol): void; name: string; detail: string; kind: SymbolKind; tags?: SymbolTag[]; range: Range; selectionRange: Range; children: DocumentSymbol[]; constructor(name: string, detail: string, kind: SymbolKind, range: Range, selectionRange: Range); } /** * How a [`SignatureHelpProvider`](#SignatureHelpProvider) was triggered. */ export declare enum SignatureHelpTriggerKind { /** * Signature help was invoked manually by the user or by a command. */ Invoke = 1, /** * Signature help was triggered by a trigger character. */ TriggerCharacter = 2, /** * Signature help was triggered by the cursor moving or by the document content changing. */ ContentChange = 3 } export declare class ParameterInformation { label: string | [number, number]; documentation?: string | vscode.MarkdownString; constructor(label: string | [number, number], documentation?: string | vscode.MarkdownString); } export declare class SignatureInformation { label: string; documentation?: string | vscode.MarkdownString; parameters: ParameterInformation[]; activeParameter?: number; constructor(label: string, documentation?: string | vscode.MarkdownString); } export declare class SignatureHelp { signatures: SignatureInformation[]; activeSignature: number; activeParameter: number; } export declare enum TreeItemCollapsibleState { None = 0, Collapsed = 1, Expanded = 2 } /** * A reference to a named icon. Currently only [File](#ThemeIcon.File) and [Folder](#ThemeIcon.Folder) are supported. * Using a theme icon is preferred over a custom icon as it gives theme authors the possibility to change the icons. */ export declare class ThemeIcon { static File: ThemeIcon; static Folder: ThemeIcon; readonly id: string; readonly color?: ThemeColor; constructor(id: string, color?: ThemeColor); } export declare class TreeItem { collapsibleState: vscode.TreeItemCollapsibleState; label?: string | vscode.TreeItemLabel; resourceUri?: Uri; iconPath?: string | Uri | { light: string | Uri; dark: string | Uri; }; command?: vscode.Command; contextValue?: string; tooltip?: string; constructor(label: string | vscode.TreeItemLabel, collapsibleState?: vscode.TreeItemCollapsibleState); } export declare class TreeItem2 extends TreeItem { } export declare enum LogLevel { Trace = 1, Debug = 2, Info = 3, Warning = 4, Error = 5, Critical = 6, Off = 7 } /** * Log levels */ export declare enum OutputChannelLogLevel { /** * No messages are logged with this level. */ Off = 0, /** * All messages are logged with this level. */ Trace = 1, /** * Messages with debug and higher log level are logged with this level. */ Debug = 2, /** * Messages with info and higher log level are logged with this level. */ Info = 3, /** * Messages with warning and higher log level are logged with this level. */ Warning = 4, /** * Only error messages are logged with this level. */ Error = 5 } export declare enum SourceControlInputBoxValidationType { Error = 0, Warning = 1, Information = 2 } export declare class ColorInformation { range: Range; color: Color; constructor(range: Range, color: Color); } export declare class DebugAdapterExecutable { readonly command: string; readonly args: string[]; readonly options: any; constructor(command: string, args: string[], options?: any); } /** * Represents a debug adapter running as a socket based server. */ export declare class DebugAdapterServer { /** * The port. */ readonly port: number; /** * The host. */ readonly host?: string; /** * Create a description for a debug adapter running as a socket based server. */ constructor(port: number, host?: string); } export declare class DebugAdapterNamedPipeServer implements vscode.DebugAdapterNamedPipeServer { readonly path: string; constructor(path: string); } export declare class DebugAdapterInlineImplementation implements vscode.DebugAdapterInlineImplementation { readonly implementation: vscode.DebugAdapter; constructor(impl: vscode.DebugAdapter); } export declare class SelectionRange { range: Range; parent?: SelectionRange; constructor(range: Range, parent?: SelectionRange); } /** * The base class of all breakpoint types. */ export declare class Breakpoint { /** * Is breakpoint enabled. */ enabled: boolean; /** * An optional expression for conditional breakpoints. */ condition?: string; /** * An optional expression that controls how many hits of the breakpoint are ignored. */ hitCondition?: string; /** * An optional message that gets logged when this breakpoint is hit. Embedded expressions within {} are interpolated by the debug adapter. */ logMessage?: string; protected constructor(enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); private _id; /** * The unique ID of the breakpoint. */ get id(): string; } /** * A breakpoint specified by a source location. */ export declare class SourceBreakpoint extends Breakpoint { /** * The source and line position of this breakpoint. */ location: Location; /** * Create a new breakpoint for a source location. */ constructor(location: Location, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); } /** * A breakpoint specified by a function name. */ export declare class FunctionBreakpoint extends Breakpoint { /** * The name of the function to which this breakpoint is attached. */ functionName: string; /** * Create a new function breakpoint. */ constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string); } export interface QuickInputButton { readonly iconPath: Uri | { light: string | Uri; dark: string | Uri; } | ThemeIcon; readonly tooltip?: string | undefined; } export declare enum DebugConsoleMode { /** * Debug session should have a separate debug console. */ Separate = 0, /** * Debug session should share debug console with its parent session. * This value has no effect for sessions which do not have a parent session. */ MergeWithParent = 1 } export declare enum DebugConfigurationProviderTriggerKind { /** * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug configurations for a newly created launch.json. */ Initial = 1, /** * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide dynamically generated debug configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command). */ Dynamic = 2 } export declare class QuickInputButtons { static readonly Back: QuickInputButton; } export declare enum TextDocumentSaveReason { Manual = 1, AfterDelay = 2, FocusOut = 3 } export declare enum TextDocumentChangeReason { Undo = 1, Redo = 2 } export declare class TaskGroup implements vscode.TaskGroup { isDefault?: boolean; private _id; static Clean: TaskGroup; static Build: TaskGroup; static Rebuild: TaskGroup; static Test: TaskGroup; static from(value: string): TaskGroup | undefined; constructor(id: string, _label: string); get id(): string; } /** * Options for a process execution */ export interface ProcessExecutionOptions { /** * The current working directory of the executed program or shell. * If omitted the tools current workspace root is used. */ cwd?: string; /** * The additional environment of the executed program or shell. If omitted * the parent process' environment is used. If provided it is merged with * the parent process' environment. */ env?: { [key: string]: string; }; } /** * The shell quoting options. */ export interface ShellQuotingOptions { /** * The character used to do character escaping. If a string is provided only spaces * are escaped. If a `{ escapeChar, charsToEscape }` literal is provide all characters * in `charsToEscape` are escaped using the `escapeChar`. */ escape?: string | { /** * The escape character. */ escapeChar: string; /** * The characters to escape. */ charsToEscape: string; }; /** * The character used for strong quoting. The string's length must be 1. */ strong?: string; /** * The character used for weak quoting. The string's length must be 1. */ weak?: string; } /** * Options for a shell execution */ export interface ShellExecutionOptions { /** * The shell executable. */ executable?: string; /** * The arguments to be passed to the shell executable used to run the task. Most shells * require special arguments to execute a command. For example `bash` requires the `-c` * argument to execute a command, `PowerShell` requires `-Command` and `cmd` requires both * `/d` and `/c`. */ shellArgs?: string[]; /** * The shell quotes supported by this shell. */ shellQuoting?: ShellQuotingOptions; /** * The current working directory of the executed shell. * If omitted the tools current workspace root is used. */ cwd?: string; /** * The additional environment of the executed shell. If omitted * the parent process' environment is used. If provided it is merged with * the parent process' environment. */ env?: { [key: string]: string; }; } export declare class ProcessExecution implements vscode.ProcessExecution { private _process; private _args; private _options; constructor(process: string, options?: ProcessExecutionOptions); constructor(process: string, args: string[], options?: ProcessExecutionOptions); get process(): string; set process(value: string); get args(): string[]; set args(value: string[]); get options(): ProcessExecutionOptions | undefined; set options(value: ProcessExecutionOptions | undefined); computeId(): string; static is(value: ShellExecution | ProcessExecution | CustomExecution): boolean; } export declare class ShellExecution implements vscode.ShellExecution { private _commandLine; private _command; private _args; private _options; constructor(commandLine: string, options?: ShellExecutionOptions); constructor(command: string | vscode.ShellQuotedString, args: (string | vscode.ShellQuotedString)[], options?: ShellExecutionOptions); get commandLine(): string; set commandLine(value: string); get command(): string | vscode.ShellQuotedString; set command(value: string | vscode.ShellQuotedString); get args(): (string | vscode.ShellQuotedString)[]; set args(value: (string | vscode.ShellQuotedString)[]); get options(): ShellExecutionOptions | undefined; set options(value: ShellExecutionOptions | undefined); computeId(): string; static is(value: ShellExecution | ProcessExecution | CustomExecution): boolean; } export declare enum ShellQuoting { Escape = 1, Strong = 2, Weak = 3 } export declare enum TaskScope { Global = 1, Workspace = 2 } export declare class CustomExecution2 implements vscode.CustomExecution { private _callback; constructor(callback: () => Promise); computeId(): string; set callback(value: () => Promise); get callback(): () => Promise; } export declare class CustomExecution implements vscode.CustomExecution { private _callback; constructor(callback: (resolvedDefinition?: vscode.TaskDefinition) => Thenable); computeId(): string; set callback(value: (resolvedDefinition?: vscode.TaskDefinition) => Thenable); get callback(): (resolvedDefinition?: vscode.TaskDefinition) => Thenable; } /** * A structure that defines a task kind in the system. * The value must be JSON-stringifyable. */ export interface TaskDefinition { /** * The task definition describing the task provided by an extension. * Usually a task provider defines more properties to identify * a task. They need to be defined in the package.json of the * extension under the 'taskDefinitions' extension point. The npm * task definition for example looks like this * ```typescript * interface NpmTaskDefinition extends TaskDefinition { * script: string; * } * ``` * * Note that type identifier starting with a '$' are reserved for internal * usages and shouldn't be used by extensions. */ readonly type: string; /** * Additional attributes of a concrete task definition. */ [name: string]: any; } export declare class Task implements vscode.Task2 { private static ExtensionCallbackType; private static ProcessType; private static ShellType; private static EmptyType; private __id; private _definition; private _scope; private _name; private _execution; private _problemMatchers; private _hasDefinedMatchers; private _isBackground; private _source; private _group; private _presentationOptions; private _runOptions; private _detail; constructor(definition: TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution | CustomExecution | vscode.CustomExecution, problemMatchers?: string | string[]); constructor(definition: TaskDefinition, scope: vscode.TaskScope.Global | vscode.TaskScope.Workspace | vscode.WorkspaceFolder, name: string, source: string, execution?: ProcessExecution | ShellExecution | CustomExecution | vscode.CustomExecution, problemMatchers?: string | string[]); get _id(): string | undefined; set _id(value: string | undefined); private clear; private computeDefinitionBasedOnExecution; get definition(): TaskDefinition; set definition(value: TaskDefinition); get scope(): vscode.TaskScope.Global | vscode.TaskScope.Workspace | vscode.WorkspaceFolder | undefined; set target(value: vscode.TaskScope.Global | vscode.TaskScope.Workspace | vscode.WorkspaceFolder); get name(): string; set name(value: string); get execution(): ProcessExecution | ShellExecution | CustomExecution | undefined; set execution(value: ProcessExecution | ShellExecution | CustomExecution | undefined); get execution2(): ProcessExecution | ShellExecution | CustomExecution | undefined; set execution2(value: ProcessExecution | ShellExecution | CustomExecution | undefined); get problemMatchers(): string[]; set problemMatchers(value: string[]); get hasDefinedMatchers(): boolean; get isBackground(): boolean; set isBackground(value: boolean); get source(): string; set source(value: string); get group(): TaskGroup | undefined; set group(value: TaskGroup | undefined); get detail(): string | undefined; set detail(value: string | undefined); get presentationOptions(): vscode.TaskPresentationOptions; set presentationOptions(value: vscode.TaskPresentationOptions); get runOptions(): vscode.RunOptions; set runOptions(value: vscode.RunOptions); } export declare enum ExtensionKind { /** * Extension runs where the UI runs. */ UI = 1, /** * Extension runs where the remote extension host runs. */ Workspace = 2 } export declare enum TaskPanelKind { /** * Shares a panel with other tasks. This is the default. */ Shared = 1, /** * Uses a dedicated panel for this tasks. The panel is not * shared with other tasks. */ Dedicated = 2, /** * Creates a new panel whenever this task is executed. */ New = 3 } export declare class TerminalLink implements vscode.TerminalLink { startIndex: number; length: number; tooltip?: string | undefined; constructor(startIndex: number, length: number, tooltip?: string | undefined); } export declare class TerminalProfile implements vscode.TerminalProfile { options: vscode.TerminalOptions | vscode.ExtensionTerminalOptions; constructor(options: vscode.TerminalOptions | vscode.ExtensionTerminalOptions); } /** * Controls the behaviour of the terminal's visibility. */ export declare enum TaskRevealKind { /** * Always brings the terminal to front if the task is executed. */ Always = 1, /** * Only brings the terminal to front if a problem is detected executing the task * (e.g. the task couldn't be started because). */ Silent = 2, /** * The terminal never comes to front when the task is executed. */ Never = 3 } export declare enum TerminalExitReason { Unknown = 0, Shutdown = 1, Process = 2, User = 3, Extension = 4 } export declare enum TerminalShellExecutionCommandLineConfidence { Low = 0, Medium = 1, High = 2 } export declare enum UIKind { Desktop = 1, Web = 2 } /** * 评论模式 */ export declare enum CommentMode { /** * 编辑状态 */ Editing = 0, /** * 预览状态 */ Preview = 1 } /** * thread 展开模式 */ export declare enum CommentThreadCollapsibleState { /** * 收起状态 */ Collapsed = 0, /** * 展开状态 */ Expanded = 1 } export declare class ColorTheme implements vscode.ColorTheme { readonly kind: ColorThemeKind; constructor(kind: ColorThemeKind); } export declare enum ColorThemeKind { Light = 1, Dark = 2, HighContrast = 3, HighContrastLight = 4 } export declare enum SymbolTag { Deprecated = 1 } export declare enum ExtensionMode { /** * The extension is installed normally (for example, from the marketplace * or VSIX) in VS Code. */ Production = 1, /** * The extension is running from an `--extensionDevelopmentPath` provided * when launching VS Code. */ Development = 2, /** * The extension is running from an `--extensionDevelopmentPath` and * the extension host is running unit tests. */ Test = 3 } export declare class CallHierarchyItem { _sessionId?: string; _itemId?: string; kind: SymbolKind; name: string; detail?: string; uri: Uri; range: Range; selectionRange: Range; constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range); } export declare class CallHierarchyIncomingCall { from: vscode.CallHierarchyItem; fromRanges: vscode.Range[]; constructor(item: vscode.CallHierarchyItem, fromRanges: vscode.Range[]); } export declare class CallHierarchyOutgoingCall { to: vscode.CallHierarchyItem; fromRanges: vscode.Range[]; constructor(item: vscode.CallHierarchyItem, fromRanges: vscode.Range[]); } export declare class TypeHierarchyItem { _sessionId?: string; _itemId?: string; kind: SymbolKind; tags?: SymbolTag[]; name: string; detail?: string; uri: Uri; range: Range; selectionRange: Range; constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range); } export declare enum ViewColumn { Active = -1, Beside = -2, One = 1, Two = 2, Three = 3, Four = 4, Five = 5, Six = 6, Seven = 7, Eight = 8, Nine = 9 } export declare class SemanticTokensLegend { readonly tokenTypes: string[]; readonly tokenModifiers: string[]; constructor(tokenTypes: string[], tokenModifiers?: string[]); } export declare class SemanticTokensBuilder { private _prevLine; private _prevChar; private _dataIsSortedAndDeltaEncoded; private _data; private _dataLen; private _tokenTypeStrToInt; private _tokenModifierStrToInt; private _hasLegend; constructor(legend?: vscode.SemanticTokensLegend); push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void; push(range: Range, tokenType: string, tokenModifiers?: string[]): void; private _push; private _pushEncoded; private static _sortAndDeltaEncode; build(resultId?: string): SemanticTokens; } export declare class SemanticTokens { readonly resultId?: string; readonly data: Uint32Array; constructor(data: Uint32Array, resultId?: string); } export declare class SemanticTokensEdit { readonly start: number; readonly deleteCount: number; readonly data?: Uint32Array; constructor(start: number, deleteCount: number, data?: Uint32Array); } export declare class SemanticTokensEdits { readonly resultId?: string; readonly edits: SemanticTokensEdit[]; constructor(edits: SemanticTokensEdit[], resultId?: string); } export declare class EvaluatableExpression implements vscode.EvaluatableExpression { readonly range: vscode.Range; readonly expression?: string; constructor(range: any, expression?: string); } export declare class TimelineItem implements vscode.TimelineItem { label: string; timestamp: number; constructor(label: string, timestamp: number); } export declare class CancellationError extends Error { constructor(); } export declare class InlineValueText implements vscode.InlineValueText { readonly range: Range; readonly text: string; constructor(range: Range, text: string); } export declare class InlineValueVariableLookup implements vscode.InlineValueVariableLookup { readonly range: Range; readonly variableName?: string; readonly caseSensitiveLookup: boolean; constructor(range: Range, variableName?: string, caseSensitiveLookup?: boolean); } export declare class InlineValueEvaluatableExpression implements vscode.InlineValueEvaluatableExpression { readonly range: Range; readonly expression?: string; constructor(range: Range, expression?: string); } export declare class InlineValueContext implements vscode.InlineValueContext { readonly frameId: number; readonly stoppedLocation: vscode.Range; constructor(frameId: number, range: Range); } export declare enum InlayHintKind { Other = 0, Type = 1, Parameter = 2 } export declare class InlayHint { text: string; label: string | InlayHintLabelPart[]; position: Position; kind?: vscode.InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; paddingLeft?: boolean; paddingRight?: boolean; constructor(position: Position, label: string | InlayHintLabelPart[], kind?: vscode.InlayHintKind); } export declare class InlayHintLabelPart { value: string; tooltip?: string | vscode.MarkdownString; location?: Location; command?: vscode.Command; constructor(value: string); } export declare enum TestResultState { Queued = 1, Running = 2, Passed = 3, Failed = 4, Skipped = 5, Errored = 6 } export declare enum TestRunProfileKind { Run = 1, Debug = 2, Coverage = 3 } export declare class TestRunRequest implements vscode.TestRunRequest { readonly include: vscode.TestItem[] | undefined; readonly exclude: vscode.TestItem[] | undefined; readonly profile: vscode.TestRunProfile | undefined; readonly continuous?: boolean | undefined; readonly preserveFocus?: boolean | undefined; constructor(include: vscode.TestItem[] | undefined, exclude: vscode.TestItem[] | undefined, profile: vscode.TestRunProfile | undefined, continuous?: boolean | undefined, preserveFocus?: boolean | undefined); } export declare class TestMessage implements vscode.TestMessage { message: string | vscode.MarkdownString; expectedOutput?: string; actualOutput?: string; location?: vscode.Location; /** proposed: */ contextValue?: string; stackTrace?: vscode.TestMessageStackFrame[] | undefined; static diff(message: string | vscode.MarkdownString, expected: string, actual: string): TestMessage; constructor(message: string | vscode.MarkdownString); } export declare class TestMessageStackFrame implements vscode.TestMessageStackFrame { label: string; uri?: vscode.Uri | undefined; position?: Position | undefined; constructor(label: string, uri?: vscode.Uri | undefined, position?: Position | undefined); } export declare class TestCoverageCount implements vscode.TestCoverageCount { covered: number; total: number; constructor(covered: number, total: number); } export declare function validateTestCoverageCount(cc?: vscode.TestCoverageCount): void; export declare class FileCoverage implements vscode.FileCoverage { readonly uri: vscode.Uri; statementCoverage: vscode.TestCoverageCount; branchCoverage?: vscode.TestCoverageCount | undefined; declarationCoverage?: vscode.TestCoverageCount | undefined; includesTests: vscode.TestItem[]; static fromDetails(uri: vscode.Uri, details: vscode.FileCoverageDetail[]): vscode.FileCoverage; detailedCoverage?: vscode.FileCoverageDetail[]; constructor(uri: vscode.Uri, statementCoverage: vscode.TestCoverageCount, branchCoverage?: vscode.TestCoverageCount | undefined, declarationCoverage?: vscode.TestCoverageCount | undefined, includesTests?: vscode.TestItem[]); } export declare class StatementCoverage implements vscode.StatementCoverage { executed: number | boolean; location: Position | Range; branches: vscode.BranchCoverage[]; get executionCount(): number; set executionCount(n: number); constructor(executed: number | boolean, location: Position | Range, branches?: vscode.BranchCoverage[]); } export declare class BranchCoverage implements vscode.BranchCoverage { executed: number | boolean; location: Position | Range; label?: string | undefined; get executionCount(): number; set executionCount(n: number); constructor(executed: number | boolean, location: Position | Range, label?: string | undefined); } export declare class DeclarationCoverage implements vscode.DeclarationCoverage { readonly name: string; executed: number | boolean; location: Position | Range; get executionCount(): number; set executionCount(n: number); constructor(name: string, executed: number | boolean, location: Position | Range); } export type FileCoverageDetail = StatementCoverage | DeclarationCoverage; export declare class TestTag implements vscode.TestTag { readonly id: string; constructor(id: string); } export declare enum InlineCompletionTriggerKind { Invoke = 0, Automatic = 1 } export declare class DataTransferItem { readonly value: any; asString(): Promise; asFile(): undefined | vscode.DataTransferFile; readonly id: string; constructor(value: any, id?: string); } export declare class DataTransfer implements vscode.DataTransfer { #private; constructor(init?: Iterable); get(mimeType: string): DataTransferItem | undefined; set(mimeType: string, value: DataTransferItem): void; forEach(callbackfn: (value: DataTransferItem, key: string, dataTransfer: DataTransfer) => void, thisArg?: unknown): void; [Symbol.iterator](): IterableIterator<[mimeType: string, item: vscode.DataTransferItem]>; } export declare class InlineSuggestion implements vscode.InlineCompletionItem { filterText?: string; insertText: string; range?: Range; command?: vscode.Command; constructor(insertText: string, range?: Range, command?: vscode.Command); } export declare class InlineSuggestionList implements vscode.InlineCompletionList { items: vscode.InlineCompletionItem[]; commands: vscode.Command[] | undefined; constructor(items: vscode.InlineCompletionItem[]); } export declare enum ChatMessageRole { System = 0, User = 1, Assistant = 2, Function = 3 } export declare class ChatMessage implements vscode.ChatMessage { role: ChatMessageRole; content: string; name?: string; constructor(role: ChatMessageRole, content: string); } export declare class TextTabInput { readonly uri: Uri; constructor(uri: Uri); } export declare class TextDiffTabInput { readonly original: Uri; readonly modified: Uri; constructor(original: Uri, modified: Uri); } export declare class TextMergeTabInput { readonly base: Uri; readonly input1: Uri; readonly input2: Uri; readonly result: Uri; constructor(base: Uri, input1: Uri, input2: Uri, result: Uri); } export declare class CustomEditorTabInput { readonly uri: Uri; readonly viewType: string; constructor(uri: Uri, viewType: string); } export declare class WebviewEditorTabInput { readonly viewType: string; constructor(viewType: string); } export declare class NotebookEditorTabInput { readonly uri: Uri; readonly notebookType: string; constructor(uri: Uri, notebookType: string); } export declare class NotebookDiffEditorTabInput { readonly original: Uri; readonly modified: Uri; readonly notebookType: string; constructor(original: Uri, modified: Uri, notebookType: string); } export declare class TerminalEditorTabInput { constructor(); } export declare class InteractiveWindowInput { readonly uri: Uri; readonly inputBoxUri: Uri; constructor(uri: Uri, inputBoxUri: Uri); } export declare class NotebookRange { static isNotebookRange(thing: any): thing is vscode.NotebookRange; private _start; private _end; get start(): number; get end(): number; get isEmpty(): boolean; constructor(start: number, end: number); with(change: { start?: number; end?: number; }): NotebookRange; } export declare class NotebookCellData { static validate(data: NotebookCellData): void; static isNotebookCellDataArray(value: unknown): value is vscode.NotebookCellData[]; static isNotebookCellData(value: unknown): value is vscode.NotebookCellData; kind: NotebookCellKind; value: string; languageId: string; mime?: string; outputs?: vscode.NotebookCellOutput[]; metadata?: Record; executionSummary?: vscode.NotebookCellExecutionSummary; constructor(kind: NotebookCellKind, value: string, languageId: string, mime?: string, outputs?: vscode.NotebookCellOutput[], metadata?: Record, executionSummary?: vscode.NotebookCellExecutionSummary); } export declare class NotebookData { cells: NotebookCellData[]; metadata?: { [key: string]: any; }; constructor(cells: NotebookCellData[]); } export declare class NotebookCellOutputItem { #private; data: Uint8Array; mime: string; static isNotebookCellOutputItem(obj: unknown): obj is vscode.NotebookCellOutputItem; static error(err: Error | { name: string; message?: string; stack?: string; }): NotebookCellOutputItem; static stdout(value: string): NotebookCellOutputItem; static stderr(value: string): NotebookCellOutputItem; static bytes(value: Uint8Array, mime?: string): NotebookCellOutputItem; static text(value: string, mime?: string): NotebookCellOutputItem; static json(value: any, mime?: string): NotebookCellOutputItem; constructor(data: Uint8Array, mime: string); } export declare class NotebookCellOutput { static isNotebookCellOutput(candidate: any): candidate is vscode.NotebookCellOutput; static ensureUniqueMimeTypes(items: NotebookCellOutputItem[], warn?: boolean): NotebookCellOutputItem[]; id: string; items: NotebookCellOutputItem[]; metadata?: Record; constructor(items: NotebookCellOutputItem[], idOrMetadata?: string | Record, metadata?: Record); } export declare enum NotebookCellKind { Markup = 1, Code = 2 } export declare enum NotebookCellExecutionState { Idle = 1, Pending = 2, Executing = 3 } export declare enum NotebookCellStatusBarAlignment { Left = 1, Right = 2 } export declare enum NotebookEditorRevealType { Default = 0, InCenter = 1, InCenterIfOutsideViewport = 2, AtTop = 3 } export declare class NotebookCellStatusBarItem { text: string; alignment: NotebookCellStatusBarAlignment; constructor(text: string, alignment: NotebookCellStatusBarAlignment); } export declare enum NotebookControllerAffinity { Default = 1, Preferred = 2 } export declare enum NotebookControllerAffinity2 { Default = 1, Preferred = 2, Hidden = -1 } export declare class NotebookRendererScript { uri: vscode.Uri; provides: readonly string[]; constructor(uri: vscode.Uri, provides?: string | readonly string[]); } export declare class NotebookKernelSourceAction { label: string; description?: string; detail?: string; command?: vscode.Command; constructor(label: string); } export declare enum NotebookVariablesRequestKind { Named = 1, Indexed = 2 } export declare class InlineEdit implements vscode.InlineEdit { readonly text: string; readonly range: Range; constructor(text: string, range: Range); } export declare enum InlineEditTriggerKind { Invoke = 0, Automatic = 1 } //# sourceMappingURL=ext-types.d.ts.map