You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/12 05:47:06 UTC
[PR] feat(settings): opt in to Code Mode for new tasks [maka]
Astro-Han opened a new pull request, #5219:
URL: https://github.com/apache/maka/pull/5219
## Summary
Add an opt-in **Code Mode** switch under Settings → General → Task defaults. The selected Runtime Host saves the default, and newly created tasks persist their tool mode. Changing the switch leaves existing tasks unchanged; copies and child tasks inherit their source task's mode. Older tasks continue using direct tool calling.
When enabled, the model receives only `exec`, with the current callable tool catalog in its description. Nested calls retain Runtime permission checks, durable settlement, cancellation, and exclusive-tool admission. Tool search refreshes the catalog for the next cell; questions and plan/graph handoffs remain available through nested calls.
Keep `@ai-sdk/code-mode` and upgrade it from 1.0.42 to 1.0.56, aligning the AI SDK dependency family, the provider-utils patch, and license notices. No new execution engine or worker abstraction is introduced. Host protocol compatibility epoch moves from 142 to 143.
## Verification
- 214 affected policy, storage, tool availability, Code Mode, plan, graph, and settlement tests passed.
- 41 Host composition, two-client conversation-copy, and AgentRun recovery tests passed.
- Real Electron test passed: toggle starts off, enabling persists through settings close/reopen, and disabling persists through the existing Host settings IPC.
- Core, storage, runtime, and Host builds; desktop typecheck and production build passed.
- Staged Biome, source-header, protocol-epoch, and whitespace checks passed.
Removed the old assertions requiring plan/graph controls to be direct-only. Nested question answer/stop and plan-handoff behavior are now covered directly.
## Execution limits
The existing 30-second cell deadline and resource limits remain in effect, including time spent awaiting host tools or user input. Cancellation drains started host operations before releasing Runtime admission. Provider-native tools and tools explicitly marked non-nestable are not callable through this mode. This PR validates execution and settings behavior with deterministic models; it does not establish a live-model quality improvement.
## AI use
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Codex implemented the dependency alignment, settings/runtime integration, and tests.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] feat(settings): opt in to Code Mode for new tasks [maka]
Posted by "orangeCatDeveloper (via GitHub)" <gi...@apache.org>.
orangeCatDeveloper commented on code in PR #5219:
URL: https://github.com/apache/maka/pull/5219#discussion_r3995505294
##########
apps/desktop/src/renderer/settings/general-settings-page.tsx:
##########
@@ -655,6 +675,23 @@ function GeneralDefaultsCard(props: {
title={sections.chatDefaults}
description={sections.chatDefaultsHelp}
>
+ {props.settingsAvailable ? (
+ <SettingsRow
+ label="Code Mode"
+ description={copy.codeModeHelp}
+ end={
+ <Switch
+ label="Code Mode"
+ isLabelHidden
+ value={props.codeModeEnabled}
+ isDisabled={savingRows["code-mode"] || !props.settingsInteractive}
+ onChange={(enabled) => void persistCodeMode(enabled)}
Review Comment:
Suggestion (non-blocking): `Switch` already supports an async `changeAction` and manages its optimistic/pending state internally. Passing `persistCodeMode` through that prop would let this row drop its `savingRows["code-mode"]` entry and keyed guard lifecycle (`begin`/set/reset/release), while preserving the existing error toast. That keeps the new setting from adding another copy of the manual save state machine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] feat(settings): opt in to Code Mode for new tasks [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #5219:
URL: https://github.com/apache/maka/pull/5219
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] feat(settings): opt in to Code Mode for new tasks [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #5219:
URL: https://github.com/apache/maka/pull/5219#discussion_r3995668437
##########
apps/desktop/src/renderer/settings/general-settings-page.tsx:
##########
@@ -655,6 +675,23 @@ function GeneralDefaultsCard(props: {
title={sections.chatDefaults}
description={sections.chatDefaultsHelp}
>
+ {props.settingsAvailable ? (
+ <SettingsRow
+ label="Code Mode"
+ description={copy.codeModeHelp}
+ end={
+ <Switch
+ label="Code Mode"
+ isLabelHidden
+ value={props.codeModeEnabled}
+ isDisabled={savingRows["code-mode"] || !props.settingsInteractive}
+ onChange={(enabled) => void persistCodeMode(enabled)}
Review Comment:
Thanks for the suggestion! Fixed in 0d46aee65. I switched to `changeAction={persistCodeMode}`, removed the Code Mode save-state entry and guard lifecycle, and preserved the error toast. The Electron persistence test passes.
AI-assisted reply generated with Codex.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org