make file attachments work good like

This commit is contained in:
Dax Raad 2025-07-04 16:20:12 -04:00
parent 994368de15
commit 45b139390c
2 changed files with 46 additions and 21 deletions

View file

@ -134,6 +134,7 @@ func (m *messagesComponent) renderView(width int) {
switch message.Role {
case opencode.MessageRoleUser:
userLoop:
for partIndex, part := range message.Parts {
switch part := part.AsUnion().(type) {
case opencode.TextPart:
@ -195,6 +196,8 @@ func (m *messagesComponent) renderView(width int) {
m = m.updateSelected(content, part.Text)
blocks = append(blocks, content)
}
// Only render the first text part
break userLoop
}
}