v1.0.2: share brand icons with sibling plugins (window.__dshModelBrands)

This commit is contained in:
Agent committed 2026-10-11 00:54:36 +00:00
1 parent 81630ed477
commit 6e8f93cab3
3 files changed
+11 -1

No files matched your search

+5
View File
@@ -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',