From 8d871c139f36f337f7bf325510611befe7fbceb5 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 26 Feb 2026 14:43:28 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E4=BC=A0=E9=97=AE?= =?utf8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c index af0ab9f06..aed988ca4 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c @@ -849,6 +849,8 @@ int ln_ws_start_audio_chat(ln_audio_chat_command_t command_type) // 重置录音上传状态 g_recording_upload_started = false; + g_story_index=0; + const char *command_name = (command_type == LN_AUDIO_CHAT_VOICE_CHAT_REQUEST) ? "VoiceChatRequest" : "ChooseStoryRequest"; @@ -1857,7 +1859,8 @@ int ln_ws_send_random_story_request(const char *story_theme) } else { LN_WS_ERROR("Failed to send RandomStoryRequest\n"); } - + g_story_index=0; + return ret; } @@ -2126,9 +2129,9 @@ static ws_command_t ln_ws_parse_command_string(const char *command_str) return WS_CMD_PONG; } else if (strcmp(command_str, "VoiceChatResponse") == 0) { return WS_CMD_VOICE_CHAT_RESPONSE; - } else if (strcmp(command_str, "ChooseStoryResponse") == 0) { + } else if (strcmp(command_str, "ChooseStoryResponse") == 0 || strcmp(command_str, "StoryContinueResponse") == 0) { return WS_CMD_CHOOSE_STORY_RESPONSE; - } else if (strcmp(command_str, "RandomStoryResponse") == 0) { + } else if (strcmp(command_str, "RandomStoryResponse") == 0 || strcmp(command_str, "StoryContinueResponse") == 0) { return WS_CMD_RANDOM_STORY_RESPONSE; } else if (strcmp(command_str, "DeviceUpgrade") == 0) { return WS_CMD_DEVICE_UPGRADE; -- 2.17.1