Skip to content

feat: add Trae open-in options#1913

Merged
arnestrickmann merged 1 commit intomainfrom
emdash/add-trae-open-in-ztr37
May 6, 2026
Merged

feat: add Trae open-in options#1913
arnestrickmann merged 1 commit intomainfrom
emdash/add-trae-open-in-ztr37

Conversation

@arnestrickmann
Copy link
Copy Markdown
Contributor

Summary

  • add Trae and Trae Solo to the Open In app registry
  • add the Trae icon asset
  • use Windows-safe raw path quoting for Trae launch commands

Testing

  • Not run: node_modules are missing in this worktree, so pnpm run format fails with prettier not found

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Greptile Summary

This PR adds trae and trae-solo to the "Open In" app registry, following the same structure as existing AI-editor entries (cursor, windsurf, kiro). A new trae.png icon is introduced and shared by both entries.

  • trae and trae-solo registry entries are added with macOS, Windows, and Linux open commands, mirroring the pattern used by comparable AI editors.
  • Windows commands deviate from all other entries by using "{{path_raw}}" with explicit double-quotes instead of the {{path}} placeholder used everywhere else — intentional per the PR description but warrants clarification.
  • Both new entries omit supportsRemote, which all peer AI-editor entries (cursor, vscode, vscodium, windsurf) carry.

Confidence Score: 4/5

Safe 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.

Important Files Changed

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
Loading
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

Comment thread src/shared/openInApps.ts
Comment on lines +361 to +364
win32: {
openCommands: ['start "" trae "{{path_raw}}"'],
checkCommands: ['trae'],
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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.

Comment thread src/shared/openInApps.ts
Comment on lines +385 to +388
win32: {
openCommands: ['start "" trae-solo "{{path_raw}}"'],
checkCommands: ['trae-solo'],
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Same {{path_raw}} inconsistency applies to trae-solo. All other comparable apps use {{path}} for their Windows start "" commands.

Suggested change
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.

Comment thread src/shared/openInApps.ts
Comment on lines +347 to 397
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',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

@arnestrickmann
Copy link
Copy Markdown
Contributor Author

Windows ecosystem

@arnestrickmann arnestrickmann merged commit 81afe1e into main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant