@modelstatus/cli 0.1.53 → 0.1.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/package.json +1 -1
- package/src/tui/app.js +6 -5
- package/src/tui/game/launch.js +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelstatus/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
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",
|
package/src/tui/app.js
CHANGED
|
@@ -102,7 +102,7 @@ function useTermDims() {
|
|
|
102
102
|
// cursor-up diffing, which drifts/scrolls the window off the top (and Ctrl-L
|
|
103
103
|
// can't fix it because it redraws at the same wrong height). These one-shot
|
|
104
104
|
// re-reads pick up the settled size and snap the window back to full screen.
|
|
105
|
-
const timers = [60, 250, 600].map((ms) => setTimeout(on, ms));
|
|
105
|
+
const timers = [60, 250, 600, 1200].map((ms) => setTimeout(on, ms));
|
|
106
106
|
return () => { stdout.off("resize", on); timers.forEach(clearTimeout); };
|
|
107
107
|
}, [stdout]);
|
|
108
108
|
const fw = Number(process.env.MM_TUI_WIDTH);
|
|
@@ -305,13 +305,14 @@ export const appController = {
|
|
|
305
305
|
try { this._instance && this._instance.unmount(); } catch { /* already gone */ }
|
|
306
306
|
this._instance = null;
|
|
307
307
|
},
|
|
308
|
-
/** Mount a fresh Ink tree, merging the base opts with `next` (e.g. a tab).
|
|
308
|
+
/** Mount a fresh Ink tree, merging the base opts with `next` (e.g. a tab).
|
|
309
|
+
* Only called after the in-TUI game (launch.js). */
|
|
309
310
|
remount(next = {}) {
|
|
310
311
|
const opts = { ...(this._opts || {}), ...next };
|
|
311
312
|
this._opts = opts;
|
|
312
|
-
//
|
|
313
|
-
//
|
|
314
|
-
//
|
|
313
|
+
// Clear + home so the fresh tree paints from the top. The alt-screen recycle
|
|
314
|
+
// (forcing Warp back into full-screen) + the settle pause happen in launch.js
|
|
315
|
+
// right before this, so by now the terminal reports its stable full height.
|
|
315
316
|
try { process.stdout.write("\x1b[2J\x1b[H"); } catch { /* ignore */ }
|
|
316
317
|
this._instance = render(h(Bootstrap, opts));
|
|
317
318
|
return this._instance;
|
package/src/tui/game/launch.js
CHANGED
|
@@ -81,10 +81,15 @@ export async function playGameInTui({ dir, width, height, initialView = "scan",
|
|
|
81
81
|
// TUI comes back shifted down / not full-height until the next resize. Reset
|
|
82
82
|
// the scroll region (\x1b[r), clear the screen, and home the cursor so the
|
|
83
83
|
// remounted tree fills the whole terminal from the top (same as Ctrl-L).
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
|
|
84
|
+
// RECYCLE Warp's alt screen (leave + re-enter) to force it back into clean
|
|
85
|
+
// full-screen mode — Warp drops that presentation during the game round-trip
|
|
86
|
+
// and its block header otherwise bleeds over the top rows. Then PAUSE before
|
|
87
|
+
// remounting: Warp reports its stable full-screen height a beat AFTER the
|
|
88
|
+
// ?1049h transition, so rendering immediately measures a transient (too-tall)
|
|
89
|
+
// size and clips a few rows off the top. The settle lets the height stabilize
|
|
90
|
+
// first; useTermDims also re-measures post-mount as a backstop.
|
|
91
|
+
try { process.stdout.write("\x1b[?1049l\x1b[?1049h\x1b[2J\x1b[H"); } catch { /* ignore */ }
|
|
92
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
88
93
|
appController.remount({ initialView, fresh: false });
|
|
89
94
|
} catch (e) {
|
|
90
95
|
if (onError) onError(e); else throw e;
|