MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / fetchSyncProgress

Function fetchSyncProgress

src/stores/apiServer.ts:435–447  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

433 }
434
435 async function fetchSyncProgress() {
436 if (!isWebMode.value) return
437 try {
438 const list = await fetchWithAuth('/_web/automation/sync-progress').then((r) => r.json())
439 const map = new Map<string, { current: number; pages: number }>()
440 for (const item of list as Array<{ sessionId: string; current: number; pages: number; done: boolean }>) {
441 if (!item.done) map.set(item.sessionId, { current: item.current, pages: item.pages })
442 }
443 syncProgress.value = map
444 } catch {
445 /* ignore */
446 }
447 }
448
449 async function removeImportSession(sourceId: string, sessionId: string, deleteData?: boolean) {
450 try {

Callers 1

pollDataSourceUpdatesFunction · 0.85

Calls 2

fetchWithAuthFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected