Repository navigation
feat: add hybrid code mode #11854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DragonnZhang
wants to merge
41
commits into
main
Choose a base branch
from
dragon/add-codemode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,867
−556
Open
feat: add hybrid code mode #11854
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
6ab42db
feat: add hybrid code mode
DragonnZhang fda09c0
fix(core): address hybrid code mode review feedback
DragonnZhang 9a0cd57
chore: merge main into code mode branch
DragonnZhang 30b2a6c
fix(code-mode): address review feedback
DragonnZhang 6c919b7
fix(web-shell): map tool mode setting alias
DragonnZhang 02afce8
fix(core): align code mode bindings and reported tool surfaces
DragonnZhang 2ecf53e
merge: sync main and preserve CodeMode context tests
DragonnZhang 4a38632
merge: preserve hybrid execution with stable tool bridge
DragonnZhang 3239c68
fix: repair web-shell alias tests and address code-mode review feedback
qwen-code-ci-bot f35beb1
Merge remote-tracking branch 'origin/main' into dragon/add-codemode
qwen-code-ci-bot 28df8ee
fix: align hybrid tool guidance with available invocation surfaces
DragonnZhang a7315eb
fix: address code-mode review feedback on exec binding narrowing and …
qwen-code-ci-bot 3c69762
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot 34711cf
fix(core): avoid unverified agent zoom hints and clarify tool exposure
DragonnZhang ce7e57d
Merge remote-tracking branch 'origin/main' into dragon/add-codemode
qwen-code-ci-bot fa457bd
fix(core): narrow MCP nested bindings by the agent tools allowlist
qwen-code-ci-bot ae35809
fix(core): keep CodeModeOnly exec expansion from bypassing MCP narrowing
qwen-code-ci-bot 4c53574
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot 22a9a40
fix: preserve code-mode fork boundaries and update mode guidance
DragonnZhang 779d689
merge: refresh main OAuth discovery before publishing code-mode fixes
DragonnZhang b1561b7
fix: preserve nested-only fork access and legacy mode resets
DragonnZhang e6fbdcd
fix(core): preserve empty tool policies when syncing main
DragonnZhang 6edd151
fix: merge main and translate current tool mode settings
DragonnZhang f746b88
fix(core): merge main and preserve hybrid skill lifecycle
DragonnZhang ed2e58c
fix(core): merge main and preserve hybrid agent permissions
DragonnZhang 4a72ef8
fix(core): align child skill routes and merge current main
DragonnZhang cad9407
fix(core): retain code-mode behavior with current main
DragonnZhang 1df2386
fix(cli): align tool mode readouts and merge main
DragonnZhang 71ab2c9
fix(core): preserve code mode policy when merging MCP rule fixes
DragonnZhang 68ceea7
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot f669bd7
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot f183ce0
fix(core): align hybrid tool visibility and prompt budgets
DragonnZhang 71b8502
fix(core): keep nested-only allowlists from revoking hybrid direct de…
4a122a6
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot e81694c
fix(core): align Skill listings with exec permission bounds
DragonnZhang 5afe0ce
fix(core): preserve direct Skill activation with nested restrictions
DragonnZhang e1d295c
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot 3dd719a
fix(core): gate the code-mode skill route on exec registration (#11854)
10d221a
Merge remote-tracking branch 'origin/main' into dragon/add-codemode
9b41dc0
fix(core): close CodeModeOnly skill-listing bypass without exec (#11854)
7faeea6
test(cli): align OpenTUI settings region tests with tools.mode (#11854)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: merge main and translate current tool mode settings
- Loading branch information
commit 6edd151087e14710ffa2e2b5959823f2c6f76fd0
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] R1-32: The row became an enum but the ZH dictionary only translates its label and description — the three option labels have no
settings.option.tools.mode.*entries, so a zh-CN user gets the raw English schema labels.With language
zh-CN, open Settings → Tools → 工具模式(实验性).SettingsMessage.tsx:745-757builds the picker from the daemon descriptor and callsformatSettingOption, which looks upsettings.option.tools.mode.direct|code_mode|code_mode_only; none exist (repo-wide grep forsettings.option.tools.modereturns zero source hits), sotranslateSettingTextfalls back to the served labels —{ value: ToolMode.Direct, label: 'Default' }etc. (packages/cli/src/config/settingsSchema.ts:2917-2919, forwarded verbatim bybuildSettingsResponseat packages/cli/src/serve/routes/workspace-settings.ts:233). The Chinese panel therefore shows "Default / Code Mode / Code Mode Only" under a fully Chinese label and description, while every other enum in this same ZH map is translated —settings.option.ui.chatWidth.*(messages.ts:192-193),settings.option.review.effort.*(234-237),settings.option.model.reasoningEffort.*(307-311),settings.option.tools.workflowSizeGuideline.*(362-366),settings.option.policy.permissionStrategy.*(377-380). Before this diff the row was a boolean rendered through the already-translatedsettings.value.on/off, so the untranslated option list is new. "Default" is also the least self-describing of the three for a Chinese reader, since the description calls that mode "Direct".Witness:
Suggested fix: Add the three option keys next to the new label/description, e.g.
'settings.option.tools.mode.direct': '直接(默认)','settings.option.tools.mode.code_mode': 'Code Mode','settings.option.tools.mode.code_mode_only': 'Code Mode Only'(keeping the two proper-noun mode names as-is if that is the intended house rendering).The fix must not violate this existing fact: Keys must be spelled exactly
settings.option.${setting.key}.${String(value)}(packages/web-shell/client/components/messages/SettingsMessage.tsx:186) with the values the schema ships —{ value: ToolMode.Direct, label: 'Default' },{ value: ToolMode.CodeMode, ... },{ value: ToolMode.CodeModeOnly, ... }(packages/cli/src/config/settingsSchema.ts:2917-2919), i.e.direct/code_mode/code_mode_only, not the label text.Acceptance criterion: A case in
packages/web-shell/client/components/messages/SettingsMessage.dom.test.tsx(or a new collocatedsettings/messages.test.ts) that renders/derives the option list for atools.modeenum descriptor under the zh-CN dictionary and asserts the Direct option is not the raw schema label'Default'— equivalently, assertsSETTINGS_MESSAGES_ZH['settings.option.tools.mode.direct']is defined. Delete the added keys and that assertion must go red; no existing test covers it (`SettingsMessage Please prove it by removing the fix and confirming that test goes red.中文说明
该行变成了枚举,但中文字典只翻译了它的 label 和 description——三个选项标签没有对应的
settings.option.tools.mode.*条目,因此 zh-CN 用户在完全中文的标签与描述下会看到原始的英文选项 "Default / Code Mode / Code Mode Only"。同一 diff 已为 CLI 翻译了这三个标签并加了 must-translate 测试,可见 web-shell 这一处属于遗漏而非有意。— qwen3.8-max via Qwen Code /review (v0.25.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] R1-32: The row became an enum but the ZH dictionary only translates its label and description — the three option labels have no
settings.option.tools.mode.*entries, so a zh-CN user gets the raw English schema labels.With language
zh-CN, open Settings → Tools → 工具模式(实验性).SettingsMessage.tsx:745-757builds the picker from the daemon descriptor and callsformatSettingOption, which looks upsettings.option.tools.mode.direct|code_mode|code_mode_only; none exist (repo-wide grep forsettings.option.tools.modereturns zero source hits), sotranslateSettingTextfalls back to the served labels —{ value: ToolMode.Direct, label: 'Default' }etc. (packages/cli/src/config/settingsSchema.ts:2917-2919, forwarded verbatim bybuildSettingsResponseat packages/cli/src/serve/routes/workspace-settings.ts:233). The Chinese panel therefore shows "Default / Code Mode / Code Mode Only" under a fully Chinese label and description, while every other enum in this same ZH map is translated —settings.option.ui.chatWidth.*(messages.ts:192-193),settings.option.review.effort.*(234-237),settings.option.model.reasoningEffort.*(307-311),settings.option.tools.workflowSizeGuideline.*(362-366),settings.option.policy.permissionStrategy.*(377-380). Before this diff the row was a boolean rendered through the already-translatedsettings.value.on/off, so the untranslated option list is new. "Default" is also the least self-describing of the three for a Chinese reader, since the description calls that mode "Direct".Witness:
Suggested fix: Add the three option keys next to the new label/description, e.g.
'settings.option.tools.mode.direct': '直接(默认)','settings.option.tools.mode.code_mode': 'Code Mode','settings.option.tools.mode.code_mode_only': 'Code Mode Only'(keeping the two proper-noun mode names as-is if that is the intended house rendering).The fix must not violate this existing fact: Keys must be spelled exactly
settings.option.${setting.key}.${String(value)}(packages/web-shell/client/components/messages/SettingsMessage.tsx:186) with the values the schema ships —{ value: ToolMode.Direct, label: 'Default' },{ value: ToolMode.CodeMode, ... },{ value: ToolMode.CodeModeOnly, ... }(packages/cli/src/config/settingsSchema.ts:2917-2919), i.e.direct/code_mode/code_mode_only, not the label text.Acceptance criterion: A case in
packages/web-shell/client/components/messages/SettingsMessage.dom.test.tsx(or a new collocatedsettings/messages.test.ts) that renders/derives the option list for atools.modeenum descriptor under the zh-CN dictionary and asserts the Direct option is not the raw schema label'Default'— equivalently, assertsSETTINGS_MESSAGES_ZH['settings.option.tools.mode.direct']is defined. Delete the added keys and that assertion must go red; no existing test covers it (`SettingsMessage Please prove it by removing the fix and confirming that test goes red.中文说明
该行变成了枚举,但中文字典只翻译了它的 label 和 description——三个选项标签没有对应的
settings.option.tools.mode.*条目,因此 zh-CN 用户在完全中文的标签与描述下会看到原始的英文选项 "Default / Code Mode / Code Mode Only"。同一 diff 已为 CLI 翻译了这三个标签并加了 must-translate 测试,可见 web-shell 这一处属于遗漏而非有意。— qwen3.8-max via Qwen Code /review (v0.25.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferred to the next round, not dropped: Critical-only mode is active on this PR (the takeover window was seeded at round 5) and the previous round exhausted its time budget, so this round landed only the blocking agent-core fixes — the R3-1 Critical (nested-only allowlists revoking hybrid direct declarations) and the exec-route listing/gate gap. This Suggestion stays open and is first in the next round's queue.
中文说明
本轮延后处理(并非忽略):本 PR 已处于仅处理 Critical 的模式(takeover 窗口从第 5 轮起算),且上一轮已耗尽时间预算,因此本轮只落地了阻断性的 agent-core 修复(R3-1:nested-only 白名单撤销 hybrid 直接声明;以及 exec 通道的列表/闸门分歧修复)。该建议保持开放,已排入下一轮队列。具体技术细节见上方英文正文。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferred to the next round, not dropped: Critical-only mode is active on this PR (the takeover window was seeded at round 5) and the previous round exhausted its time budget, so this round landed only the blocking agent-core fixes — the R3-1 Critical (nested-only allowlists revoking hybrid direct declarations) and the exec-route listing/gate gap. This Suggestion stays open and is first in the next round's queue.
中文说明
本轮延后处理(并非忽略):本 PR 已处于仅处理 Critical 的模式(takeover 窗口从第 5 轮起算),且上一轮已耗尽时间预算,因此本轮只落地了阻断性的 agent-core 修复(R3-1:nested-only 白名单撤销 hybrid 直接声明;以及 exec 通道的列表/闸门分歧修复)。该建议保持开放,已排入下一轮队列。具体技术细节见上方英文正文。