Merge pull request #28 from wagesj45/codex/update-readme-and-document-permissions

Update usage docs
This commit is contained in:
Jordan Wages 2025-06-25 01:03:16 -05:00 committed by GitHub
commit c9a35e145f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,17 +24,13 @@ message meets a specified criterion.
## Architecture Overview ## Architecture Overview
The extension relies on both WebExtension scripts and Thunderbird's experiment Sortana is implemented entirely with WebExtension scripts:
APIs:
- `background.js` loads the saved endpoint, registers the UI patching script, - `background.js` loads saved settings and listens for new messages.
and listens for test messages. - `modules/ExpressionSearchFilter.jsm` implements the AI filter and performs the
- `experiment/api.js` exposes the `aiFilter` namespace. It loads HTTP request.
`modules/ExpressionSearchFilter.jsm` which implements the custom filter term - `options/` contains the HTML and JavaScript for configuring the endpoint and
and performs the HTTP request. rules.
- `experiment/DomContentScript/` registers content scripts for Thunderbird
windows; `content/filterEditor.js` modifies the filter editor UI.
- `options/` contains the HTML and JavaScript for the options page.
- `_locales/` holds localized strings used throughout the UI. - `_locales/` holds localized strings used throughout the UI.
### Key Files ### Key Files
@ -61,11 +57,10 @@ the version from `manifest.json` and creates an XPI in the `release` folder.
## Usage ## Usage
1. Open the add-on's options and set the URL of your classification service. 1. Open the add-on's options and set the URL of your classification service.
2. Create or edit a filter in Thunderbird and choose the **AI classification** 2. Use the **Classification Rules** section to add a criterion and optional
term. Enter the desired criterion (for example, a short description of the actions such as tagging or moving a message when it matches.
messages you want to match). 3. Save your settings. New mail will be evaluated automatically using the
3. When the filter runs, the add-on sends the message text to the service and configured rules.
checks the JSON response for a match.
### Example Filters ### Example Filters
@ -92,7 +87,16 @@ Here are some useful and fun example criteria you can use in your filters. Filte
- **"Would I roll my eyes reading this email?"** - **"Would I roll my eyes reading this email?"**
For when you're ready to filter based on vibes. For when you're ready to filter based on vibes.
You can define as many filters as you'd like, each using a different prompt and triggering tags, moves, or actions based on the model's classification. You can define as many filters as you'd like, each using a different prompt and
triggering tags, moves, or actions based on the model's classification.
## Required Permissions
Sortana requests the following Thunderbird permissions:
- `storage` store configuration and cached classification results.
- `messagesRead` read message contents for classification.
- `messagesMove` move messages when a rule specifies a target folder.
## License ## License