import { CancellationToken } from "../../../../base/common/cancellation.js";
import { Event } from "../../../../base/common/event.js";
import { IMarkdownString } from "../../../../base/common/htmlContent.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { IObservable } from "../../../../base/common/observable.js";
import { ThemeIcon } from "../../../../base/common/themables.js";
import { URI } from "../../../../base/common/uri.js";
import { IChatAgentAttachmentCapabilities, IChatAgentRequest } from "@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
import { IChatEditingSession } from "./chatEditingService.js";
import { IChatRequestVariableData } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel";
import { IChatProgress } from "./chatService.js";
export declare enum ChatSessionStatus {
    Failed = 0,
    Completed = 1,
    InProgress = 2
}
export interface IChatSessionCommandContribution {
    name: string;
    description: string;
    when?: string;
}
export interface IChatSessionProviderOptionItem {
    id: string;
    name: string;
}
export interface IChatSessionProviderOptionGroup {
    id: string;
    name: string;
    description?: string;
    items: IChatSessionProviderOptionItem[];
}
export interface IChatSessionsExtensionPoint {
    readonly type: string;
    readonly name: string;
    readonly displayName: string;
    readonly description: string;
    readonly when?: string;
    readonly icon?: string | {
        light: string;
        dark: string;
    };
    readonly order?: number;
    readonly alternativeIds?: string[];
    readonly welcomeTitle?: string;
    readonly welcomeMessage?: string;
    readonly welcomeTips?: string;
    readonly inputPlaceholder?: string;
    readonly capabilities?: IChatAgentAttachmentCapabilities;
    readonly commands?: IChatSessionCommandContribution[];
}
export interface IChatSessionItem {
    /** @deprecated Use {@link resource} instead */
    id: string;
    resource: URI;
    label: string;
    iconPath?: ThemeIcon;
    description?: string | IMarkdownString;
    status?: ChatSessionStatus;
    tooltip?: string | IMarkdownString;
    timing: {
        startTime: number;
        endTime?: number;
    };
    statistics?: {
        insertions: number;
        deletions: number;
    };
}
export type IChatSessionHistoryItem = {
    type: "request";
    prompt: string;
    participant: string;
    command?: string;
    variableData?: IChatRequestVariableData;
} | {
    type: "response";
    parts: IChatProgress[];
    participant: string;
};
/**
 * The session type used for local agent chat sessions.
 */
export declare const localChatSessionType = "local";
export interface IChatSession extends IDisposable {
    readonly onWillDispose: Event<void>;
    readonly sessionResource: URI;
    readonly history: readonly IChatSessionHistoryItem[];
    /**
     * Session options as key-value pairs. Keys correspond to option group IDs (e.g., 'models', 'subagents')
     * and values are the selected option item IDs.
     */
    readonly options?: Record<string, string>;
    readonly progressObs?: IObservable<IChatProgress[]>;
    readonly isCompleteObs?: IObservable<boolean>;
    readonly interruptActiveResponseCallback?: () => Promise<boolean>;
    /**
     * Editing session transferred from a previously-untitled chat session in `onDidCommitChatSessionItem`.
     */
    initialEditingSession?: IChatEditingSession;
    requestHandler?: (request: IChatAgentRequest, progress: (progress: IChatProgress[]) => void, history: any[], // TODO: Nail down types
    token: CancellationToken) => Promise<void>;
}
export interface IChatSessionItemProvider {
    readonly chatSessionType: string;
    readonly onDidChangeChatSessionItems: Event<void>;
    provideChatSessionItems(token: CancellationToken): Promise<IChatSessionItem[]>;
    provideNewChatSessionItem?(options: {
        request: IChatAgentRequest;
        metadata?: any;
    }, token: CancellationToken): Promise<IChatSessionItem>;
}
export interface IChatSessionContentProvider {
    provideChatSessionContent(sessionResource: URI, token: CancellationToken): Promise<IChatSession>;
}
export type SessionOptionsChangedCallback = (sessionResource: URI, updates: ReadonlyArray<{
    optionId: string;
    value: string;
}>) => Promise<void>;
