MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / getBlockHighlightAtom

Method getBlockHighlightAtom

frontend/app/block/block-model.ts:22–35  ·  view source on GitHub ↗
(blockId: string)

Source from the content-addressed store, hash-verified

20 }
21
22 getBlockHighlightAtom(blockId: string): jotai.Atom<BlockHighlightType | null> {
23 let atom = this.blockHighlightAtomCache.get(blockId);
24 if (!atom) {
25 atom = jotai.atom((get) => {
26 const highlight = get(this.blockHighlightAtom);
27 if (highlight?.blockId === blockId) {
28 return highlight;
29 }
30 return null;
31 });
32 this.blockHighlightAtomCache.set(blockId, atom);
33 }
34 return atom;
35 }
36
37 setBlockHighlight(highlight: BlockHighlightType | null) {
38 globalStore.set(this.blockHighlightAtom, highlight);

Callers 1

blockframe.tsxFile · 0.80

Calls 2

getMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected