fix: retain source continuation and explain request reservation pauses
This commit is contained in:
@@ -95,6 +95,7 @@ export function readText(project, relative) {
|
||||
|
||||
export function readLines(project, args) {
|
||||
const file = readText(project, args.path);
|
||||
if (args.expected_sha256 !== undefined && args.expected_sha256.toLowerCase() !== file.sha256) throw new Error('文件SHA256已变化,原分页不能继续拼接;请从新版本重新读取并核对。');
|
||||
const lines = file.content.split('\n');
|
||||
const start = Math.max(1, Number(args.start_line) || 1);
|
||||
const end = Math.min(lines.length, start + 299, Math.max(start, Number(args.end_line) || start + 199));
|
||||
|
||||
Reference in New Issue
Block a user