refactor(onboard): share local workspace+gateway config

This commit is contained in:
Peter Steinberger
2026-02-15 14:21:28 +00:00
parent 1a758135d8
commit af34c8fafe
3 changed files with 25 additions and 28 deletions

View File

@@ -0,0 +1,21 @@
import type { OpenClawConfig } from "../config/config.js";
export function applyOnboardingLocalWorkspaceConfig(
baseConfig: OpenClawConfig,
workspaceDir: string,
): OpenClawConfig {
return {
...baseConfig,
agents: {
...baseConfig.agents,
defaults: {
...baseConfig.agents?.defaults,
workspace: workspaceDir,
},
},
gateway: {
...baseConfig.gateway,
mode: "local",
},
};
}