mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 23:12:22 +02:00
Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
14 lines
568 B
JavaScript
14 lines
568 B
JavaScript
// Older saved turns kept image fields only inside the tool's JSON output.
|
|
export function generatedImageResult(event) {
|
|
if (!event || event.error || (event.exit_code != null && event.exit_code !== 0)) return null;
|
|
if (event.image_url) return event;
|
|
if (!['generate_image', 'edit_image'].includes(event.tool) || typeof event.output !== 'string') return null;
|
|
try {
|
|
const result = JSON.parse(event.output);
|
|
if (result.error || !result.image_url || typeof result.image_url !== 'string') return null;
|
|
return result;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|