ccstatusline-usage 2.0.33 → 2.0.35
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/README.md +12 -2
- package/dist/ccstatusline.js +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ To use the enhanced configuration, copy `defaults/settings-enhanced.json` to you
|
|
|
56
56
|
- [API Documentation](#-api-documentation)
|
|
57
57
|
- [Development](#️-development)
|
|
58
58
|
- [Contributing](#-contributing)
|
|
59
|
+
- [Uninstall](#️-uninstall)
|
|
59
60
|
- [License](#-license)
|
|
60
61
|
- [Related Projects](#-related-projects)
|
|
61
62
|
|
|
@@ -207,10 +208,10 @@ bunx ccstatusline-usage@latest
|
|
|
207
208
|
npx ccstatusline-usage@latest
|
|
208
209
|
|
|
209
210
|
# Or with Yarn
|
|
210
|
-
yarn dlx ccstatusline@latest
|
|
211
|
+
yarn dlx ccstatusline-usage@latest
|
|
211
212
|
|
|
212
213
|
# Or with pnpm
|
|
213
|
-
pnpm dlx ccstatusline@latest
|
|
214
|
+
pnpm dlx ccstatusline-usage@latest
|
|
214
215
|
```
|
|
215
216
|
|
|
216
217
|
### Windows-Specific Features
|
|
@@ -627,6 +628,15 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
627
628
|
|
|
628
629
|
---
|
|
629
630
|
|
|
631
|
+
## 🗑️ Uninstall
|
|
632
|
+
|
|
633
|
+
```bash
|
|
634
|
+
npm uninstall -g ccstatusline-usage
|
|
635
|
+
rm -rf ~/.npm/_npx ~/.config/ccstatusline ~/.cache/ccstatusline*
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
630
640
|
## 📄 License
|
|
631
641
|
|
|
632
642
|
[MIT](LICENSE) © Matthew Breedlove
|
package/dist/ccstatusline.js
CHANGED
|
@@ -39325,8 +39325,8 @@ var readFile = fs2.promises.readFile;
|
|
|
39325
39325
|
var writeFile = fs2.promises.writeFile;
|
|
39326
39326
|
var mkdir = fs2.promises.mkdir;
|
|
39327
39327
|
var CCSTATUSLINE_COMMANDS = {
|
|
39328
|
-
NPM: "npx -y ccstatusline@latest",
|
|
39329
|
-
BUNX: "bunx -y ccstatusline@latest",
|
|
39328
|
+
NPM: "npx -y ccstatusline-usage@latest",
|
|
39329
|
+
BUNX: "bunx -y ccstatusline-usage@latest",
|
|
39330
39330
|
SELF_MANAGED: "ccstatusline"
|
|
39331
39331
|
};
|
|
39332
39332
|
function getClaudeConfigDir() {
|
|
@@ -51450,7 +51450,7 @@ import { execSync as execSync3 } from "child_process";
|
|
|
51450
51450
|
import * as fs5 from "fs";
|
|
51451
51451
|
import * as path4 from "path";
|
|
51452
51452
|
var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils";
|
|
51453
|
-
var PACKAGE_VERSION = "2.0.
|
|
51453
|
+
var PACKAGE_VERSION = "2.0.35";
|
|
51454
51454
|
function getPackageVersion() {
|
|
51455
51455
|
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
51456
51456
|
return PACKAGE_VERSION;
|
|
@@ -54683,8 +54683,10 @@ class ContextBarWidget {
|
|
|
54683
54683
|
const cw = context.data?.context_window;
|
|
54684
54684
|
if (!cw)
|
|
54685
54685
|
return null;
|
|
54686
|
-
const total = cw.context_window_size
|
|
54687
|
-
const used = cw.current_usage
|
|
54686
|
+
const total = Number(cw.context_window_size) || 200000;
|
|
54687
|
+
const used = Number(cw.current_usage) || 0;
|
|
54688
|
+
if (isNaN(total) || isNaN(used))
|
|
54689
|
+
return null;
|
|
54688
54690
|
const percent = total > 0 ? used / total * 100 : 0;
|
|
54689
54691
|
const usedK = Math.round(used / 1000);
|
|
54690
54692
|
const totalK = Math.round(total / 1000);
|