|
7 | 7 | @click="handlePrimaryAction" |
8 | 8 | > |
9 | 9 | <span class="reasoning-title"> |
10 | | - {{ tm("reasoning.thinking") }} |
| 10 | + {{ reasoningTitle }} |
11 | 11 | </span> |
12 | 12 | <v-icon |
13 | 13 | size="22" |
|
40 | 40 |
|
41 | 41 | <script setup lang="ts"> |
42 | 42 | import { computed, onBeforeUnmount, ref, watch } from "vue"; |
43 | | -import type { MessagePart } from "@/composables/useMessages"; |
| 43 | +import { |
| 44 | + reasoningActivityCounts, |
| 45 | + reasoningActivityTitle, |
| 46 | + type MessagePart, |
| 47 | +} from "@/composables/useMessages"; |
44 | 48 | import { useModuleI18n } from "@/i18n/composables"; |
45 | 49 | import ReasoningTimeline from "@/components/chat/message_list_comps/ReasoningTimeline.vue"; |
46 | 50 |
|
@@ -75,6 +79,14 @@ const renderParts = computed<MessagePart[]>(() => { |
75 | 79 |
|
76 | 80 | const openInSidebar = computed(() => Boolean(props.openInSidebar)); |
77 | 81 |
|
| 82 | +const activityCounts = computed(() => |
| 83 | + reasoningActivityCounts(renderParts.value, props.reasoning || ""), |
| 84 | +); |
| 85 | +
|
| 86 | +const reasoningTitle = computed(() => |
| 87 | + reasoningActivityTitle(activityCounts.value, tm), |
| 88 | +); |
| 89 | +
|
78 | 90 | const thinkingText = computed(() => |
79 | 91 | renderParts.value |
80 | 92 | .filter((part) => part.type === "think") |
@@ -214,14 +226,11 @@ onBeforeUnmount(() => { |
214 | 226 | color: rgba(var(--v-theme-on-surface), 0.88); |
215 | 227 | } |
216 | 228 |
|
217 | | -.reasoning-header--trigger { |
218 | | - align-items: flex-start; |
219 | | -} |
220 | | -
|
221 | 229 | .reasoning-icon { |
222 | 230 | color: currentcolor; |
223 | 231 | transition: transform 0.2s ease; |
224 | 232 | flex-shrink: 0; |
| 233 | + align-self: center; |
225 | 234 | } |
226 | 235 |
|
227 | 236 | .reasoning-title { |
|
0 commit comments