MCPcopy Index your code
hub / github.com/simstudioai/sim / doWrite

Function doWrite

apps/sim/stores/terminal/console/storage.ts:171–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 { merge = true }: PersistOptions = {}
170): Promise<void> {
171 const doWrite = async () => {
172 try {
173 const nextData = merge ? mergePersistedConsoleData(await loadConsoleData(), data) : data
174 const serialized = JSON.stringify(nextData)
175 await set(STORE_KEY, serialized)
176 } catch (error) {
177 logger.warn('IndexedDB write failed', { error })
178 }
179 }
180
181 activeWrite = (activeWrite ?? Promise.resolve()).then(doWrite)
182 return activeWrite

Callers

nothing calls this directly

Calls 4

loadConsoleDataFunction · 0.85
warnMethod · 0.65
setFunction · 0.50

Tested by

no test coverage detected