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

@ -215,7 +215,7 @@ async function abortTest<TApi extends Api>(model: Model<TApi>, options: OptionsF
const stream = agentLoop(userPrompt, context, config, abortController.signal);
// Abort after first tool execution
const abortPromise = (async () => {
(async () => {
for await (const event of stream) {
events.push(event);

View file

@ -444,7 +444,7 @@ describe("Context overflow error handling", () => {
console.log("Pulling gpt-oss:20b model for Ollama overflow tests...");
try {
execSync("ollama pull gpt-oss:20b", { stdio: "inherit" });
} catch (e) {
} catch (_e) {
console.warn("Failed to pull gpt-oss:20b model, tests will be skipped");
return;
}

View file

@ -554,7 +554,7 @@ describe("Cross-Provider Handoff Tests", () => {
let successCount = 0;
const totalTests = contextTests.length;
for (const { label, context, sourceModel } of contextTests) {
for (const { label, context } of contextTests) {
const success = await testProviderHandoff(model, label, context);
if (success) successCount++;
}

View file

@ -866,7 +866,7 @@ describe("Generate E2E Tests", () => {
console.log("Pulling gpt-oss:20b model for Ollama tests...");
try {
execSync("ollama pull gpt-oss:20b", { stdio: "inherit" });
} catch (e) {
} catch (_e) {
console.warn("Failed to pull gpt-oss:20b model, tests will be skipped");
return;
}

View file

@ -1,4 +1,4 @@
import { type Static, Type } from "@sinclair/typebox";
import { Type } from "@sinclair/typebox";
import { describe, expect, it } from "vitest";
import { getModel } from "../src/models.js";
import { complete, resolveApiKey } from "../src/stream.js";
@ -18,8 +18,6 @@ const calculateSchema = Type.Object({
expression: Type.String({ description: "The mathematical expression to evaluate" }),
});
type CalculateParams = Static<typeof calculateSchema>;
const calculateTool: Tool = {
name: "calculate",
description: "Evaluate mathematical expressions",