diff --git a/client.js b/client.js index d32bd1c..6854f62 100644 --- a/client.js +++ b/client.js @@ -750,6 +750,11 @@ window.__ModuleLoader__.load({ inject: ['slots', 'locale', 'sessions', 'remote', 'remote.session', 'modelDirectories'], apply(ctx) { ctx.effect(() => ctx.locale.register(NS, { en, zh }), 'model-selector-plus: dictionaries'); + // Share brand icons with sibling plugins (e.g. omp-advisor's picker) without duplicating SVGs. + ctx.effect(() => { + window.__dshModelBrands = { brandOf, BrandIcon }; + return () => { if (window.__dshModelBrands?.brandOf === brandOf) delete window.__dshModelBrands; }; + }, 'model-selector-plus: brand icons'); // Priority -1 shadows the stock occupant (lowest priority renders). ctx.slots.inject('conversation.input.model', () => ctx.slots.register({ name: 'conversation.input.model', diff --git a/client.src.js b/client.src.js index dc1c17f..56eaf03 100644 --- a/client.src.js +++ b/client.src.js @@ -750,6 +750,11 @@ window.__ModuleLoader__.load({ inject: ['slots', 'locale', 'sessions', 'remote', 'remote.session', 'modelDirectories'], apply(ctx) { ctx.effect(() => ctx.locale.register(NS, { en, zh }), 'model-selector-plus: dictionaries'); + // Share brand icons with sibling plugins (e.g. omp-advisor's picker) without duplicating SVGs. + ctx.effect(() => { + window.__dshModelBrands = { brandOf, BrandIcon }; + return () => { if (window.__dshModelBrands?.brandOf === brandOf) delete window.__dshModelBrands; }; + }, 'model-selector-plus: brand icons'); // Priority -1 shadows the stock occupant (lowest priority renders). ctx.slots.inject('conversation.input.model', () => ctx.slots.register({ name: 'conversation.input.model', diff --git a/package.json b/package.json index 4c7a343..d16b0fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@local/model-selector-plus", - "version": "1.0.1", + "version": "1.0.2", "private": true, "type": "module", "exports": { ".": "./index.js", "./client": "./client.js" },