diff --git a/manager_api_new/lib/model/ai_chat_request.dart b/manager_api_new/lib/model/ai_chat_request.dart index 0b01b00..d1b8a16 100644 --- a/manager_api_new/lib/model/ai_chat_request.dart +++ b/manager_api_new/lib/model/ai_chat_request.dart @@ -18,6 +18,7 @@ class AiChatRequest { this.appType, this.configurationId, this.language, + this.conversationId, this.history = const [], this.isVoice = false, this.isAutoTriggered = false, @@ -39,6 +40,11 @@ class AiChatRequest { String? language; + /// GUID de session généré par le client, stable sur une conversation. + /// Seul lien entre deux tours côté serveur : sans lui, `AiController` en génère + /// un par appel et chaque question devient une conversation isolée en base. + String? conversationId; + List? history; /// true = interaction vocale (lunettes) — prompt audio-friendly, pas de navigation @@ -105,6 +111,11 @@ class AiChatRequest { } else { json[r'history'] = null; } + if (this.conversationId != null) { + json[r'conversationId'] = this.conversationId; + } else { + json[r'conversationId'] = null; + } json[r'isVoice'] = this.isVoice ?? false; json[r'isAutoTriggered'] = this.isAutoTriggered ?? false; return json;