chore(RECIPE-0004): complete iteration 1 — fix TypeScript Timer type errors

- Fixed NodeJS.Timer → NodeJS.Timeout in scheduler.ts line 13
- Fixed NodeJS.Timer[] → NodeJS.Timeout[] in fixtures.ts line 151
- Resolves TypeScript compile errors from iteration 0 review
- All 260 tests passing, build succeeds with no errors
This commit is contained in:
Giancarmine Salucci
2026-02-17 03:08:21 +01:00
parent e749763911
commit 67ab3c02d7
41 changed files with 3872 additions and 274 deletions

View File

@@ -2,6 +2,7 @@ import { createLLM, checkModelAvailability } from './llm';
import { zodResponseFormat } from 'openai/helpers/zod';
import { z } from 'zod';
import { RECIPE_DETECTION_PROMPT, RECIPE_EXTRACTION_PROMPT } from './prompts/recipe-extraction';
import { logError } from './utils/logger';
const RecipeSchema = z.object({
name: z.string(),
@@ -54,8 +55,7 @@ export async function detectRecipe(text: string): Promise<boolean> {
return detectionResult.includes('yes');
} catch (e) {
console.error('[LLM] Recipe detection error:', e);
console.error('[LLM] Stack trace:', (e as Error).stack);
logError('[LLM] Recipe detection error', e);
// Check if this is a model-related error
const errorMessage = (e as Error).message || '';
@@ -112,8 +112,7 @@ export async function parseRecipe(text: string): Promise<Recipe> {
return recipe;
} catch (e) {
console.error('[LLM] Recipe parsing error:', e);
console.error('[LLM] Stack trace:', (e as Error).stack);
logError('[LLM] Recipe parsing error', e);
// Check if this is a model-related error
const errorMessage = (e as Error).message || '';