on main help sign in
fix: prevent filename insertion when dragging attachments (#1683)
4133554Christian Rocha
internal/tui/components/chat/editor/editor.go−1
@@ -247,7 +247,6 @@ func (m *editorCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
247 if !attachment.IsText() && !attachment.IsImage() {
247 if !attachment.IsText() && !attachment.IsImage() {
248 return m, util.ReportWarn("Invalid file content type: " + mimeType)
248 return m, util.ReportWarn("Invalid file content type: " + mimeType)
249 }
249 }
250− m.textarea.InsertString(attachment.FileName)
251 return m, util.CmdHandler(filepicker.FilePickedMsg{
250 return m, util.CmdHandler(filepicker.FilePickedMsg{
252 Attachment: attachment,
251 Attachment: attachment,
253 })
252 })