Adapt dsh-mind-map plugin for Desktop 0.2 soft inject slots.

Use ui-slots/locale inject paths and host schemastery resolution so the linked plugin boots without hard settingsScope.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-09 22:46:34 +08:00
parent 20ca725493
commit 39afb07db0
3 changed files with 82 additions and 22 deletions

View file

@ -33,6 +33,10 @@ async function importHostPkg(id) {
const scoped = id.startsWith('@')
const parts = scoped ? id.split('/') : [id]
const candidates = [
join(dshHome, 'profiles', 'node_modules', ...parts, 'lib', 'index.mjs'),
join(dshHome, 'profiles', 'node_modules', ...parts, 'lib', 'index.js'),
join(dshHome, 'profiles', 'desktop', 'node_modules', ...parts, 'lib', 'index.mjs'),
join(dshHome, 'profiles', 'desktop', 'node_modules', ...parts, 'lib', 'index.js'),
join(dshHome, 'profiles', 'web', 'node_modules', ...parts, 'lib', 'index.mjs'),
join(dshHome, 'profiles', 'web', 'node_modules', ...parts, 'lib', 'index.js'),
]