Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
水玉婷
ai-wechat
Commits
8c585125
Commit
8c585125
authored
Jan 22, 2026
by
水玉婷
Browse files
feat:思考结束折叠思考过程
parent
8c7e6432
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/views/components/utils/contentTemplateService.ts
View file @
8c585125
...
@@ -451,7 +451,7 @@ export class ContentTemplateService {
...
@@ -451,7 +451,7 @@ export class ContentTemplateService {
updatedResponse
.
contentBlocks
[
updatedBlockIndex
].
hasThinkBox
=
true
;
updatedResponse
.
contentBlocks
[
updatedBlockIndex
].
hasThinkBox
=
true
;
// 思考结束后保持展开状态
// 思考结束后保持展开状态
updatedResponse
.
contentBlocks
[
updatedBlockIndex
].
thinkBoxExpanded
=
true
;
updatedResponse
.
contentBlocks
[
updatedBlockIndex
].
thinkBoxExpanded
=
defaultThinkBoxExpanded
;
// 重置思考开始时间
// 重置思考开始时间
this
.
thinkingStartTime
=
null
;
this
.
thinkingStartTime
=
null
;
...
@@ -481,14 +481,13 @@ export class ContentTemplateService {
...
@@ -481,14 +481,13 @@ export class ContentTemplateService {
completionTokens
=
messageContent
?.
completionTokens
||
0
;
completionTokens
=
messageContent
?.
completionTokens
||
0
;
totalTokens
=
messageContent
?.
totalTokens
||
0
;
totalTokens
=
messageContent
?.
totalTokens
||
0
;
// 只有实时对话才在29时折叠思考框,历史数据不受影响
// 只有实时对话才在29时折叠思考框,历史数据不受影响
// 修改:不再自动折叠思考框,保持用户当前的展开状态
if
(
!
isHistoryData
&&
updatedResponse
&&
updatedResponse
.
contentBlocks
.
length
>
0
)
{
// if (!isHistoryData && updatedResponse && updatedResponse.contentBlocks.length > 0) {
updatedResponse
.
contentBlocks
.
forEach
((
block
)
=>
{
// updatedResponse.contentBlocks.forEach((block) => {
if
(
block
.
hasThinkBox
)
{
// if (block.hasThinkBox) {
block
.
thinkBoxExpanded
=
false
;
// block.thinkBoxExpanded = false;
}
// }
});
// });
}
// }
updatedIsThinking
=
false
;
updatedIsThinking
=
false
;
updatedBlockIndex
=
-
1
;
updatedBlockIndex
=
-
1
;
break
;
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment