@staff0rd/assist 0.401.0 → 0.402.0

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/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.401.0",
9
+ version: "0.402.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -26725,6 +26725,13 @@ function registerSessions(program2) {
26725
26725
  // src/commands/statusLine.ts
26726
26726
  import chalk198 from "chalk";
26727
26727
 
26728
+ // src/shared/contextLevel.ts
26729
+ function contextLevel(pct) {
26730
+ if (pct >= 30) return "red";
26731
+ if (pct >= 20) return "yellow";
26732
+ return "dim";
26733
+ }
26734
+
26728
26735
  // src/commands/buildLimitsSegment.ts
26729
26736
  import chalk197 from "chalk";
26730
26737
 
@@ -26861,9 +26868,14 @@ function formatNumber(num) {
26861
26868
  }
26862
26869
  function colorizePercent(pct) {
26863
26870
  const label2 = `${Math.round(pct)}%`;
26864
- if (pct > 80) return chalk198.red(label2);
26865
- if (pct > 40) return chalk198.yellow(label2);
26866
- return label2;
26871
+ switch (contextLevel(pct)) {
26872
+ case "red":
26873
+ return chalk198.red(label2);
26874
+ case "yellow":
26875
+ return chalk198.yellow(label2);
26876
+ default:
26877
+ return label2;
26878
+ }
26867
26879
  }
26868
26880
  async function statusLine() {
26869
26881
  const inputData = await readStdin();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.401.0",
3
+ "version": "0.402.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {