Explorar el Código

解决思考过程一开始不展示问题

zhuliu hace 1 semana
padre
commit
4340c85529
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      src/components/xiaoshi_AI/index.vue

+ 7 - 2
src/components/xiaoshi_AI/index.vue

@@ -673,13 +673,18 @@ export default {
                     // 找到结束标签
                     const content = answer.substring(0, endMatch.index);
                     if (content) {
-                        segments.push({ type: 'think', content:content });
+                        segments.push({ type: 'think', content:content,show:false });
                     }
                     answer = answer.substring(endMatch.index + endMatch[0].length);
                     inThink = false;
                 } else {
                     // 没有找到结束标签,剩余所有内容都是think
-                    segments.push({ type: 'think', content: answer });
+                    if(chat.id == this.currentMessage.id){
+                        segments.push({ type: 'think', content: answer,show:true });
+                    }else{
+                      segments.push({ type: 'think', content: answer,show:false });  
+                    }
+                    
                     answer = '';
                 }
             } else {