import { CancellationToken } from "../../../../../base/common/cancellation.js";
import { Event } from "../../../../../base/common/event.js";
import { Disposable, IDisposable } from "../../../../../base/common/lifecycle.js";
import { URI } from "../../../../../base/common/uri.js";
import { IMenuService } from "../../../../../platform/actions/common/actions.service.js";
import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.service.js";
import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js";
import { ILabelService } from "../../../../../platform/label/common/label.service.js";
import { ILogService } from "../../../../../platform/log/common/log.service.js";
import { IThemeService } from "../../../../../platform/theme/common/themeService.service.js";
import { IExtensionService } from "../../../../services/extensions/common/extensions.service.js";
import { IChatAgentAttachmentCapabilities } from "../../common/participants/chatAgents.js";
import { IChatAgentService } from "../../common/participants/chatAgents.service.js";
import { ChatSessionStatus, IChatNewSessionRequest, IChatSession, IChatSessionCommitEvent, IChatSessionContentProvider, IChatSessionCustomizationItemGroup, IChatSessionCustomizationsProvider, IChatSessionItem, IChatSessionItemController, IChatSessionItemsDelta, IChatSessionOptionsChangeEvent, IChatSessionProviderOptionGroup, IChatSessionProviderOptionItem, IChatSessionRequestHistoryItem, IChatSessionsExtensionPoint, IChatInputCompletionsParams, IChatInputCompletionsResult, ReadonlyChatSessionOptionsMap, ResolvedChatSessionsExtensionPoint } from "../../common/chatSessionsService.js";
import { IChatSessionsService } from "../../common/chatSessionsService.service.js";
import { ResponseModelState } from "../../common/chatService/chatService.js";
import { IChatRequestVariableEntry } from "../../common/attachments/chatVariableEntries.js";
import { Target } from "../../common/promptSyntax/promptTypes.js";
import { IChatModel } from "../../common/model/chatModel.js";
export declare class ChatSessionsService extends Disposable implements IChatSessionsService {
    private readonly _logService;
    private readonly _chatAgentService;
    private readonly _extensionService;
    private readonly _contextKeyService;
    private readonly _menuService;
    private readonly _themeService;
    private readonly _labelService;
    readonly _serviceBrand: undefined;
    private readonly _itemControllers;
    private readonly _contributions;
    private readonly _contributionDisposables;
    private readonly _contentProviders;
    private readonly _alternativeIdMap;
    private readonly _contextKeys;
    private readonly _onDidChangeItemsProviders;
    readonly onDidChangeItemsProviders: Event<{
        readonly chatSessionType: string;
    }>;
    private readonly _onDidChangeSessionItems;
    readonly onDidChangeSessionItems: Event<IChatSessionItemsDelta>;
    private readonly _onDidCommitSession;
    readonly onDidCommitSession: Event<IChatSessionCommitEvent>;
    private readonly _onDidChangeAvailability;
    readonly onDidChangeAvailability: Event<void>;
    private readonly _onDidChangeInProgress;
    get onDidChangeInProgress(): Event<void>;
    private readonly _onDidChangeContentProviderSchemes;
    get onDidChangeContentProviderSchemes(): Event<{
        readonly added: string[];
        readonly removed: string[];
    }>;
    private readonly _onDidChangeSessionOptions;
    get onDidChangeSessionOptions(): Event<IChatSessionOptionsChangeEvent>;
    private readonly _onDidChangeOptionGroups;
    get onDidChangeOptionGroups(): Event<string>;
    private readonly inProgressMap;
    private readonly _sessionTypeOptions;
    private readonly _sessions;
    private readonly _resourceAliases;
    private readonly _customizationsProviders;
    private readonly _onDidChangeCustomizations;
    readonly onDidChangeCustomizations: Event<{
        readonly chatSessionType: string;
    }>;
    private readonly _hasCanDelegateProvidersKey;
    constructor(_logService: ILogService, _chatAgentService: IChatAgentService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService, _menuService: IMenuService, _themeService: IThemeService, _labelService: ILabelService);
    private reportInProgress;
    getInProgress(): {
        chatSessionType: string;
        count: number;
    }[];
    resolveChatSessionItem(chatSessionType: string, resource: URI, token: CancellationToken): Promise<IChatSessionItem | undefined>;
    private updateInProgressStatus;
    private registerContribution;
    private _isContributionAvailable;
    /**
     * Resolves a session type to its primary type, checking for alternative IDs.
     * @param sessionType The session type or alternative ID to resolve
     * @returns The primary session type, or undefined if not found or not available
     */
    private _resolveToPrimaryType;
    private _registerMenuItems;
    private _registerCommands;
    private _evaluateAvailability;
    private _enableContribution;
    /**
     * Disposes of all sessions that belong to a contribution
     *
     * @returns List of session resources that were disposed.
     */
    private _disposeSessionsForContribution;
    private _registerAgent;
    getAllChatSessionContributions(): ResolvedChatSessionsExtensionPoint[];
    private _updateHasCanDelegateProvidersContextKey;
    getChatSessionContribution(chatSessionType: string): ResolvedChatSessionsExtensionPoint | undefined;
    private resolveChatSessionContribution;
    private getContributionIcon;
    private resolveIconForCurrentColorTheme;
    registerChatSessionContribution(contribution: IChatSessionsExtensionPoint): IDisposable;
    activateChatSessionItemProvider(chatViewType: string): Promise<void>;
    private doActivateChatSessionItemController;
    canResolveChatSession(sessionType: string): Promise<boolean>;
    provideChatInputCompletions(sessionResource: URI, params: IChatInputCompletionsParams, token: CancellationToken): Promise<IChatInputCompletionsResult | undefined>;
    getChatInputCompletionTriggerCharacters(sessionType: string): Promise<readonly string[] | undefined>;
    private tryActivateControllers;
    getChatSessionItems(providersToResolve: readonly string[] | undefined, token: CancellationToken): AsyncIterable<{
        readonly chatSessionType: string;
        readonly items: readonly IChatSessionItem[];
    }>;
    refreshChatSessionItems(providersToResolve: readonly string[] | undefined, token: CancellationToken): Promise<void>;
    getRegisteredChatSessionItemProviders(): readonly string[];
    registerChatSessionItemController(chatSessionType: string, controller: IChatSessionItemController): IDisposable;
    registerChatSessionContentProvider(chatSessionType: string, provider: IChatSessionContentProvider): IDisposable;
    registerCustomizationsProvider(chatSessionType: string, provider: IChatSessionCustomizationsProvider): IDisposable;
    hasCustomizationsProvider(chatSessionType: string): boolean;
    getCustomizations(chatSessionType: string, token: CancellationToken): Promise<IChatSessionCustomizationItemGroup[] | undefined>;
    createNewChatSessionItem(chatSessionType: string, request: IChatNewSessionRequest, token: CancellationToken): Promise<IChatSessionItem | undefined>;
    getOrCreateChatSession(sessionResource: URI, token: CancellationToken): Promise<IChatSession>;
    hasAnySessionOptions(sessionResource: URI): boolean;
    getSessionOptions(sessionResource: URI): Map<string, string> | undefined;
    getSessionOption(sessionResource: URI, optionId: string): string | IChatSessionProviderOptionItem | undefined;
    setSessionOption(sessionResource: URI, optionId: string, value: string | IChatSessionProviderOptionItem): boolean;
    updateSessionOptions(sessionResource: URI, updates: ReadonlyChatSessionOptionsMap): boolean;
    /**
     * Resolve a resource through the alias map. If the resource is a real
     * resource that has been aliased to an untitled resource, return the
     * untitled resource (the canonical key in {@link _sessions}).
     */
    private _resolveResource;
    registerSessionResourceAlias(untitledResource: URI, realResource: URI): void;
    fireSessionCommitted(original: URI, committed: URI): void;
    /**
     * Store option groups for a session type
     */
    setOptionGroupsForSessionType(chatSessionType: string, handle: number, optionGroups?: IChatSessionProviderOptionGroup[]): void;
    /**
     * Get available option groups for a session type
     */
    getOptionGroupsForSessionType(chatSessionType: string): IChatSessionProviderOptionGroup[] | undefined;
    getNewChatSessionInputState(chatSessionType: string, sessionResource: URI): Promise<readonly IChatSessionProviderOptionGroup[] | undefined>;
    /**
     * Get the capabilities for a specific session type
     */
    getCapabilitiesForSessionType(chatSessionType: string): IChatAgentAttachmentCapabilities | undefined;
    /**
     * Get the customAgentTarget for a specific session type.
     * When set, the mode picker should show filtered custom agents matching this target.
     */
    getCustomAgentTargetForSessionType(chatSessionType: string): Target;
    requiresCustomModelsForSessionType(chatSessionType: string): boolean;
    supportsDelegationForSessionType(chatSessionType: string): boolean;
    sessionSupportsFork(sessionResource: URI): boolean;
    forkChatSession(sessionResource: URI, request: IChatSessionRequestHistoryItem | undefined, token: CancellationToken): Promise<IChatSessionItem>;
    sessionSupportsRename(sessionResource: URI): boolean;
    renameChatSession(sessionResource: URI, title: string, token: CancellationToken): Promise<void>;
    getContentProviderSchemes(): string[];
}
export declare enum ChatSessionPosition {
    Editor = "editor",
    Sidebar = "sidebar"
}
type NewChatSessionSendOptions = {
    readonly prompt: string;
    readonly attachedContext?: IChatRequestVariableEntry[];
    readonly initialSessionOptions?: ReadonlyChatSessionOptionsMap;
};
export type NewChatSessionOpenOptions = {
    readonly type: string;
    readonly position: ChatSessionPosition;
    readonly displayName: string;
    readonly replaceEditor?: boolean;
};
export declare function openChatSession(accessor: ServicesAccessor, openOptions: NewChatSessionOpenOptions, chatSendOptions?: NewChatSessionSendOptions): Promise<void>;
export declare function getResourceForNewChatSession(options: NewChatSessionOpenOptions): URI;
export declare function getSessionStatusForModel(model: IChatModel): ChatSessionStatus | undefined;
export declare function chatResponseStateToSessionStatus(state: ResponseModelState): ChatSessionStatus;
export {};
