MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / addClineToStack

Method addClineToStack

src/core/webview/ClineProvider.ts:446–461  ·  view source on GitHub ↗
(task: Task)

Source from the content-addressed store, hash-verified

444 // When the task is completed, the top instance is removed, reactivating the
445 // previous task.
446 async addClineToStack(task: Task) {
447 // Add this cline instance into the stack that represents the order of
448 // all the called tasks.
449 this.clineStack.push(task)
450 task.emit(RooCodeEventName.TaskFocused)
451
452 // Perform special setup provider specific tasks.
453 await this.performPreparationTasks(task)
454
455 // Ensure getState() resolves correctly.
456 const state = await this.getState()
457
458 if (!state || typeof state.mode !== "string") {
459 throw new Error(t("common:errors.retrieve_current_mode"))
460 }
461 }
462
463 async performPreparationTasks(cline: Task) {
464 // LMStudio: We need to force model loading in order to read its context

Calls 4

getStateMethod · 0.95
tFunction · 0.90
emitMethod · 0.65

Tested by

no test coverage detected