Skip to content

Update apple-notes extension - #30504

Open
BitForger wants to merge 11 commits into
raycast:mainfrom
BitForger:ext/apple-notes
Open

Update apple-notes extension#30504
BitForger wants to merge 11 commits into
raycast:mainfrom
BitForger:ext/apple-notes

Conversation

@BitForger

@BitForger BitForger commented Aug 25, 2026

Copy link
Copy Markdown

Description

Adds support for many more AI actions with apple notes. They include:

  • appending text to note
  • moving notes
  • delete notes
  • restore notes from trash
  • listing folders

Screencast

Example of the output created just by prompting the AI window
CleanShot 2026-08-24 at 22 56 37
CleanShot 2026-08-24 at 22 57 21

Checklist

- Enhance error handling and code formatting across note management tools
- Implement AI tools for note management: add delete, restore, move, append, and list folders; enhance search with tag filtering.
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: apple-notes Issues related to the apple-notes extension AI Extension platform: macOS labels Aug 25, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution! 🎉

🔔 @tumispro @ron-myers @mathieudutour @StevenRCE0 @SKaplanOfficial @tylerwince @xilopaint @ridemountainpig @teemusuvinen @saldanaj97 @andreaselia @fanhefeng @charlesharries @janosorcsik you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/apple-notes"
FORK_URL="https://github.com/BitForger/extensions.git"
EXTENSION_NAME="apple-notes"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@BitForger

Copy link
Copy Markdown
Author

Here's a summary:

This PR expands the Apple Notes AI capabilities in the Raycast extension.

What’s included

  • Added a broader set of AI tools for managing notes:
    • append-to-note
    • delete-note
    • restore-note
    • move-note
    • list-folders
  • Added tag filtering support to search-notes
  • Updated the AI Note command so it can optionally target an existing note and append generated content instead of always creating a new note
  • Improved note operations to validate IDs before AppleScript execution, avoiding crashes when a missing noteId is passed
  • Added manifest metadata, AI instructions, and eval coverage for the new capabilities

Why

This makes the AI extension more useful for real Apple Notes workflows, such as:

  • appending content to an existing note without overwriting it
  • deleting or restoring notes safely
  • searching by tags
  • moving notes between folders
  • allowing the AI to discover valid note folders before acting

Verification

  • npm run build
  • npm run lint

Copy/paste version:

This PR expands the Apple Notes AI capabilities for the Raycast extension.

It adds support for:

  • appending content to an existing note without overwriting it
  • deleting and restoring notes
  • moving notes between folders
  • listing available folders so the AI can act with valid destinations
  • filtering note searches by tags

It also updates the AI Note command to optionally target an existing note instead of always creating a new one, and adds guard logic to avoid crashes when a missing note ID is passed to AppleScript-backed note actions.

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands Apple Notes’ AI surface with append, move, delete, restore, folder-listing, tag-filtering, and existing-note append capabilities.

  • Adds five Apple Notes AI tools and their manifest guidance and evaluations.
  • Adds account-aware folder moves and destructive-action confirmation.
  • Extends note search with tag filtering and normalized exact-title lookup.

Confidence Score: 4/5

The PR is not yet safe to merge because non-ASCII exact-title lookup can still report an existing note as missing.

For non-ASCII exact-title requests, the SQL query has no title predicate and returns only the ten most recently modified notes, so an older matching note never reaches the JavaScript comparison and AI Note aborts instead of appending.

Files Needing Attention: extensions/apple-notes/src/api/getNotes.ts, extensions/apple-notes/src/ai.ts

Important Files Changed

Filename Overview
extensions/apple-notes/src/api/getNotes.ts Adds normalized exact-title and accent-insensitive filtering, but the current non-ASCII exact lookup still excludes older matching notes before JavaScript comparison.
extensions/apple-notes/src/ai.ts Adds exact-title selection and append-to-existing-note behavior; its ten-result lookup exposes the outstanding non-ASCII false-negative path.
extensions/apple-notes/src/api/applescript.ts Adds escaped append, account-aware move, and folder-listing AppleScript operations.
extensions/apple-notes/src/tools/delete-note.ts Adds resolved-title destructive confirmation and note deletion.
extensions/apple-notes/src/tools/move-note.ts Preserves optional destination account identity through execution and confirmation.
extensions/apple-notes/package.json Registers the new AI tools and documents the account-aware move workflow.

Reviews (11): Last reviewed commit: "Refactor getNotes function to simplify S..." | Re-trigger Greptile

Comment thread extensions/apple-notes/src/ai.ts Outdated
Comment thread extensions/apple-notes/src/tools/delete-note.ts
Comment thread extensions/apple-notes/src/api/applescript.ts Outdated
… titles; update delete confirmation message for clarity.
Comment thread extensions/apple-notes/src/tools/delete-note.ts Outdated
…eval and improve confirmation message display.
Comment thread extensions/apple-notes/src/tools/move-note.ts
Comment thread extensions/apple-notes/src/ai.ts Outdated
Comment thread extensions/apple-notes/src/tools/delete-note.ts
Comment thread extensions/apple-notes/package.json Outdated
@BitForger
BitForger marked this pull request as ready for review August 25, 2026 20:36
…ype to clarify its requirement when multiple accounts exist.
Comment thread extensions/apple-notes/src/api/getNotes.ts Outdated
Comment thread extensions/apple-notes/src/api/getNotes.ts Outdated
Comment thread extensions/apple-notes/src/tools/delete-note.ts
@0xdhrv 0xdhrv self-assigned this Aug 26, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @BitForger 👋

Thanks for the contribution 🔥

Could you look into the suggestions from Greptile?


I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

@0xdhrv
0xdhrv marked this pull request as draft August 26, 2026 11:33
@BitForger

Copy link
Copy Markdown
Author

Hi @0xdhrv,

I've been going back and forth with Greptile and I don't think the last two comments are necessarily an issue. The first one, is complaining about a scenario that wouldn't reasonably be met outside of an automated stress test.
The second one it even flags as not likely an actual problem.

Could you (, or an engineer you assign) please review the suggestions from Greptile and let me know how best to proceed?

Thanks

Comment thread extensions/apple-notes/src/api/getNotes.ts Outdated
…icode-aware checks and improve SQL query handling for non-ASCII characters.
Comment thread extensions/apple-notes/src/api/getNotes.ts Outdated
@BitForger
BitForger marked this pull request as ready for review August 28, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Extension extension: apple-notes Issues related to the apple-notes extension extension fix / improvement Label for PRs with extension's fix improvements platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants