mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 06:50:34 +00:00
Config: migrate legacy top-level memorySearch
This commit is contained in:
committed by
Vignesh
parent
efc79f69a2
commit
8688730161
@@ -14,6 +14,34 @@ import {
|
||||
// tools.alsoAllow legacy migration intentionally omitted (field not shipped in prod).
|
||||
|
||||
export const LEGACY_CONFIG_MIGRATIONS_PART_3: LegacyConfigMigration[] = [
|
||||
{
|
||||
id: "memorySearch->agents.defaults.memorySearch",
|
||||
describe: "Move top-level memorySearch to agents.defaults.memorySearch",
|
||||
apply: (raw, changes) => {
|
||||
const legacyMemorySearch = getRecord(raw.memorySearch);
|
||||
if (!legacyMemorySearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
const agents = ensureRecord(raw, "agents");
|
||||
const defaults = ensureRecord(agents, "defaults");
|
||||
const existing = getRecord(defaults.memorySearch);
|
||||
if (!existing) {
|
||||
defaults.memorySearch = legacyMemorySearch;
|
||||
changes.push("Moved memorySearch → agents.defaults.memorySearch.");
|
||||
} else {
|
||||
mergeMissing(existing, legacyMemorySearch);
|
||||
defaults.memorySearch = existing;
|
||||
changes.push(
|
||||
"Merged memorySearch → agents.defaults.memorySearch (preserved explicit agents.defaults overrides).",
|
||||
);
|
||||
}
|
||||
|
||||
agents.defaults = defaults;
|
||||
raw.agents = agents;
|
||||
delete raw.memorySearch;
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "auth.anthropic-claude-cli-mode-oauth",
|
||||
describe: "Switch anthropic:claude-cli auth profile mode to oauth",
|
||||
|
||||
Reference in New Issue
Block a user