MCPcopy
hub / github.com/Eugeny/tabby / observeTabCompletion

Method observeTabCompletion

tabby-core/src/services/app.service.ts:410–419  ·  view source on GitHub ↗

* Returns an observable that fires once * the tab's internal "process" (see [[BaseTabProcess]]) completes

(tab: BaseTabComponent)

Source from the content-addressed store, hash-verified

408 * the tab's internal "process" (see [[BaseTabProcess]]) completes
409 */
410 observeTabCompletion (tab: BaseTabComponent): Observable<void> {
411 if (!this.completionObservers.has(tab)) {
412 const observer = new CompletionObserver(tab)
413 observer.destroyed$.subscribe(() => {
414 this.stopObservingTabCompletion(tab)
415 })
416 this.completionObservers.set(tab, observer)
417 }
418 return this.completionObservers.get(tab)!.done$
419 }
420
421 stopObservingTabCompletion (tab: BaseTabComponent): void {
422 this.completionObservers.delete(tab)

Callers 1

getItemsMethod · 0.80

Calls 3

setMethod · 0.80
subscribeMethod · 0.45

Tested by

no test coverage detected