ui: preserve atlas ai line breaks

This commit is contained in:
Brad Stein 2026-01-27 18:08:43 -03:00
parent aec391608d
commit 3ea68a7464

View File

@ -33,7 +33,7 @@
<div v-for="(msg, idx) in messages" :key="idx" :class="['chat-row', msg.role]"> <div v-for="(msg, idx) in messages" :key="idx" :class="['chat-row', msg.role]">
<div class="bubble" :class="{ streaming: msg.streaming }"> <div class="bubble" :class="{ streaming: msg.streaming }">
<div class="role mono">{{ msg.role === 'assistant' ? 'Atlas AI' : 'you' }}</div> <div class="role mono">{{ msg.role === 'assistant' ? 'Atlas AI' : 'you' }}</div>
<p>{{ msg.content }}</p> <p class="message">{{ msg.content }}</p>
<div v-if="msg.streaming" class="meta mono typing">streaming</div> <div v-if="msg.streaming" class="meta mono typing">streaming</div>
<div v-else-if="msg.latency_ms" class="meta mono">{{ msg.latency_ms }} ms</div> <div v-else-if="msg.latency_ms" class="meta mono">{{ msg.latency_ms }} ms</div>
</div> </div>
@ -297,6 +297,10 @@ async function copyCurl() {
border: 1px solid var(--card-border); border: 1px solid var(--card-border);
background: rgba(255, 255, 255, 0.04); background: rgba(255, 255, 255, 0.04);
} }
.message {
white-space: pre-wrap;
word-break: break-word;
}
.bubble.streaming { .bubble.streaming {
border-color: rgba(0, 229, 197, 0.4); border-color: rgba(0, 229, 197, 0.4);
box-shadow: var(--glow-soft); box-shadow: var(--glow-soft);