ccstatusline 2.1.0 → 2.1.2

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 CHANGED
@@ -46,10 +46,11 @@
46
46
 
47
47
  ## 🆕 Recent Updates
48
48
 
49
- ### v2.1.0 - Usage widgets and reliability fixes
49
+ ### v2.1.0 - v2.1.1 - Usage widgets and reliability fixes
50
50
 
51
- - **🧩 New Usage widgets** - Added **Session Usage**, **Weekly Usage**, **Reset Timer**, and **Context Bar** widgets.
52
- - **📊 More accurate counts** - Usage/context widgets now use new statusline JSON metrics when available for more accurate token and context counts.
51
+ - **🧩 New Usage widgets (v2.1.0)** - Added **Session Usage**, **Weekly Usage**, **Reset Timer**, and **Context Bar** widgets.
52
+ - **📊 More accurate counts (v2.1.0)** - Usage/context widgets now use new statusline JSON metrics when available for more accurate token and context counts.
53
+ - **🪟 Windows empty file bug fix (v2.1.1)** - Fixed a Windows issue that could create an empty `c:\dev\null` file.
53
54
 
54
55
  ### v2.0.26 - v2.0.29 - Performance, git internals, and workflow improvements
55
56
 
@@ -32018,8 +32018,8 @@ var require_utils = __commonJS((exports) => {
32018
32018
  exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
32019
32019
  exports.isWindows = () => {
32020
32020
  if (typeof navigator !== "undefined" && navigator.platform) {
32021
- const platform3 = navigator.platform.toLowerCase();
32022
- return platform3 === "win32" || platform3 === "windows";
32021
+ const platform4 = navigator.platform.toLowerCase();
32022
+ return platform4 === "win32" || platform4 === "windows";
32023
32023
  }
32024
32024
  if (typeof process !== "undefined" && process.platform) {
32025
32025
  return process.platform === "win32";
@@ -51173,10 +51173,74 @@ async function saveSettings(settings) {
51173
51173
  await writeFile2(SETTINGS_PATH, JSON.stringify(settingsWithVersion, null, 2), "utf-8");
51174
51174
  }
51175
51175
 
51176
+ // src/utils/open-url.ts
51177
+ import { spawnSync } from "child_process";
51178
+ import * as os4 from "os";
51179
+ function runOpenCommand(command, args) {
51180
+ const result = spawnSync(command, args, {
51181
+ stdio: "ignore",
51182
+ windowsHide: true
51183
+ });
51184
+ if (result.error) {
51185
+ return result.error.message;
51186
+ }
51187
+ if (result.status !== 0) {
51188
+ return `Command exited with status ${result.status}`;
51189
+ }
51190
+ if (result.signal) {
51191
+ return `Command terminated by signal ${result.signal}`;
51192
+ }
51193
+ return null;
51194
+ }
51195
+ function openExternalUrl(url2) {
51196
+ let parsedUrl;
51197
+ try {
51198
+ parsedUrl = new URL(url2);
51199
+ } catch {
51200
+ return {
51201
+ success: false,
51202
+ error: "Invalid URL"
51203
+ };
51204
+ }
51205
+ if (parsedUrl.protocol !== "http:" && parsedUrl.protocol !== "https:") {
51206
+ return {
51207
+ success: false,
51208
+ error: "Only http(s) URLs are supported"
51209
+ };
51210
+ }
51211
+ const platform3 = os4.platform();
51212
+ if (platform3 === "darwin") {
51213
+ const commandError = runOpenCommand("open", [url2]);
51214
+ return commandError ? { success: false, error: commandError } : { success: true };
51215
+ }
51216
+ if (platform3 === "win32") {
51217
+ const commandError = runOpenCommand("cmd", ["/c", "start", "", url2]);
51218
+ return commandError ? { success: false, error: commandError } : { success: true };
51219
+ }
51220
+ if (platform3 === "linux") {
51221
+ const xdgError = runOpenCommand("xdg-open", [url2]);
51222
+ if (!xdgError) {
51223
+ return { success: true };
51224
+ }
51225
+ const gioError = runOpenCommand("gio", ["open", url2]);
51226
+ if (!gioError) {
51227
+ return { success: true };
51228
+ }
51229
+ return {
51230
+ success: false,
51231
+ error: `xdg-open failed: ${xdgError}; gio open failed: ${gioError}`
51232
+ };
51233
+ }
51234
+ return {
51235
+ success: false,
51236
+ error: `Unsupported platform: ${platform3}`
51237
+ };
51238
+ }
51239
+
51176
51240
  // src/utils/powerline.ts
51177
51241
  import { execSync as execSync2 } from "child_process";
51178
51242
  import * as fs4 from "fs";
51179
- import * as os4 from "os";
51243
+ import * as os5 from "os";
51180
51244
  import * as path3 from "path";
51181
51245
  var fontsInstalledThisSession = false;
51182
51246
  function checkPowerlineFonts() {
@@ -51193,24 +51257,24 @@ function checkPowerlineFonts() {
51193
51257
  leftArrow: "",
51194
51258
  leftThinArrow: ""
51195
51259
  };
51196
- const platform3 = os4.platform();
51260
+ const platform4 = os5.platform();
51197
51261
  let fontPaths = [];
51198
- if (platform3 === "darwin") {
51262
+ if (platform4 === "darwin") {
51199
51263
  fontPaths = [
51200
- path3.join(os4.homedir(), "Library", "Fonts"),
51264
+ path3.join(os5.homedir(), "Library", "Fonts"),
51201
51265
  "/Library/Fonts",
51202
51266
  "/System/Library/Fonts"
51203
51267
  ];
51204
- } else if (platform3 === "linux") {
51268
+ } else if (platform4 === "linux") {
51205
51269
  fontPaths = [
51206
- path3.join(os4.homedir(), ".local", "share", "fonts"),
51207
- path3.join(os4.homedir(), ".fonts"),
51270
+ path3.join(os5.homedir(), ".local", "share", "fonts"),
51271
+ path3.join(os5.homedir(), ".fonts"),
51208
51272
  "/usr/share/fonts",
51209
51273
  "/usr/local/share/fonts"
51210
51274
  ];
51211
- } else if (platform3 === "win32") {
51275
+ } else if (platform4 === "win32") {
51212
51276
  fontPaths = [
51213
- path3.join(os4.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts"),
51277
+ path3.join(os5.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts"),
51214
51278
  "C:\\Windows\\Fonts"
51215
51279
  ];
51216
51280
  }
@@ -51263,8 +51327,8 @@ async function checkPowerlineFontsAsync() {
51263
51327
  if (quickCheck.installed) {
51264
51328
  return quickCheck;
51265
51329
  }
51266
- const platform3 = os4.platform();
51267
- if (platform3 === "linux" || platform3 === "darwin") {
51330
+ const platform4 = os5.platform();
51331
+ if (platform4 === "linux" || platform4 === "darwin") {
51268
51332
  try {
51269
51333
  const { exec: exec2 } = await import("child_process");
51270
51334
  const { promisify } = await import("util");
@@ -51286,14 +51350,14 @@ async function checkPowerlineFontsAsync() {
51286
51350
  async function installPowerlineFonts() {
51287
51351
  await Promise.resolve();
51288
51352
  try {
51289
- const platform3 = os4.platform();
51353
+ const platform4 = os5.platform();
51290
51354
  let fontDir;
51291
- if (platform3 === "darwin") {
51292
- fontDir = path3.join(os4.homedir(), "Library", "Fonts");
51293
- } else if (platform3 === "linux") {
51294
- fontDir = path3.join(os4.homedir(), ".local", "share", "fonts");
51295
- } else if (platform3 === "win32") {
51296
- fontDir = path3.join(os4.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts");
51355
+ if (platform4 === "darwin") {
51356
+ fontDir = path3.join(os5.homedir(), "Library", "Fonts");
51357
+ } else if (platform4 === "linux") {
51358
+ fontDir = path3.join(os5.homedir(), ".local", "share", "fonts");
51359
+ } else if (platform4 === "win32") {
51360
+ fontDir = path3.join(os5.homedir(), "AppData", "Local", "Microsoft", "Windows", "Fonts");
51297
51361
  } else {
51298
51362
  return {
51299
51363
  success: false,
@@ -51303,7 +51367,7 @@ async function installPowerlineFonts() {
51303
51367
  if (!fs4.existsSync(fontDir)) {
51304
51368
  fs4.mkdirSync(fontDir, { recursive: true });
51305
51369
  }
51306
- const tempDir = path3.join(os4.tmpdir(), `ccstatusline-powerline-fonts-${Date.now()}`);
51370
+ const tempDir = path3.join(os5.tmpdir(), `ccstatusline-powerline-fonts-${Date.now()}`);
51307
51371
  try {
51308
51372
  if (fs4.existsSync(tempDir)) {
51309
51373
  fs4.rmSync(tempDir, { recursive: true, force: true });
@@ -51312,7 +51376,7 @@ async function installPowerlineFonts() {
51312
51376
  stdio: "pipe",
51313
51377
  encoding: "utf8"
51314
51378
  });
51315
- if (platform3 === "darwin" || platform3 === "linux") {
51379
+ if (platform4 === "darwin" || platform4 === "linux") {
51316
51380
  const installScript = path3.join(tempDir, "install.sh");
51317
51381
  if (fs4.existsSync(installScript)) {
51318
51382
  fs4.chmodSync(installScript, 493);
@@ -51321,7 +51385,7 @@ async function installPowerlineFonts() {
51321
51385
  encoding: "utf8",
51322
51386
  shell: "/bin/bash"
51323
51387
  });
51324
- if (platform3 === "linux") {
51388
+ if (platform4 === "linux") {
51325
51389
  try {
51326
51390
  execSync2("fc-cache -f -v", {
51327
51391
  stdio: "pipe",
@@ -51405,7 +51469,7 @@ import { execSync as execSync3 } from "child_process";
51405
51469
  import * as fs5 from "fs";
51406
51470
  import * as path4 from "path";
51407
51471
  var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils";
51408
- var PACKAGE_VERSION = "2.1.0";
51472
+ var PACKAGE_VERSION = "2.1.2";
51409
51473
  function getPackageVersion() {
51410
51474
  if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
51411
51475
  return PACKAGE_VERSION;
@@ -51425,6 +51489,9 @@ function getPackageVersion() {
51425
51489
  return "";
51426
51490
  }
51427
51491
  function getTerminalWidth() {
51492
+ if (process.platform === "win32") {
51493
+ return null;
51494
+ }
51428
51495
  try {
51429
51496
  const tty2 = execSync3("ps -o tty= -p $(ps -o ppid= -p $$)", {
51430
51497
  encoding: "utf8",
@@ -51456,6 +51523,9 @@ function getTerminalWidth() {
51456
51523
  return null;
51457
51524
  }
51458
51525
  function canDetectTerminalWidth() {
51526
+ if (process.platform === "win32") {
51527
+ return false;
51528
+ }
51459
51529
  try {
51460
51530
  const tty2 = execSync3("ps -o tty= -p $(ps -o ppid= -p $$)", {
51461
51531
  encoding: "utf8",
@@ -54317,16 +54387,16 @@ var CustomCommandEditor = ({ widget, onComplete, onCancel, action }) => {
54317
54387
  // src/utils/usage.ts
54318
54388
  import {
54319
54389
  execSync as execSync6,
54320
- spawnSync
54390
+ spawnSync as spawnSync2
54321
54391
  } from "child_process";
54322
54392
  import * as fs7 from "fs";
54323
- import * as os6 from "os";
54393
+ import * as os7 from "os";
54324
54394
  import * as path7 from "path";
54325
54395
 
54326
54396
  // src/utils/jsonl.ts
54327
54397
  import * as fs6 from "fs";
54328
54398
  import { createHash } from "node:crypto";
54329
- import os5 from "node:os";
54399
+ import os6 from "node:os";
54330
54400
  import path6 from "node:path";
54331
54401
 
54332
54402
  // node_modules/tinyglobby/dist/index.mjs
@@ -55127,7 +55197,7 @@ function normalizeConfigDir(configDir) {
55127
55197
  function getBlockCachePath(configDir = getClaudeConfigDir()) {
55128
55198
  const normalizedConfigDir = normalizeConfigDir(configDir);
55129
55199
  const configHash = createHash("sha256").update(normalizedConfigDir).digest("hex").slice(0, 16);
55130
- return path6.join(os5.homedir(), ".cache", "ccstatusline", `block-cache-${configHash}.json`);
55200
+ return path6.join(os6.homedir(), ".cache", "ccstatusline", `block-cache-${configHash}.json`);
55131
55201
  }
55132
55202
  function readBlockCache(expectedConfigDir) {
55133
55203
  try {
@@ -55431,7 +55501,7 @@ function floorToHour(timestamp) {
55431
55501
  }
55432
55502
 
55433
55503
  // src/utils/usage.ts
55434
- var CACHE_DIR = path7.join(os6.homedir(), ".cache", "ccstatusline");
55504
+ var CACHE_DIR = path7.join(os7.homedir(), ".cache", "ccstatusline");
55435
55505
  var CACHE_FILE = path7.join(CACHE_DIR, "usage.json");
55436
55506
  var LOCK_FILE = path7.join(CACHE_DIR, "usage.lock");
55437
55507
  var CACHE_MAX_AGE = 180;
@@ -55600,7 +55670,7 @@ function fetchFromUsageApi(token) {
55600
55670
  req.end();
55601
55671
  `;
55602
55672
  const runtimePath = process.execPath || "node";
55603
- const result = spawnSync(runtimePath, ["-e", script], {
55673
+ const result = spawnSync2(runtimePath, ["-e", script], {
55604
55674
  encoding: "utf8",
55605
55675
  timeout: 6000,
55606
55676
  env: { ...process.env, TOKEN: token }
@@ -55885,7 +55955,7 @@ class BlockTimerWidget {
55885
55955
  }
55886
55956
  // src/widgets/CurrentWorkingDir.tsx
55887
55957
  var import_react31 = __toESM(require_react(), 1);
55888
- import * as os7 from "node:os";
55958
+ import * as os8 from "node:os";
55889
55959
  var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
55890
55960
 
55891
55961
  class CurrentWorkingDirWidget {
@@ -56032,7 +56102,7 @@ class CurrentWorkingDirWidget {
56032
56102
  return true;
56033
56103
  }
56034
56104
  abbreviateHomeDir(path8) {
56035
- const homeDir = os7.homedir();
56105
+ const homeDir = os8.homedir();
56036
56106
  if (path8 === homeDir) {
56037
56107
  return "~";
56038
56108
  }
@@ -56046,7 +56116,7 @@ class CurrentWorkingDirWidget {
56046
56116
  return path8;
56047
56117
  }
56048
56118
  abbreviatePath(path8) {
56049
- const homeDir = os7.homedir();
56119
+ const homeDir = os8.homedir();
56050
56120
  const useBackslash = path8.includes("\\") && !path8.includes("/");
56051
56121
  const sep2 = useBackslash ? "\\" : "/";
56052
56122
  let normalizedPath = path8;
@@ -56169,7 +56239,7 @@ class ClaudeSessionIdWidget {
56169
56239
  }
56170
56240
  // src/widgets/FreeMemory.ts
56171
56241
  import { execSync as execSync7 } from "child_process";
56172
- import os8 from "os";
56242
+ import os9 from "os";
56173
56243
  function formatBytes(bytes) {
56174
56244
  const GB = 1024 ** 3;
56175
56245
  const MB = 1024 ** 2;
@@ -56233,12 +56303,12 @@ class FreeMemoryWidget {
56233
56303
  if (context.isPreview) {
56234
56304
  return item.rawValue ? "12.4G/16.0G" : "Mem: 12.4G/16.0G";
56235
56305
  }
56236
- const total = os8.totalmem();
56306
+ const total = os9.totalmem();
56237
56307
  let used;
56238
- if (os8.platform() === "darwin") {
56239
- used = getUsedMemoryMacOS() ?? total - os8.freemem();
56308
+ if (os9.platform() === "darwin") {
56309
+ used = getUsedMemoryMacOS() ?? total - os9.freemem();
56240
56310
  } else {
56241
- used = total - os8.freemem();
56311
+ used = total - os9.freemem();
56242
56312
  }
56243
56313
  const value = `${formatBytes(used)}/${formatBytes(total)}`;
56244
56314
  return item.rawValue ? value : `Mem: ${value}`;
@@ -59062,9 +59132,9 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
59062
59132
  { label: isClaudeInstalled ? "\uD83D\uDD0C Uninstall from Claude Code" : "\uD83D\uDCE6 Install to Claude Code", value: "install", selectable: true }
59063
59133
  ];
59064
59134
  if (hasChanges) {
59065
- menuItems.push({ label: "\uD83D\uDCBE Save & Exit", value: "save", selectable: true }, { label: "❌ Exit without saving", value: "exit", selectable: true });
59135
+ menuItems.push({ label: "\uD83D\uDCBE Save & Exit", value: "save", selectable: true }, { label: "❌ Exit without saving", value: "exit", selectable: true }, { label: "", value: "_gap3", selectable: false }, { label: "⭐ Like ccstatusline? Star us on GitHub", value: "starGithub", selectable: true });
59066
59136
  } else {
59067
- menuItems.push({ label: "\uD83D\uDEAA Exit", value: "exit", selectable: true });
59137
+ menuItems.push({ label: "\uD83D\uDEAA Exit", value: "exit", selectable: true }, { label: "", value: "_gap3", selectable: false }, { label: "⭐ Like ccstatusline? Star us on GitHub", value: "starGithub", selectable: true });
59068
59138
  }
59069
59139
  const selectableItems = menuItems.filter((item) => item.selectable);
59070
59140
  use_input_default((input, key) => {
@@ -59087,6 +59157,7 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
59087
59157
  globalOverrides: "Set global padding, separators, and color overrides that apply to all widgets",
59088
59158
  install: isClaudeInstalled ? "Remove ccstatusline from your Claude Code settings" : "Add ccstatusline to your Claude Code settings for automatic status line rendering",
59089
59159
  terminalConfig: "Configure terminal-specific settings for optimal display",
59160
+ starGithub: "Open the ccstatusline GitHub repository in your browser so you can star the project",
59090
59161
  save: "Save all changes and exit the configuration tool",
59091
59162
  exit: hasChanges ? "Exit without saving your changes" : "Exit the configuration tool"
59092
59163
  };
@@ -59143,7 +59214,7 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
59143
59214
  };
59144
59215
  // src/tui/components/PowerlineSetup.tsx
59145
59216
  var import_react41 = __toESM(require_react(), 1);
59146
- import * as os9 from "os";
59217
+ import * as os10 from "os";
59147
59218
 
59148
59219
  // src/tui/components/PowerlineSeparatorEditor.tsx
59149
59220
  var import_react39 = __toESM(require_react(), 1);
@@ -59860,7 +59931,7 @@ var PowerlineSetup = ({
59860
59931
  }, undefined, false, undefined, this)
59861
59932
  ]
59862
59933
  }, undefined, true, undefined, this),
59863
- os9.platform() === "darwin" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59934
+ os10.platform() === "darwin" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59864
59935
  children: [
59865
59936
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
59866
59937
  dimColor: true,
@@ -59876,7 +59947,7 @@ var PowerlineSetup = ({
59876
59947
  }, undefined, false, undefined, this)
59877
59948
  ]
59878
59949
  }, undefined, true, undefined, this),
59879
- os9.platform() === "linux" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59950
+ os10.platform() === "linux" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59880
59951
  children: [
59881
59952
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
59882
59953
  dimColor: true,
@@ -59892,7 +59963,7 @@ var PowerlineSetup = ({
59892
59963
  }, undefined, false, undefined, this)
59893
59964
  ]
59894
59965
  }, undefined, true, undefined, this),
59895
- os9.platform() === "win32" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59966
+ os10.platform() === "win32" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
59896
59967
  children: [
59897
59968
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
59898
59969
  dimColor: true,
@@ -60678,6 +60749,7 @@ NOTE: If /ide integration is enabled, it's not recommended to use this mode.`
60678
60749
  };
60679
60750
  // src/tui/App.tsx
60680
60751
  var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
60752
+ var GITHUB_REPO_URL = "https://github.com/sirmalloc/ccstatusline";
60681
60753
  var App2 = () => {
60682
60754
  const { exit } = use_app_default();
60683
60755
  const [settings, setSettings] = import_react45.useState(null);
@@ -60693,7 +60765,7 @@ var App2 = () => {
60693
60765
  const [installingFonts, setInstallingFonts] = import_react45.useState(false);
60694
60766
  const [fontInstallMessage, setFontInstallMessage] = import_react45.useState(null);
60695
60767
  const [existingStatusLine, setExistingStatusLine] = import_react45.useState(null);
60696
- const [saveMessage, setSaveMessage] = import_react45.useState(null);
60768
+ const [flashMessage, setFlashMessage] = import_react45.useState(null);
60697
60769
  const [previewIsTruncated, setPreviewIsTruncated] = import_react45.useState(false);
60698
60770
  import_react45.useEffect(() => {
60699
60771
  getExistingStatusLine().then(setExistingStatusLine);
@@ -60723,15 +60795,15 @@ var App2 = () => {
60723
60795
  }
60724
60796
  }, [settings, originalSettings]);
60725
60797
  import_react45.useEffect(() => {
60726
- if (saveMessage) {
60798
+ if (flashMessage) {
60727
60799
  const timer = setTimeout(() => {
60728
- setSaveMessage(null);
60800
+ setFlashMessage(null);
60729
60801
  }, 2000);
60730
60802
  return () => {
60731
60803
  clearTimeout(timer);
60732
60804
  };
60733
60805
  }
60734
- }, [saveMessage]);
60806
+ }, [flashMessage]);
60735
60807
  use_input_default((input, key) => {
60736
60808
  if (key.ctrl && input === "c") {
60737
60809
  exit();
@@ -60741,7 +60813,10 @@ var App2 = () => {
60741
60813
  await saveSettings(settings);
60742
60814
  setOriginalSettings(JSON.parse(JSON.stringify(settings)));
60743
60815
  setHasChanges(false);
60744
- setSaveMessage("✓ Configuration saved");
60816
+ setFlashMessage({
60817
+ text: "✓ Configuration saved",
60818
+ color: "green"
60819
+ });
60745
60820
  })();
60746
60821
  }
60747
60822
  });
@@ -60822,6 +60897,31 @@ Continue?`;
60822
60897
  case "install":
60823
60898
  handleInstallUninstall();
60824
60899
  break;
60900
+ case "starGithub":
60901
+ setConfirmDialog({
60902
+ message: `Open the ccstatusline GitHub repository in your browser?
60903
+
60904
+ ${GITHUB_REPO_URL}`,
60905
+ action: () => {
60906
+ const result = openExternalUrl(GITHUB_REPO_URL);
60907
+ if (result.success) {
60908
+ setFlashMessage({
60909
+ text: "✓ Opened GitHub repository in browser",
60910
+ color: "green"
60911
+ });
60912
+ } else {
60913
+ setFlashMessage({
60914
+ text: `✗ Could not open browser. Visit: ${GITHUB_REPO_URL}`,
60915
+ color: "red"
60916
+ });
60917
+ }
60918
+ setScreen("main");
60919
+ setConfirmDialog(null);
60920
+ return Promise.resolve();
60921
+ }
60922
+ });
60923
+ setScreen("confirm");
60924
+ break;
60825
60925
  case "save":
60826
60926
  await saveSettings(settings);
60827
60927
  setOriginalSettings(JSON.parse(JSON.stringify(settings)));
@@ -60862,10 +60962,10 @@ Continue?`;
60862
60962
  bold: true,
60863
60963
  children: ` | ${getPackageVersion() && `v${getPackageVersion()}`}`
60864
60964
  }, undefined, false, undefined, this),
60865
- saveMessage && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
60866
- color: "green",
60965
+ flashMessage && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
60966
+ color: flashMessage.color,
60867
60967
  bold: true,
60868
- children: ` ${saveMessage}`
60968
+ children: ` ${flashMessage.text}`
60869
60969
  }, undefined, false, undefined, this)
60870
60970
  ]
60871
60971
  }, undefined, true, undefined, this),
@@ -60887,7 +60987,8 @@ Continue?`;
60887
60987
  powerline: 2,
60888
60988
  terminalConfig: 3,
60889
60989
  globalOverrides: 4,
60890
- install: 5
60990
+ install: 5,
60991
+ starGithub: hasChanges ? 8 : 7
60891
60992
  };
60892
60993
  setMenuSelections({ ...menuSelections, main: menuMap[value] ?? 0 });
60893
60994
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",