import type { IntentLevel, RiskLevel, Sentiment } from './common' import type { CustomerStage } from './crm' /** AI 回复建议 */ export type ReplyStyle = 'stable' | 'active' | 'brief' export interface AiReplySuggestion { id: string style: ReplyStyle content: string translationCn: string targetLang: string reason: string knowledgeRefs: string[] knowledgeRefIds?: string[] expectedEffect: string cultureTip?: string } /** AI 会话分析结果 */ export interface AiAnalysis { intentScore: number intentLevel: IntentLevel stage: CustomerStage sentiment: Sentiment riskLevel: RiskLevel riskNote?: string country: string keyPoints: { label: string; value: string }[] nextActions: string[] summary: string } export interface TranslatePayload { text: string sourceLang?: string targetLang: string scenario?: string } export interface TranslateResult { translated: string detectedLang: string terms: { source: string; target: string }[] historyItem?: TranslationHistoryItem meta?: { method: 'ai-contextual' | 'ai-direct' contextApplied: boolean contextMessageCount: number conversationSummaryApplied?: boolean model: string } } export interface TranslationHistoryItem { id: string sourceLang: string targetLang: string originalText: string translatedText: string detectedLang: string favorite: boolean createdAt: string } export type AiTextAction = 'polish' | 'translate' | 'shorten' | 'expand' | 'tone' export interface AiTextActionPayload { text: string action: AiTextAction tone?: string targetLang?: string } export interface InterpretLine { id: string speaker: 'me' | 'peer' original: string translated: string lang: string at: string }