Parse full message for AI classification
This commit is contained in:
parent
93a36ea2d8
commit
1070610174
2 changed files with 57 additions and 4 deletions
15
AGENTS.md
15
AGENTS.md
|
@ -43,3 +43,18 @@ Additional documentation exists outside this repository.
|
|||
- [Bulma.css](https://github.com/jgthms/bulma)
|
||||
- Issue tracker: [Thunderbird tracker on Bugzilla](https://bugzilla.mozilla.org/describecomponents.cgi?product=Thunderbird)
|
||||
|
||||
|
||||
### Message Structure Notes
|
||||
|
||||
Messages retrieved with `messenger.messages.getFull` are returned as
|
||||
nested objects. The root contains `headers` and a `parts` array. Each part may
|
||||
itself contain `parts` for multipart messages or a `body` string. Attachments are
|
||||
indicated via the `content-disposition` header.
|
||||
|
||||
When constructing the text sent to the AI service, parse the full message
|
||||
recursively. Include key headers such as `from`, `to`, `subject`, and others, and
|
||||
record attachment summaries rather than raw binary data. Inline or attached
|
||||
base64 data should be replaced with placeholders showing the byte size. The
|
||||
final string should have the headers, a brief attachment section, then the plain
|
||||
text extracted from all text parts.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue