MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / maybeTakePrePhraseSnapshot

Method maybeTakePrePhraseSnapshot

src/core/HatTokenMap.ts:129–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 }
128
129 private async maybeTakePrePhraseSnapshot() {
130 const phraseStartSignal = this.graph.commandServerApi?.signals?.prePhrase;
131
132 if (phraseStartSignal != null) {
133 const newSignalVersion = await phraseStartSignal.getVersion();
134
135 if (newSignalVersion !== this.lastSignalVersion) {
136 this.graph.debug.log("taking snapshot");
137 this.lastSignalVersion = newSignalVersion;
138
139 if (newSignalVersion != null) {
140 this.takePrePhraseSnapshot();
141 }
142 }
143 }
144 }
145
146 private takePrePhraseSnapshot() {
147 if (this.prePhraseMapSnapshot != null) {

Callers 2

getActiveMapMethod · 0.95
getReadableMapMethod · 0.95

Calls 3

takePrePhraseSnapshotMethod · 0.95
getVersionMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected