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

Method constructor

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

Source from the content-addressed store, hash-verified

161 private listeners: Array<(models: Model[]) => void> = [];
162
163 private constructor() {
164 // Load custom servers from localStorage on init
165 this.loadCustomServersFromStorage();
166
167 // Subscribe to underlying model managers and forward state changes
168 // This makes ModelManager the single source of truth for all model state
169 GemmaModelManager.getInstance().onStateChange(() => {
170 this.notifyListeners();
171 });
172
173 if (isTauri()) {
174 NativeLlmManager.getInstance().onStateChange(() => {
175 this.notifyListeners();
176 });
177 }
178 }
179
180 public static getInstance(): ModelManager {
181 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