Fix Desktop boot failure from unconditional settings.plugin.item inject.

Always register settings.section; mount the Web plugins card only after configForms attaches. Harden snapshot store init (0.2.4).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-10 01:37:47 +08:00
parent c1fed965b1
commit ae0353dd12
4 changed files with 38 additions and 11 deletions

View file

@ -93,8 +93,15 @@ export function apply(ctx, config) {
onChange: () => {},
};
if (typeof settings?.installSection === 'function') {
settings.installSection(ctx, SEARCH_MCP_SETTINGS_NAMESPACE, Config, config, hooks);
return;
try {
settings.installSection(ctx, SEARCH_MCP_SETTINGS_NAMESPACE, Config, config, hooks);
return;
} catch (error) {
settingsCtx.logger?.warn?.(
'dsh-search-mcp: installSection failed (will try register/describe): %s',
error instanceof Error ? error.message : error,
);
}
}
// ≤0.1.5 / some Desktop builds: explicit namespace registration.
// ≥0.1.7: Config is projected from the Loader entry — register may be