Skip to content

Commit c1f2386

Browse files
committed
chore: reduce unnecessary div level
1 parent a673120 commit c1f2386

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

apps/frontend/app/components/chat/ChatInterface.vue

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -310,29 +310,27 @@ function alertIsStreaming(input: string) {
310310
v-for="m of messages" :key="m.id" class="flex"
311311
:class="m.role === 'user' ? 'justify-end' : 'justify-start'"
312312
>
313-
<div class="border-primary-200">
314-
<Card class="max-w-2xl border-primary-200 bg-transparent shadow-md">
315-
<!-- <CardHeader class="px-4 py-2">
316-
<CardTitle class="text-sm font-semibold">
317-
{{ m.role === 'user' ? $t('pages.chat.userLabel') : $t('pages.chat.aiLabel') }}
318-
</CardTitle>
319-
</CardHeader> -->
320-
<CardContent class="px-4 py-3">
321-
<div v-if="m.isStreaming && !m.content" class="flex gap-2">
322-
<div>{{ $t('generating') }}</div>
323-
<div class="spinner h-5 w-5" />
324-
</div>
325-
<MDCCached v-else :value="m.content" />
326-
<div class="hidden first:block">
327-
<Skeleton
328-
class="h-5 w-$c-W rounded-full bg-muted-foreground" :style="{
329-
'--c-W': `${(Math.floor(Math.random() * (300 - 100 + 1)) + 100) * (m.role === 'user' ? 1 : 2)}px`,
330-
}"
331-
/>
332-
</div>
333-
</CardContent>
334-
</Card>
335-
</div>
313+
<Card class="max-w-2xl border-primary-200 bg-transparent shadow-md">
314+
<!-- <CardHeader class="px-4 py-2">
315+
<CardTitle class="text-sm font-semibold">
316+
{{ m.role === 'user' ? $t('pages.chat.userLabel') : $t('pages.chat.aiLabel') }}
317+
</CardTitle>
318+
</CardHeader> -->
319+
<CardContent class="px-4 py-3">
320+
<div v-if="m.isStreaming && !m.content" class="flex gap-2">
321+
<div>{{ $t('generating') }}</div>
322+
<div class="spinner h-5 w-5" />
323+
</div>
324+
<MDCCached v-else :value="m.content" />
325+
<div class="hidden first:block">
326+
<Skeleton
327+
class="h-5 w-$c-W rounded-full bg-muted-foreground" :style="{
328+
'--c-W': `${(Math.floor(Math.random() * (300 - 100 + 1)) + 100) * (m.role === 'user' ? 1 : 2)}px`,
329+
}"
330+
/>
331+
</div>
332+
</CardContent>
333+
</Card>
336334
</div>
337335

338336
<div class="pb-40" />

0 commit comments

Comments
 (0)