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
12
message.go
12
message.go
|
|
@ -410,15 +410,3 @@ func renderHTML(html string) string {
|
|||
return string(out)
|
||||
}
|
||||
|
||||
// saveMessage writes the raw EML content to ~/QUEUEID.eml.
|
||||
func saveMessage(id, content string) (string, error) {
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("could not determine home directory: %w", err)
|
||||
}
|
||||
path := filepath.Join(home, id+".eml")
|
||||
if err := os.WriteFile(path, []byte(content), 0600); err != nil {
|
||||
return "", fmt.Errorf("write %s: %w", path, err)
|
||||
}
|
||||
return path, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue