import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { ElementRef, EventEmitter } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatAutocomplete, MatAutocompleteActivatedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
import { AIOptions, AiModelType, CopilotChatConversation, CopilotChatMessage, CopilotChatMessageRoleEnum, CopilotCommand, CopilotContextItem, CopilotEngine } from '@metad/copilot';
import { NgmScrollBackComponent } from '@metad/ocap-angular/common';
import { DisplayBehaviour } from '@metad/ocap-core';
import { NgxPopperjsContentComponent, NgxPopperjsPlacements, NgxPopperjsTriggers } from 'ngx-popperjs';
import { BehaviorSubject } from 'rxjs';
import { IUser, NgmCopilotChatMessage } from '../types';
import * as i0 from "@angular/core";
export declare const AUTO_SUGGESTION_DEBOUNCE_TIME = 1000;
export declare const AUTO_SUGGESTION_STOP: string[];
export declare class NgmCopilotChatComponent {
    #private;
    NgxPopperjsPlacements: typeof NgxPopperjsPlacements;
    NgxPopperjsTriggers: typeof NgxPopperjsTriggers;
    CopilotChatMessageRoleEnum: typeof CopilotChatMessageRoleEnum;
    DisplayBehaviour: typeof DisplayBehaviour;
    private copilotService;
    readonly copilotEngine$: import("@angular/core").WritableSignal<CopilotEngine>;
    welcomeTitle: string;
    welcomeSubTitle: string;
    placeholder: string;
    thinkingAvatar: string;
    assistantAvatar: string;
    /**
     * @deprecated use CopilotRole and Agent instead
     */
    get copilotEngine(): CopilotEngine;
    set copilotEngine(value: CopilotEngine);
    user: IUser;
    copy: EventEmitter<any>;
    conversationsChange: EventEmitter<any>;
    enableCopilot: EventEmitter<any>;
    chatsContent: ElementRef<HTMLDivElement>;
    copilotOptions: NgxPopperjsContentComponent;
    scrollBack: NgmScrollBackComponent;
    readonly autocompleteTrigger: import("@angular/core").Signal<MatAutocompleteTrigger>;
    readonly userInput: import("@angular/core").Signal<ElementRef<any>>;
    get _placeholder(): string;
    readonly _mockConversations: Array<CopilotChatConversation<NgmCopilotChatMessage>>;
    private openaiOptions;
    get aiOptions(): AIOptions;
    get model(): (string & {}) | import("openai/resources").ChatModel;
    set model(value: (string & {}) | import("openai/resources").ChatModel);
    readonly selectedModel: import("@angular/core").ModelSignal<((string & {}) | import("openai/resources").ChatModel)[]>;
    get temperature(): number;
    set temperature(value: number);
    get n(): number;
    set n(value: number);
    get verbose(): boolean;
    set verbose(value: boolean);
    /**
    |--------------------------------------------------------------------------
    | Signals
    |--------------------------------------------------------------------------
    */
    readonly copilot: import("@angular/core").Signal<import("@metad/copilot").ICopilot>;
    readonly copilotEnabled: import("@angular/core").Signal<string>;
    readonly showTokenizer$: import("@angular/core").Signal<boolean>;
    readonly canListModels: import("@angular/core").Signal<boolean>;
    readonly latestModels: import("@angular/core").WritableSignal<AiModelType[]>;
    readonly conversations: import("@angular/core").Signal<CopilotChatConversation<NgmCopilotChatMessage>[]>;
    readonly isTools: import("@angular/core").Signal<boolean>;
    readonly roles: import("@angular/core").Signal<(import("@metad/copilot").BusinessRoleType | {
        name: string;
        title: any;
        description: any;
    })[]>;
    readonly role: import("@angular/core").WritableSignal<string>;
    readonly roleDetail: import("@angular/core").Signal<import("@metad/copilot").BusinessRoleType | {
        name: string;
        title: any;
        description: any;
    }>;
    /**
     * 当前 Asking prompt
     */
    promptControl: FormControl<string>;
    readonly prompt: import("@angular/core").Signal<string>;
    readonly lastWord: import("@angular/core").Signal<string>;
    readonly contextSearch: import("@angular/core").Signal<string>;
    readonly isContextTrigger: import("@angular/core").Signal<boolean>;
    readonly hasContextTrigger: import("@angular/core").Signal<boolean>;
    readonly beforeLastWord: import("@angular/core").Signal<string>;
    readonly commandWithContext: import("@angular/core").Signal<{
        command: CopilotCommand<any[]>;
        context: import("@metad/copilot").CopilotContext;
    }>;
    readonly command: import("@angular/core").Signal<CopilotCommand<any[]>>;
    readonly commandTitle: import("@angular/core").Signal<string>;
    readonly commandContext: import("@angular/core").Signal<import("@metad/copilot").CopilotContext>;
    readonly context: import("@angular/core").WritableSignal<CopilotContextItem<any>>;
    readonly onlyCommand: import("@angular/core").Signal<string>;
    readonly loadingContext$: BehaviorSubject<boolean>;
    readonly contextItems: import("@angular/core").Signal<CopilotContextItem<any>[]>;
    readonly contextSearchWords: import("@angular/core").Signal<string[]>;
    readonly filteredContextItems: import("@angular/core").Signal<CopilotContextItem<any>[]>;
    readonly contextMenuSearch: import("@angular/core").ModelSignal<string>;
    readonly filteredContextMenuItems: import("@angular/core").Signal<CopilotContextItem<any>[]>;
    readonly promptCompletion: import("@angular/core").WritableSignal<string>;
    readonly answering: import("@angular/core").WritableSignal<boolean>;
    readonly historyQuestions: import("@angular/core").WritableSignal<string[]>;
    private readonly historyIndex;
    searchModel: FormControl<string>;
    readonly searchText: import("@angular/core").Signal<string>;
    readonly models: import("@angular/core").Signal<AiModelType[]>;
    readonly commands: import("@angular/core").Signal<(CopilotCommand<any[]> & {
        example: string;
    })[]>;
    readonly filteredCommands: import("@angular/core").Signal<(CopilotCommand<any[]> & {
        example: string;
    })[]>;
    readonly suggestionsOpened$: BehaviorSubject<boolean>;
    readonly messageCopied: import("@angular/core").WritableSignal<string[]>;
    readonly editingMessageId: import("@angular/core").WritableSignal<string>;
    /**
    |--------------------------------------------------------------------------
    | Subscribers
    |--------------------------------------------------------------------------
    */
    private scrollSub;
    private autocompleteSub;
    constructor();
    trackByKey(index: number, item: any): any;
    refreshModels(): void;
    changeSelectedModel(values: any): void;
    newChat(): void;
    askCopilotStream(prompt: string, options?: {
        command?: string;
        newConversation?: boolean;
        assistantMessageId?: string;
    }): Promise<void>;
    stopGenerating(): void;
    scrollBottom(): void;
    send(text: string): Promise<void>;
    run(): Promise<void>;
    clear(): void;
    onEnableCopilot(): void;
    addMessage(message: CopilotChatMessage): Promise<void>;
    deleteMessage(message: CopilotChatMessage): void;
    resubmitMessage(element: HTMLDivElement, id: string, message: CopilotChatMessage, content: string): Promise<void>;
    /**
     * @deprecated regenerate method should in copilot engine service
     */
    regenerate(message: CopilotChatMessage): Promise<void>;
    isFoucs(target: HTMLDivElement | HTMLTextAreaElement): boolean;
    triggerFun(event: KeyboardEvent, autocomplete: MatAutocomplete): void;
    onPromptActivated(event: MatAutocompleteActivatedEvent): void;
    copyMessage(message: CopilotChatMessage): void;
    onCopy(copyButton: any): void;
    dropCopilot(event: CdkDragDrop<any[], any[], any>): void;
    switchRole(): void;
    editMessageContent(id: string, element: HTMLDivElement): void;
    cancelMessageContent(element: HTMLDivElement): void;
    setContext(item: CopilotContextItem): void;
    repleaceContext(orginal: string, target: CopilotContextItem): void;
    removeContext(): void;
    focus(value?: string): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmCopilotChatComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgmCopilotChatComponent, "ngm-copilot-chat", never, { "welcomeTitle": { "alias": "welcomeTitle"; "required": false; }; "welcomeSubTitle": { "alias": "welcomeSubTitle"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "thinkingAvatar": { "alias": "thinkingAvatar"; "required": false; }; "assistantAvatar": { "alias": "assistantAvatar"; "required": false; }; "copilotEngine": { "alias": "copilotEngine"; "required": false; }; "user": { "alias": "user"; "required": false; }; "selectedModel": { "alias": "selectedModel"; "required": false; "isSignal": true; }; "contextMenuSearch": { "alias": "contextMenuSearch"; "required": false; "isSignal": true; }; }, { "copy": "copy"; "conversationsChange": "conversationsChange"; "enableCopilot": "enableCopilot"; "selectedModel": "selectedModelChange"; "contextMenuSearch": "contextMenuSearchChange"; }, never, never, true, never>;
}
