hedgequantx 2.4.39 → 2.4.41

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.4.39",
3
+ "version": "2.4.41",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -115,9 +115,10 @@ const refreshStats = async () => {
115
115
 
116
116
  /**
117
117
  * Display application banner
118
+ * @param {boolean} [clear=true] - Whether to clear screen first
118
119
  */
119
- const banner = async () => {
120
- console.clear();
120
+ const banner = async (clear = true) => {
121
+ if (clear) console.clear();
121
122
 
122
123
  const termWidth = process.stdout.columns || 100;
123
124
  const isMobile = termWidth < 60;
@@ -240,9 +241,10 @@ const run = async () => {
240
241
  while (true) {
241
242
  try {
242
243
  prepareStdin();
243
- await banner();
244
244
 
245
245
  if (!connections.isConnected()) {
246
+ console.clear();
247
+ await banner(false);
246
248
  const choice = await mainMenu();
247
249
 
248
250
  if (choice === 'exit') {
@@ -260,8 +262,10 @@ const run = async () => {
260
262
  await refreshStats();
261
263
  }
262
264
  } else {
263
- // Refresh stats before showing dashboard
265
+ // Refresh stats BEFORE clearing screen, so everything displays at once
264
266
  await refreshStats();
267
+ console.clear();
268
+ await banner(false);
265
269
 
266
270
  const action = await dashboardMenu(currentService);
267
271
 
@@ -85,7 +85,6 @@ const nativePrompt = (message) => {
85
85
  */
86
86
  const waitForEnter = async (message = 'PRESS ENTER TO CONTINUE...') => {
87
87
  await nativePrompt(message);
88
- console.clear();
89
88
  };
90
89
 
91
90
  /**