feat(onboarding)!: default tools profile to messaging

This commit is contained in:
Peter Steinberger
2026-03-02 18:12:03 +00:00
parent 9b8e642475
commit 16df7ef4a9
4 changed files with 22 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import type { OpenClawConfig } from "../config/config.js";
import {
applyOnboardingLocalWorkspaceConfig,
ONBOARDING_DEFAULT_DM_SCOPE,
ONBOARDING_DEFAULT_TOOLS_PROFILE,
} from "./onboard-config.js";
describe("applyOnboardingLocalWorkspaceConfig", () => {
@@ -13,6 +14,7 @@ describe("applyOnboardingLocalWorkspaceConfig", () => {
expect(result.session?.dmScope).toBe(ONBOARDING_DEFAULT_DM_SCOPE);
expect(result.gateway?.mode).toBe("local");
expect(result.agents?.defaults?.workspace).toBe("/tmp/workspace");
expect(result.tools?.profile).toBe(ONBOARDING_DEFAULT_TOOLS_PROFILE);
});
it("preserves existing dmScope when already configured", () => {
@@ -36,4 +38,15 @@ describe("applyOnboardingLocalWorkspaceConfig", () => {
expect(result.session?.dmScope).toBe("per-account-channel-peer");
});
it("preserves an explicit tools.profile when already configured", () => {
const baseConfig: OpenClawConfig = {
tools: {
profile: "full",
},
};
const result = applyOnboardingLocalWorkspaceConfig(baseConfig, "/tmp/workspace");
expect(result.tools?.profile).toBe("full");
});
});