Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
vibe coded a solution that works.
Removed
list
Operation:list
operation for emails has been removed acrossindex.ts
,tools.ts
, andutils/mail.ts
.searchTerm
(""
) now effectively lists recent emails within the specified scope (account/mailbox/date).Enhanced Search Filtering:
search
operation:account
: Filter by a specific email account.mailbox
: Filter by a specific mailbox (can be combined withaccount
or used across all accounts).fromDate
: Filter emails received on or after this date (ISO format).toDate
: Filter emails received on or before this date (ISO format).maxMailboxes
: Limit the number of mailboxes searched (JXA only) for performance tuning.tools.ts
) and server logic (index.ts
) to support these new parameters.Refactored Search Implementation (
utils/mail.ts
):searchMails
function: Heavily refactored to accept and utilize the new filtering parameters (accountName
,mailboxName
,fromDate
,toDate
,maxMailboxes
).getLatestMails
: The unusedgetLatestMails
function was removed.Improved Input Validation (
index.ts
):isMailArgs
validation function was updated to correctly handle the new optional parameters (fromDate
,toDate
,maxMailboxes
) and the removal of thelist
operation. It now allows an empty string forsearchTerm
in thesearch
operation.