修改重传问题 3217/4
authorhcj <1224667075@qq.com>
Thu, 26 Feb 2026 06:43:28 +0000 (14:43 +0800)
committerhcj <1224667075@qq.com>
Thu, 26 Feb 2026 06:43:28 +0000 (14:43 +0800)
code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c

index af0ab9f..aed988c 100644 (file)
@@ -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;