import type { RequestMetadata } from '@vscode/copilot-api';
import { HTMLTracer, IChatEndpointInfo, RenderPromptResult } from '@vscode/prompt-tsx';
import type { Event } from 'vscode';
import type { LanguageModelToolResult2 } from '../../../vscodeTypes';
import type { IModelAPIResponse } from '../../endpoint/common/endpointProvider';
import { CapturingToken } from '../common/capturingToken';
import { ILoggedPendingRequest, IRequestLogger, LoggedInfo, LoggedRequest, PendingLoggedChatRequest } from '../common/requestLogger';
import { Disposable } from '../../../util/vs/base/common/lifecycle';
import { IChatEndpoint } from '../../../platform/networking/common/networking';
/**
 * Get the current CapturingToken from AsyncLocalStorage.
 * Returns undefined if not within a captureInvocation context.
 */
export declare function getCurrentCapturingToken(): CapturingToken | undefined;
/**
 * Store the current CapturingToken with a correlation ID for cross-IPC retrieval.
 * Call this before making a request that will cross IPC boundaries.
 */
export declare function storeCapturingTokenForCorrelation(correlationId: string): void;
/**
 * Retrieve and remove a CapturingToken by correlation ID.
 * Returns undefined if no token was stored for this ID.
 */
export declare function retrieveCapturingTokenByCorrelation(correlationId: string): CapturingToken | undefined;
/**
 * Run a function within a CapturingToken context without going through IRequestLogger.
 * Used to restore context after IPC boundary crossing.
 */
export declare function runWithCapturingToken<T>(token: CapturingToken, fn: () => T): T;
export declare abstract class AbstractRequestLogger extends Disposable implements IRequestLogger {
    _serviceBrand: undefined;
    get promptRendererTracing(): boolean;
    captureInvocation<T>(request: CapturingToken, fn: () => Promise<T>): Promise<T>;
    abstract logModelListCall(id: string, requestMetadata: RequestMetadata, models: IModelAPIResponse[]): void;
    abstract logToolCall(id: string, name: string | undefined, args: unknown, response: LanguageModelToolResult2): void;
    logContentExclusionRules(_repos: string[], _rules: {
        patterns: string[];
        ifAnyMatch: string[];
        ifNoneMatch: string[];
    }[], _durationMs: number): void;
    logChatRequest(debugName: string, chatEndpoint: IChatEndpoint, chatParams: ILoggedPendingRequest): PendingLoggedChatRequest;
    abstract addPromptTrace(elementName: string, endpoint: IChatEndpointInfo, result: RenderPromptResult, trace: HTMLTracer): void;
    abstract addEntry(entry: LoggedRequest): void;
    abstract getRequests(): LoggedInfo[];
    abstract getRequestById(id: string): LoggedInfo | undefined;
    abstract onDidChangeRequests: Event<void>;
    enableWorkspaceEditTracing(): void;
    disableWorkspaceEditTracing(): void;
    /** Current request being made to the LM. */
    protected get currentRequest(): CapturingToken | undefined;
}
//# sourceMappingURL=requestLogger.d.ts.map