Repository navigation
Conversation
更新官方 Hook 事件配置与会话生命周期处理,补充回归测试和本地热重启构建支持,并发布 1.0.34-beta.0 测试版本。
为Trae CN的solo_agent主代理添加特殊判断,避免被当作子代理处理
…k handling 1. 回滚CFBundleShortVersionString和CFBundleVersion到1.0.34-beta.0 2. 删除不再需要的旧版Trae IDE托管hook清理逻辑代码
wxtsky
pushed a commit
that referenced
this pull request
Sep 23, 2026
Trae CN's hooks fire Claude-style event names, its bundle is Trae CN.app, and its primary conversation is tagged agent_id=solo_agent rather than being a folded subagent.
wxtsky
added a commit
that referenced
this pull request
Sep 23, 2026
`.traeIDE` backs BOTH built-ins — Trae (~/.trae/hooks.json) and Trae CN (~/.trae-cn/hooks.json) — and both editions document the same six Claude-style events: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, Notification (docs.trae.ai/ide/hook-configuration-reference, docs.trae.cn/ide_hook-configuration-reference). The Cursor-style camelCase list it used to share with `.flat` never fires in either edition, so the switch is right for international Trae too — it is not a CN-only change. Trim #341's list to the documented set: SessionEnd / SubagentStart / SubagentStop / PreCompact are not TraeCode events, and Notification is async with its stdout ignored, so it needs no 86400s timeout. Install now also drops CodeIsland entries left under the old camelCase keys (as Trae CLI Next already does); the per-event loop only replaced entries under current names, so upgraded configs kept dead keys forever. User hooks under any key are preserved. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
wxtsky
added a commit
that referenced
this pull request
Sep 23, 2026
…app) Trae CN has shipped as /Applications/Trae CN.app with bundle id cn.trae.app since its first macOS build (Homebrew trae-cn cask; the TraeCode CN 3.3.104 DMG still does), main binary `Electron`, helpers `Trae CN Helper …`. CodeIsland assumed `TraeCN.app` or the international `Trae.app`/`com.trae.app`, so Trae CN was never recognised as itself. - Keep #341's bundle list (and its removal of `/trae.app/`, which made an open international Trae keep Trae CN sessions alive), but move it to CodeIslandCore so the bridge uses it too: `traecn` now matches the bundle in `sourceMatchesExecutablePath`, so `_ppid` resolves to the long-lived Trae CN process instead of the `bash -c` hook shell, which exits after every hook and idled/dropped the card. It stays an IDE host, so ancestry inference still never picks it (#220). - findTraeCNPids also looks for the real bundle. - Map cn.trae.app → traecn / "Trae CN" for native-app mode, the jump target, the terminal badge and IDE-terminal detection. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
wxtsky
added a commit
that referenced
this pull request
Sep 23, 2026
TRAE's desktop IDE puts `agent_id` + `agent_type` on EVERY hook as the agent executing it (docs.trae.cn/enterprise_hook-configuration-reference, 请求体通用字段), main conversation included, and TraeCode has no SubagentStart/SubagentStop events. The main agent's id is `solo_agent` (what #341 observed), but just as well another built-in (`builder_v3`, `chat_v3`, `custom_v3`, `solo_coder`, … are all in the TraeCode CN 3.3.104 agent catalog) or a user's custom agent. #341 exempted only `solo_agent` on `traecn`, and only at the reducer's routing branch — metadata extraction and the app's agent-scoped permission/question handling still treated it as a subagent, and any other agent id (or the international edition) still lost every turn after the first Stop. Drop the id at HookEvent instead for `trae` and `traecn`, so every consumer sees one main conversation; the raw value stays in rawJSON. Claude-style routing is unchanged for other sources. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Owner
|
感谢 @duyinghua!方向是对的:TRAE 的 IDE Hook 确实用 Claude 风格的事件名,Trae CN 的真实包名确实是 你的分支没开「Allow edits by maintainers」,我没法把修改推上来,所以直接合进了 main。你的提交已压成一个、保留你的署名(ee7364a),后面跟着几处补充修改:
随下一个版本发布。再次感谢! |
Closed
Author
|
很专业的回复,感谢采纳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the issue where TraeCN IDE is not supported