ccstatusline 2.1.1 → 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/dist/ccstatusline.js +148 -53
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -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
|
|
32022
|
-
return
|
|
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
|
|
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
|
|
51260
|
+
const platform4 = os5.platform();
|
|
51197
51261
|
let fontPaths = [];
|
|
51198
|
-
if (
|
|
51262
|
+
if (platform4 === "darwin") {
|
|
51199
51263
|
fontPaths = [
|
|
51200
|
-
path3.join(
|
|
51264
|
+
path3.join(os5.homedir(), "Library", "Fonts"),
|
|
51201
51265
|
"/Library/Fonts",
|
|
51202
51266
|
"/System/Library/Fonts"
|
|
51203
51267
|
];
|
|
51204
|
-
} else if (
|
|
51268
|
+
} else if (platform4 === "linux") {
|
|
51205
51269
|
fontPaths = [
|
|
51206
|
-
path3.join(
|
|
51207
|
-
path3.join(
|
|
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 (
|
|
51275
|
+
} else if (platform4 === "win32") {
|
|
51212
51276
|
fontPaths = [
|
|
51213
|
-
path3.join(
|
|
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
|
|
51267
|
-
if (
|
|
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
|
|
51353
|
+
const platform4 = os5.platform();
|
|
51290
51354
|
let fontDir;
|
|
51291
|
-
if (
|
|
51292
|
-
fontDir = path3.join(
|
|
51293
|
-
} else if (
|
|
51294
|
-
fontDir = path3.join(
|
|
51295
|
-
} else if (
|
|
51296
|
-
fontDir = path3.join(
|
|
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(
|
|
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 (
|
|
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 (
|
|
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.
|
|
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;
|
|
@@ -54323,16 +54387,16 @@ var CustomCommandEditor = ({ widget, onComplete, onCancel, action }) => {
|
|
|
54323
54387
|
// src/utils/usage.ts
|
|
54324
54388
|
import {
|
|
54325
54389
|
execSync as execSync6,
|
|
54326
|
-
spawnSync
|
|
54390
|
+
spawnSync as spawnSync2
|
|
54327
54391
|
} from "child_process";
|
|
54328
54392
|
import * as fs7 from "fs";
|
|
54329
|
-
import * as
|
|
54393
|
+
import * as os7 from "os";
|
|
54330
54394
|
import * as path7 from "path";
|
|
54331
54395
|
|
|
54332
54396
|
// src/utils/jsonl.ts
|
|
54333
54397
|
import * as fs6 from "fs";
|
|
54334
54398
|
import { createHash } from "node:crypto";
|
|
54335
|
-
import
|
|
54399
|
+
import os6 from "node:os";
|
|
54336
54400
|
import path6 from "node:path";
|
|
54337
54401
|
|
|
54338
54402
|
// node_modules/tinyglobby/dist/index.mjs
|
|
@@ -55133,7 +55197,7 @@ function normalizeConfigDir(configDir) {
|
|
|
55133
55197
|
function getBlockCachePath(configDir = getClaudeConfigDir()) {
|
|
55134
55198
|
const normalizedConfigDir = normalizeConfigDir(configDir);
|
|
55135
55199
|
const configHash = createHash("sha256").update(normalizedConfigDir).digest("hex").slice(0, 16);
|
|
55136
|
-
return path6.join(
|
|
55200
|
+
return path6.join(os6.homedir(), ".cache", "ccstatusline", `block-cache-${configHash}.json`);
|
|
55137
55201
|
}
|
|
55138
55202
|
function readBlockCache(expectedConfigDir) {
|
|
55139
55203
|
try {
|
|
@@ -55437,7 +55501,7 @@ function floorToHour(timestamp) {
|
|
|
55437
55501
|
}
|
|
55438
55502
|
|
|
55439
55503
|
// src/utils/usage.ts
|
|
55440
|
-
var CACHE_DIR = path7.join(
|
|
55504
|
+
var CACHE_DIR = path7.join(os7.homedir(), ".cache", "ccstatusline");
|
|
55441
55505
|
var CACHE_FILE = path7.join(CACHE_DIR, "usage.json");
|
|
55442
55506
|
var LOCK_FILE = path7.join(CACHE_DIR, "usage.lock");
|
|
55443
55507
|
var CACHE_MAX_AGE = 180;
|
|
@@ -55606,7 +55670,7 @@ function fetchFromUsageApi(token) {
|
|
|
55606
55670
|
req.end();
|
|
55607
55671
|
`;
|
|
55608
55672
|
const runtimePath = process.execPath || "node";
|
|
55609
|
-
const result =
|
|
55673
|
+
const result = spawnSync2(runtimePath, ["-e", script], {
|
|
55610
55674
|
encoding: "utf8",
|
|
55611
55675
|
timeout: 6000,
|
|
55612
55676
|
env: { ...process.env, TOKEN: token }
|
|
@@ -55891,7 +55955,7 @@ class BlockTimerWidget {
|
|
|
55891
55955
|
}
|
|
55892
55956
|
// src/widgets/CurrentWorkingDir.tsx
|
|
55893
55957
|
var import_react31 = __toESM(require_react(), 1);
|
|
55894
|
-
import * as
|
|
55958
|
+
import * as os8 from "node:os";
|
|
55895
55959
|
var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
55896
55960
|
|
|
55897
55961
|
class CurrentWorkingDirWidget {
|
|
@@ -56038,7 +56102,7 @@ class CurrentWorkingDirWidget {
|
|
|
56038
56102
|
return true;
|
|
56039
56103
|
}
|
|
56040
56104
|
abbreviateHomeDir(path8) {
|
|
56041
|
-
const homeDir =
|
|
56105
|
+
const homeDir = os8.homedir();
|
|
56042
56106
|
if (path8 === homeDir) {
|
|
56043
56107
|
return "~";
|
|
56044
56108
|
}
|
|
@@ -56052,7 +56116,7 @@ class CurrentWorkingDirWidget {
|
|
|
56052
56116
|
return path8;
|
|
56053
56117
|
}
|
|
56054
56118
|
abbreviatePath(path8) {
|
|
56055
|
-
const homeDir =
|
|
56119
|
+
const homeDir = os8.homedir();
|
|
56056
56120
|
const useBackslash = path8.includes("\\") && !path8.includes("/");
|
|
56057
56121
|
const sep2 = useBackslash ? "\\" : "/";
|
|
56058
56122
|
let normalizedPath = path8;
|
|
@@ -56175,7 +56239,7 @@ class ClaudeSessionIdWidget {
|
|
|
56175
56239
|
}
|
|
56176
56240
|
// src/widgets/FreeMemory.ts
|
|
56177
56241
|
import { execSync as execSync7 } from "child_process";
|
|
56178
|
-
import
|
|
56242
|
+
import os9 from "os";
|
|
56179
56243
|
function formatBytes(bytes) {
|
|
56180
56244
|
const GB = 1024 ** 3;
|
|
56181
56245
|
const MB = 1024 ** 2;
|
|
@@ -56239,12 +56303,12 @@ class FreeMemoryWidget {
|
|
|
56239
56303
|
if (context.isPreview) {
|
|
56240
56304
|
return item.rawValue ? "12.4G/16.0G" : "Mem: 12.4G/16.0G";
|
|
56241
56305
|
}
|
|
56242
|
-
const total =
|
|
56306
|
+
const total = os9.totalmem();
|
|
56243
56307
|
let used;
|
|
56244
|
-
if (
|
|
56245
|
-
used = getUsedMemoryMacOS() ?? total -
|
|
56308
|
+
if (os9.platform() === "darwin") {
|
|
56309
|
+
used = getUsedMemoryMacOS() ?? total - os9.freemem();
|
|
56246
56310
|
} else {
|
|
56247
|
-
used = total -
|
|
56311
|
+
used = total - os9.freemem();
|
|
56248
56312
|
}
|
|
56249
56313
|
const value = `${formatBytes(used)}/${formatBytes(total)}`;
|
|
56250
56314
|
return item.rawValue ? value : `Mem: ${value}`;
|
|
@@ -59068,9 +59132,9 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
|
|
|
59068
59132
|
{ label: isClaudeInstalled ? "\uD83D\uDD0C Uninstall from Claude Code" : "\uD83D\uDCE6 Install to Claude Code", value: "install", selectable: true }
|
|
59069
59133
|
];
|
|
59070
59134
|
if (hasChanges) {
|
|
59071
|
-
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 });
|
|
59072
59136
|
} else {
|
|
59073
|
-
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 });
|
|
59074
59138
|
}
|
|
59075
59139
|
const selectableItems = menuItems.filter((item) => item.selectable);
|
|
59076
59140
|
use_input_default((input, key) => {
|
|
@@ -59093,6 +59157,7 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
|
|
|
59093
59157
|
globalOverrides: "Set global padding, separators, and color overrides that apply to all widgets",
|
|
59094
59158
|
install: isClaudeInstalled ? "Remove ccstatusline from your Claude Code settings" : "Add ccstatusline to your Claude Code settings for automatic status line rendering",
|
|
59095
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",
|
|
59096
59161
|
save: "Save all changes and exit the configuration tool",
|
|
59097
59162
|
exit: hasChanges ? "Exit without saving your changes" : "Exit the configuration tool"
|
|
59098
59163
|
};
|
|
@@ -59149,7 +59214,7 @@ var MainMenu = ({ onSelect, isClaudeInstalled, hasChanges, initialSelection = 0,
|
|
|
59149
59214
|
};
|
|
59150
59215
|
// src/tui/components/PowerlineSetup.tsx
|
|
59151
59216
|
var import_react41 = __toESM(require_react(), 1);
|
|
59152
|
-
import * as
|
|
59217
|
+
import * as os10 from "os";
|
|
59153
59218
|
|
|
59154
59219
|
// src/tui/components/PowerlineSeparatorEditor.tsx
|
|
59155
59220
|
var import_react39 = __toESM(require_react(), 1);
|
|
@@ -59866,7 +59931,7 @@ var PowerlineSetup = ({
|
|
|
59866
59931
|
}, undefined, false, undefined, this)
|
|
59867
59932
|
]
|
|
59868
59933
|
}, undefined, true, undefined, this),
|
|
59869
|
-
|
|
59934
|
+
os10.platform() === "darwin" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
|
|
59870
59935
|
children: [
|
|
59871
59936
|
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
|
|
59872
59937
|
dimColor: true,
|
|
@@ -59882,7 +59947,7 @@ var PowerlineSetup = ({
|
|
|
59882
59947
|
}, undefined, false, undefined, this)
|
|
59883
59948
|
]
|
|
59884
59949
|
}, undefined, true, undefined, this),
|
|
59885
|
-
|
|
59950
|
+
os10.platform() === "linux" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
|
|
59886
59951
|
children: [
|
|
59887
59952
|
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
|
|
59888
59953
|
dimColor: true,
|
|
@@ -59898,7 +59963,7 @@ var PowerlineSetup = ({
|
|
|
59898
59963
|
}, undefined, false, undefined, this)
|
|
59899
59964
|
]
|
|
59900
59965
|
}, undefined, true, undefined, this),
|
|
59901
|
-
|
|
59966
|
+
os10.platform() === "win32" && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(jsx_dev_runtime13.Fragment, {
|
|
59902
59967
|
children: [
|
|
59903
59968
|
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text, {
|
|
59904
59969
|
dimColor: true,
|
|
@@ -60684,6 +60749,7 @@ NOTE: If /ide integration is enabled, it's not recommended to use this mode.`
|
|
|
60684
60749
|
};
|
|
60685
60750
|
// src/tui/App.tsx
|
|
60686
60751
|
var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
|
|
60752
|
+
var GITHUB_REPO_URL = "https://github.com/sirmalloc/ccstatusline";
|
|
60687
60753
|
var App2 = () => {
|
|
60688
60754
|
const { exit } = use_app_default();
|
|
60689
60755
|
const [settings, setSettings] = import_react45.useState(null);
|
|
@@ -60699,7 +60765,7 @@ var App2 = () => {
|
|
|
60699
60765
|
const [installingFonts, setInstallingFonts] = import_react45.useState(false);
|
|
60700
60766
|
const [fontInstallMessage, setFontInstallMessage] = import_react45.useState(null);
|
|
60701
60767
|
const [existingStatusLine, setExistingStatusLine] = import_react45.useState(null);
|
|
60702
|
-
const [
|
|
60768
|
+
const [flashMessage, setFlashMessage] = import_react45.useState(null);
|
|
60703
60769
|
const [previewIsTruncated, setPreviewIsTruncated] = import_react45.useState(false);
|
|
60704
60770
|
import_react45.useEffect(() => {
|
|
60705
60771
|
getExistingStatusLine().then(setExistingStatusLine);
|
|
@@ -60729,15 +60795,15 @@ var App2 = () => {
|
|
|
60729
60795
|
}
|
|
60730
60796
|
}, [settings, originalSettings]);
|
|
60731
60797
|
import_react45.useEffect(() => {
|
|
60732
|
-
if (
|
|
60798
|
+
if (flashMessage) {
|
|
60733
60799
|
const timer = setTimeout(() => {
|
|
60734
|
-
|
|
60800
|
+
setFlashMessage(null);
|
|
60735
60801
|
}, 2000);
|
|
60736
60802
|
return () => {
|
|
60737
60803
|
clearTimeout(timer);
|
|
60738
60804
|
};
|
|
60739
60805
|
}
|
|
60740
|
-
}, [
|
|
60806
|
+
}, [flashMessage]);
|
|
60741
60807
|
use_input_default((input, key) => {
|
|
60742
60808
|
if (key.ctrl && input === "c") {
|
|
60743
60809
|
exit();
|
|
@@ -60747,7 +60813,10 @@ var App2 = () => {
|
|
|
60747
60813
|
await saveSettings(settings);
|
|
60748
60814
|
setOriginalSettings(JSON.parse(JSON.stringify(settings)));
|
|
60749
60815
|
setHasChanges(false);
|
|
60750
|
-
|
|
60816
|
+
setFlashMessage({
|
|
60817
|
+
text: "✓ Configuration saved",
|
|
60818
|
+
color: "green"
|
|
60819
|
+
});
|
|
60751
60820
|
})();
|
|
60752
60821
|
}
|
|
60753
60822
|
});
|
|
@@ -60828,6 +60897,31 @@ Continue?`;
|
|
|
60828
60897
|
case "install":
|
|
60829
60898
|
handleInstallUninstall();
|
|
60830
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;
|
|
60831
60925
|
case "save":
|
|
60832
60926
|
await saveSettings(settings);
|
|
60833
60927
|
setOriginalSettings(JSON.parse(JSON.stringify(settings)));
|
|
@@ -60868,10 +60962,10 @@ Continue?`;
|
|
|
60868
60962
|
bold: true,
|
|
60869
60963
|
children: ` | ${getPackageVersion() && `v${getPackageVersion()}`}`
|
|
60870
60964
|
}, undefined, false, undefined, this),
|
|
60871
|
-
|
|
60872
|
-
color:
|
|
60965
|
+
flashMessage && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(Text, {
|
|
60966
|
+
color: flashMessage.color,
|
|
60873
60967
|
bold: true,
|
|
60874
|
-
children: ` ${
|
|
60968
|
+
children: ` ${flashMessage.text}`
|
|
60875
60969
|
}, undefined, false, undefined, this)
|
|
60876
60970
|
]
|
|
60877
60971
|
}, undefined, true, undefined, this),
|
|
@@ -60893,7 +60987,8 @@ Continue?`;
|
|
|
60893
60987
|
powerline: 2,
|
|
60894
60988
|
terminalConfig: 3,
|
|
60895
60989
|
globalOverrides: 4,
|
|
60896
|
-
install: 5
|
|
60990
|
+
install: 5,
|
|
60991
|
+
starGithub: hasChanges ? 8 : 7
|
|
60897
60992
|
};
|
|
60898
60993
|
setMenuSelections({ ...menuSelections, main: menuMap[value] ?? 0 });
|
|
60899
60994
|
}
|