MCPcopy
hub / github.com/anomalyco/opencode / decode

Function decode

packages/desktop/src/main/wsl/runtime.ts:178–181  ·  view source on GitHub ↗
(chunk: Buffer)

Source from the content-addressed store, hash-verified

176 let decoder: TextDecoder | undefined
177 return {
178 decode(chunk: Buffer) {
179 decoder ??= new TextDecoder(detectOutputEncoding(chunk))
180 return decoder.decode(chunk, { stream: true })
181 },
182 flush() {
183 return decoder?.decode() ?? ""
184 },

Callers

nothing calls this directly

Calls 1

detectOutputEncodingFunction · 0.85

Tested by

no test coverage detected