@agenticmail/cli 0.8.32 → 0.8.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -247,15 +247,25 @@ async function markSpam() {
|
|
|
247
247
|
async function deleteMessage() {
|
|
248
248
|
if (!state.currentMessage || !state.selectedAgent) return;
|
|
249
249
|
const subject = state.currentMessage.subject ?? '(no subject)';
|
|
250
|
+
// From Trash, delete is permanent (no further fallback). From
|
|
251
|
+
// every other folder it's a move-to-trash, recoverable.
|
|
252
|
+
const isTrash = state.selectedFolder === 'trash';
|
|
250
253
|
const ok = await confirmModal({
|
|
251
|
-
title: 'Delete this message?',
|
|
252
|
-
body:
|
|
253
|
-
|
|
254
|
+
title: isTrash ? 'Delete this message forever?' : 'Delete this message?',
|
|
255
|
+
body: isTrash
|
|
256
|
+
? `"${subject}" will be permanently removed. This can't be undone.`
|
|
257
|
+
: `"${subject}" will be moved to Trash. You can recover it from there.`,
|
|
258
|
+
confirm: isTrash ? 'Delete forever' : 'Move to Trash',
|
|
254
259
|
danger: true,
|
|
255
260
|
});
|
|
256
261
|
if (!ok) return;
|
|
257
262
|
try {
|
|
258
|
-
|
|
263
|
+
// Pass the real IMAP folder name + permanent flag. The API
|
|
264
|
+
// uses the folder for the IMAP source mailbox and decides
|
|
265
|
+
// move-to-trash vs expunge based on `permanent`.
|
|
266
|
+
const imap = state.folderNames?.[state.selectedFolder] ?? 'INBOX';
|
|
267
|
+
const qs = `?folder=${encodeURIComponent(imap)}${isTrash ? '&permanent=true' : ''}`;
|
|
268
|
+
await apiDelete(`/mail/messages/${state.selectedUid}${qs}`, { agentKey: state.selectedAgent.apiKey });
|
|
259
269
|
toast('Deleted.');
|
|
260
270
|
location.hash = `#/folder/${state.selectedFolder ?? 'inbox'}`;
|
|
261
271
|
await loadList(state.selectedAgent, state.selectedFolder);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.33",
|
|
4
4
|
"description": "Email and SMS infrastructure for AI agents — the first platform to give agents real email addresses and phone numbers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agenticmail/api": "^0.7.
|
|
32
|
+
"@agenticmail/api": "^0.7.18",
|
|
33
33
|
"@agenticmail/core": "^0.7.0",
|
|
34
34
|
"json5": "^2.2.3"
|
|
35
35
|
},
|