Skip to content

fix(trae): support Trae CLI Next hooks#266

Open
Hayak3 wants to merge 1 commit into
wxtsky:mainfrom
Hayak3:fix-trae-cli-next-hooks
Open

fix(trae): support Trae CLI Next hooks#266
Hayak3 wants to merge 1 commit into
wxtsky:mainfrom
Hayak3:fix-trae-cli-next-hooks

Conversation

@Hayak3

@Hayak3 Hayak3 commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • Keep legacy Trae IDE hooks at ~/.trae/hooks.json
  • Add separate Trae CLI Next hooks at ~/.trae/cli/hooks.json
  • Use TraeX-supported PascalCase hook events for Trae CLI Next instead of legacy Trae IDE events like beforeReadFile
  • Clean up CodeIsland-managed legacy Trae IDE entries if they were written into the new Trae CLI Next hooks file

Background

Trae CLI Next no longer reads ~/.trae/hooks.json. It reads ~/.trae/cli/hooks.json, but that file must use the TraeX hook event schema. Reusing the old Trae IDE event list causes parse errors such as:

unknown hook event: "beforeReadFile"

Verification

  • swift build -c release passed
  • git diff --check passed
  • swift test --filter ... could not run on this machine because the active developer directory is CommandLineTools and XCTest is unavailable; debug test builds also hit an existing SwiftUI #Preview / PreviewsMacros
    environment issue

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