mirror of
https://github.com/sst/opencode.git
synced 2025-07-24 08:15:04 +00:00
make file attachments work good like
This commit is contained in:
parent
994368de15
commit
45b139390c
2 changed files with 46 additions and 21 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue