import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { AIOptions, CopilotChatConversation, CopilotChatMessage, CopilotChatOptions, CopilotCommand, CopilotContext, CopilotEngine } from '@metad/copilot';
import { ChatRequest, ChatRequestOptions, JSONValue, Message } from 'ai';
import { AgentExecutor } from 'langchain/agents';
import { DropAction } from '../types';
import { NgmCopilotService } from './copilot.service';
import * as i0 from "@angular/core";
export declare class NgmCopilotEngineService implements CopilotEngine {
    #private;
    readonly copilot: NgmCopilotService;
    readonly copilotContext: import("./context.service").NgmCopilotContextService;
    private api;
    private chatId;
    private key;
    placeholder?: string;
    aiOptions: AIOptions;
    readonly verbose: import("@angular/core").Signal<boolean>;
    readonly llm: import("@angular/core").Signal<import("@langchain/openai").ChatOpenAI<import("@langchain/openai").ChatOpenAICallOptions>>;
    /**
     * One conversation including user and assistant messages
     * This is a array of conversations
     */
    readonly conversations$: import("@angular/core").WritableSignal<CopilotChatConversation[]>;
    readonly conversations: import("@angular/core").Signal<CopilotChatConversation[]>;
    readonly messages: import("@angular/core").Signal<CopilotChatMessage[]>;
    readonly lastConversation: import("@angular/core").Signal<{
        messages: any[];
        id: string;
        type: "command" | "free";
        command: string;
    }>;
    readonly lastUserMessages: import("@angular/core").Signal<any[]>;
    readonly currentConversation: import("@angular/core").Signal<{
        messages: any[];
        id: string;
        type: "command" | "free";
        command: string;
    }>;
    readonly currentCommand: import("@angular/core").Signal<CopilotCommand<any[]> & {
        llm?: import("@langchain/openai").ChatOpenAI<import("@langchain/openai").ChatOpenAICallOptions>;
        agentExecutor?: AgentExecutor;
    }>;
    readonly chatHistoryMessages: import("@angular/core").Signal<import("@langchain/core/messages").BaseMessage[]>;
    readonly commands: import("@angular/core").Signal<(CopilotCommand<any[]> & {
        llm?: import("@langchain/openai").ChatOpenAI<import("@langchain/openai").ChatOpenAICallOptions>;
        agentExecutor?: AgentExecutor;
    })[]>;
    readonly error: import("@angular/core").WritableSignal<Error>;
    readonly streamData: import("@angular/core").WritableSignal<JSONValue[]>;
    readonly isLoading: import("@angular/core").WritableSignal<boolean>;
    constructor();
    updateAiOptions(options?: Partial<AIOptions>): void;
    /**
     * Find command by name or alias
     *
     * @param name Name or alias of command
     * @returns AI Command
     */
    getCommand(name: string): CopilotCommand<any[]>;
    getCommandWithContext(name: string): {
        command: CopilotCommand<any[]>;
        context: CopilotContext;
    };
    registerDropAction(dropAction: DropAction): void;
    unregisterDropAction(id: string): void;
    chat(prompt: string, options?: CopilotChatOptions): Promise<any>;
    callCommand(_command: CopilotCommand, prompt: string, options: CopilotChatOptions): Promise<any>;
    triggerCommandAgent(content: string, command: CopilotCommand, options?: CopilotChatOptions): Promise<any>;
    /**
     * @deprecated use `triggerCommandAgent` instead
     */
    triggerRequest(messagesSnapshot: CopilotChatMessage[], { options, data }?: ChatRequestOptions, { abortController, assistantMessageId, conversationId }?: {
        abortController?: AbortController | null;
        assistantMessageId?: string;
        conversationId?: string;
    }): Promise<ChatRequest | null | undefined>;
    append(message: Message, options: ChatRequestOptions): Promise<ChatRequest | null | undefined>;
    generateId(): string;
    newConversation(type: CopilotChatConversation['type'], command: string): void;
    upsertConversation(type: CopilotChatConversation['type'], command: string): void;
    upsertMessage(...messages: CopilotChatMessage[]): void;
    /**
     * Remove message from conversation, then remove the conversation if it has been empty
     *
     * @param message Message or message id
     */
    deleteMessage(message: CopilotChatMessage | string): void;
    clear(): void;
    updateConversations(fn: (conversations: Array<CopilotChatConversation>) => Array<CopilotChatConversation>): void;
    updateConversation(id: string, fn: (conversation: CopilotChatConversation) => CopilotChatConversation): void;
    updateLastConversation(fn: (conversations: CopilotChatConversation) => CopilotChatConversation): void;
    stopMessage(id: string): void;
    dropCopilot(event: CdkDragDrop<any[], any[], any>): Promise<void>;
    executeCommandSuggestion(input: string, options: {
        command: CopilotCommand;
        context: CopilotContext;
        signal?: AbortSignal;
    }): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmCopilotEngineService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<NgmCopilotEngineService>;
}
