forked from r.muellner/velum-raycast
fix: stream large project texts and scope API capabilities
Analyze UTF-8 text files as bounded batches of complete lines and reassemble only approved spans without loading entire files. Preserve line endings, BOM, Unicode offsets and source-change checks. Scope capability checks to selected file types, report missing features and HTTP failures, and retain the required Office image-policy handling. Cover large files, chunk boundaries, mappings and failure cleanup with regression tests.
This commit is contained in:
@@ -498,3 +498,13 @@ describe("Velum-Projektstände", () => {
|
||||
expect(project.sameEntityTypeCoverage(run, ["PERSON", "EMAIL", "URL"])).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
it("erfasst große Textdateien weiterhin, behält aber die Office-Uploadgrenze", async () => {
|
||||
const root = await fs.mkdtemp(join(tmpdir(), "velum-large-scan-")); roots.push(root);
|
||||
for (const name of ["large.txt", "large.docx"]) {
|
||||
const handle = await fs.open(join(root, name), "w"); await handle.truncate(21 * 1024 * 1024); await handle.close();
|
||||
}
|
||||
const result = await project.scanProjectFiles(root, undefined, false);
|
||||
expect(result.files.map((file) => file.relPath)).toEqual(["large.txt"]);
|
||||
expect(result.skipped).toEqual([{ path: "large.docx", reason: "Datei zu groß (Grenze: 20 MiB)" }]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user