chore:微信小程序也已显示思考过程
This commit is contained in:
@@ -76,12 +76,12 @@
|
||||
<view class="message-content">
|
||||
<!-- 思考流折叠面板 (AI 思考过程) -->
|
||||
<view v-if="message.role === 'ai' && message.thoughtsText" class="thought-panel" :class="{ streaming: message.isStreaming && message.thoughtsText }">
|
||||
<view class="thought-header" @click="toggleThought(message)">
|
||||
<view class="thought-header" @tap.stop="toggleThought(message)">
|
||||
<text class="thought-icon">{{ message.isStreaming ? '🧠' : '💡' }}</text>
|
||||
<text class="thought-label">{{ message.isStreaming ? '思考中...' : ('思考过程 (' + (message.thoughtSteps || 1) + ' 步)') }}</text>
|
||||
<text v-if="!message.isStreaming" class="thought-toggle">{{ message.thoughtExpanded ? '▼' : '▶' }}</text>
|
||||
<text v-if="!message.isStreaming" class="thought-toggle">{{ message.thoughtExpanded === false ? '▶' : '▼' }}</text>
|
||||
</view>
|
||||
<view v-if="message.isStreaming || message.thoughtExpanded" class="thought-content">
|
||||
<view v-if="message.isStreaming || message.thoughtExpanded !== false" class="thought-content">
|
||||
<text>{{ message.thoughtsText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1106,7 +1106,7 @@ async sendStreamMessage(userMessage, attachments = []) {
|
||||
pendingQuestion: null,
|
||||
questionAnswered: false,
|
||||
tokens: null,
|
||||
thoughtExpanded: false,
|
||||
thoughtExpanded: true,
|
||||
selectedAnswers: {},
|
||||
questionTimeout: 0
|
||||
}
|
||||
@@ -3402,6 +3402,11 @@ _handleStreamError(msg) {
|
||||
/* AI消息特有样式 (微信风格: 头像 + 名称 + 时间同行, 下方内容)
|
||||
与你截图样式一致 */
|
||||
.ai-message {
|
||||
.avatar {
|
||||
/* 隐藏 AI 头像 */
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
/* 确保昵称在内容上方的布局 */
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user