import * as React from '@theia/core/shared/react'; import { DisposableCollection, Emitter, Event } from '@theia/core'; import { PreferenceService } from '@theia/core/lib/common'; import { ChatBannerProvider } from '@theia/ai-chat-ui/lib/browser/chat-banner-provider'; interface AiSessionOverride { /** Human-readable label, e.g. "Default tool confirmation: always_allow". */ label: string; /** Whether this override bypasses AI tool confirmations globally. */ bypass: boolean; } /** * Persistent strip rendered above the chat content whenever an AI tool confirmation * preference (`ai-features.chat.defaultToolConfirmation` or `ai-features.chat.toolConfirmation`) * is active in the session scope (typically set via `--session-preference`). When the * global default is forced to "Allow All" the strip is shown in error styling as the * Theia AI Allow-All Mode banner; per-tool confirmation overrides use warning styling. * * Other AI-namespaced session overrides (e.g. forced-on AI features, default chat agent) * are reported by the generic Session Preferences status bar item and intentionally not * duplicated here. */ export declare class AiAllowAllModeChatBanner implements ChatBannerProvider { readonly priority = 1000; protected readonly preferenceService: PreferenceService; protected readonly toDispose: DisposableCollection; protected readonly onDidChangeEmitter: Emitter; readonly onDidChange: Event; /** * Only tool confirmation preferences are watched here. Other AI session overrides * (enable AI, agent mode, default chat agent, etc.) are surfaced in the generic * Session Preferences status bar item to keep the banner from duplicating the list. */ protected readonly watchedKeys: ReadonlyArray; /** * Process-lifetime dismissal flag. Reset on the next launch so the user is * always reminded once per process. Also automatically cleared when the override * set changes in any way after a dismissal (see {@link init}), so a previously * dismissed strip cannot silently hide new or escalated overrides. */ protected dismissed: boolean; /** * Signature of the override set at the moment the user dismissed the strip. * `undefined` while the strip is not dismissed. */ protected dismissedSignature: string | undefined; protected init(): void; /** * Stable snapshot of the watched preferences' current session values. Used to * detect changes to the override set for the dismissal-reset logic; not for * anything user-visible so the format is intentionally simple. */ protected overrideSignature(): string; renderBanner(): React.ReactNode | undefined; /** AI-relevant preferences currently coming from the session scope. */ protected collectOverrides(): AiSessionOverride[]; /** * Returns `true` only when the global default is forced to Allow-All. Per-tool * `always_allow` entries via `TOOL_CONFIRMATION_PREFERENCE` are scoped exceptions * and remain in the banner as informational (warning) entries rather than escalating * the whole strip to the red "Allow-All Mode" treatment. */ protected isBypassValue(key: string, value: unknown): boolean; protected describe(key: string, value: unknown): string; protected handleDismiss: (e: React.MouseEvent) => void; dispose(): void; } export {}; //# sourceMappingURL=ai-allow-all-mode-chat-banner.d.ts.map