@modelstatus/cli 0.1.45 → 0.1.46

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": "@modelstatus/cli",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Track which AI models you use, where, and never get surprised by a retirement. Free offline model-health for any repo (mm status), browser sign-in for cloud inventory + alerts.",
5
5
  "keywords": [
6
6
  "llm",
@@ -73,7 +73,15 @@ export async function playGameInTui({ dir, width, height, initialView = "scan",
73
73
  try { if (cacheFile) fs.unlinkSync(cacheFile); } catch { /* ignore */ }
74
74
  }
75
75
 
76
- // (4) Remount the TUI where the player was (so quitting returns you there).
76
+ // (4) Reset the terminal to a clean full screen BEFORE remounting. The game
77
+ // left the alternate screen (\x1b[?1049l), which restores the PRE-game main
78
+ // buffer + cursor — i.e. wherever Ink sat when it unmounted (below the old
79
+ // frame). Ink renders its first frame from that cursor, so without this the
80
+ // TUI comes back shifted down / not full-height until the next resize. Reset
81
+ // the scroll region (\x1b[r), clear the screen, and home the cursor so the
82
+ // remounted tree fills the whole terminal from the top (same as Ctrl-L).
83
+ try { process.stdout.write("\x1b[r\x1b[2J\x1b[3J\x1b[H"); } catch { /* ignore */ }
84
+ await new Promise((r) => setImmediate(r)); // let the reset flush before Ink mounts
77
85
  appController.remount({ initialView, fresh: false });
78
86
  } catch (e) {
79
87
  if (onError) onError(e); else throw e;