Repository navigation
Conversation
|
Thank you for your contribution! 🎉 🔔 @asifk987 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 commandsBRANCH="codex/selected-text-thread"
FORK_URL="https://github.com/bbnotcode/raycast-extensions.git"
EXTENSION_NAME="codex"
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 devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryThis PR adds a no-view command that prefills ChatGPT from selected text, introduces configurable Chat/Codex routing for all New Thread commands, and hides working-directory functionality in Chat mode.
Confidence Score: 4/5The implementation appears functionally safe, but the pull request must be undrafted to satisfy the repository requirement; the metadata mismatch and missing deeplink tests should also be addressed. No concrete runtime failure was established, but the manifest now misdescribes the default New Thread behavior, the shared undocumented deeplink mapping lacks committed regression coverage, and the draft state violates an explicit repository requirement. Files Needing Attention: extensions/codex/package.json, extensions/codex/src/utils/launch.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
extensions/codex/package.json:111
**Descriptions promise wrong mode.** The new preference defaults every New Thread command to ordinary ChatGPT Chat, but all four command descriptions say they start a Codex thread. Raycast therefore advertises a different action from the default behavior, which can mislead users. Update the affected descriptions to explain that the mode is configurable.
### Issue 2
extensions/codex/src/utils/launch.ts:125-133
**Deeplink routing lacks tests.** The new URL builder controls explicit Chat/Codex routing and conditionally includes the working directory for every New Thread command, but the committed tests do not cover these parameters. Since this desktop protocol is undocumented, add focused URL-construction tests so routing changes cannot silently break all New Thread commands.
### Issue 3
extensions/codex/package.json:80
**Pull request remains draft.** The pull request is still marked as a draft, which violates the repository directive that pull requests must be undrafted before team review. This repository requirement must be satisfied before merging.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(codex): add selected-text prompts a..." | Re-trigger Greptile |
| "description": "Mode used by all New Thread commands. Working directory settings apply only to Codex mode.", | ||
| "type": "dropdown", | ||
| "required": false, | ||
| "default": "chat", |
There was a problem hiding this comment.
Descriptions promise wrong mode. The new preference defaults every New Thread command to ordinary ChatGPT Chat, but all four command descriptions say they start a Codex thread. Raycast therefore advertises a different action from the default behavior, which can mislead users. Update the affected descriptions to explain that the mode is configurable.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex/package.json
Line: 111
Comment:
**Descriptions promise wrong mode.** The new preference defaults every New Thread command to ordinary ChatGPT Chat, but all four command descriptions say they start a Codex thread. Raycast therefore advertises a different action from the default behavior, which can mislead users. Update the affected descriptions to explain that the mode is configurable.
**Knowledge Base Used:**
- [Extension catalog and package model](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-catalog.md)
- [Extension package contract](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-package-contract.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| const params = new URLSearchParams({ mode }); | ||
|
|
||
| if (prompt) { | ||
| params.set("prompt", prompt); | ||
| } | ||
|
|
||
| if (path) { | ||
| if (path && mode === "codex") { | ||
| params.set("path", path); | ||
| } |
There was a problem hiding this comment.
Deeplink routing lacks tests. The new URL builder controls explicit Chat/Codex routing and conditionally includes the working directory for every New Thread command, but the committed tests do not cover these parameters. Since this desktop protocol is undocumented, add focused URL-construction tests so routing changes cannot silently break all New Thread commands.
Knowledge Base Used: Extension command implementation patterns
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex/src/utils/launch.ts
Line: 125-133
Comment:
**Deeplink routing lacks tests.** The new URL builder controls explicit Chat/Codex routing and conditionally includes the working directory for every New Thread command, but the committed tests do not cover these parameters. Since this desktop protocol is undocumented, add focused URL-construction tests so routing changes cannot silently break all New Thread commands.
**Knowledge Base Used:** [Extension command implementation patterns](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-command-implementation.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| ] | ||
| }, | ||
| { | ||
| "name": "new-thread-from-selected-text", |
There was a problem hiding this comment.
Pull request remains draft. The pull request is still marked as a draft, which violates the repository directive that pull requests must be undrafted before team review. This repository requirement must be satisfied before merging.
Rule Used: Pull requests must be undrafted before they can be... (source)
Learned From
raycast/extensions#18182
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex/package.json
Line: 80
Comment:
**Pull request remains draft.** The pull request is still marked as a draft, which violates the repository directive that pull requests must be undrafted before team review. This repository requirement must be satisfied before merging.
**Rule Used:** Pull requests must be undrafted before they can be... ([source](https://app.greptile.com/raycast/-/custom-context?memory=d302c23a-ba3d-4c77-9e77-90f49f817dce))
**Learned From**
[raycast/extensions#18182](https://github.com/raycast/extensions/pull/18182)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
@bbnotcode Thanks for this, and the mode idea is a good catch. I hadn't realized the app just keeps whatever mode it was last in when the link doesn't carry one, so today my New Thread commands drift depending on how you last used Codex. Setting it explicitly is the right fix, but I'm landing it a bit differently. Default to codex rather than chat, so the existing commands keep doing what their names say and nobody's Default Working Directory stops applying to them after an update. The app takes a third value too (mode=work for ChatGPT Work), so the global preference will offer all three. I'm also keeping path on the URL in every mode, since I tested work with a directory attached and it opens fine. On the selected text command, I already had that built and it's going out in the next release, so I'll land mine (our implementations came out nearly identical). The prompt prefix is the one piece you had that I didn't, so I'm taking that and crediting you for it. I scoped that preference to the command rather than the whole extension since it only applies to the new selected text command. Lots of other updates and new commands as well that I'll open a PR for later today! |
|
Closing this based on the above discussion. @asifk987 checking if you add @bbnotcode as contributor? |
Description
Selecting text in another application currently requires copying it before starting a chat from Raycast. Add New Thread from Selected Text, a no-view command that reads the selection before changing application focus and prefills a new chat. Empty or unreadable selections show feedback without launching a chat or falling back to the clipboard.
modeparameter in the desktop deeplink.Related to #30825.
Behavior and compatibility
This changes the default behavior of existing New Thread commands to Chat. Users can choose Codex in the new preference to restore coding tasks. Maintainer feedback on this default is welcome.
The desktop deeplink prefills the composer; it does not automatically send the message. This targets the main Chat page, not the floating Quick Chat window. The
mode=chatandmode=codexrouting was checked against the installed desktop app's URL parser; it is not presented as a documented public API guarantee.Validation
npm run build— passed; local Raycast distribution updated.npx tsc --noEmit— passed.npm run lint— passed.npm test— 4 existing tests passed.git diff --check— passed.Screencast
Pending. This PR is a draft because a real cross-application selection → Raycast → desktop Chat verification and recording have not been completed. Desktop UI automation was unavailable in the development environment.
Manual verification: set a prefix, select multiline text in another application, invoke the new command, and verify Chat mode and the prefilled prompt. Also verify an empty selection, clipboard/manual prompt entry, and switching the preference back to Codex with a working directory.
Checklist
npm run buildand tested this distribution build in Raycast (build passed; end-to-end manual verification pending)assetsfolder are used by the extension itself (no asset changes)READMEare located outside the metadata folder if they were not generated with our metadata tool (no README media added)