hedgequantx 1.2.102 → 1.2.104
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/package.json +1 -1
- package/src/pages/algo.js +9 -3
package/package.json
CHANGED
package/src/pages/algo.js
CHANGED
|
@@ -677,11 +677,12 @@ const launchAlgo = async (service, account, contract, numContracts, dailyTarget,
|
|
|
677
677
|
console.log(chalk.cyan(BOT));
|
|
678
678
|
|
|
679
679
|
// Logs (without borders) - newest first, show more logs
|
|
680
|
+
// Align with left border of rectangle above (║ = 1 char + 1 space)
|
|
680
681
|
const MAX_VISIBLE_LOGS = 25;
|
|
681
682
|
console.log();
|
|
682
683
|
|
|
683
684
|
if (logs.length === 0) {
|
|
684
|
-
console.log(chalk.gray('
|
|
685
|
+
console.log(chalk.gray(' Waiting for activity...') + '\x1B[K');
|
|
685
686
|
// Fill remaining lines with empty
|
|
686
687
|
for (let i = 0; i < MAX_VISIBLE_LOGS - 1; i++) {
|
|
687
688
|
console.log('\x1B[K');
|
|
@@ -692,7 +693,8 @@ const launchAlgo = async (service, account, contract, numContracts, dailyTarget,
|
|
|
692
693
|
reversedLogs.forEach(log => {
|
|
693
694
|
const color = typeColors[log.type] || chalk.white;
|
|
694
695
|
const icon = getIcon(log.type);
|
|
695
|
-
|
|
696
|
+
// Align with rectangle: 1 space to match content after ║
|
|
697
|
+
const logLine = ` [${log.timestamp}] ${icon} ${log.message}`;
|
|
696
698
|
console.log(color(logLine) + '\x1B[K');
|
|
697
699
|
});
|
|
698
700
|
// Fill remaining lines with empty to keep fixed height
|
|
@@ -959,8 +961,12 @@ const launchAlgo = async (service, account, contract, numContracts, dailyTarget,
|
|
|
959
961
|
hqxServer.disconnect();
|
|
960
962
|
algoRunning = false;
|
|
961
963
|
|
|
962
|
-
//
|
|
964
|
+
// Small delay to ensure all cleanup is done
|
|
965
|
+
await new Promise(r => setTimeout(r, 500));
|
|
966
|
+
|
|
967
|
+
// Clear screen, show cursor, and show final result
|
|
963
968
|
console.clear();
|
|
969
|
+
process.stdout.write('\x1B[?25h'); // Make sure cursor is visible
|
|
964
970
|
|
|
965
971
|
console.log();
|
|
966
972
|
if (stopReason === 'target') {
|