Settings: saved keys a module no longer declares are dropped from the project instead of warning every run
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GiiQgYH1z4SgQNuNNAgQCV
This commit is contained in:
@@ -342,7 +342,10 @@ export function createPipelineState(rawApi, { answerMs = ANSWER_MS } = {}) {
|
||||
});
|
||||
const already = valuesAlreadyPlaced(from || slots);
|
||||
Object.entries(already).forEach(([moduleId, own]) => {
|
||||
merged[moduleId] = { ...(merged[moduleId] || {}), ...own };
|
||||
// A saved key its module no longer declares (removed or renamed) is dropped here, so it leaves the project at the next save.
|
||||
const declared = modulesById[moduleId] && modulesById[moduleId].settings;
|
||||
const kept = declared ? Object.fromEntries(Object.entries(own).filter(([name]) => name in declared)) : own;
|
||||
merged[moduleId] = { ...(merged[moduleId] || {}), ...kept };
|
||||
});
|
||||
Object.entries(from ? {} : pendingValues).forEach(([moduleId, own]) => {
|
||||
merged[moduleId] = { ...(merged[moduleId] || {}), ...own };
|
||||
|
||||
Reference in New Issue
Block a user