-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update supernotes extension to enable AI tools #17475
base: main
Are you sure you want to change the base?
Conversation
- Added in AI Extension support and date format preference. - Initial commit
Thank you for your first contribution! 🎉 🔔 @acnebs @tobeagram @peduarte 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. Due to our current reduced availability, the initial review may take up to 10-15 business days |
Hey @mattdelliott, thanks for this. We were just discussing integrating the new Raycast AI features with the Supernotes extension, looks like you've beat us to it! The only issue is that the date formatting feature unfortunately cannot work as written, as only a certain date format (ISO 8601 without a time) is accepted as the However this would be a good time to better standardize that call so that it matches other integrations, which use two digits for month and day (this was actually an oversight when we first added const localDate = format(new Date(), "yyyy-MM-dd") |
Hey @connebs! That is great to hear. I removed that option and hardcoded the As far as the AI Extension goes, I just got some basics to get started, but I am sure there will be a lot more awesome use cases to implement. |
Good point, I think for now |
Sounds good. I've made those changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds AI Extension support to Supernotes, enabling interaction with the note-taking app through Raycast's AI interface.
- Added three new AI tools in
/extensions/supernotes/src/tools/
:search-cards.ts
,append-card.ts
, andcreate-card.ts
for searching, appending to, and creating cards - Added AI configuration in
package.json
with instructions and example inputs for handling markdown formatting and daily cards - Fixed date formatting in
sendToDaily
function to properly zero-pad month and day values for consistent ISO-8601 format - Updated documentation in README.md with a new "Tools" section describing the AI capabilities
- Added proper changelog entry with the
{PR_MERGE_DATE}
placeholder at the top of CHANGELOG.md
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
7 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
* The content markup to append to the card. If not provided then ask for it. | ||
*/ | ||
content: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The JSDoc comment says "If not provided then ask for it" but the content field is not marked as optional in the type definition. Either make it optional with content?: string or update the comment.
* The content markup to append to the card. If not provided then ask for it. | |
*/ | |
content: string; | |
* The content markup to append to the card. If not provided then ask for it. | |
*/ | |
content?: string; |
|
||
type Input = { | ||
/** | ||
* The search term to search for when looking for a cards, optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Minor typo in comment: 'a cards' should be 'cards'
* The search term to search for when looking for a cards, optional | |
* The search term to search for when looking for cards, optional |
body: { | ||
search: searchTerm, | ||
include_membership_statuses: [1, 2], | ||
limit: 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider making the limit configurable through the Input type to allow for more flexible searches
if (!fetched.ok) { | ||
throw new Error("There was a problem searching for cards."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Error handling could be improved by including the error details from fetched.body in the thrown error message
Description
Screencast
https://cln.sh/FRWgv49yw1XjNh0PX0KN
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder