android / debug (push) Successful in 2m16s
android / release (push) Successful in 2m9s
ci / checks (push) Successful in 3m39s
ci / test (push) Successful in 2m5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m56s
ci / chart (push) Successful in 6s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 20s
ci / publish-edge-chart (push) Successful in 4s
The web client kept its own dark shell: an icon rail, neon jade accents, and rows that reported state with colored dots and pills. Rhema Together had since settled on a warmer, quieter language, and the two surfaces no longer looked like one product. The shell is now one 232px sidebar plus a view. Chat lists sessions in the sidebar and renders the transcript in a 760px column; settings moves its searchable nav into the same sidebar and its pages onto an 880px column. The palette, type scale, controls, cards, and markdown come from Together's light theme, with its dark values following the OS. FiraCode Nerd Font Mono sets code, and the product mark, logo, and lucide icons replace the glyph characters. Status is a word now: running, waiting, held, connected, live, snapshot. The rail, its dots, the duplicate consent deny action, and the session key tag are gone. The model backend moved into the chat topbar beside the stream state. The mobile shell keeps the composer fixed in chat and lets settings scroll as a document. README and component docs follow the new layout. nuxt typecheck and build pass; checked light and dark at 1280x800 and 390x844 against mock API data.
118 lines
2.9 KiB
Vue
118 lines
2.9 KiB
Vue
<script setup lang="ts">
|
|
// The agent handing a file over: a head row naming it, the image (when
|
|
// there is one) under it, capped so a screenshot cannot take the
|
|
// stream. Every card downloads, images included: a picture the browser
|
|
// cannot paint, an SVG, or bytes that failed to fetch must still come
|
|
// out of the store.
|
|
import { Download, FileCode, FileText, Image } from 'lucide-vue-next'
|
|
import type { AttachmentCard } from '~/composables/useTranscript'
|
|
|
|
defineProps<{ attachment: AttachmentCard }>()
|
|
|
|
const emit = defineEmits<{
|
|
download: [id: string, name: string]
|
|
}>()
|
|
|
|
const MEDIA_ICONS = {
|
|
image: Image,
|
|
code: FileCode,
|
|
file: FileText,
|
|
} as const
|
|
|
|
/** B / KB / MB, one decimal past 1 KB, a card label, not precision. */
|
|
function formatBytes(size: number): string {
|
|
if (size < 1024) return `${size} B`
|
|
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)} KB`
|
|
return `${(size / (1024 * 1024)).toFixed(1)} MB`
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="attachment">
|
|
<div class="attachment-head">
|
|
<component
|
|
:is="MEDIA_ICONS[attachment.media]"
|
|
:size="16"
|
|
class="attachment-icon"
|
|
aria-hidden="true"
|
|
/>
|
|
<span class="attachment-name">{{ attachment.name }}</span>
|
|
<span class="attachment-size">{{ formatBytes(attachment.size) }}</span>
|
|
<button
|
|
class="btn btn-sm btn-quiet"
|
|
:title="`Download ${attachment.name}`"
|
|
:aria-label="`Download ${attachment.name}`"
|
|
@click="emit('download', attachment.id, attachment.name)"
|
|
>
|
|
<Download :size="14" aria-hidden="true" />
|
|
Download
|
|
</button>
|
|
</div>
|
|
|
|
<img
|
|
v-if="attachment.media === 'image' && attachment.url"
|
|
:src="attachment.url"
|
|
:alt="attachment.caption ?? attachment.name"
|
|
class="attachment-image"
|
|
>
|
|
<p v-if="attachment.caption" class="attachment-caption">{{ attachment.caption }}</p>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.attachment {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-2);
|
|
max-width: 480px;
|
|
padding: var(--sp-2) var(--sp-3);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--r-control);
|
|
background: var(--surface-2);
|
|
}
|
|
|
|
.attachment-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.attachment-icon {
|
|
flex: none;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.attachment-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
color: var(--text);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--fs-small);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.attachment-size {
|
|
flex: none;
|
|
color: var(--faint);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--fs-small);
|
|
}
|
|
|
|
.attachment-image {
|
|
align-self: flex-start;
|
|
max-width: 100%;
|
|
max-height: 240px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--r-control);
|
|
}
|
|
|
|
.attachment-caption {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: var(--fs-small);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
</style>
|