MCPcopy Create free account
hub / github.com/codeaashu/claude-code / writeFn

Function writeFn

src/utils/asciicast.ts:173–184  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

171
172 const writer = createBufferedWriter({
173 writeFn(content: string) {
174 // Use recordingState.filePath (mutable) so writes follow renames from --resume
175 const currentPath = recordingState.filePath
176 if (!currentPath) {
177 return
178 }
179 pendingWrite = pendingWrite
180 .then(() => appendFile(currentPath, content))
181 .catch(() => {
182 // Silently ignore write errors — don't break the session
183 })
184 },
185 flushIntervalMs: 500,
186 maxBufferSize: 50,
187 maxBufferBytes: 10 * 1024 * 1024, // 10MB

Callers 3

flushFunction · 0.85
flushDeferredFunction · 0.85
writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected