修复: 对话轨迹生成锚点回归与耗时口径
生成中锚点改真实末条,修第二轮打字机与工具卡不渲染回归 轨迹总耗时计入末轮时长,单卡耗时剔除审批等待区间 聚合文案与截断常量下沉共用,时长进位边界钳制
This commit is contained in:
@@ -52,7 +52,7 @@ import { ref, computed, watch, nextTick, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import ToolCard from './ToolCard.vue'
|
||||
import { listen, type UnlistenFn } from '@tauri-apps/api/event'
|
||||
import { aggregateCalls, statsTail } from '@/composables/ai/useTurnTrace'
|
||||
import { aggregateCalls, aggText } from '@/composables/ai/useTurnTrace'
|
||||
import type { AiToolCallInfo } from '@/api/types'
|
||||
|
||||
// useI18n needed for $t() in template (collapseAll / expandAll) + groupDisplayName(i18n key)
|
||||
@@ -230,10 +230,7 @@ function groupDisplayName(group: ToolCallGroup): string {
|
||||
|
||||
/** 分组聚合行文案:「N 次调用 · 成功 x 失败 y」(零值项省略;与单卡状态点同源 isToolFailure 判定) */
|
||||
function groupAggText(group: ToolCallGroup): string {
|
||||
const s = aggregateCalls(group.calls)
|
||||
const tail = statsTail(s)
|
||||
const head = t('ai.trace.calls', { n: s.total })
|
||||
return tail ? `${head} · ${tail}` : head
|
||||
return aggText(aggregateCalls(group.calls))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user