Preserve resolver display mode when auto-opening for missing models
Add openResolverForDetectedMissingModels() in model_resolver.js to keep the current resolver display state when missing models are detected: if the resolver dialog is already visible, schedule an active workflow refresh instead of re-activating the button; if it is hidden, activate the resolver button as before. Update the auto-open-on-missing path to use the new method, and adjust/add tests to cover the preserved display mode behavior.
This commit is contained in:
@@ -1069,6 +1069,15 @@ export class ModelResolver {
|
||||
return localStorage.getItem('ModelResolver.autoOpenOnMissing') === 'true';
|
||||
}
|
||||
|
||||
openResolverForDetectedMissingModels() {
|
||||
if (this.dialog?.isVisible?.()) {
|
||||
this.dialog.scheduleActiveWorkflowRefresh?.('auto-open-missing-models');
|
||||
return;
|
||||
}
|
||||
|
||||
this.activateResolverButton();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check for missing models and auto-open dialog if any are found
|
||||
@@ -1121,7 +1130,7 @@ export class ModelResolver {
|
||||
// Auto-open dialog if there are missing models
|
||||
if (data.total_missing > 0) {
|
||||
log.debug(`Model Resolver: Found ${data.total_missing} missing model(s), opening dialog...`);
|
||||
this.openResolverManager();
|
||||
this.openResolverForDetectedMissingModels();
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user