File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments