feat: Add persistent settings and multiple layouts support
- Add settings manager to persist symbol, timeframe, and layouts - Support multiple layouts for comprehensive chart analysis - Remove debug screenshots for cleaner logs - Update AI analysis with professional trading prompt - Add multi-screenshot analysis for better trading insights - Update analyze API to use saved settings and multiple layouts
This commit is contained in:
22
app/screenshots/[filename]/route.ts
Normal file
22
app/screenshots/[filename]/route.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
|
||||
export async function GET(
|
||||
request: NextRequest,
|
||||
context: any
|
||||
) {
|
||||
try {
|
||||
const screenshotsDir = path.join(process.cwd(), 'screenshots')
|
||||
const filePath = path.join(screenshotsDir, context.params.filename)
|
||||
const file = await fs.readFile(filePath)
|
||||
return new NextResponse(file, {
|
||||
headers: {
|
||||
'Content-Type': 'image/png',
|
||||
'Content-Disposition': `inline; filename="${context.params.filename}"`
|
||||
}
|
||||
})
|
||||
} catch (e: any) {
|
||||
return NextResponse.json({ error: e.message }, { status: 404 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user