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; readonly editIntentMetadata?: EditIntentMetadata | undefined; constructor(lines: AsyncIterable, 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; constructor(stream: AsyncGenerator); } type t = EditWindowLines | Done | DirectEdits; } export declare function handleEditWindowOnly(linesStream: AsyncIterable): ResponseParseResult.EditWindowLines; export declare function handleCodeBlock(linesStream: AsyncIterable): ResponseParseResult.EditWindowLines; export declare function handleEditWindowWithEditIntent(linesStream: AsyncIterable, tracer: ILogger, parseMode: EditIntentParseMode): Promise; export interface UnifiedXmlInsertContext { readonly editWindowLines: string[]; readonly editWindowLineRange: OffsetRange; readonly cursorLineInEditWindowOffset: number; readonly cursorColumnZeroBased: number; readonly editWindow: OffsetRange; readonly originalEditWindow: OffsetRange | undefined; readonly targetDocument: DocumentId; readonly isFromCursorJump: boolean; } export declare function handleUnifiedWithXml(linesStream: AsyncIterable, ctx: UnifiedXmlInsertContext, documentBeforeEdits: StringText, tracer: ILogger): Promise; //# sourceMappingURL=responseFormatHandlers.d.ts.map