import { DocumentId } from '../../../platform/inlineEdits/common/dataTypes/documentId';
import * as xtabPromptOptions from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
import { NoNextEditReason, StreamedEdit } from '../../../platform/inlineEdits/common/statelessNextEditProvider';
import { ILogger } from '../../../platform/log/common/logService';
import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
import { StringText } from '../../../util/vs/editor/common/core/text/abstractText';
import { EditIntentParseMode } from './editIntent';
export declare namespace ResponseParseResult {
    interface EditIntentMetadata {
        readonly intent: xtabPromptOptions.EditIntent;
        readonly parseError?: string;
    }
    /**
     * The response contains edit-window lines to be fed into *ResponseProcessor.diff*.
     */
    class EditWindowLines {
        readonly lines: AsyncIterable<string>;
        readonly editIntentMetadata?: EditIntentMetadata | undefined;
        constructor(lines: AsyncIterable<string>, editIntentMetadata?: EditIntentMetadata | undefined);
    }
    /**
     * The handler has finished — no more processing needed. Carries a {@link NoNextEditReason}.
     */
    class Done {
        readonly reason: NoNextEditReason;
        constructor(reason: NoNextEditReason);
    }
    /**
     * The handler yields edits directly (e.g. INSERT or CustomDiffPatch).
     * The coordinator should `yield*` the stream.
     */
    class DirectEdits {
        readonly stream: AsyncGenerator<StreamedEdit, NoNextEditReason, void>;
        constructor(stream: AsyncGenerator<StreamedEdit, NoNextEditReason, void>);
    }
    type t = EditWindowLines | Done | DirectEdits;
}
export declare function handleEditWindowOnly(linesStream: AsyncIterable<string>): ResponseParseResult.EditWindowLines;
export declare function handleCodeBlock(linesStream: AsyncIterable<string>): ResponseParseResult.EditWindowLines;
export declare function handleEditWindowWithEditIntent(linesStream: AsyncIterable<string>, tracer: ILogger, parseMode: EditIntentParseMode): Promise<ResponseParseResult.EditWindowLines | ResponseParseResult.Done>;
export interface UnifiedXmlInsertContext {
    readonly editWindowLines: string[];
    readonly editWindowLineRange: OffsetRange;
    readonly cursorOriginalLinesOffset: number;
    readonly cursorColumnZeroBased: number;
    readonly editWindow: OffsetRange;
    readonly originalEditWindow: OffsetRange | undefined;
    readonly targetDocument: DocumentId;
    readonly isFromCursorJump: boolean;
}
export declare function handleUnifiedWithXml(linesStream: AsyncIterable<string>, ctx: UnifiedXmlInsertContext, documentBeforeEdits: StringText, tracer: ILogger): Promise<ResponseParseResult.t>;
//# sourceMappingURL=responseFormatHandlers.d.ts.map