Enable more biome lints and fix things

This commit is contained in:
Mario Zechner 2025-12-21 22:56:20 +01:00
parent 9c18439c4d
commit d5fd685901
57 changed files with 151 additions and 199 deletions

View file

@ -89,7 +89,7 @@ export const grepTool: AgentTool<typeof grepSchema> = {
let searchStat: Stats;
try {
searchStat = statSync(searchPath);
} catch (err) {
} catch (_err) {
settle(() => reject(new Error(`Path not found: ${searchPath}`)));
return;
}

View file

@ -126,7 +126,6 @@ export const readTool: AgentTool<typeof readSchema> = {
details = { truncation };
} else if (userLimitedLines !== undefined && startLine + userLimitedLines < allLines.length) {
// User specified limit, there's more content, but no truncation
const endLineDisplay = startLineDisplay + userLimitedLines - 1;
const remaining = allLines.length - (startLine + userLimitedLines);
const nextOffset = startLine + userLimitedLines + 1;

View file

@ -261,5 +261,5 @@ export function truncateLine(
if (line.length <= maxChars) {
return { text: line, wasTruncated: false };
}
return { text: line.slice(0, maxChars) + "... [truncated]", wasTruncated: true };
return { text: `${line.slice(0, maxChars)}... [truncated]`, wasTruncated: true };
}