import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser"; import { EditorAction2 } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions"; import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service"; import { IEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon"; import { Action2 } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions"; import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service"; import { ITextEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor"; import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service"; import { IInstantiationService, ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service"; import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane"; import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service"; import { MutableObservableValue } from "../common/observableValue.js"; import { ITestResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResult"; import { ITestResultService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResultService.service"; import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service"; import { TestResultItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes"; import { IShowResultOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testingPeekOpener"; import { ITestingPeekOpener } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testingPeekOpener.service"; import { InspectSubject } from "./testResultsView/testResultsSubject.js"; export declare class TestingPeekOpener extends Disposable implements ITestingPeekOpener { private readonly configuration; private readonly editorService; private readonly codeEditorService; private readonly testResults; private readonly testService; private readonly viewsService; private readonly commandService; private readonly notificationService; static readonly ID = "workbench.contrib.testing.peekOpener"; _serviceBrand: undefined; private lastUri?; /** @inheritdoc */ readonly historyVisible: MutableObservableValue; constructor(configuration: IConfigurationService, editorService: IEditorService, codeEditorService: ICodeEditorService, testResults: ITestResultService, testService: ITestService, storageService: IStorageService, viewsService: IViewsService, commandService: ICommandService, notificationService: INotificationService); /** @inheritdoc */ open(): Promise; /** @inheritdoc */ tryPeekFirstError(result: ITestResult, test: TestResultItem, options?: Partial): boolean; /** @inheritdoc */ peekUri(uri: URI, options?: IShowResultOptions): boolean; /** @inheritdoc */ closeAllPeeks(): void; openCurrentInEditor(): void; private getActiveControl; /** @inheritdoc */ private showPeekFromUri; /** * Opens the peek view on a test failure, based on user preferences. */ private openPeekOnFailure; /** * Gets the message closest to the given position from a test in the file. */ private getFileCandidateMessage; /** * Gets any possible still-relevant message from the results. */ private getAnyCandidateMessage; /** * Gets the first failed message that can be displayed from the result. */ private getFailedCandidateMessage; } /** * Adds output/message peek functionality to code editors. */ export declare class TestingOutputPeekController extends Disposable implements IEditorContribution { private readonly editor; private readonly codeEditorService; private readonly instantiationService; private readonly testResults; /** * Gets the controller associated with the given code editor. */ static get(editor: ICodeEditor): TestingOutputPeekController | null; /** * Currently-shown peek view. */ private readonly peek; /** * Context key updated when the peek is visible/hidden. */ private readonly visible; /** * Gets the currently display subject. Undefined if the peek is not open. */ readonly subject: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservableWithChange; constructor(editor: ICodeEditor, codeEditorService: ICodeEditorService, instantiationService: IInstantiationService, testResults: ITestResultService, contextKeyService: IContextKeyService); /** * Shows a peek for the message in the editor. */ show(uri: URI): Promise; /** * Shows a peek for the existing inspect subject. */ showSubject(subject: InspectSubject): Promise; openAndShow(uri: URI): Promise; /** * Disposes the peek view, if any. */ removePeek(): void; /** * Collapses all displayed stack frames. */ collapseStack(): void; /** * Shows the next message in the peek, if possible. */ next(): void; /** * Shows the previous message in the peek, if possible. */ previous(): void; /** * Removes the peek view if it's being displayed on the given test ID. */ removeIfPeekingForTest(testId: string): void; /** * If the test we're currently showing has its state change to something * else, then clear the peek. */ private closePeekOnTestChange; private closePeekOnCertainResultEvents; private retrieveTest; } export declare class TestResultsView extends ViewPane { private readonly resultService; private readonly content; constructor(options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService, resultService: ITestResultService); get subject(): InspectSubject | undefined; showLatestRun(preserveFocus?: boolean): void; protected renderBody(container: HTMLElement): void; protected layoutBody(height: number, width: number): void; private renderContent; } export declare class CloseTestPeek extends EditorAction2 { constructor(); runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor): void; } export declare class GoToNextMessageAction extends Action2 { static readonly ID = "testing.goToNextMessage"; constructor(); run(accessor: ServicesAccessor): void; } export declare class GoToPreviousMessageAction extends Action2 { static readonly ID = "testing.goToPreviousMessage"; constructor(); run(accessor: ServicesAccessor): void; } export declare class CollapsePeekStack extends Action2 { static readonly ID = "testing.collapsePeekStack"; constructor(); run(accessor: ServicesAccessor): void; } export declare class OpenMessageInEditorAction extends Action2 { static readonly ID = "testing.openMessageInEditor"; constructor(); run(accessor: ServicesAccessor): void; } export declare class ToggleTestingPeekHistory extends Action2 { static readonly ID = "testing.toggleTestingPeekHistory"; constructor(); run(accessor: ServicesAccessor): void; }