feat: add Trae open-in options#1913
Conversation
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe to merge; the new entries follow established registry patterns with only minor questions around the Windows path placeholder choice and a potentially missing remote-support flag. The trae and trae-solo entries are straightforward additions. The only substantive question is whether using path_raw with explicit double-quotes on Windows (vs. the path placeholder used by every other app) is correct or introduces double-quoting when the template is evaluated. The supportsRemote omission is worth a second look if Trae supports SSH remote projects. src/shared/openInApps.ts — Windows open-command placeholder choice and supportsRemote flag warrant a second look.
|
| Filename | Overview |
|---|---|
| src/shared/openInApps.ts | Adds trae and trae-solo entries to the app registry, matching the overall pattern used by similar AI-editor entries. Windows commands deviate from other entries by using {{path_raw}} with explicit double-quotes rather than {{path}}. Both entries omit supportsRemote, unlike peer AI-editor entries. |
| src/assets/images/trae.png | New PNG icon asset added for Trae; shared by both trae and trae-solo entries. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User clicks Open In Trae] --> B{Platform}
B -->|darwin| C[Try trae CLI]
C -->|CLI present| G[Trae opens project]
C -->|CLI absent| D[Fallback: open -a Trae path]
D --> G
B -->|win32| E[start trae with path_raw quoted]
E --> G
B -->|linux| F[trae path]
F --> G
A2[User clicks Open In Trae Solo] --> B2{Platform}
B2 -->|darwin| C2[Try trae-solo CLI]
C2 -->|CLI present| G2[Trae Solo opens project]
C2 -->|CLI absent| D2[Fallback: open -a Trae Solo path]
D2 --> G2
B2 -->|win32| E2[start trae-solo with path_raw quoted]
E2 --> G2
B2 -->|linux| F2[trae-solo path]
F2 --> G2
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
src/shared/openInApps.ts:361-364
Every peer AI-editor entry with Windows support (`cursor`, `vscode`, `vscodium`, `windsurf`, `kiro`, `antigravity`) uses `start "" <cmd> {{path}}` without explicit quotes. Trae switches to `"{{path_raw}}"` with explicit double-quotes. If `{{path}}` is already correctly escaped for cmd.exe (as those other entries assume), using `"{{path_raw}}"` instead could result in double-quoting. If `{{path}}` is *not* safe for Windows paths with spaces, then all the other entries share the same latent bug and should be updated too — not just Trae.
```suggestion
win32: {
openCommands: ['start "" trae {{path}}'],
checkCommands: ['trae'],
},
```
### Issue 2 of 3
src/shared/openInApps.ts:385-388
Same `{{path_raw}}` inconsistency applies to `trae-solo`. All other comparable apps use `{{path}}` for their Windows `start ""` commands.
```suggestion
win32: {
openCommands: ['start "" trae-solo {{path}}'],
checkCommands: ['trae-solo'],
},
```
### Issue 3 of 3
src/shared/openInApps.ts:347-397
**Missing `supportsRemote` flag**
`cursor`, `vscode`, `vscodium`, and `windsurf` all set `supportsRemote: true`. If Trae supports SSH remote-development workflows, both `trae` and `trae-solo` should carry this flag. Its absence means the app will not appear in remote-project "Open In" lists even if it is technically capable.
Reviews (1): Last reviewed commit: "Add Trae open-in options" | Re-trigger Greptile
| win32: { | ||
| openCommands: ['start "" trae "{{path_raw}}"'], | ||
| checkCommands: ['trae'], | ||
| }, |
There was a problem hiding this comment.
Every peer AI-editor entry with Windows support (
cursor, vscode, vscodium, windsurf, kiro, antigravity) uses start "" <cmd> {{path}} without explicit quotes. Trae switches to "{{path_raw}}" with explicit double-quotes. If {{path}} is already correctly escaped for cmd.exe (as those other entries assume), using "{{path_raw}}" instead could result in double-quoting. If {{path}} is not safe for Windows paths with spaces, then all the other entries share the same latent bug and should be updated too — not just Trae.
| win32: { | |
| openCommands: ['start "" trae "{{path_raw}}"'], | |
| checkCommands: ['trae'], | |
| }, | |
| win32: { | |
| openCommands: ['start "" trae {{path}}'], | |
| checkCommands: ['trae'], | |
| }, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/shared/openInApps.ts
Line: 361-364
Comment:
Every peer AI-editor entry with Windows support (`cursor`, `vscode`, `vscodium`, `windsurf`, `kiro`, `antigravity`) uses `start "" <cmd> {{path}}` without explicit quotes. Trae switches to `"{{path_raw}}"` with explicit double-quotes. If `{{path}}` is already correctly escaped for cmd.exe (as those other entries assume), using `"{{path_raw}}"` instead could result in double-quoting. If `{{path}}` is *not* safe for Windows paths with spaces, then all the other entries share the same latent bug and should be updated too — not just Trae.
```suggestion
win32: {
openCommands: ['start "" trae {{path}}'],
checkCommands: ['trae'],
},
```
How can I resolve this? If you propose a fix, please make it concise.| win32: { | ||
| openCommands: ['start "" trae-solo "{{path_raw}}"'], | ||
| checkCommands: ['trae-solo'], | ||
| }, |
There was a problem hiding this comment.
Same
{{path_raw}} inconsistency applies to trae-solo. All other comparable apps use {{path}} for their Windows start "" commands.
| win32: { | |
| openCommands: ['start "" trae-solo "{{path_raw}}"'], | |
| checkCommands: ['trae-solo'], | |
| }, | |
| win32: { | |
| openCommands: ['start "" trae-solo {{path}}'], | |
| checkCommands: ['trae-solo'], | |
| }, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/shared/openInApps.ts
Line: 385-388
Comment:
Same `{{path_raw}}` inconsistency applies to `trae-solo`. All other comparable apps use `{{path}}` for their Windows `start ""` commands.
```suggestion
win32: {
openCommands: ['start "" trae-solo {{path}}'],
checkCommands: ['trae-solo'],
},
```
How can I resolve this? If you propose a fix, please make it concise.| trae: { | ||
| id: 'trae', | ||
| label: 'Trae', | ||
| iconPath: ICON_PATHS.trae, | ||
| autoInstall: true, | ||
| platforms: { | ||
| darwin: { | ||
| openCommands: [ | ||
| 'command -v trae >/dev/null 2>&1 && trae {{path}}', | ||
| 'open -a "Trae" {{path}}', | ||
| ], | ||
| checkCommands: ['trae'], | ||
| appNames: ['Trae'], | ||
| }, | ||
| win32: { | ||
| openCommands: ['start "" trae "{{path_raw}}"'], | ||
| checkCommands: ['trae'], | ||
| }, | ||
| linux: { | ||
| openCommands: ['trae {{path}}'], | ||
| checkCommands: ['trae'], | ||
| }, | ||
| }, | ||
| }, | ||
| 'trae-solo': { | ||
| id: 'trae-solo', | ||
| label: 'Trae Solo', | ||
| iconPath: ICON_PATHS.trae, | ||
| autoInstall: true, | ||
| platforms: { | ||
| darwin: { | ||
| openCommands: [ | ||
| 'command -v trae-solo >/dev/null 2>&1 && trae-solo {{path}}', | ||
| 'open -a "Trae Solo" {{path}}', | ||
| ], | ||
| checkCommands: ['trae-solo'], | ||
| appNames: ['Trae Solo'], | ||
| }, | ||
| win32: { | ||
| openCommands: ['start "" trae-solo "{{path_raw}}"'], | ||
| checkCommands: ['trae-solo'], | ||
| }, | ||
| linux: { | ||
| openCommands: ['trae-solo {{path}}'], | ||
| checkCommands: ['trae-solo'], | ||
| }, | ||
| }, | ||
| }, | ||
| 'intellij-idea': { | ||
| id: 'intellij-idea', | ||
| label: 'IntelliJ IDEA', |
There was a problem hiding this comment.
cursor, vscode, vscodium, and windsurf all set supportsRemote: true. If Trae supports SSH remote-development workflows, both trae and trae-solo should carry this flag. Its absence means the app will not appear in remote-project "Open In" lists even if it is technically capable.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/shared/openInApps.ts
Line: 347-397
Comment:
**Missing `supportsRemote` flag**
`cursor`, `vscode`, `vscodium`, and `windsurf` all set `supportsRemote: true`. If Trae supports SSH remote-development workflows, both `trae` and `trae-solo` should carry this flag. Its absence means the app will not appear in remote-project "Open In" lists even if it is technically capable.
How can I resolve this? If you propose a fix, please make it concise.|
Windows ecosystem |
Summary
Testing