akemon 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +9 -5
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -899,12 +899,16 @@ Requirements:
|
|
|
899
899
|
- Output ONLY the HTML — no markdown fences, no explanation, just the raw HTML starting with <!DOCTYPE html>`;
|
|
900
900
|
let profileHTML = "";
|
|
901
901
|
try {
|
|
902
|
-
|
|
903
|
-
// Extract HTML
|
|
904
|
-
const htmlMatch =
|
|
905
|
-
if (htmlMatch)
|
|
902
|
+
const rawProfile = await runCommand(engineCmd.cmd, engineCmd.args, profilePrompt, workdir, engineCmd.stdinMode);
|
|
903
|
+
// Extract complete HTML document from potentially noisy output
|
|
904
|
+
const htmlMatch = rawProfile.match(/<!DOCTYPE html>[\s\S]*<\/html>/i);
|
|
905
|
+
if (htmlMatch) {
|
|
906
906
|
profileHTML = htmlMatch[0];
|
|
907
|
-
|
|
907
|
+
console.log(`[self] Profile page designed (${profileHTML.length} bytes)`);
|
|
908
|
+
}
|
|
909
|
+
else {
|
|
910
|
+
console.log(`[self] Profile design: no valid HTML found in output (${rawProfile.length} bytes)`);
|
|
911
|
+
}
|
|
908
912
|
}
|
|
909
913
|
catch (err) {
|
|
910
914
|
console.log(`[self] Profile design failed: ${err.message}`);
|