chore(parse): use template literal for warning, add .hh test case

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/5591f1ba-9032-4706-b007-effb0df46eb8

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-18 06:46:45 +00:00 committed by GitHub
parent af81512f61
commit 350b1ece63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -386,10 +386,10 @@ export async function runChunkedParseAndResolve(
if (chunkHasWorkerUnsafeFiles && !hasWarnedAboutCppChunks) {
hasWarnedAboutCppChunks = true;
logger.warn(
'C/C++ files detected — parsing those chunks in sequential mode to avoid known ' +
'worker-thread native binding errors (e.g. `Napi::Error`). C/C++ source files ' +
'are still fully indexed; chunks with no C/C++ continue using workers. ' +
'Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.',
`C/C++ files detected — parsing those chunks in sequential mode to avoid known ` +
`worker-thread native binding errors (e.g. \`Napi::Error\`). C/C++ source files ` +
`are still fully indexed; chunks with no C/C++ continue using workers. ` +
`Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.`,
);
}
chunkWorkerData = await processParsing(

View file

@ -29,9 +29,10 @@ describe('hasWorkerUnsafeLanguages', () => {
expect(hasWorkerUnsafeLanguages([{ path: 'include/api.h', size: 100 }])).toBe(true);
});
it('returns true when C++ header files (.hpp, .hxx) are present', () => {
it('returns true when C++ header files (.hpp, .hxx, .hh) are present', () => {
expect(hasWorkerUnsafeLanguages([{ path: 'include/api.hpp', size: 100 }])).toBe(true);
expect(hasWorkerUnsafeLanguages([{ path: 'include/core.hxx', size: 100 }])).toBe(true);
expect(hasWorkerUnsafeLanguages([{ path: 'include/util.hh', size: 100 }])).toBe(true);
});
it('returns false for an empty list', () => {