import type { AnnotationsState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-annotations/state"; import type { AnnotationsAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/action-origin.generated"; /** * Pure reducer for annotations state. Handles every {@link AnnotationsAction} * variant. * * Per the spec, every annotations action is client-dispatchable; the reducer * runs identically on the client (optimistic, write-ahead) and the server. It * preserves the dispatch order of annotations (and of entries within an * annotation): new entries are appended; `*Set` actions with a matching id * replace in place, while actions whose target id is unknown are no-ops * (mirroring `changeset/fileRemoved` semantics). The single-entry * minimum invariant is enforced by producers, not the reducer — removing an * annotation's last entry via {@link AnnotationsEntryRemovedAction} (instead * of {@link AnnotationsRemovedAction}) would leave an empty annotation, * which is observable but not catastrophic. */ export declare function annotationsReducer(state: AnnotationsState, action: AnnotationsAction, log?: (msg: string) => void): AnnotationsState;