modelInfoForCategory method
Full ModelInfo for the model currently loaded under category, or
null when nothing is loaded for it.
Wraps current with includeModelMetadata = true so callers (e.g. view
models surfacing the loaded model's display name / framework) get the
populated proto instead of reconstructing a stand-in.
Implementation
Future<ModelInfo?> modelInfoForCategory(ModelCategory category) async {
final result = await current(
CurrentModelRequest(category: category, includeModelMetadata: true),
);
if (!result.found || !result.hasModel()) return null;
return result.model;
}