MCPcopy
hub / github.com/continuedev/continue / shouldCancel

Method shouldCancel

core/indexing/docs/DocsService.ts:317–332  ·  view source on GitHub ↗
(startUrl: string, startedWithEmbedder: string)

Source from the content-addressed store, hash-verified

315
316 // Used to check periodically during indexing if should cancel indexing
317 shouldCancel(startUrl: string, startedWithEmbedder: string) {
318 // Check if aborted
319 const isAborted = this.statuses.get(startUrl)?.status === "aborted";
320 if (isAborted) {
321 return true;
322 }
323
324 // Handle embeddings provider change mid-indexing
325 if (
326 this.config.selectedModelByRole.embed?.embeddingId !== startedWithEmbedder
327 ) {
328 this.abort(startUrl);
329 return true;
330 }
331 return false;
332 }
333
334 // Determine if transformers.js embeddings are supported in this environment
335 async canUseTransformersEmbeddings() {

Callers 1

indexAndAddMethod · 0.95

Calls 2

abortMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected