claude-scope 0.8.45 → 0.8.46
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/claude-scope.cjs +61 -60
- package/package.json +1 -1
package/dist/claude-scope.cjs
CHANGED
|
@@ -148,6 +148,10 @@ function createThemeColors(params) {
|
|
|
148
148
|
disk: params.sysmonDisk,
|
|
149
149
|
network: params.sysmonNetwork,
|
|
150
150
|
separator: params.sysmonSeparator
|
|
151
|
+
},
|
|
152
|
+
configCount: {
|
|
153
|
+
label: params.configCountLabel ?? semantic.info,
|
|
154
|
+
separator: params.configCountSeparator ?? base.muted
|
|
151
155
|
}
|
|
152
156
|
};
|
|
153
157
|
}
|
|
@@ -2092,6 +2096,10 @@ function getDefaultColors() {
|
|
|
2092
2096
|
disk: "\x1B[33m",
|
|
2093
2097
|
network: "\x1B[32m",
|
|
2094
2098
|
separator: "\x1B[90m"
|
|
2099
|
+
},
|
|
2100
|
+
configCount: {
|
|
2101
|
+
label: "\x1B[36m",
|
|
2102
|
+
separator: "\x1B[90m"
|
|
2095
2103
|
}
|
|
2096
2104
|
};
|
|
2097
2105
|
}
|
|
@@ -3233,98 +3241,90 @@ var init_styles3 = __esm({
|
|
|
3233
3241
|
balanced: (data, colors2) => {
|
|
3234
3242
|
const { claudeMdCount, rulesCount, mcpCount, hooksCount } = data;
|
|
3235
3243
|
const parts = [];
|
|
3236
|
-
const info = colors2?.semantic.info ?? "";
|
|
3237
|
-
const muted = colors2?.base.muted ?? "";
|
|
3238
3244
|
if (claudeMdCount > 0) {
|
|
3239
|
-
const label =
|
|
3245
|
+
const label = colors2 ? colorize("CLAUDE.md", colors2.label) : "CLAUDE.md";
|
|
3240
3246
|
parts.push(`${label}:${claudeMdCount}`);
|
|
3241
3247
|
}
|
|
3242
3248
|
if (rulesCount > 0) {
|
|
3243
|
-
const label =
|
|
3249
|
+
const label = colors2 ? colorize("rules", colors2.label) : "rules";
|
|
3244
3250
|
parts.push(`${label}:${rulesCount}`);
|
|
3245
3251
|
}
|
|
3246
3252
|
if (mcpCount > 0) {
|
|
3247
|
-
const label =
|
|
3253
|
+
const label = colors2 ? colorize("MCPs", colors2.label) : "MCPs";
|
|
3248
3254
|
parts.push(`${label}:${mcpCount}`);
|
|
3249
3255
|
}
|
|
3250
3256
|
if (hooksCount > 0) {
|
|
3251
|
-
const label =
|
|
3257
|
+
const label = colors2 ? colorize("hooks", colors2.label) : "hooks";
|
|
3252
3258
|
parts.push(`${label}:${hooksCount}`);
|
|
3253
3259
|
}
|
|
3254
|
-
const sep =
|
|
3260
|
+
const sep = colors2 ? colorize(" \u2502 ", colors2.separator) : " \u2502 ";
|
|
3255
3261
|
return parts.join(sep);
|
|
3256
3262
|
},
|
|
3257
3263
|
compact: (data, colors2) => {
|
|
3258
3264
|
const { claudeMdCount, rulesCount, mcpCount, hooksCount } = data;
|
|
3259
3265
|
const parts = [];
|
|
3260
|
-
const info = colors2?.semantic.info ?? "";
|
|
3261
|
-
const muted = colors2?.base.muted ?? "";
|
|
3262
3266
|
if (claudeMdCount > 0) {
|
|
3263
|
-
const text =
|
|
3267
|
+
const text = colors2 ? colorize(`${claudeMdCount} docs`, colors2.label) : `${claudeMdCount} docs`;
|
|
3264
3268
|
parts.push(text);
|
|
3265
3269
|
}
|
|
3266
3270
|
if (rulesCount > 0) {
|
|
3267
|
-
const text =
|
|
3271
|
+
const text = colors2 ? colorize(`${rulesCount} rules`, colors2.label) : `${rulesCount} rules`;
|
|
3268
3272
|
parts.push(text);
|
|
3269
3273
|
}
|
|
3270
3274
|
if (mcpCount > 0) {
|
|
3271
|
-
const text =
|
|
3275
|
+
const text = colors2 ? colorize(`${mcpCount} MCPs`, colors2.label) : `${mcpCount} MCPs`;
|
|
3272
3276
|
parts.push(text);
|
|
3273
3277
|
}
|
|
3274
3278
|
if (hooksCount > 0) {
|
|
3275
3279
|
const hookLabel = hooksCount === 1 ? "hook" : "hooks";
|
|
3276
|
-
const text =
|
|
3280
|
+
const text = colors2 ? colorize(`${hooksCount} ${hookLabel}`, colors2.label) : `${hooksCount} ${hookLabel}`;
|
|
3277
3281
|
parts.push(text);
|
|
3278
3282
|
}
|
|
3279
|
-
const sep =
|
|
3283
|
+
const sep = colors2 ? colorize(" \u2502 ", colors2.separator) : " \u2502 ";
|
|
3280
3284
|
return parts.join(sep);
|
|
3281
3285
|
},
|
|
3282
3286
|
playful: (data, colors2) => {
|
|
3283
3287
|
const { claudeMdCount, rulesCount, mcpCount, hooksCount } = data;
|
|
3284
3288
|
const parts = [];
|
|
3285
|
-
const info = colors2?.semantic.info ?? "";
|
|
3286
|
-
const muted = colors2?.base.muted ?? "";
|
|
3287
3289
|
if (claudeMdCount > 0) {
|
|
3288
|
-
const text =
|
|
3290
|
+
const text = colors2 ? colorize(`CLAUDE.md:${claudeMdCount}`, colors2.label) : `CLAUDE.md:${claudeMdCount}`;
|
|
3289
3291
|
parts.push(`\u{1F4C4} ${text}`);
|
|
3290
3292
|
}
|
|
3291
3293
|
if (rulesCount > 0) {
|
|
3292
|
-
const text =
|
|
3294
|
+
const text = colors2 ? colorize(`rules:${rulesCount}`, colors2.label) : `rules:${rulesCount}`;
|
|
3293
3295
|
parts.push(`\u{1F4DC} ${text}`);
|
|
3294
3296
|
}
|
|
3295
3297
|
if (mcpCount > 0) {
|
|
3296
|
-
const text =
|
|
3298
|
+
const text = colors2 ? colorize(`MCPs:${mcpCount}`, colors2.label) : `MCPs:${mcpCount}`;
|
|
3297
3299
|
parts.push(`\u{1F50C} ${text}`);
|
|
3298
3300
|
}
|
|
3299
3301
|
if (hooksCount > 0) {
|
|
3300
|
-
const text =
|
|
3302
|
+
const text = colors2 ? colorize(`hooks:${hooksCount}`, colors2.label) : `hooks:${hooksCount}`;
|
|
3301
3303
|
parts.push(`\u{1FA9D} ${text}`);
|
|
3302
3304
|
}
|
|
3303
|
-
const sep =
|
|
3305
|
+
const sep = colors2 ? colorize(" \u2502 ", colors2.separator) : " \u2502 ";
|
|
3304
3306
|
return parts.join(sep);
|
|
3305
3307
|
},
|
|
3306
3308
|
verbose: (data, colors2) => {
|
|
3307
3309
|
const { claudeMdCount, rulesCount, mcpCount, hooksCount } = data;
|
|
3308
3310
|
const parts = [];
|
|
3309
|
-
const info = colors2?.semantic.info ?? "";
|
|
3310
|
-
const muted = colors2?.base.muted ?? "";
|
|
3311
3311
|
if (claudeMdCount > 0) {
|
|
3312
|
-
const text =
|
|
3312
|
+
const text = colors2 ? colorize(`${claudeMdCount} CLAUDE.md`, colors2.label) : `${claudeMdCount} CLAUDE.md`;
|
|
3313
3313
|
parts.push(text);
|
|
3314
3314
|
}
|
|
3315
3315
|
if (rulesCount > 0) {
|
|
3316
|
-
const text =
|
|
3316
|
+
const text = colors2 ? colorize(`${rulesCount} rules`, colors2.label) : `${rulesCount} rules`;
|
|
3317
3317
|
parts.push(text);
|
|
3318
3318
|
}
|
|
3319
3319
|
if (mcpCount > 0) {
|
|
3320
|
-
const text =
|
|
3320
|
+
const text = colors2 ? colorize(`${mcpCount} MCP servers`, colors2.label) : `${mcpCount} MCP servers`;
|
|
3321
3321
|
parts.push(text);
|
|
3322
3322
|
}
|
|
3323
3323
|
if (hooksCount > 0) {
|
|
3324
|
-
const text =
|
|
3324
|
+
const text = colors2 ? colorize(`${hooksCount} hooks`, colors2.label) : `${hooksCount} hooks`;
|
|
3325
3325
|
parts.push(text);
|
|
3326
3326
|
}
|
|
3327
|
-
const sep =
|
|
3327
|
+
const sep = colors2 ? colorize(" \u2502 ", colors2.separator) : " \u2502 ";
|
|
3328
3328
|
return parts.join(sep);
|
|
3329
3329
|
}
|
|
3330
3330
|
};
|
|
@@ -3391,7 +3391,7 @@ var init_config_count_widget = __esm({
|
|
|
3391
3391
|
mcpCount,
|
|
3392
3392
|
hooksCount
|
|
3393
3393
|
};
|
|
3394
|
-
return this.styleFn(renderData, this.colors);
|
|
3394
|
+
return this.styleFn(renderData, this.colors.configCount);
|
|
3395
3395
|
}
|
|
3396
3396
|
setLine(line) {
|
|
3397
3397
|
this._lineOverride = line;
|
|
@@ -4370,36 +4370,29 @@ var init_styles9 = __esm({
|
|
|
4370
4370
|
init_style_utils();
|
|
4371
4371
|
gitTagStyles = {
|
|
4372
4372
|
balanced: (data, colors2) => {
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
return colorize(tag, colors2.branch);
|
|
4373
|
+
if (!colors2) return data.tag;
|
|
4374
|
+
return colorize(data.tag, colors2.branch);
|
|
4376
4375
|
},
|
|
4377
4376
|
compact: (data, colors2) => {
|
|
4378
|
-
if (!data.tag) return "\u2014";
|
|
4379
4377
|
const tag = data.tag.replace(/^v/, "");
|
|
4380
4378
|
if (!colors2) return tag;
|
|
4381
4379
|
return colorize(tag, colors2.branch);
|
|
4382
4380
|
},
|
|
4383
4381
|
playful: (data, colors2) => {
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
return `\u{1F3F7}\uFE0F ${colorize(tag, colors2.branch)}`;
|
|
4382
|
+
if (!colors2) return `\u{1F3F7}\uFE0F ${data.tag}`;
|
|
4383
|
+
return `\u{1F3F7}\uFE0F ${colorize(data.tag, colors2.branch)}`;
|
|
4387
4384
|
},
|
|
4388
4385
|
verbose: (data, colors2) => {
|
|
4389
|
-
if (!
|
|
4390
|
-
const tag = `version ${data.tag}`;
|
|
4391
|
-
if (!colors2) return tag;
|
|
4386
|
+
if (!colors2) return `version ${data.tag}`;
|
|
4392
4387
|
return `version ${colorize(data.tag, colors2.branch)}`;
|
|
4393
4388
|
},
|
|
4394
4389
|
labeled: (data, colors2) => {
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
return withLabel("Tag", colorize(tag, colors2.branch));
|
|
4390
|
+
if (!colors2) return withLabel("Tag", data.tag);
|
|
4391
|
+
return withLabel("Tag", colorize(data.tag, colors2.branch));
|
|
4398
4392
|
},
|
|
4399
4393
|
indicator: (data, colors2) => {
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
return withIndicator(colorize(tag, colors2.branch));
|
|
4394
|
+
if (!colors2) return withIndicator(data.tag);
|
|
4395
|
+
return withIndicator(colorize(data.tag, colors2.branch));
|
|
4403
4396
|
}
|
|
4404
4397
|
};
|
|
4405
4398
|
}
|
|
@@ -4463,6 +4456,9 @@ var init_git_tag_widget = __esm({
|
|
|
4463
4456
|
}
|
|
4464
4457
|
try {
|
|
4465
4458
|
const latestTag = await (this.git.latestTag?.() ?? Promise.resolve(null));
|
|
4459
|
+
if (!latestTag) {
|
|
4460
|
+
return null;
|
|
4461
|
+
}
|
|
4466
4462
|
const renderData = { tag: latestTag };
|
|
4467
4463
|
return this.styleFn(renderData, this.colors.git);
|
|
4468
4464
|
} catch {
|
|
@@ -27593,9 +27589,14 @@ var PokerWidget = class extends StdinDataWidget {
|
|
|
27593
27589
|
var WidgetFactory = class {
|
|
27594
27590
|
transcriptProvider;
|
|
27595
27591
|
systemProvider;
|
|
27596
|
-
|
|
27592
|
+
theme;
|
|
27593
|
+
/**
|
|
27594
|
+
* @param theme - Optional theme colors. Defaults to DEFAULT_THEME (Monokai).
|
|
27595
|
+
*/
|
|
27596
|
+
constructor(theme) {
|
|
27597
27597
|
this.transcriptProvider = new TranscriptProvider();
|
|
27598
27598
|
this.systemProvider = new SystemProvider();
|
|
27599
|
+
this.theme = theme ?? DEFAULT_THEME;
|
|
27599
27600
|
}
|
|
27600
27601
|
/**
|
|
27601
27602
|
* Create a widget instance by ID
|
|
@@ -27605,33 +27606,33 @@ var WidgetFactory = class {
|
|
|
27605
27606
|
createWidget(widgetId) {
|
|
27606
27607
|
switch (widgetId) {
|
|
27607
27608
|
case "model":
|
|
27608
|
-
return new ModelWidget();
|
|
27609
|
+
return new ModelWidget(this.theme);
|
|
27609
27610
|
case "context":
|
|
27610
|
-
return new ContextWidget();
|
|
27611
|
+
return new ContextWidget(this.theme);
|
|
27611
27612
|
case "cost":
|
|
27612
|
-
return new CostWidget();
|
|
27613
|
+
return new CostWidget(this.theme);
|
|
27613
27614
|
case "lines":
|
|
27614
|
-
return new LinesWidget();
|
|
27615
|
+
return new LinesWidget(this.theme);
|
|
27615
27616
|
case "duration":
|
|
27616
|
-
return new DurationWidget();
|
|
27617
|
+
return new DurationWidget(this.theme);
|
|
27617
27618
|
case "git":
|
|
27618
|
-
return new GitWidget();
|
|
27619
|
+
return new GitWidget(void 0, this.theme);
|
|
27619
27620
|
case "git-tag":
|
|
27620
|
-
return new GitTagWidget();
|
|
27621
|
+
return new GitTagWidget(void 0, this.theme);
|
|
27621
27622
|
case "config-count":
|
|
27622
|
-
return new ConfigCountWidget();
|
|
27623
|
+
return new ConfigCountWidget(void 0, this.theme);
|
|
27623
27624
|
case "cache-metrics":
|
|
27624
|
-
return new CacheMetricsWidget(
|
|
27625
|
+
return new CacheMetricsWidget(this.theme);
|
|
27625
27626
|
case "active-tools":
|
|
27626
|
-
return new ActiveToolsWidget(
|
|
27627
|
+
return new ActiveToolsWidget(this.theme, this.transcriptProvider);
|
|
27627
27628
|
case "dev-server":
|
|
27628
|
-
return new DevServerWidget(
|
|
27629
|
+
return new DevServerWidget(this.theme);
|
|
27629
27630
|
case "docker":
|
|
27630
|
-
return new DockerWidget(
|
|
27631
|
+
return new DockerWidget(this.theme);
|
|
27631
27632
|
case "poker":
|
|
27632
|
-
return new PokerWidget(
|
|
27633
|
+
return new PokerWidget(this.theme);
|
|
27633
27634
|
case "sysmon":
|
|
27634
|
-
return new SysmonWidget(
|
|
27635
|
+
return new SysmonWidget(this.theme, this.systemProvider);
|
|
27635
27636
|
case "empty-line":
|
|
27636
27637
|
return new EmptyLineWidget();
|
|
27637
27638
|
default:
|