import { URI } from "../../../../base/common/uri.js"; import { ICodeEditor } from "../../../../editor/browser/editorBrowser.js"; import { ICodeEditorService } from "../../../../editor/browser/services/codeEditorService.service.js"; import { IRange } from "../../../../editor/common/core/range.js"; import { EditorResourceAccessor } from "../../../../workbench/common/editor.js"; import { ISessionFileChange } from "../../../services/sessions/common/session.js"; import { IAgentFeedbackService } from "./agentFeedbackService.service.js"; export interface IAgentFeedbackContext { readonly codeSelection?: string; readonly diffHunks?: string; } export declare function changeMatchesResource(change: ISessionFileChange, resourceUri: URI): boolean; export declare function getSessionChangeForResource(sessionResource: URI | undefined, resourceUri: URI, agentFeedbackService: IAgentFeedbackService): ISessionFileChange | undefined; export declare function createAgentFeedbackContext(editor: ICodeEditor, codeEditorService: ICodeEditorService, resourceUri: URI, range: IRange): IAgentFeedbackContext; export declare function getActiveResourceCandidates(input: Parameters[0]): URI[]; /** A resource candidate paired with the feedback session it is scoped to. */ export interface IFeedbackSessionCandidate { /** The first candidate resource that resolved to {@link sessionResource}. */ readonly resource: URI; readonly sessionResource: URI; } /** * Maps resource candidates to their feedback session, yielding every distinct * session at most once. A Changes multi-diff contributes an original and a * modified URI per file and can hold thousands of files, so session-scoped work * (resolving the backend, reading feedback, building comments) must run once per * session rather than once per file. Iteration stays lazy so callers keep their * early exit once a session with comments is found. */ export declare function getFeedbackSessionCandidates(candidates: Iterable, resolveSessionResource: (resource: URI) => URI | undefined): Iterable;