import { Event, URI } from "../../../../../sessions/sessions.web.main.internal.js"; import { IChatResponseViewModel } from "../../common/model/chatViewModel.js"; import { IChatModelFeedbackSurveyChangeEvent, IChatModelFeedbackSurveyState } from "./chatModelFeedbackSurveyService.js"; export declare const IChatModelFeedbackSurveyService: import("../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; export interface IChatModelFeedbackSurveyService { readonly _serviceBrand: undefined; /** Fires when a response's survey state changes, so the row can re-render. */ readonly onDidChangeSurveyState: Event; /** * Fires when the configured survey changes, including when it first resolves. Rows rendered * before that point carry no control until they re-render, so they listen for this. */ readonly onDidChangeConfiguration: Event; /** * The survey attached to a response, or `undefined` when the config does not apply to it. * * Presence depends only on the `match` rules and never on the prompting heuristics, so the * control does not come and go between responses. Repeated calls return the same state, so a * row scrolling back into view keeps its control and is not asked to prompt twice. */ getSurvey(response: IChatResponseViewModel): IChatModelFeedbackSurveyState | undefined; /** * Opens the survey, or closes it when it is already showing. Manual opens are never rate * limited, because the prompting rules only exist to pace surveys the user did not ask for. */ toggle(response: IChatResponseViewModel): void; /** * Reports that the user moved the model picker from one model to another. Leaving a surveyed * model for an unsurveyed one is the strongest signal that the model was wrong. */ notifyModelSwitchedAway(sessionResource: URI, fromModelId: string, toModelId: string): void; answerChoice(response: IChatResponseViewModel, stepId: string, optionId: string): void; submit(response: IChatResponseViewModel, comment?: string): void; dismiss(response: IChatResponseViewModel): void; /** Records in-progress free text without re-rendering, so it survives row recycling. */ setCommentDraft(response: IChatResponseViewModel, comment: string): void; }