@theronap/agnoclast-mcp 0.9.312 → 0.9.313
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.
- package/lib/messages_render.mjs +5 -2
- package/package.json +1 -1
package/lib/messages_render.mjs
CHANGED
|
@@ -10,6 +10,9 @@ export function authorLabel(author) {
|
|
|
10
10
|
return author.name
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/** A person's AI speaking as them (sentVia 'ai' or 'connector'), so a reader can tell human from AI. */
|
|
14
|
+
const viaAi = (m) => (m.sentVia ? ' (via their AI)' : '')
|
|
15
|
+
|
|
13
16
|
function when(iso) {
|
|
14
17
|
return iso ? iso.replace('T', ' ').slice(0, 16) + 'Z' : ''
|
|
15
18
|
}
|
|
@@ -28,7 +31,7 @@ export function renderMessageInbox(items) {
|
|
|
28
31
|
lines.push('', `## ${conv.name} — conversation ${conv.id}`)
|
|
29
32
|
for (const it of its) {
|
|
30
33
|
const where = it.threadRootId ? ` · in thread ${it.threadRootId}` : ''
|
|
31
|
-
lines.push(`- [${when(it.createdAt)}] ${authorLabel(it.author)} (${REASON[it.reason] ?? it.reason}${where}) · message ${it.id}`)
|
|
34
|
+
lines.push(`- [${when(it.createdAt)}] ${authorLabel(it.author)}${viaAi(it)} (${REASON[it.reason] ?? it.reason}${where}) · message ${it.id}`)
|
|
32
35
|
for (const l of it.body.split('\n')) lines.push(` ${l}`)
|
|
33
36
|
}
|
|
34
37
|
}
|
|
@@ -40,7 +43,7 @@ export function renderMessageInbox(items) {
|
|
|
40
43
|
export function renderConversation(messages) {
|
|
41
44
|
if (!messages.length) return 'No messages yet.'
|
|
42
45
|
return messages.map((m) => {
|
|
43
|
-
const head = `[${when(m.createdAt)}] ${authorLabel(m.author)} · message ${m.id}${m.editedAt ? ' · edited' : ''}`
|
|
46
|
+
const head = `[${when(m.createdAt)}] ${authorLabel(m.author)}${viaAi(m)} · message ${m.id}${m.editedAt ? ' · edited' : ''}`
|
|
44
47
|
const replies = m.replyCount ? `\n (${m.replyCount} repl${m.replyCount === 1 ? 'y' : 'ies'} in thread ${m.id})` : ''
|
|
45
48
|
const body = m.deleted ? ' (message deleted)' : m.body.split('\n').map((l) => ` ${l}`).join('\n')
|
|
46
49
|
return `${head}\n${body}${replies}`
|
package/package.json
CHANGED