import { Disposable } from "../../../../base/common/lifecycle.js"; import { URI } from "../../../../base/common/uri.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; import { ITelemetryService } from "../../../../platform/telemetry/common/telemetry.service.js"; import { ColorScheme } from "../../../../platform/theme/common/theme.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { ISessionsChatBackgroundService } from "./chatBackgroundService.service.js"; export declare const AGENT_SESSIONS_PREFERRED_DARK_CHAT_BACKGROUND_IMAGE_SETTING = "chat.agentSessions.preferredDarkBackgroundImage"; export declare const AGENT_SESSIONS_PREFERRED_LIGHT_CHAT_BACKGROUND_IMAGE_SETTING = "chat.agentSessions.preferredLightBackgroundImage"; export declare const AGENT_SESSIONS_PREFERRED_DARK_CHAT_BACKGROUND_IMAGE_LAYOUT_SETTING = "chat.agentSessions.preferredDarkBackgroundImageLayout"; export declare const AGENT_SESSIONS_PREFERRED_LIGHT_CHAT_BACKGROUND_IMAGE_LAYOUT_SETTING = "chat.agentSessions.preferredLightBackgroundImageLayout"; export declare const AGENT_SESSIONS_CHAT_BACKGROUND_CODICONS_PRESET = "codicons"; export type SessionsChatBackgroundPreset = typeof AGENT_SESSIONS_CHAT_BACKGROUND_CODICONS_PRESET; /** File extensions of the image formats a chat background can display. */ export declare const chatBackgroundImageExtensions: readonly string[]; /** The configured background, whether or not the theme shows it. */ export type ISessionsChatConfiguredBackground = { readonly kind: "codicons"; } | { readonly kind: "image"; readonly image: URI; }; export interface ISessionsChatImageBackground { readonly kind: "image"; readonly backgroundImage: string; readonly backgroundRepeat: string; readonly backgroundSize: string; readonly backgroundPosition: string; } export interface ISessionsChatCodiconsBackground { readonly kind: "codicons"; } export type ISessionsChatBackground = ISessionsChatImageBackground | ISessionsChatCodiconsBackground; declare const backgroundImageStyles: { readonly repeat: { readonly backgroundRepeat: "repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "left top"; }; readonly stretch: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "100% 100%"; readonly backgroundPosition: "center center"; }; readonly center: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "center center"; }; readonly top: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "center top"; }; readonly "top-right": { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "right top"; }; readonly "top-left": { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "left top"; }; readonly bottom: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "center bottom"; }; readonly "bottom-right": { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "right bottom"; }; readonly "bottom-left": { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "left bottom"; }; readonly left: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "left center"; }; readonly right: { readonly backgroundRepeat: "no-repeat"; readonly backgroundSize: "auto"; readonly backgroundPosition: "right center"; }; }; export type ChatBackgroundImageLayout = keyof typeof backgroundImageStyles; export declare const chatBackgroundImageLayoutValues: ChatBackgroundImageLayout[]; /** * What changed the chat background: the Set Chat Background tool of an agent, or the background or * layout quick pick of the Agents window. Changes from anywhere else are reported as `settings`. */ export type ChatBackgroundChangeSource = "agent" | "backgroundPicker" | "layoutPicker"; export declare class SessionsChatBackgroundService extends Disposable implements ISessionsChatBackgroundService { private readonly configurationService; private readonly themeService; private readonly storageService; private readonly telemetryService; readonly _serviceBrand: undefined; private readonly _onDidChangeBackground; readonly onDidChangeBackground: import("../../../../base/common/event.js").Event; private backgroundImageLayout; /** The source of each setting this service is writing, which the resulting configuration change is attributed to. */ private readonly pendingChangeSources; /** Serializes writes, so that overlapping writes of a setting cannot replace or remove each other's source. */ private readonly writeSequencer; /** The last reported background of each color scheme, so that only changes of what is shown are reported. */ private readonly reportedBackgrounds; constructor(configurationService: IConfigurationService, themeService: IThemeService, contextKeyService: IContextKeyService, storageService: IStorageService, telemetryService: ITelemetryService); getBackground(): ISessionsChatBackground | undefined; getConfiguredBackgroundImage(): URI | undefined; getRecentBackgroundImages(): readonly URI[]; getReferencedBackgroundImages(): readonly URI[]; setBackground(background: URI | SessionsChatBackgroundPreset, source: ChatBackgroundChangeSource, colorScheme?: ColorScheme): Promise; clearBackground(source: ChatBackgroundChangeSource, colorScheme?: ColorScheme): Promise; getBackgroundImageLayout(colorScheme?: ColorScheme): ChatBackgroundImageLayout; setBackgroundImageLayout(layout: ChatBackgroundImageLayout, source: ChatBackgroundChangeSource, persist?: boolean, colorScheme?: ColorScheme): Promise; private updateSetting; /** Reports each change of a shown background, including changes made outside this service, such as in settings.json. */ private reportChanges; private readReportedBackground; private readConfiguredBackgroundImageLayout; private getBackgroundImageSetting; private getBackgroundImageLayoutSetting; getConfiguredBackground(colorScheme?: ColorScheme): ISessionsChatConfiguredBackground | undefined; private readConfiguredBackground; private getStoredRecentBackgroundImages; private storeRecentBackgroundImage; private resolveBackgroundImage; } export {};