refactor: inbox (#137)

* refactor: inbox

* fix: migrations

* fix: migrations
This commit is contained in:
Acbox Liu
2026-02-26 20:16:02 +08:00
committed by GitHub
parent d2878d841b
commit fe10abf3fc
21 changed files with 404 additions and 62 deletions
+8 -1
View File
@@ -29,13 +29,20 @@ ${skill.content}
const formatInbox = (items: InboxItem[]): string => {
if (!items || items.length === 0) return ''
const formatted = items.map((item) => ({
id: item.id,
source: item.source,
header: item.header,
content: item.content,
createdAt: item.createdAt,
}))
return `
## Inbox (${items.length} unread)
These are messages from other channels — NOT from the current conversation. Use ${quote('send')} or ${quote('react')} if you want to respond to any of them.
<inbox>
${JSON.stringify(items)}
${JSON.stringify(formatted)}
</inbox>
Use ${quote('search_inbox')} to find older messages by keyword.
+2 -1
View File
@@ -33,7 +33,8 @@ export const allActions = Object.values(AgentAction)
export interface InboxItem {
id: string
source: string
content: Record<string, unknown>
header: Record<string, unknown>
content: string
createdAt: string
}