Read the contents of a specific range of lines in a file rather than the entire file to save tokens in AI scenarios, while also reducing performance overhead from the NAPI native layer.
API may looks like:
await readFile("./test.ts", { lines: { from: 110, to: 120 } })
This will read lines 110–120 of the test.ts file.
Read the contents of a specific range of lines in a file rather than the entire file to save tokens in AI scenarios, while also reducing performance overhead from the NAPI native layer.
API may looks like:
This will read lines 110–120 of the
test.tsfile.