mirror of
https://github.com/hansjone/dsh-search-mcp.git
synced 2026-10-17 16:53:19 +08:00
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:
parent
c1fed965b1
commit
ae0353dd12
4 changed files with 38 additions and 11 deletions
11
lib/index.js
11
lib/index.js
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue