@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
18 lines • 1.01 kB
TypeScript
/**
* Provider image rejections (senpi#2170). A provider that rejects an image
* rejects every later request that replays it, and `dropFailedAssistantTurns`
* removes the failed turn but not the image, so one bad image bricked the
* session. The failed assistant turn is persisted with its error, so the
* rejection is derived from history on every request (and after a restart):
* images no successful response had accepted before an image-rejection failure
* are replaced by a placeholder naming their source.
*/
interface TurnMessage {
role: string;
}
export declare function isProviderImageRejection(errorMessage: string | undefined): boolean;
export declare function rejectedImagePlaceholder(source: string): string;
export declare function rejectedImageSources(messages: readonly TurnMessage[], failedTurn: TurnMessage): string[];
export declare function omitProviderRejectedImages<T extends TurnMessage>(messages: T[]): T[];
export {};
//# sourceMappingURL=provider-rejected-images.d.ts.map