Skip to content

Commit 0485bc7

Browse files
committed
Show Content if no DisplayContent provided
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
1 parent 8cecb92 commit 0485bc7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pkg/tui/page/chat/chat.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,15 @@ func (p *chatPage) Update(msg tea.Msg) (layout.Model, tea.Cmd) {
259259
return p, cmd
260260

261261
case editor.SendMsg:
262+
displayContent := msg.DisplayContent
263+
if displayContent == "" {
264+
displayContent = msg.Content
265+
}
262266
// Add user message to UI immediately using the display content (with @filename placeholders)
263-
displayCmd := p.messages.AddUserMessage(msg.DisplayContent)
267+
displayCmd := p.messages.AddUserMessage(displayContent)
264268
// Persist display content to history (not expanded file contents)
265269
if p.history != nil {
266-
if err := p.history.Add(msg.DisplayContent); err != nil {
270+
if err := p.history.Add(displayContent); err != nil {
267271
fmt.Fprintf(os.Stderr, "failed to persist command history: %v\n", err)
268272
}
269273
}

0 commit comments

Comments
 (0)