import { ChatService, ChatSession, ChatSessionStatus } from '@theia/ai-chat'; import { DisposableCollection } from '@theia/core'; import { ApplicationShell, FrontendApplicationContribution } from '@theia/core/lib/browser'; import { AgentNotificationKind } from '@theia/ai-core'; import { AgentNotificationService } from '@theia/ai-core/lib/browser'; interface SessionNotificationState { /** Whether the session status required user action at the last observed status change. */ waiting: boolean; /** Whether a request was in progress at the last observed status change. */ inProgress: boolean; listener: DisposableCollection; } /** * Fires agent notifications on chat session status transitions: when a session starts waiting * for user action (a tool approval or another input) and when a session finishes its request * (successfully or with an error). Watches all sessions, not just the active one, so that * background sessions still reach the user. * * Delegated sessions (created by the agent delegation tool on behalf of a parent session) are * excluded: their interactions bubble into the parent session's UI, so they must not produce * their own notifications. */ export declare class ChatSessionNotificationContribution implements FrontendApplicationContribution { protected readonly chatService: ChatService; protected readonly notificationService: AgentNotificationService; protected readonly shell: ApplicationShell; protected readonly states: Map; onStart(): void; protected watchSession(session: ChatSession): void; protected handleStatusChanged(session: ChatSession, state: SessionNotificationState, status: ChatSessionStatus): void; protected isDelegatedSession(session: ChatSession): boolean; protected notify(session: ChatSession, kind: AgentNotificationKind): void; protected unwatchSession(sessionId: string): void; } export {}; //# sourceMappingURL=chat-session-notification-contribution.d.ts.map