Files
html/api/ambre-find-result.php
2026-04-22 11:00:03 +02:00

29 lines
1.1 KiB
PHP

<?php
header("Content-Type: text/plain");
$c = @file_get_contents("/var/www/html/wevia.html");
// Find how the result payload is handled in SSE (type === "result")
$pos = strpos($c, "type === 'result'");
while ($pos !== false && $pos < 250000) {
echo "=== Position $pos ===\n";
echo substr($c, $pos, 800);
echo "\n\n---\n";
$pos = strpos($c, "type === 'result'", $pos + 10);
if ($pos > strpos($c, "type === 'result'") + 100) break;
}
// Also check the 'schema' output handling
$pos2 = strpos($c, "Schema Mermaid");
echo "\n\n=== Schema Mermaid: $pos2 ===\n";
if ($pos2 !== false) echo substr($c, max(0, $pos2 - 500), 1200);
// Check if the result step handles mermaid_code field
echo "\n\n=== Look for mermaid_code field handler ===\n";
if (preg_match_all('/mermaid_code[^,;]{0,300}/', $c, $m)) {
foreach (array_slice($m[0], 0, 5) as $match) echo " " . substr($match, 0, 200) . "\n";
}
// Also Resultat phase 5/5 rendering
$pos3 = strpos($c, "Resultat");
echo "\n\n=== Resultat: $pos3 ===\n";
if ($pos3 !== false) echo substr($c, max(0, $pos3 - 100), 900);