MCPcopy
hub / github.com/coder/mux / constructor

Method constructor

src/browser/stores/PRStatusStore.ts:190–211  ·  view source on GitHub ↗
(
    runtimeStatusStore:
      | PassiveRuntimeDeps
      | Pick<RuntimeStatusStore, "getStatus"> = getRuntimeStatusStore()
  )

Source from the content-addressed store, hash-verified

188 constructor(runtimeStatusStore?: PassiveRuntimeDeps);
189 constructor(runtimeStatusStore?: Pick<RuntimeStatusStore, "getStatus">);
190 constructor(
191 runtimeStatusStore:
192 | PassiveRuntimeDeps
193 | Pick<RuntimeStatusStore, "getStatus"> = getRuntimeStatusStore()
194 ) {
195 this.runtimeStatusStore = {
196 getStatus: (workspaceId) => runtimeStatusStore.getStatus(workspaceId),
197 subscribeKey:
198 "subscribeKey" in runtimeStatusStore
199 ? (workspaceId, listener) => runtimeStatusStore.subscribeKey(workspaceId, listener)
200 : () => () => undefined,
201 };
202 this.refreshController = new RefreshController({
203 onRefresh: () => this.refreshAll(),
204 onRefreshError: (failure) => {
205 console.error("[PRStatusStore] refresh failed:", failure.errorMessage);
206 },
207 debounceMs: 5000,
208 refreshOnFocus: true,
209 focusDebounceMs: 1000,
210 });
211 }
212
213 setClient(client: RouterClient<AppRouter> | null): void {
214 this.client = client;

Callers

nothing calls this directly

Calls 3

refreshAllMethod · 0.95
subscribeKeyMethod · 0.80
getStatusMethod · 0.65

Tested by

no test coverage detected