import { Conversation, ConversationOptions, ConversationUiCtrl, ConvoObject, ConvoObjectCompletion, ConvoTask, FlatConvoMessage } from "@convo-lang/convo-lang"; import { ConvoLangTheme } from "./convo-lang-theme.js"; export type ConversationInputChangeType = 'chat' | 'source'; export interface ConversationInputChange { type: ConversationInputChangeType; value: string; } export declare const ConversationUiContext: import("react").Context; export declare const useConversationUiCtrl: (ctrlOverride?: ConversationUiCtrl) => ConversationUiCtrl; export declare const useConversation: (ctrlOverride?: ConversationUiCtrl) => Conversation | null; export declare const useConversationMessages: (ctrlOverride?: ConversationUiCtrl) => FlatConvoMessage[]; export declare const useConversationTheme: (ctrlOverride?: ConversationUiCtrl) => Partial; export interface UseConvoOptions { initDelayMs?: number; updateDelayMs?: number; conversationOptions?: ConversationOptions; vars?: Record; conversation?: Conversation; disable?: boolean; updateTrigger?: number; } export interface UseConvoValue { value?: T; completion?: ConvoObjectCompletion; error?: any; errorMessage?: string; complete: boolean; input: ConvoObject | null | undefined; busy: boolean; tasks: ConvoTask[]; } /** * Uses the value of a convo scripts. Use the convo function to create the value to pass to the hook. * * @example * const llmValue=useConvoValue(convo` * > user * What is the color of the sky * `)) * // llmValue === {busy:true,complete:false} | {busy:false,complete:true,value:"The color of the sky is blue"}} * */ export declare const useConvo: , R extends Awaited>>(convo: C | null | undefined, options?: UseConvoOptions) => UseConvoValue; /** * Uses the value of a convo scripts. Use the convo function to create the value to pass to the hook. * * @note !!!! - `(@)json` should be `@json` but due to JSDoc tag escaping in examples `@json` can not be used. * * @example * const llmValue=useConvoValue(convo` * (@)json ${z.object({name:z.string,favoriteFood:z.string()})} * > user * My name is Bob and my favorite food is cheese * `)) * // llmValue === {name:"Bob",favoriteFood:"cheese"} | undefined * */ export declare const useConvoValue: , R extends Awaited>>(convo: C | null | undefined, options?: UseConvoOptions) => R | undefined; /** * Watches changes to the given value and queues changes to the value to the given * conversation. Changes to the value must be made by the wSet functions to be seen by * the watcher. */ export declare const useQueueConvoVarChanges: (conversation: Conversation | null | undefined, varName: string | null | undefined, value: any) => void;