(sourceId: string, sessionId?: string)
| 524 | } |
| 525 | |
| 526 | function generateIndexForSource(sourceId: string, sessionId?: string) { |
| 527 | const ds = dataSources.value.find((s) => s.id === sourceId) |
| 528 | if (!ds) return |
| 529 | const targets = sessionId |
| 530 | ? ds.sessions.filter((s) => s.id === sessionId && s.targetSessionId) |
| 531 | : ds.sessions.filter((s) => s.targetSessionId) |
| 532 | const indexService = useSessionIndexService() |
| 533 | const threshold = getSessionGapThreshold() |
| 534 | for (const sess of targets) { |
| 535 | indexService.generateIncremental(sess.targetSessionId, threshold).catch(() => {}) |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | function generateIndexForAllSources() { |
| 540 | const indexService = useSessionIndexService() |
no test coverage detected