sam-coder-cli 1.0.53 → 1.0.55
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/bin/agi-animation.js +19 -5
- package/package.json +1 -1
package/bin/agi-animation.js
CHANGED
|
@@ -864,8 +864,11 @@ async function runAGIAnimation() {
|
|
|
864
864
|
await sleep(1000);
|
|
865
865
|
|
|
866
866
|
// PHASE 10: Consciousness Awakening (2 seconds - 60 frames)
|
|
867
|
-
// Play consciousness sound (non-blocking)
|
|
868
|
-
|
|
867
|
+
// Play consciousness sound (completely non-blocking with timeout)
|
|
868
|
+
Promise.race([
|
|
869
|
+
sound.playConsciousnessSound().catch(() => {}),
|
|
870
|
+
new Promise(resolve => setTimeout(resolve, 1000)) // 1 second timeout
|
|
871
|
+
]).catch(() => {});
|
|
869
872
|
|
|
870
873
|
const consciousnessFrames = [];
|
|
871
874
|
const brainWidth = Math.min(60, Math.floor(width * 0.7));
|
|
@@ -967,6 +970,10 @@ async function runAGIAnimation() {
|
|
|
967
970
|
frameCount++;
|
|
968
971
|
}
|
|
969
972
|
|
|
973
|
+
// Debug: Confirm consciousness phase completed
|
|
974
|
+
console.log('\n[DEBUG] Consciousness phase completed, starting galaxy formation...');
|
|
975
|
+
await sleep(1000);
|
|
976
|
+
|
|
970
977
|
// PHASE 11: Galaxy Formation (2 seconds - 60 frames)
|
|
971
978
|
// Play galaxy sound (non-blocking)
|
|
972
979
|
sound.playGalaxySound().catch(() => {});
|
|
@@ -1411,7 +1418,16 @@ async function runAGIAnimation() {
|
|
|
1411
1418
|
safeWrite(chalk.gray(centerText('\n\n[ SYSTEM READY ]')));
|
|
1412
1419
|
safeWrite(chalk.dim(centerText('\n\nPress any key to continue...')));
|
|
1413
1420
|
|
|
1414
|
-
|
|
1421
|
+
// Wait for actual user input
|
|
1422
|
+
await new Promise(resolve => {
|
|
1423
|
+
process.stdin.setRawMode(true);
|
|
1424
|
+
process.stdin.resume();
|
|
1425
|
+
process.stdin.once('data', () => {
|
|
1426
|
+
process.stdin.setRawMode(false);
|
|
1427
|
+
process.stdin.pause();
|
|
1428
|
+
resolve();
|
|
1429
|
+
});
|
|
1430
|
+
});
|
|
1415
1431
|
|
|
1416
1432
|
const totalTime = Date.now() - startTime;
|
|
1417
1433
|
const actualFPS = Math.round(frameCount / (totalTime / 1000));
|
|
@@ -1421,8 +1437,6 @@ async function runAGIAnimation() {
|
|
|
1421
1437
|
console.log(chalk.gray(`\n\nAnimation completed: ${frameCount} frames in ${totalTime}ms (${actualFPS} FPS)`));
|
|
1422
1438
|
}
|
|
1423
1439
|
|
|
1424
|
-
await sleep(1000);
|
|
1425
|
-
|
|
1426
1440
|
} finally {
|
|
1427
1441
|
process.stdout.write(ANSI.showCursor);
|
|
1428
1442
|
clearScreen();
|