const Database = require('better-sqlite3');
const db = new Database('d:/workspace/AuraK/data/metadata.db');

try {
    const session = db.prepare('SELECT id, messages FROM assessment_sessions WHERE messages IS NOT NULL AND messages != "[]" ORDER BY created_at DESC LIMIT 1').get();
    if (session) {
        console.log('ID:', session.id);
        console.log('MESSAGES:', session.messages);
    } else {
        console.log('No sessions with messages found.');
    }
} catch (e) {
    console.error(e);
} finally {
    db.close();
}
