MCPcopy
hub / github.com/wavetermdev/waveterm / onTreeStateAtomUpdated

Method onTreeStateAtomUpdated

frontend/layout/lib/layoutModel.ts:708–713  ·  view source on GitHub ↗

* Callback that is invoked when the upstream tree state has been updated. This ensures the model is updated if the atom is not fully loaded when the model is first instantiated. * @param force Whether to force the local tree state to update, regardless of whether the state is already up to date

(force = false)

Source from the content-addressed store, hash-verified

706 * @param force Whether to force the local tree state to update, regardless of whether the state is already up to date.
707 */
708 async onTreeStateAtomUpdated(force = false) {
709 if (force) {
710 this.updateTree();
711 this.setter(this.localTreeStateAtom, { ...this.treeState });
712 }
713 }
714
715 /**
716 * Set the upstream tree state atom to the value of the local tree state.

Callers 1

useTileLayoutFunction · 0.80

Calls 1

updateTreeMethod · 0.95

Tested by

no test coverage detected