mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-24 23:51:48 +00:00
35 lines
961 B
TypeScript
35 lines
961 B
TypeScript
import type { OpenClawConfig } from "../config/config.js";
|
|
import type { DmScope } from "../config/types.base.js";
|
|
import type { ToolProfileId } from "../config/types.tools.js";
|
|
|
|
export const ONBOARDING_DEFAULT_DM_SCOPE: DmScope = "per-channel-peer";
|
|
export const ONBOARDING_DEFAULT_TOOLS_PROFILE: ToolProfileId = "coding";
|
|
|
|
export function applyOnboardingLocalWorkspaceConfig(
|
|
baseConfig: OpenClawConfig,
|
|
workspaceDir: string,
|
|
): OpenClawConfig {
|
|
return {
|
|
...baseConfig,
|
|
agents: {
|
|
...baseConfig.agents,
|
|
defaults: {
|
|
...baseConfig.agents?.defaults,
|
|
workspace: workspaceDir,
|
|
},
|
|
},
|
|
gateway: {
|
|
...baseConfig.gateway,
|
|
mode: "local",
|
|
},
|
|
session: {
|
|
...baseConfig.session,
|
|
dmScope: baseConfig.session?.dmScope ?? ONBOARDING_DEFAULT_DM_SCOPE,
|
|
},
|
|
tools: {
|
|
...baseConfig.tools,
|
|
profile: baseConfig.tools?.profile ?? ONBOARDING_DEFAULT_TOOLS_PROFILE,
|
|
},
|
|
};
|
|
}
|