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:
parent
419c57a427
commit
70b0eedb9c
3 changed files with 30 additions and 16 deletions
4
msgs.go
4
msgs.go
|
|
@ -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}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue