mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 01:24:31 +00:00
feat(onboarding)!: default tools profile to messaging
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user