@modelstatus/cli 0.1.66 → 0.1.67

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.66",
3
+ "version": "0.1.67",
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/signin.js CHANGED
@@ -19,6 +19,7 @@ export function SignIn({ apiBase, onSuccess, onSkip }) {
19
19
  const [url, setUrl] = React.useState(null);
20
20
  const [error, setError] = React.useState(null);
21
21
  const [tick, setTick] = React.useState(0);
22
+ const [attempt, setAttempt] = React.useState(0); // g from the error state bumps this → re-runs the flow
22
23
 
23
24
  // Spinner animation (80ms tick).
24
25
  React.useEffect(() => {
@@ -47,7 +48,7 @@ export function SignIn({ apiBase, onSuccess, onSkip }) {
47
48
  const poll = async () => {
48
49
  if (cancelled) return;
49
50
  if (Date.now() > deadline) {
50
- setError("The login request expired. Press q and run mm login again.");
51
+ setError("The login request expired.");
51
52
  setPhase("error");
52
53
  return;
53
54
  }
@@ -67,7 +68,7 @@ export function SignIn({ apiBase, onSuccess, onSkip }) {
67
68
  return;
68
69
  }
69
70
  if (res?.status === "denied") {
70
- setError("Authorization was denied. Press q to quit.");
71
+ setError("Authorization was denied.");
71
72
  setPhase("error");
72
73
  return;
73
74
  }
@@ -90,12 +91,13 @@ export function SignIn({ apiBase, onSuccess, onSkip }) {
90
91
  cancelled = true;
91
92
  if (pollTimer) clearTimeout(pollTimer);
92
93
  };
93
- }, [apiBase, onSuccess]);
94
+ }, [apiBase, onSuccess, attempt]);
94
95
 
95
96
  useInput((input, key) => {
96
97
  if (key.ctrl && input === "c") return exit();
97
98
  if (input === "q") return exit();
98
99
  if (input === "s" && onSkip) return onSkip();
100
+ if (input === "g" && phase === "error") { setError(null); setPhase("starting"); setAttempt((a) => a + 1); return; }
99
101
  if (input === "o" && url) openUrl(url); // re-open the browser if it didn't fire
100
102
  });
101
103
 
@@ -113,7 +115,7 @@ export function SignIn({ apiBase, onSuccess, onSkip }) {
113
115
  h(Text, { color: "red", bold: true }, " ✕ Sign-in failed"),
114
116
  h(Text, { color: "gray" }, ` ${error}`),
115
117
  h(Text, { color: "gray", dimColor: true }, ""),
116
- h(Text, { color: "gray", dimColor: true }, " press q to quit"),
118
+ h(Text, { color: "gray", dimColor: true }, " g retries · tabs 1-2 work with no account (press 1) · q quits"),
117
119
  );
118
120
  }
119
121
  // polling
@@ -379,7 +379,7 @@ export function LocalView({ client, me, dir, ui, width = 78, height = 14, active
379
379
  { color: C.FG_DIM },
380
380
  search.query
381
381
  ? ` No matches for "${search.query}" — try a broader term, or esc to clear.`
382
- : " No AI model calls here yet — this folder looks clean.",
382
+ : " No AI model calls in this folder. Run mm inside a repo that calls AI models, or press 5 to track one by name.",
383
383
  )
384
384
  : null,
385
385
  ...rowNodes,