import { Raw } from '@vscode/prompt-tsx';
import type { InlineCompletionContext } from 'vscode';
import { Event } from '../../../util/vs/base/common/event';
import { ThemeIcon } from '../../../util/vs/base/common/themables';
import { SerializedLineEdit } from '../../../util/vs/editor/common/core/edits/lineEdit';
import { SerializedEdit } from './dataTypes/editUtils';
import { LanguageContextResponse, SerializedContextResponse } from './dataTypes/languageContext';
import { RootedLineEdit } from './dataTypes/rootedLineEdit';
import { DebugRecorderBookmark } from './debugRecorderBookmark';
import { ISerializedNextEditRequest, StatelessNextEditRequest } from './statelessNextEditProvider';
import { HistoryContext } from './workspaceEditTracker/historyContextProvider';
export interface MarkdownLoggable {
    toMarkdown(): string;
}
export declare class InlineEditRequestLogContext {
    readonly filePath: string;
    readonly version: number;
    private _context;
    private static _id;
    readonly requestId: number;
    readonly time: number;
    /** Tweaks visibility of this log element in the log tree */
    protected _isVisible: boolean;
    get includeInLogTree(): boolean;
    private _isCompleted;
    /** Mark this request as completed (no longer in progress). */
    markCompleted(): void;
    private readonly _onDidChange;
    /** Fires when state changes, allowing live log entries to refresh their content. */
    readonly onDidChange: Event<void>;
    protected fireDidChange(): void;
    constructor(filePath: string, version: number, _context: InlineCompletionContext | undefined);
    recordingBookmark: DebugRecorderBookmark | undefined;
    toLogDocument(): string;
    toMinimalLog(): string;
    private _statelessNextEditProviderId;
    setStatelessNextEditProviderId(id: string): void;
    private _nextEditRequest;
    setRequestInput(nextEditRequest: StatelessNextEditRequest): void;
    private _resultEdit;
    setResult(resultEditOrPatchString: RootedLineEdit | string): void;
    protected _diagnosticsResultEdit: RootedLineEdit | undefined;
    setDiagnosticsResult(resultEdit: RootedLineEdit): void;
    private _nesTypePicked;
    setPickedNESType(nesTypePicked: 'llm' | 'diagnostics'): this;
    private _logContextOfCachedEdit;
    setIsCachedResult(logContextOfCachedEdit: InlineEditRequestLogContext): void;
    /**
     * Marks this log context as having joined an already in-flight request
     * (async pending or speculative). The icon shows git-merge to distinguish
     * from a true cache hit.
     */
    setIsReusedInFlightResult(logContextOfReusedRequest: InlineEditRequestLogContext): void;
    private _endpointInfo;
    setEndpointInfo(url: string, modelName: string): void;
    get endpointInfo(): {
        url: string;
        modelName: string;
    } | undefined;
    private _headerRequestId;
    setHeaderRequestId(headerRequestId: string): void;
    get headerRequestId(): string | undefined;
    _prompt: string | undefined;
    private _rawMessages;
    get prompt(): string | undefined;
    get rawMessages(): Raw.ChatMessage[] | undefined;
    setPrompt(prompt: string | Raw.ChatMessage[]): void;
    private _outcome;
    /**
     * Sets the outcome, warning if already set (i.e., not `pending`).
     * Use direct `this._outcome = ...` assignment to bypass the guard
     * (e.g., in `setIsCachedResult` which intentionally overrides any inherited outcome).
     */
    private _setOutcome;
    private _resolveIcon;
    getIcon(): ThemeIcon;
    setIsSkipped(): void;
    markAsFromCache(): void;
    markAsNoSuggestions(): void;
    markAsPreviouslyRejected(): void;
    private _error;
    get error(): unknown | undefined;
    setError(e: unknown): void;
    /**
     * Model Response
     */
    private response;
    setResponse(v: string): void;
    private fullResponsePromise;
    private fullResponse;
    setFullResponse(promise: Promise<string | undefined>): void;
    allPromisesResolved(): Promise<void>;
    private providerStartTime;
    setProviderStartTime(): void;
    private providerEndTime;
    setProviderEndTime(): void;
    private fetchStartTime;
    setFetchStartTime(): void;
    private fetchEndTime;
    setFetchEndTime(): void;
    /**
     * Each of edit suggestions from model
     */
    private _responseResults;
    get responseResults(): readonly unknown[] | undefined;
    setResponseResults(v: readonly unknown[]): void;
    getDebugName(): string;
    getMarkdownTitle(): string;
    protected _recentEdit: HistoryContext | undefined;
    setRecentEdit(edit: HistoryContext): void;
    private _trace;
    trace(msg: string): void;
    private _renderTraceDiagram;
    private _logs;
    addLog(content: string): void;
    private _rebaseFailure;
    setRebaseFailure(failure: MarkdownLoggable): void;
    private _isAccepted;
    setAccepted(isAccepted: boolean): void;
    addListToLog(list: string[]): void;
    addCodeblockToLog(code: string, language?: string): void;
    private _fileDiagnostics;
    setDiagnosticsData(fileDiagnostics: string): void;
    private _terminalOutput;
    setTerminalData(terminalOutput: string): void;
    private _languageContext;
    setLanguageContext(langCtx: LanguageContextResponse): void;
    /**
     * Convert the current instance into a JSON format to enable serialization
     * @returns JSON representation of the current state
     */
    toJSON(): ISerializedInlineEditLogContext;
}
export interface INextEditProviderTest {
    recentWorkspaceEdits: {
        path: string;
        initialText: string;
        edit: SerializedEdit;
    }[];
    recentWorkspaceEditsActiveDocumentIdx?: number;
    statelessDocuments?: {
        initialText: string;
        edit: SerializedLineEdit;
    }[];
    statelessActiveDocumentIdx?: number;
    statelessLLMPrompt?: string;
    statelessLLMResponse?: string;
    statelessNextEdit?: SerializedLineEdit;
    nextEdit?: SerializedEdit;
}
export interface ISerializedInlineEditLogContext {
    requestId: number;
    time: number;
    filePath: string;
    version: number;
    statelessNextEditProviderId: string | undefined;
    nextEditRequest: ISerializedNextEditRequest | undefined;
    diagnosticsResultEdit: string | undefined;
    resultEdit: string | undefined;
    isCachedResult: boolean;
    prompt: string | undefined;
    error: string;
    response: string | undefined;
    responseResults: string;
    providerStartTime: number | undefined;
    providerEndTime: number | undefined;
    fetchStartTime: number | undefined;
    fetchEndTime: number | undefined;
    logs: string[];
    isAccepted: boolean | undefined;
    languageContext: SerializedContextResponse | undefined;
    diagnostics: string | undefined;
    terminalOutput: string | undefined;
}
//# sourceMappingURL=inlineEditLogContext.d.ts.map