Prompt for filename when saving a message

Replace the immediate save-to-~/ID.eml with a filename prompt (default
ID.eml) consistent with the part-save UX. Enter confirms, Esc cancels.
Removes the now-unused saveMessage/saveCmd helpers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nemunaire 2026-03-29 19:33:31 +07:00
commit 70b0eedb9c
3 changed files with 30 additions and 16 deletions

View file

@ -54,9 +54,9 @@ func loadMessageCmd(id string) tea.Cmd {
}
}
func saveCmd(id, content string) tea.Cmd {
func saveMessageAsCmd(content, name string) tea.Cmd {
return func() tea.Msg {
path, err := saveMessage(id, content)
path, err := savePart([]byte(content), name)
if err != nil {
return saveErrMsg{err}
}