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

Method constructor

app/src/utils/ModelManager.ts:175–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 private listeners: Array<(models: Model[]) => void> = [];
174
175 private constructor() {
176 // Load custom servers from localStorage on init
177 this.loadCustomServersFromStorage();
178
179 // Subscribe to underlying model managers and forward state changes
180 // This makes ModelManager the single source of truth for all model state
181 GemmaModelManager.getInstance().onStateChange(() => {
182 this.notifyListeners();
183 });
184
185 if (isTauri()) {
186 NativeLlmManager.getInstance().onStateChange(() => {
187 this.notifyListeners();
188 });
189 }
190 }
191
192 public static getInstance(): ModelManager {
193 if (!ModelManager.instance) {

Callers

nothing calls this directly

Calls 5

notifyListenersMethod · 0.95
isTauriFunction · 0.90
onStateChangeMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected