@staff0rd/assist 0.89.2 → 0.90.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -8
  2. package/package.json +1 -1
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.89.2",
9
+ version: "0.90.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -5970,9 +5970,16 @@ function run2(name, args) {
5970
5970
  }
5971
5971
 
5972
5972
  // src/commands/statusLine.ts
5973
+ import chalk52 from "chalk";
5973
5974
  function formatNumber(num) {
5974
5975
  return num.toLocaleString("en-US");
5975
5976
  }
5977
+ function colorizePercent(pct) {
5978
+ const label2 = `${pct}%`;
5979
+ if (pct > 80) return chalk52.red(label2);
5980
+ if (pct > 40) return chalk52.yellow(label2);
5981
+ return label2;
5982
+ }
5976
5983
  async function statusLine() {
5977
5984
  const inputData = await readStdin();
5978
5985
  const data = JSON.parse(inputData);
@@ -5983,7 +5990,7 @@ async function statusLine() {
5983
5990
  const formattedInput = formatNumber(totalInput);
5984
5991
  const formattedOutput = formatNumber(totalOutput);
5985
5992
  console.log(
5986
- `${model} | Tokens - ${formattedOutput} \u2191 : ${formattedInput} \u2193 | Context - ${usedPct}%`
5993
+ `${model} | Tokens - ${formattedOutput} \u2191 : ${formattedInput} \u2193 | Context - ${colorizePercent(usedPct)}`
5987
5994
  );
5988
5995
  }
5989
5996
 
@@ -5996,7 +6003,7 @@ import { fileURLToPath as fileURLToPath5 } from "url";
5996
6003
  // src/commands/sync/syncClaudeMd.ts
5997
6004
  import * as fs21 from "fs";
5998
6005
  import * as path27 from "path";
5999
- import chalk52 from "chalk";
6006
+ import chalk53 from "chalk";
6000
6007
  async function syncClaudeMd(claudeDir, targetBase) {
6001
6008
  const source = path27.join(claudeDir, "CLAUDE.md");
6002
6009
  const target = path27.join(targetBase, "CLAUDE.md");
@@ -6005,12 +6012,12 @@ async function syncClaudeMd(claudeDir, targetBase) {
6005
6012
  const targetContent = fs21.readFileSync(target, "utf-8");
6006
6013
  if (sourceContent !== targetContent) {
6007
6014
  console.log(
6008
- chalk52.yellow("\n\u26A0\uFE0F Warning: CLAUDE.md differs from existing file")
6015
+ chalk53.yellow("\n\u26A0\uFE0F Warning: CLAUDE.md differs from existing file")
6009
6016
  );
6010
6017
  console.log();
6011
6018
  printDiff(targetContent, sourceContent);
6012
6019
  const confirm = await promptConfirm(
6013
- chalk52.red("Overwrite existing CLAUDE.md?"),
6020
+ chalk53.red("Overwrite existing CLAUDE.md?"),
6014
6021
  false
6015
6022
  );
6016
6023
  if (!confirm) {
@@ -6026,7 +6033,7 @@ async function syncClaudeMd(claudeDir, targetBase) {
6026
6033
  // src/commands/sync/syncSettings.ts
6027
6034
  import * as fs22 from "fs";
6028
6035
  import * as path28 from "path";
6029
- import chalk53 from "chalk";
6036
+ import chalk54 from "chalk";
6030
6037
  async function syncSettings(claudeDir, targetBase, options2) {
6031
6038
  const source = path28.join(claudeDir, "settings.json");
6032
6039
  const target = path28.join(targetBase, "settings.json");
@@ -6038,14 +6045,14 @@ async function syncSettings(claudeDir, targetBase, options2) {
6038
6045
  if (normalizedSource !== normalizedTarget) {
6039
6046
  if (!options2?.yes) {
6040
6047
  console.log(
6041
- chalk53.yellow(
6048
+ chalk54.yellow(
6042
6049
  "\n\u26A0\uFE0F Warning: settings.json differs from existing file"
6043
6050
  )
6044
6051
  );
6045
6052
  console.log();
6046
6053
  printDiff(targetContent, sourceContent);
6047
6054
  const confirm = await promptConfirm(
6048
- chalk53.red("Overwrite existing settings.json?"),
6055
+ chalk54.red("Overwrite existing settings.json?"),
6049
6056
  false
6050
6057
  );
6051
6058
  if (!confirm) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.89.2",
3
+ "version": "0.90.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {