@agenticmail/cli 0.9.0 → 0.9.2
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.
|
@@ -57,15 +57,31 @@ export function openReply(replyAll) {
|
|
|
57
57
|
`Reply${replyAll ? ' all' : ''}: ${msg.subject ?? '(no subject)'}`;
|
|
58
58
|
document.getElementById('compose-from').value = state.selectedAgent.id;
|
|
59
59
|
const fromAddr = msg.from?.[0]?.address ?? '';
|
|
60
|
+
// Reply-all addressing.
|
|
61
|
+
//
|
|
62
|
+
// Canonical reply-all puts the previous actor on To: and everyone
|
|
63
|
+
// else on Cc:. The earlier code merged To+Cc+sender into a single
|
|
64
|
+
// `to` field, which (combined with 0.9.0's wake-default-from-To)
|
|
65
|
+
// produced wake-thrash again — every recipient was on To so
|
|
66
|
+
// every recipient woke. The split below restores the intended
|
|
67
|
+
// wake semantics: only the previous actor wakes by default;
|
|
68
|
+
// everyone else gets CC awareness.
|
|
60
69
|
let toAddr = fromAddr;
|
|
70
|
+
let ccAddr = '';
|
|
61
71
|
if (replyAll) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
const me = (state.selectedAgent.email ?? '').toLowerCase();
|
|
73
|
+
const senderLower = fromAddr.toLowerCase();
|
|
74
|
+
const others = [...(msg.to ?? []), ...(msg.cc ?? [])]
|
|
75
|
+
.map(a => a.address)
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.map(a => a.toLowerCase())
|
|
78
|
+
.filter(a => a !== senderLower && a !== me)
|
|
79
|
+
.filter((v, i, a) => a.indexOf(v) === i);
|
|
80
|
+
toAddr = fromAddr;
|
|
81
|
+
ccAddr = others.join(', ');
|
|
66
82
|
}
|
|
67
83
|
document.getElementById('compose-to').value = toAddr;
|
|
68
|
-
document.getElementById('compose-cc').value =
|
|
84
|
+
document.getElementById('compose-cc').value = ccAddr;
|
|
69
85
|
document.getElementById('compose-wake').value = '';
|
|
70
86
|
document.getElementById('compose-subject').value =
|
|
71
87
|
(msg.subject ?? '').startsWith('Re:') ? msg.subject : `Re: ${msg.subject ?? ''}`;
|
|
@@ -50,11 +50,22 @@ function renderMessage(msg) {
|
|
|
50
50
|
if (!view) return;
|
|
51
51
|
const fromAddr = msg.from?.[0]?.address ?? '?';
|
|
52
52
|
const fromName = msg.from?.[0]?.name || fromAddr;
|
|
53
|
-
const toStr = (msg.to ?? []).map(a => a.name ? `${a.name} <${a.address}>` : a.address).join(', ') || '?';
|
|
54
|
-
const ccStr = (msg.cc ?? []).map(a => a.address).join(', ');
|
|
55
53
|
const senderPseudo = { name: fromName }; // for avatar generation
|
|
56
54
|
const bodyText = msg.text ?? stripHtml(msg.html ?? '');
|
|
57
55
|
|
|
56
|
+
// Build separate To / Cc / Bcc lines so the user can actually
|
|
57
|
+
// tell who was on the action list vs CC'd for awareness. The
|
|
58
|
+
// previous renderer concatenated everything onto one "to" line.
|
|
59
|
+
const formatAddr = (a) => a?.name && a.name !== a.address
|
|
60
|
+
? `${a.name} <${a.address}>`
|
|
61
|
+
: (a?.address ?? '');
|
|
62
|
+
const renderAddrRow = (label, list, cls) => {
|
|
63
|
+
if (!Array.isArray(list) || list.length === 0) return '';
|
|
64
|
+
const rendered = list.map(formatAddr).filter(Boolean).map(escapeHtml).join(', ');
|
|
65
|
+
if (!rendered) return '';
|
|
66
|
+
return `<div class="message-recipient-row ${cls}"><span class="message-recipient-label">${label}</span><span class="message-recipient-list">${rendered}</span></div>`;
|
|
67
|
+
};
|
|
68
|
+
|
|
58
69
|
const attachmentsHtml = (msg.attachments ?? []).length > 0
|
|
59
70
|
? `<div class="message-attachments">${msg.attachments.map((a, i) =>
|
|
60
71
|
`<button class="message-attachment" data-att-index="${i}" data-att-filename="${escapeHtml(a.filename ?? 'attachment')}" title="Click to download">
|
|
@@ -75,7 +86,9 @@ function renderMessage(msg) {
|
|
|
75
86
|
<span class="name">${escapeHtml(fromName)}</span>
|
|
76
87
|
<span class="addr"><${escapeHtml(fromAddr)}></span>
|
|
77
88
|
</div>
|
|
78
|
-
|
|
89
|
+
${renderAddrRow('To', msg.to, 'message-to')}
|
|
90
|
+
${renderAddrRow('Cc', msg.cc, 'message-cc')}
|
|
91
|
+
${renderAddrRow('Bcc', msg.bcc, 'message-bcc')}
|
|
79
92
|
</div>
|
|
80
93
|
<div class="message-date">${escapeHtml(formatDateFull(msg.date))}</div>
|
|
81
94
|
</div>
|
package/dist/public/styles.css
CHANGED
|
@@ -583,7 +583,28 @@ mark.search-hl {
|
|
|
583
583
|
}
|
|
584
584
|
.message-from .name { font-weight: 500; }
|
|
585
585
|
.message-from .addr { color: var(--muted); margin-left: 4px; }
|
|
586
|
-
|
|
586
|
+
/* Recipient rows — one per field (To / Cc / Bcc). Renders only
|
|
587
|
+
when the field is non-empty. The label is a fixed-width tag
|
|
588
|
+
so the addresses align cleanly across the three rows. */
|
|
589
|
+
.message-recipient-row {
|
|
590
|
+
display: flex; gap: 6px;
|
|
591
|
+
font-size: 12px; color: var(--muted);
|
|
592
|
+
margin-top: 4px;
|
|
593
|
+
line-height: 1.5;
|
|
594
|
+
}
|
|
595
|
+
.message-recipient-label {
|
|
596
|
+
flex: 0 0 28px;
|
|
597
|
+
font-weight: 600;
|
|
598
|
+
color: var(--ink-soft);
|
|
599
|
+
text-transform: none;
|
|
600
|
+
}
|
|
601
|
+
.message-recipient-list {
|
|
602
|
+
flex: 1 1 auto;
|
|
603
|
+
min-width: 0;
|
|
604
|
+
word-break: break-word;
|
|
605
|
+
}
|
|
606
|
+
.message-cc .message-recipient-label,
|
|
607
|
+
.message-bcc .message-recipient-label { color: var(--muted); }
|
|
587
608
|
.message-date {
|
|
588
609
|
font-size: 12px; color: var(--muted);
|
|
589
610
|
white-space: nowrap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
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,12 +29,12 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agenticmail/api": "^0.9.
|
|
33
|
-
"@agenticmail/core": "^0.9.
|
|
32
|
+
"@agenticmail/api": "^0.9.2",
|
|
33
|
+
"@agenticmail/core": "^0.9.2",
|
|
34
34
|
"json5": "^2.2.3"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@agenticmail/claudecode": "^0.2.
|
|
37
|
+
"@agenticmail/claudecode": "^0.2.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"tsup": "^8.4.0",
|