MCPcopy Create free account
hub / github.com/Roy3838/Observer / onModelsChange

Method onModelsChange

app/src/utils/ModelManager.ts:772–777  ·  view source on GitHub ↗

* Subscribe to model list changes

(listener: (models: Model[]) => void)

Source from the content-addressed store, hash-verified

770 * Subscribe to model list changes
771 */
772 public onModelsChange(listener: (models: Model[]) => void): () => void {
773 this.listeners.push(listener);
774 return () => {
775 this.listeners = this.listeners.filter(l => l !== listener);
776 };
777 }
778
779 private notifyListeners(): void {
780 const models = this.listModels().models;

Callers 4

MCPFunction · 0.80
ObserverHeroFunction · 0.80
ModelLocationIndicatorFunction · 0.80
StaticAgentViewFunction · 0.80

Calls 2

pushMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected