import type { MeterProvider } from "@opentelemetry/api"; import type { InteractiveModeContext } from "../types.js"; /** Most alternatives one request asks for and the composer offers. */ export declare const MAX_PREDICTION_CHOICES = 4; type PredictionContext = Pick; /** * Normalize a prediction reply to the single line the composer shows, or * `undefined` when the model skipped, rambled, or replied with nothing usable. */ export declare function parseComposerPrediction(reply: string): string | undefined; /** * Normalize an alternatives reply (one message per line, most likely first) to at most `max` distinct * lines, or `undefined` when the model skipped or nothing usable remains. List markers and wrapping * quotes are stripped per line; a leading preamble line ending in a colon, lines that ramble, repeat an * earlier one up to case and punctuation, or carry the skip reply are dropped. */ export declare function parseComposerPredictions(reply: string, max: number): string[] | undefined; /** * Composer predictions: once a turn completes, run an ephemeral side turn on * the session's model and context (the same prompt prefix, so it reads the * prompt cache) asking for the user's likely next message, or with * `composer.predictionAlternatives` up to four of them, then offer them in the * empty composer. Tab or Right inserts one; nothing is sent. */ export declare class ComposerPredictionController { #private; constructor(ctx: PredictionContext, options?: { deadlineMs?: number; meterProvider?: MeterProvider; }); /** The prediction's alternatives for the conversation as it stands now, most likely first, if one is ready. */ get choices(): readonly string[] | undefined; /** Predict the next message for the turn that just completed, superseding any earlier prediction. */ request(): void; /** The composer painted the current prediction; its first painted frame counts it as shown. */ shown(): void; /** The user inserted the alternative at `rank` (Tab or Right); the last insert before retirement counts. */ accepted(rank: number): void; /** Abort an in-flight prediction and retire the shown one. */ cancel(): void; } export {};