MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / #bridgeSelectors

Method #bridgeSelectors

packages/angular/src/lib/threads.ts:490–511  ·  view source on GitHub ↗

* Subscribes each core selector to its mirroring writable signal. The * `select` operator emits the current value synchronously on subscribe, so * the signals are seeded immediately and stay current thereafter.

()

Source from the content-addressed store, hash-verified

488 * the signals are seeded immediately and stay current thereafter.
489 */
490 #bridgeSelectors(): void {
491 this.#subscriptions.push(
492 this.#store.select(ɵselectThreads).subscribe((threads) => {
493 this.#threads.set(threads.map(projectThread));
494 }),
495 this.#store.select(ɵselectThreadsIsLoading).subscribe((value) => {
496 this.#storeIsLoading.set(value);
497 }),
498 this.#store.select(ɵselectThreadsError).subscribe((value) => {
499 this.#storeError.set(value);
500 }),
501 this.#store.select(ɵselectHasNextPage).subscribe((value) => {
502 this.#hasMoreThreads.set(value);
503 }),
504 this.#store.select(ɵselectIsFetchingNextPage).subscribe((value) => {
505 this.#isFetchingMoreThreads.set(value);
506 }),
507 this.#store.select(ɵselectIsMutating).subscribe((value) => {
508 this.#isMutating.set(value);
509 }),
510 );
511 }
512
513 /**
514 * Wraps a mutation so that, when thread mutations are unavailable on the

Callers 1

constructorMethod · 0.95

Calls 4

pushMethod · 0.65
subscribeMethod · 0.65
selectMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected