From 09a4d4015be730a4c4141c2cca11c9b24a89b52e Mon Sep 17 00:00:00 2001 From: Laura Date: Sun, 14 Sep 2025 22:42:47 +0200 Subject: [PATCH] fixes to files --- static/css/chat.css | 14 +++++++++++--- stream.go | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/static/css/chat.css b/static/css/chat.css index 58c1a34..d6fcbde 100644 --- a/static/css/chat.css +++ b/static/css/chat.css @@ -806,13 +806,21 @@ body:not(.loading) #loading { } .message .files { - background: #181926; - padding: 10px 12px; + display: grid; + grid-template-columns: repeat(4, 1fr); border-radius: 2px; - flex-wrap: wrap; overflow: hidden; } +.message.editing .files { + background: #181926; + padding: 7px 8px; +} + +.message .files .file { + box-shadow: none; +} + .files .file { position: relative; display: flex; diff --git a/stream.go b/stream.go index 0a944a1..783ed82 100644 --- a/stream.go +++ b/stream.go @@ -61,6 +61,10 @@ func NewStream(w http.ResponseWriter, ctx context.Context) (*Stream, error) { } func NewChunk(typ ChunkType, data any) *Chunk { + if str, ok := data.(string); ok { + data = CleanChunk(str) + } + return &Chunk{ Type: typ, Data: data,