extensions
extensions copied to clipboard
[Dice & Coin] custom dice + windows support
Description
- Added Windows support
- Added ability to throw custom (impossible) dice (close #22616)
Screencast
https://github.com/user-attachments/assets/ad2bb68a-ee67-44b7-b3d9-23214e7fc2a8
Checklist
- [x] I read the extension guidelines
- [x] I read the documentation about publishing
- [X] I ran
npm run buildand tested this distribution build in Raycast - [x] I checked that files in the
assetsfolder are used by the extension itself - [x] I checked that assets used in the
READMEare located outside the metadata folder if they were not generated with our metadata tool
Thank you for your contribution! :tada:
🔔 @yonbergman 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/dice-and-coin"
FORK_URL="https://github.com/xmok/raycast-extensions.git"
EXTENSION_NAME="dice-and-coin"
REPO_NAME="raycast-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
Due to our current reduced availability, the initial review may take up to 10-15 business days.
Greptile Summary
This PR successfully implements Windows support and adds a custom dice feature to the Dice & Coin extension, addressing issue #22616.
Key Changes:
- Added
throw-custom-dicecommand with configurable min/max range via preferences - Windows platform support added to
package.json - Modern ESLint flat config migration (
eslint.config.jsreplacing.eslintrc.json) - Updated dependencies to latest versions (
@raycast/api1.104.1, ESLint 9, TypeScript 5.8) - Proper input validation and error handling with user-friendly error messages
- Command subtitle dynamically updates to show the configured range
- New command disabled by default as suggested by custom instruction b24ed10f
Implementation Quality:
- Clean error handling with helpful user feedback
- Consistent code style matching existing commands (
throw-dice.tsx,toss-coin.tsx) - Proper use of Raycast APIs (
updateCommandMetadata,openExtensionPreferences) - Appropriate use of textfield type for min/max preferences
Confidence Score: 5/5
- This PR is safe to merge with one minor typo fix needed
- The implementation is well-tested (as per PR checklist), follows best practices, includes proper error handling, and matches the existing code patterns. The only issue is a spelling mistake in the CHANGELOG that should be corrected before merge.
- Only
CHANGELOG.mdneeds attention for the typo correction
Important Files Changed
| Filename | Overview |
|---|---|
| extensions/dice-and-coin/src/throw-custom-dice.tsx | Added new custom dice command with proper input validation, error handling, and user feedback |
| extensions/dice-and-coin/package.json | Added Windows platform support, new custom dice command with preferences, and updated dependencies |
| extensions/dice-and-coin/CHANGELOG.md | Added changelog entry for new features - contains typo 'Suport' instead of 'Support' |