MCPcopy Index your code
hub / github.com/anomalyco/opencode / decodeChunk

Function decodeChunk

packages/core/src/tool/read-filesystem.ts:161–162  ·  view source on GitHub ↗
(resource: string, decoder: TextDecoder, bytes: Uint8Array)

Source from the content-addressed store, hash-verified

159 },
160 })
161const decodeChunk = (resource: string, decoder: TextDecoder, bytes: Uint8Array) =>
162 bytes.includes(0) ? Effect.fail(new BinaryFileError({ resource })) : decodeUtf8(resource, decoder, bytes)
163
164export const inspect = Effect.fn("ReadTool.inspect")(function* (fs: FSUtil.Interface, input: string) {
165 const info = yield* fs.stat(input)

Callers 1

read-filesystem.tsFile · 0.85

Calls 1

decodeUtf8Function · 0.70

Tested by

no test coverage detected