From 04e73a8832e27aa7e46a8fff978da1f679aca7bf Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Thu, 13 Aug 2026 13:39:33 +0200 Subject: [PATCH] manager_api_new : AiChatRequest.conversationId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le champ existait côté serveur depuis le début mais manquait dans le client généré — c'est ce qui expliquait que personne ne l'envoyait, et donc qu'aucune question ne soit reliée à la suivante en base. Édité à la main, générateur non relancé. flutter build web vert. Co-Authored-By: Claude Opus 5 --- manager_api_new/lib/model/ai_chat_request.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) 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;