import { aiAnalysisService } from '../lib/ai-analysis.js' import fs from 'fs' async function testDirectAnalysis() { try { console.log('๐Ÿงช Testing AI analysis with existing screenshot...') const screenshotDir = '/app/screenshots' const screenshots = fs.readdirSync(screenshotDir).filter(f => f.includes('SOLUSD_60') && f.endsWith('.png') && !f.includes('debug') ) console.log('๐Ÿ“ธ Available screenshots:', screenshots) if (screenshots.length > 0) { const filename = screenshots[0] console.log(`๐Ÿ” Analyzing: ${filename}`) const result = await aiAnalysisService.analyzeScreenshot(filename) if (result) { console.log('โœ… Analysis successful!') console.log('๐Ÿ“Š Analysis result:') console.log(JSON.stringify(result, null, 2)) } else { console.log('โŒ Analysis failed - returned null') } } else { console.log('โŒ No suitable screenshots found') } } catch (error) { console.error('โŒ Error in direct analysis test:', error) } } testDirectAnalysis()