import { IDisposable } from "../../../../../base/common/lifecycle.js"; import { IAgentSession } from "./agentSessionsModel.js"; import { ServicesAccessor } from "../../../../../editor/browser/editorExtensions.js"; import { IChatWidget } from "../chat.js"; import { IChatWidgetService } from "../chat.service.js"; import { IEditorOptions } from "../../../../../platform/editor/common/editor.js"; import { URI } from "../../../../../base/common/uri.js"; export interface ISessionOpenerParticipant { handleOpenSession(accessor: ServicesAccessor, session: IAgentSession, openOptions?: ISessionOpenOptions): Promise; handleOpenSessionResource?(accessor: ServicesAccessor, resource: URI, openOptions?: ISessionOpenOptions): Promise; } export interface ISessionOpenOptions { readonly sideBySide?: boolean; readonly editorOptions?: IEditorOptions; } declare class SessionOpenerRegistry { private readonly participants; registerParticipant(participant: ISessionOpenerParticipant): IDisposable; getParticipants(): readonly ISessionOpenerParticipant[]; } export declare const sessionOpenerRegistry: SessionOpenerRegistry; export declare function openSessionByResource(accessor: ServicesAccessor, resource: URI, openOptions?: ISessionOpenOptions): Promise; /** * With `chat.agentSessions.openInEditor`, sessions open like files: an existing * editor is revealed, including an inactive tab without a widget, while a session * shown in the Chat view opens in a new editor, which moves it out of the Chat view. */ export declare function shouldRevealSessionEditor(chatWidgetService: IChatWidgetService, sessionResource: URI): boolean; export declare function openSession(accessor: ServicesAccessor, session: IAgentSession, openOptions?: ISessionOpenOptions, alreadyResolved?: boolean): Promise; export {};