-
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
Add evaluate-math-expression extension #17089
base: main
Are you sure you want to change the base?
Conversation
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days Once the PR is approved and merged, the extension will be available on our Store. |
@greptileai can you do a review here 😊 |
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 a new "Evaluate Math Expression" extension that reads selected text, evaluates it as a math expression, and outputs the result according to user preferences.
- In
CHANGELOG.md
, please use{PR_MERGE_DATE}
instead of the hardcoded date "2025-02-15" - this will be automatically replaced with the current date upon merging - In
src/evaluate-math-expression.ts
, error handling could be simplified withshowFailureToast
from@raycast/utils
instead of the currentshowToast
implementation - The
evaluate
function is marked as async but doesn't contain any await operations - Consider adding validation for empty text selection before evaluation
- The
Preferences
interface inpreferences.ts
is unnecessary as it's autogenerated inraycast-env.d.ts
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
10 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
extensions/evaluate-math-expression/src/evaluate-math-expression.ts
Outdated
Show resolved
Hide resolved
return { | ||
...preferences, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
maxDecimals: parseInt(preferences.maxDecimals as any) || undefined, |
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 using Number(preferences.maxDecimals)
instead of parseInt()
to handle decimal values properly
Co-authored-by: Per Nielsen Tikær <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…on.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@pernielsentikaer Done! |
Description
Screencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder