Update `Terminal Finder` extension - error handling + Kitty support
Lots of cool stuff!
sorta related to #23252 - if there are errors, they were not being shown. I have added some functions but still testing to make sure they work. The ones I have migrated I have tested ✅.
Description
- A new quick command to jump from X to Y
- Added README.md
- Added support for Kitty
- Updated
commanddescriptions to be more precise - Added error handling in existing
runAppleScript
Screencast
WIP
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:
🔔 @yedongze @Bibabidu @AnirudhG07 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/terminalfinder"
FORK_URL="https://github.com/xmok/raycast-extensions.git"
EXTENSION_NAME="terminalfinder"
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 adds Kitty terminal support, creates a new unified X → Y quick command for dynamic terminal switching, and improves error handling across the extension. The changes consolidate duplicated code into reusable utility functions (clipboardToApplication, finderToApplication, applicationToFinder) and fix incorrect command descriptions that previously said "Finder directory" for clipboard commands.
Key changes:
- Added Kitty terminal support with three new commands (clipboard→Kitty, Finder→Kitty, Kitty→Finder)
- New
X → Ycommand with dropdown arguments allowing users to select source and destination dynamically - Fixed error handling: replaced generic "Something went wrong" messages with
showFailureToastthat displays actual error details - Added
stderrcheck inrunAppleScriptto properly surface AppleScript errors (addresses #23252) - Corrected command descriptions in
package.json(clipboard commands now correctly say "Clipboard directory" instead of "Finder directory") - Refactored Warp and Ghostty commands to use shared utility functions for consistency
- Added README documenting supported terminals
Issues found:
- AppleScript error handling uses
returninstead oferrorin the new utility functions, causing "not running" messages to appear as success toasts instead of triggering error handlers
Confidence Score: 3/5
- Safe to merge after fixing the AppleScript error handling issue
- The PR successfully addresses the original error handling problem from #23252 by adding stderr checking and using
showFailureToast. However, the new utility functions have a logical error where AppleScript returns strings instead of throwing errors when applications aren't running, causing confusing success messages. This is easily fixable and doesn't break existing functionality. - Pay close attention to
extensions/terminalfinder/src/utils.ts- fix thereturnstatements to useerrorinstead
Important Files Changed
| Filename | Overview |
|---|---|
| extensions/terminalfinder/src/utils.ts | Added error handling to runAppleScript (stderr check), refactored common logic into reusable functions (clipboardToApplication, finderToApplication, applicationToFinder) |
| extensions/terminalfinder/package.json | Added Kitty support, new X → Y command, fixed command descriptions, updated dependencies and contributor list |
| extensions/terminalfinder/CHANGELOG.md | Added new changelog entry with correct format and placeholder date |
| extensions/terminalfinder/src/index.ts | New quick command handler for X → Y with dropdown arguments for dynamic terminal/finder switching |