Commit 8c585125 authored by 水玉婷's avatar 水玉婷
Browse files

feat:思考结束折叠思考过程

parent 8c7e6432
......@@ -451,7 +451,7 @@ export class ContentTemplateService {
updatedResponse.contentBlocks[updatedBlockIndex].hasThinkBox = true;
// 思考结束后保持展开状态
updatedResponse.contentBlocks[updatedBlockIndex].thinkBoxExpanded = true;
updatedResponse.contentBlocks[updatedBlockIndex].thinkBoxExpanded = defaultThinkBoxExpanded;
// 重置思考开始时间
this.thinkingStartTime = null;
......@@ -481,14 +481,13 @@ export class ContentTemplateService {
completionTokens = messageContent?.completionTokens || 0;
totalTokens = messageContent?.totalTokens || 0;
// 只有实时对话才在29时折叠思考框,历史数据不受影响
// 修改:不再自动折叠思考框,保持用户当前的展开状态
// if (!isHistoryData && updatedResponse && updatedResponse.contentBlocks.length > 0) {
// updatedResponse.contentBlocks.forEach((block) => {
// if (block.hasThinkBox) {
// block.thinkBoxExpanded = false;
// }
// });
// }
if (!isHistoryData && updatedResponse && updatedResponse.contentBlocks.length > 0) {
updatedResponse.contentBlocks.forEach((block) => {
if (block.hasThinkBox) {
block.thinkBoxExpanded = false;
}
});
}
updatedIsThinking = false;
updatedBlockIndex = -1;
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment