import type { Config } from '../config/schema.js'; import { resolveModel } from '../providers/index.js'; import { isLocalModelBaseUrl } from '../providers/model-call.js'; export type TextAssistIntent = 'improve' | 'expand' | 'shorten' | 'fix'; export type TextAssistFormat = 'markdown' | 'plain'; export type TextAssistScenario = 'generic.text' | 'cron.message' | 'cron.workflowGoal' | 'workflow.arg' | 'workflow.goal' | 'automation.instruction' | 'automation.workflowGoal' | 'automation.workflowInput'; export interface TextAssistRequest { scenario?: TextAssistScenario | string; intent?: TextAssistIntent; field?: { id?: string; label?: string; format?: TextAssistFormat; }; input?: string; locale?: 'en' | 'zh' | string; context?: Record; } export interface TextAssistResult { text: string; } export type TextAssistStreamEvent = { type: 'start'; provider: string; modelId: string; scenario: TextAssistScenario; } | { type: 'thinking_delta'; delta: string; } | { type: 'text_delta'; delta: string; } | { type: 'done'; text: string; } | { type: 'error'; message: string; }; export declare function resolveTextAssistApiKey(model: ReturnType): Promise; export { isLocalModelBaseUrl }; export declare function streamTextAssist(request: TextAssistRequest, config?: Config, signal?: AbortSignal): AsyncGenerator; export declare function assistText(request: TextAssistRequest, config?: Config, signal?: AbortSignal): Promise;