+
{{ $t('chat.contentRepetitionWarning') }}
- ({{ c.truncatedChars }} chars)
+ ({{ seg.truncatedChars }} chars)
+
@@ -447,6 +452,8 @@ import ThinkingSegment from './ThinkingSegment.vue'
import ContentSegment from './ContentSegment.vue'
import GoalAvatarRing from '@/components/goal/GoalAvatarRing.vue'
import { useGoalStore } from '@/stores/useGoalStore'
+import { useSystemSettingsStore } from '@/stores/useSystemSettingsStore'
+import { storeToRefs } from 'pinia'
import PlanStepsPanel from './PlanStepsPanel.vue'
import UserMessageContent from './UserMessageContent.vue'
import type { BrowserAction } from './BrowserTimeline.vue'
@@ -562,7 +569,13 @@ const hasContent = computed(() => {
return !!(textPart?.text || props.message.content)
})
-const showThinkingPanel = computed(() => !!thinkingContent.value)
+// Debug mode gates whether the model's reasoning ("thinking") is surfaced.
+// Off (default) keeps the transcript focused on tool activity + the answer,
+// directly addressing the "thinking piles up" complaint. Tool-call boxes stay
+// visible (they auto-collapse) so the user still sees what the agent did.
+const { debugMode } = storeToRefs(useSystemSettingsStore())
+
+const showThinkingPanel = computed(() => debugMode.value && !!thinkingContent.value)
// 思考耗时(生成结束后显示)
const thinkingDuration = computed(() => {
@@ -997,32 +1010,29 @@ const useSegmentedView = computed(() =>
const groupedIterations = computed(() => {
const segs = segments.value || []
const anyTagged = segs.some(s => typeof s.iterationIndex === 'number')
+ // Untagged (legacy / persisted-without-iterationIndex) messages render as a
+ // single bucket — but still in their ORIGINAL emission order, never split by
+ // type. Splitting into thinking/tool/content arrays was what made a tool box
+ // jump above or below its surrounding text depending on the message.
if (!anyTagged) {
- return [{
- key: 'all',
- index: 0,
- empty: false,
- thinkings: segs.filter(s => s.type === 'thinking'),
- tools: segs.filter(s => s.type === 'tool_call'),
- contents: segs.filter(s => s.type === 'content'),
- }]
+ return [{ key: 'all', index: 0, empty: segs.length === 0, items: segs }]
}
- const buckets = new Map