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,