import { LLMResult } from '@langchain/core/outputs';
import { TMessageContent, TMessageContentComplex, TTokenUsage } from '@metad/contracts';
import { ZodType, ZodTypeDef } from 'zod';
import { CopilotChatMessage } from './types';
export declare function zodToAnnotations(obj: ZodType<any, ZodTypeDef, any>): any;
export declare function nanoid(): string;
export declare function nonNullable<T>(value: T): value is NonNullable<T>;
export declare function isNil(value: unknown): value is null | undefined;
export declare function isString(value: unknown): value is string;
export declare function isBlank(value: unknown): boolean;
export declare function nonBlank<T>(value: T): value is NonNullable<T>;
/**
 * Split the prompt into command and prompt
 *
 * @param prompt
 * @returns
 */
export declare function getCommandPrompt(prompt: string): {
    command: string;
    prompt: string;
};
export declare function referencesCommandName(commandName: string): string;
export declare const AgentRecursionLimit = 20;
/**
 * @deprecated use calcTokenUsage
 */
export declare function sumTokenUsage(output: LLMResult): number;
export declare function calcTokenUsage(output: LLMResult): TTokenUsage;
export declare function stringifyMessageContent(content: TMessageContent | TMessageContentComplex): any;
/**
 * Append content into AI Message
 *
 * @param aiMessage
 * @param content
 */
export declare function appendMessageContent(aiMessage: CopilotChatMessage, content: string | TMessageContentComplex): void;
export declare function estimateTokenUsage(text: string): number;
export declare function filterMessageText(content: TMessageContent | TMessageContentComplex): any;
