claude-scope 0.8.46 → 0.8.47
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 +192 -167
- package/package.json +1 -1
package/dist/claude-scope.cjs
CHANGED
|
@@ -4298,6 +4298,40 @@ var init_duration_widget = __esm({
|
|
|
4298
4298
|
}
|
|
4299
4299
|
});
|
|
4300
4300
|
|
|
4301
|
+
// src/widgets/empty-line-widget.ts
|
|
4302
|
+
var EmptyLineWidget;
|
|
4303
|
+
var init_empty_line_widget = __esm({
|
|
4304
|
+
"src/widgets/empty-line-widget.ts"() {
|
|
4305
|
+
"use strict";
|
|
4306
|
+
init_widget_types();
|
|
4307
|
+
init_stdin_data_widget();
|
|
4308
|
+
EmptyLineWidget = class extends StdinDataWidget {
|
|
4309
|
+
id = "empty-line";
|
|
4310
|
+
metadata = createWidgetMetadata(
|
|
4311
|
+
"Empty Line",
|
|
4312
|
+
"Empty line separator",
|
|
4313
|
+
"1.0.0",
|
|
4314
|
+
"claude-scope",
|
|
4315
|
+
5
|
|
4316
|
+
// Sixth line (0-indexed)
|
|
4317
|
+
);
|
|
4318
|
+
/**
|
|
4319
|
+
* All styles return the same value (Braille Pattern Blank).
|
|
4320
|
+
* This method exists for API consistency with other widgets.
|
|
4321
|
+
*/
|
|
4322
|
+
setStyle(_style) {
|
|
4323
|
+
}
|
|
4324
|
+
/**
|
|
4325
|
+
* Return Braille Pattern Blank to create a visible empty separator line.
|
|
4326
|
+
* U+2800 occupies cell width but appears blank, ensuring the line renders.
|
|
4327
|
+
*/
|
|
4328
|
+
renderWithData(_data, _context) {
|
|
4329
|
+
return "\u2800";
|
|
4330
|
+
}
|
|
4331
|
+
};
|
|
4332
|
+
}
|
|
4333
|
+
});
|
|
4334
|
+
|
|
4301
4335
|
// src/providers/git-provider.ts
|
|
4302
4336
|
function createGit(cwd) {
|
|
4303
4337
|
return new NativeGit(cwd);
|
|
@@ -4866,6 +4900,128 @@ var init_model_widget = __esm({
|
|
|
4866
4900
|
}
|
|
4867
4901
|
});
|
|
4868
4902
|
|
|
4903
|
+
// src/widgets/sysmon/styles.ts
|
|
4904
|
+
function formatGB(gb) {
|
|
4905
|
+
if (gb < 1) {
|
|
4906
|
+
return `${Math.round(gb * 1024)}MB`;
|
|
4907
|
+
}
|
|
4908
|
+
const formatted = gb.toFixed(1);
|
|
4909
|
+
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}GB` : `${formatted}GB`;
|
|
4910
|
+
}
|
|
4911
|
+
function formatMB(mb) {
|
|
4912
|
+
if (mb < 0.1) {
|
|
4913
|
+
const kb = mb * 1024;
|
|
4914
|
+
const formatted2 = kb.toFixed(1);
|
|
4915
|
+
return formatted2.endsWith(".0") ? `${formatted2.slice(0, -2)}KB` : `${formatted2}KB`;
|
|
4916
|
+
}
|
|
4917
|
+
const formatted = mb.toFixed(1);
|
|
4918
|
+
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}MB` : `${formatted}MB`;
|
|
4919
|
+
}
|
|
4920
|
+
var sysmonStyles;
|
|
4921
|
+
var init_styles13 = __esm({
|
|
4922
|
+
"src/widgets/sysmon/styles.ts"() {
|
|
4923
|
+
"use strict";
|
|
4924
|
+
init_colors();
|
|
4925
|
+
sysmonStyles = {
|
|
4926
|
+
balanced: (data, colors2) => {
|
|
4927
|
+
const cpu = colors2 ? colorize(`CPU ${data.cpu.percent}%`, colors2.cpu) : `CPU ${data.cpu.percent}%`;
|
|
4928
|
+
const ram = colors2 ? colorize(`RAM ${formatGB(data.memory.used)}`, colors2.ram) : `RAM ${formatGB(data.memory.used)}`;
|
|
4929
|
+
const disk = colors2 ? colorize(`Disk ${data.disk.percent}%`, colors2.disk) : `Disk ${data.disk.percent}%`;
|
|
4930
|
+
const net = colors2 ? colorize(`Net \u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `Net \u2193${formatMB(data.network.rxSec)}/s`;
|
|
4931
|
+
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
4932
|
+
return `${cpu} ${sep} ${ram} ${sep} ${disk} ${sep} ${net}`;
|
|
4933
|
+
},
|
|
4934
|
+
compact: (data, colors2) => {
|
|
4935
|
+
const cpu = colors2 ? colorize(`CPU${data.cpu.percent}%`, colors2.cpu) : `CPU${data.cpu.percent}%`;
|
|
4936
|
+
const ram = colors2 ? colorize(`RAM${formatGB(data.memory.used)}`, colors2.ram) : `RAM${formatGB(data.memory.used)}`;
|
|
4937
|
+
const disk = colors2 ? colorize(`D${data.disk.percent}%`, colors2.disk) : `D${data.disk.percent}%`;
|
|
4938
|
+
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
4939
|
+
return `${cpu} ${ram} ${disk} ${net}`;
|
|
4940
|
+
},
|
|
4941
|
+
playful: (data, colors2) => {
|
|
4942
|
+
const cpu = colors2 ? colorize(`${data.cpu.percent}%`, colors2.cpu) : `${data.cpu.percent}%`;
|
|
4943
|
+
const ram = colors2 ? colorize(formatGB(data.memory.used), colors2.ram) : formatGB(data.memory.used);
|
|
4944
|
+
const disk = colors2 ? colorize(`${data.disk.percent}%`, colors2.disk) : `${data.disk.percent}%`;
|
|
4945
|
+
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
4946
|
+
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
4947
|
+
return `\u{1F5A5}\uFE0F ${cpu} ${sep} \u{1F4BE} ${ram} ${sep} \u{1F4BF} ${disk} ${sep} \u{1F310} ${net}`;
|
|
4948
|
+
},
|
|
4949
|
+
verbose: (data, colors2) => {
|
|
4950
|
+
const cpu = colors2 ? colorize(`CPU: ${data.cpu.percent}%`, colors2.cpu) : `CPU: ${data.cpu.percent}%`;
|
|
4951
|
+
const ram = colors2 ? colorize(`RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`, colors2.ram) : `RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`;
|
|
4952
|
+
const disk = colors2 ? colorize(`Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`, colors2.disk) : `Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`;
|
|
4953
|
+
const net = colors2 ? colorize(
|
|
4954
|
+
`Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`,
|
|
4955
|
+
colors2.network
|
|
4956
|
+
) : `Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`;
|
|
4957
|
+
return `${cpu} | ${ram} | ${disk} | ${net}`;
|
|
4958
|
+
}
|
|
4959
|
+
};
|
|
4960
|
+
}
|
|
4961
|
+
});
|
|
4962
|
+
|
|
4963
|
+
// src/widgets/sysmon-widget.ts
|
|
4964
|
+
var SysmonWidget;
|
|
4965
|
+
var init_sysmon_widget = __esm({
|
|
4966
|
+
"src/widgets/sysmon-widget.ts"() {
|
|
4967
|
+
"use strict";
|
|
4968
|
+
init_style_types();
|
|
4969
|
+
init_widget_types();
|
|
4970
|
+
init_theme();
|
|
4971
|
+
init_styles13();
|
|
4972
|
+
SysmonWidget = class {
|
|
4973
|
+
id = "sysmon";
|
|
4974
|
+
metadata = createWidgetMetadata(
|
|
4975
|
+
"Sysmon",
|
|
4976
|
+
"System monitoring: CPU, RAM, Disk, Network metrics",
|
|
4977
|
+
"1.0.0",
|
|
4978
|
+
"claude-scope",
|
|
4979
|
+
2
|
|
4980
|
+
// Default to line 2
|
|
4981
|
+
);
|
|
4982
|
+
colors;
|
|
4983
|
+
provider;
|
|
4984
|
+
styleFn = sysmonStyles.balanced;
|
|
4985
|
+
enabled = true;
|
|
4986
|
+
_lineOverride;
|
|
4987
|
+
constructor(colors2, provider) {
|
|
4988
|
+
this.colors = colors2 ?? DEFAULT_THEME;
|
|
4989
|
+
this.provider = provider ?? null;
|
|
4990
|
+
}
|
|
4991
|
+
async initialize(context) {
|
|
4992
|
+
this.enabled = context.config?.enabled !== false;
|
|
4993
|
+
}
|
|
4994
|
+
async render(_context) {
|
|
4995
|
+
if (!this.provider || !this.isEnabled()) {
|
|
4996
|
+
return null;
|
|
4997
|
+
}
|
|
4998
|
+
const metrics = await this.provider.getMetrics();
|
|
4999
|
+
if (!metrics) {
|
|
5000
|
+
return null;
|
|
5001
|
+
}
|
|
5002
|
+
return this.styleFn(metrics, this.colors.sysmon);
|
|
5003
|
+
}
|
|
5004
|
+
async update(_data) {
|
|
5005
|
+
}
|
|
5006
|
+
isEnabled() {
|
|
5007
|
+
return this.enabled && this.provider !== null;
|
|
5008
|
+
}
|
|
5009
|
+
setStyle(style = DEFAULT_WIDGET_STYLE) {
|
|
5010
|
+
const fn = sysmonStyles[style];
|
|
5011
|
+
if (fn) {
|
|
5012
|
+
this.styleFn = fn;
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
setLine(line) {
|
|
5016
|
+
this._lineOverride = line;
|
|
5017
|
+
}
|
|
5018
|
+
getLine() {
|
|
5019
|
+
return this._lineOverride ?? this.metadata.line ?? 0;
|
|
5020
|
+
}
|
|
5021
|
+
};
|
|
5022
|
+
}
|
|
5023
|
+
});
|
|
5024
|
+
|
|
4869
5025
|
// src/cli/commands/quick-config/demo-data.ts
|
|
4870
5026
|
function createDemoData() {
|
|
4871
5027
|
return {
|
|
@@ -4907,6 +5063,21 @@ function createDemoData() {
|
|
|
4907
5063
|
}
|
|
4908
5064
|
};
|
|
4909
5065
|
}
|
|
5066
|
+
function createMockSystemProvider() {
|
|
5067
|
+
const demoMetrics = {
|
|
5068
|
+
cpu: { percent: 42 },
|
|
5069
|
+
memory: { used: 8.2, total: 16, percent: 51 },
|
|
5070
|
+
disk: { used: 120, total: 256, percent: 47 },
|
|
5071
|
+
network: { rxSec: 2.4, txSec: 0.8 }
|
|
5072
|
+
};
|
|
5073
|
+
return {
|
|
5074
|
+
getMetrics: async () => demoMetrics,
|
|
5075
|
+
startUpdate: () => {
|
|
5076
|
+
},
|
|
5077
|
+
stopUpdate: () => {
|
|
5078
|
+
}
|
|
5079
|
+
};
|
|
5080
|
+
}
|
|
4910
5081
|
var init_demo_data = __esm({
|
|
4911
5082
|
"src/cli/commands/quick-config/demo-data.ts"() {
|
|
4912
5083
|
"use strict";
|
|
@@ -4979,6 +5150,14 @@ async function registerWidgetsFromConfig(registry, config, style, themeName) {
|
|
|
4979
5150
|
const w = new DockerWidget(themeColors);
|
|
4980
5151
|
w.setStyle(s);
|
|
4981
5152
|
return w;
|
|
5153
|
+
},
|
|
5154
|
+
sysmon: (s) => {
|
|
5155
|
+
const w = new SysmonWidget(themeColors, createMockSystemProvider());
|
|
5156
|
+
w.setStyle(s);
|
|
5157
|
+
return w;
|
|
5158
|
+
},
|
|
5159
|
+
"empty-line": () => {
|
|
5160
|
+
return new EmptyLineWidget();
|
|
4982
5161
|
}
|
|
4983
5162
|
};
|
|
4984
5163
|
for (const [lineNum, widgets] of Object.entries(config.lines)) {
|
|
@@ -5029,10 +5208,12 @@ var init_layout_preview = __esm({
|
|
|
5029
5208
|
init_dev_server_widget();
|
|
5030
5209
|
init_docker_widget();
|
|
5031
5210
|
init_duration_widget();
|
|
5211
|
+
init_empty_line_widget();
|
|
5032
5212
|
init_git_tag_widget();
|
|
5033
5213
|
init_git_widget();
|
|
5034
5214
|
init_lines_widget();
|
|
5035
5215
|
init_model_widget();
|
|
5216
|
+
init_sysmon_widget();
|
|
5036
5217
|
init_demo_data();
|
|
5037
5218
|
}
|
|
5038
5219
|
});
|
|
@@ -7823,24 +8004,7 @@ __export(select_with_preview_exports, {
|
|
|
7823
8004
|
async function generatePreviews(choices, style, themeName) {
|
|
7824
8005
|
const previews = [];
|
|
7825
8006
|
const isStyleSelection = choices.length >= 3 && choices.every((c) => isQuickConfigStyle(c.value));
|
|
7826
|
-
const availableThemes =
|
|
7827
|
-
"catppuccin-mocha",
|
|
7828
|
-
// AVAILABLE_THEMES[0]
|
|
7829
|
-
"cyberpunk-neon",
|
|
7830
|
-
// AVAILABLE_THEMES[1]
|
|
7831
|
-
"dracula",
|
|
7832
|
-
// AVAILABLE_THEMES[2]
|
|
7833
|
-
"dusty-sage",
|
|
7834
|
-
// AVAILABLE_THEMES[3]
|
|
7835
|
-
"github-dark-dimmed",
|
|
7836
|
-
// AVAILABLE_THEMES[4]
|
|
7837
|
-
"gray",
|
|
7838
|
-
// AVAILABLE_THEMES[5] - was missing!
|
|
7839
|
-
"monokai",
|
|
7840
|
-
// AVAILABLE_THEMES[6]
|
|
7841
|
-
"muted-gray"
|
|
7842
|
-
// AVAILABLE_THEMES[7] - was missing!
|
|
7843
|
-
];
|
|
8007
|
+
const availableThemes = AVAILABLE_THEMES.slice(0, 8).map((t) => t.name);
|
|
7844
8008
|
const isThemeSelection = choices.some((c) => isThemeName(c.value, availableThemes));
|
|
7845
8009
|
for (const choice of choices) {
|
|
7846
8010
|
try {
|
|
@@ -7925,6 +8089,7 @@ var init_select_with_preview = __esm({
|
|
|
7925
8089
|
"src/cli/commands/quick-config/select-with-preview.ts"() {
|
|
7926
8090
|
"use strict";
|
|
7927
8091
|
init_esm3();
|
|
8092
|
+
init_theme();
|
|
7928
8093
|
init_layout_preview();
|
|
7929
8094
|
selectWithPreview = createPrompt(selectWithPreviewImpl);
|
|
7930
8095
|
}
|
|
@@ -26016,7 +26181,7 @@ function generateBalancedLayout(style, themeName) {
|
|
|
26016
26181
|
{
|
|
26017
26182
|
id: "git-tag",
|
|
26018
26183
|
style,
|
|
26019
|
-
colors: {
|
|
26184
|
+
colors: { branch: theme.git.branch, changes: theme.git.changes }
|
|
26020
26185
|
},
|
|
26021
26186
|
{
|
|
26022
26187
|
id: "cache-metrics",
|
|
@@ -26032,7 +26197,7 @@ function generateBalancedLayout(style, themeName) {
|
|
|
26032
26197
|
{
|
|
26033
26198
|
id: "config-count",
|
|
26034
26199
|
style,
|
|
26035
|
-
colors: {
|
|
26200
|
+
colors: { label: theme.configCount.label, separator: theme.configCount.separator }
|
|
26036
26201
|
}
|
|
26037
26202
|
]
|
|
26038
26203
|
}
|
|
@@ -26126,7 +26291,7 @@ function generateRichLayout(style, themeName) {
|
|
|
26126
26291
|
{
|
|
26127
26292
|
id: "git-tag",
|
|
26128
26293
|
style,
|
|
26129
|
-
colors: {
|
|
26294
|
+
colors: { branch: theme.git.branch, changes: theme.git.changes }
|
|
26130
26295
|
},
|
|
26131
26296
|
{
|
|
26132
26297
|
id: "cache-metrics",
|
|
@@ -26142,7 +26307,7 @@ function generateRichLayout(style, themeName) {
|
|
|
26142
26307
|
{
|
|
26143
26308
|
id: "config-count",
|
|
26144
26309
|
style,
|
|
26145
|
-
colors: {
|
|
26310
|
+
colors: { label: theme.configCount.label, separator: theme.configCount.separator }
|
|
26146
26311
|
}
|
|
26147
26312
|
],
|
|
26148
26313
|
"2": [
|
|
@@ -26258,7 +26423,7 @@ async function selectLayout() {
|
|
|
26258
26423
|
},
|
|
26259
26424
|
{
|
|
26260
26425
|
name: "Rich",
|
|
26261
|
-
description: "
|
|
26426
|
+
description: "5 lines: Core metrics + Git/Cache + Dev/Docker/Tools + Sysmon",
|
|
26262
26427
|
value: "rich",
|
|
26263
26428
|
getConfig: (s, t) => generateRichLayout(s, t)
|
|
26264
26429
|
}
|
|
@@ -26497,119 +26662,7 @@ init_git_tag_widget();
|
|
|
26497
26662
|
init_git_widget();
|
|
26498
26663
|
init_lines_widget();
|
|
26499
26664
|
init_model_widget();
|
|
26500
|
-
|
|
26501
|
-
// src/widgets/sysmon-widget.ts
|
|
26502
|
-
init_style_types();
|
|
26503
|
-
init_widget_types();
|
|
26504
|
-
init_theme();
|
|
26505
|
-
|
|
26506
|
-
// src/widgets/sysmon/styles.ts
|
|
26507
|
-
init_colors();
|
|
26508
|
-
function formatGB(gb) {
|
|
26509
|
-
if (gb < 1) {
|
|
26510
|
-
return `${Math.round(gb * 1024)}MB`;
|
|
26511
|
-
}
|
|
26512
|
-
const formatted = gb.toFixed(1);
|
|
26513
|
-
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}GB` : `${formatted}GB`;
|
|
26514
|
-
}
|
|
26515
|
-
function formatMB(mb) {
|
|
26516
|
-
if (mb < 0.1) {
|
|
26517
|
-
const kb = mb * 1024;
|
|
26518
|
-
const formatted2 = kb.toFixed(1);
|
|
26519
|
-
return formatted2.endsWith(".0") ? `${formatted2.slice(0, -2)}KB` : `${formatted2}KB`;
|
|
26520
|
-
}
|
|
26521
|
-
const formatted = mb.toFixed(1);
|
|
26522
|
-
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}MB` : `${formatted}MB`;
|
|
26523
|
-
}
|
|
26524
|
-
var sysmonStyles = {
|
|
26525
|
-
balanced: (data, colors2) => {
|
|
26526
|
-
const cpu = colors2 ? colorize(`CPU ${data.cpu.percent}%`, colors2.cpu) : `CPU ${data.cpu.percent}%`;
|
|
26527
|
-
const ram = colors2 ? colorize(`RAM ${formatGB(data.memory.used)}`, colors2.ram) : `RAM ${formatGB(data.memory.used)}`;
|
|
26528
|
-
const disk = colors2 ? colorize(`Disk ${data.disk.percent}%`, colors2.disk) : `Disk ${data.disk.percent}%`;
|
|
26529
|
-
const net = colors2 ? colorize(`Net \u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `Net \u2193${formatMB(data.network.rxSec)}/s`;
|
|
26530
|
-
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
26531
|
-
return `${cpu} ${sep} ${ram} ${sep} ${disk} ${sep} ${net}`;
|
|
26532
|
-
},
|
|
26533
|
-
compact: (data, colors2) => {
|
|
26534
|
-
const cpu = colors2 ? colorize(`CPU${data.cpu.percent}%`, colors2.cpu) : `CPU${data.cpu.percent}%`;
|
|
26535
|
-
const ram = colors2 ? colorize(`RAM${formatGB(data.memory.used)}`, colors2.ram) : `RAM${formatGB(data.memory.used)}`;
|
|
26536
|
-
const disk = colors2 ? colorize(`D${data.disk.percent}%`, colors2.disk) : `D${data.disk.percent}%`;
|
|
26537
|
-
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
26538
|
-
return `${cpu} ${ram} ${disk} ${net}`;
|
|
26539
|
-
},
|
|
26540
|
-
playful: (data, colors2) => {
|
|
26541
|
-
const cpu = colors2 ? colorize(`${data.cpu.percent}%`, colors2.cpu) : `${data.cpu.percent}%`;
|
|
26542
|
-
const ram = colors2 ? colorize(formatGB(data.memory.used), colors2.ram) : formatGB(data.memory.used);
|
|
26543
|
-
const disk = colors2 ? colorize(`${data.disk.percent}%`, colors2.disk) : `${data.disk.percent}%`;
|
|
26544
|
-
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
26545
|
-
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
26546
|
-
return `\u{1F5A5}\uFE0F ${cpu} ${sep} \u{1F4BE} ${ram} ${sep} \u{1F4BF} ${disk} ${sep} \u{1F310} ${net}`;
|
|
26547
|
-
},
|
|
26548
|
-
verbose: (data, colors2) => {
|
|
26549
|
-
const cpu = colors2 ? colorize(`CPU: ${data.cpu.percent}%`, colors2.cpu) : `CPU: ${data.cpu.percent}%`;
|
|
26550
|
-
const ram = colors2 ? colorize(`RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`, colors2.ram) : `RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`;
|
|
26551
|
-
const disk = colors2 ? colorize(`Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`, colors2.disk) : `Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`;
|
|
26552
|
-
const net = colors2 ? colorize(
|
|
26553
|
-
`Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`,
|
|
26554
|
-
colors2.network
|
|
26555
|
-
) : `Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`;
|
|
26556
|
-
return `${cpu} | ${ram} | ${disk} | ${net}`;
|
|
26557
|
-
}
|
|
26558
|
-
};
|
|
26559
|
-
|
|
26560
|
-
// src/widgets/sysmon-widget.ts
|
|
26561
|
-
var SysmonWidget = class {
|
|
26562
|
-
id = "sysmon";
|
|
26563
|
-
metadata = createWidgetMetadata(
|
|
26564
|
-
"Sysmon",
|
|
26565
|
-
"System monitoring: CPU, RAM, Disk, Network metrics",
|
|
26566
|
-
"1.0.0",
|
|
26567
|
-
"claude-scope",
|
|
26568
|
-
2
|
|
26569
|
-
// Default to line 2
|
|
26570
|
-
);
|
|
26571
|
-
colors;
|
|
26572
|
-
provider;
|
|
26573
|
-
styleFn = sysmonStyles.balanced;
|
|
26574
|
-
enabled = true;
|
|
26575
|
-
_lineOverride;
|
|
26576
|
-
constructor(colors2, provider) {
|
|
26577
|
-
this.colors = colors2 ?? DEFAULT_THEME;
|
|
26578
|
-
this.provider = provider ?? null;
|
|
26579
|
-
}
|
|
26580
|
-
async initialize(context) {
|
|
26581
|
-
this.enabled = context.config?.enabled !== false;
|
|
26582
|
-
}
|
|
26583
|
-
async render(_context) {
|
|
26584
|
-
if (!this.provider || !this.isEnabled()) {
|
|
26585
|
-
return null;
|
|
26586
|
-
}
|
|
26587
|
-
const metrics = await this.provider.getMetrics();
|
|
26588
|
-
if (!metrics) {
|
|
26589
|
-
return null;
|
|
26590
|
-
}
|
|
26591
|
-
return this.styleFn(metrics, this.colors.sysmon);
|
|
26592
|
-
}
|
|
26593
|
-
async update(_data) {
|
|
26594
|
-
}
|
|
26595
|
-
isEnabled() {
|
|
26596
|
-
return this.enabled && this.provider !== null;
|
|
26597
|
-
}
|
|
26598
|
-
setStyle(style = DEFAULT_WIDGET_STYLE) {
|
|
26599
|
-
const fn = sysmonStyles[style];
|
|
26600
|
-
if (fn) {
|
|
26601
|
-
this.styleFn = fn;
|
|
26602
|
-
}
|
|
26603
|
-
}
|
|
26604
|
-
setLine(line) {
|
|
26605
|
-
this._lineOverride = line;
|
|
26606
|
-
}
|
|
26607
|
-
getLine() {
|
|
26608
|
-
return this._lineOverride ?? this.metadata.line ?? 0;
|
|
26609
|
-
}
|
|
26610
|
-
};
|
|
26611
|
-
|
|
26612
|
-
// src/cli/commands/quick-config/preview.ts
|
|
26665
|
+
init_sysmon_widget();
|
|
26613
26666
|
init_demo_data();
|
|
26614
26667
|
|
|
26615
26668
|
// src/cli/commands/quick-config/index.ts
|
|
@@ -26662,7 +26715,7 @@ async function ensureDefaultConfig() {
|
|
|
26662
26715
|
if (!(0, import_node_fs3.existsSync)(configDir)) {
|
|
26663
26716
|
(0, import_node_fs3.mkdirSync)(configDir, { recursive: true });
|
|
26664
26717
|
}
|
|
26665
|
-
const defaultConfig = generateRichLayout("balanced", "
|
|
26718
|
+
const defaultConfig = generateRichLayout("balanced", "monokai");
|
|
26666
26719
|
(0, import_node_fs3.writeFileSync)(configPath, JSON.stringify(defaultConfig, null, 2), "utf-8");
|
|
26667
26720
|
}
|
|
26668
26721
|
|
|
@@ -26905,36 +26958,7 @@ init_docker_widget();
|
|
|
26905
26958
|
|
|
26906
26959
|
// src/core/widget-factory.ts
|
|
26907
26960
|
init_duration_widget();
|
|
26908
|
-
|
|
26909
|
-
// src/widgets/empty-line-widget.ts
|
|
26910
|
-
init_widget_types();
|
|
26911
|
-
init_stdin_data_widget();
|
|
26912
|
-
var EmptyLineWidget = class extends StdinDataWidget {
|
|
26913
|
-
id = "empty-line";
|
|
26914
|
-
metadata = createWidgetMetadata(
|
|
26915
|
-
"Empty Line",
|
|
26916
|
-
"Empty line separator",
|
|
26917
|
-
"1.0.0",
|
|
26918
|
-
"claude-scope",
|
|
26919
|
-
5
|
|
26920
|
-
// Sixth line (0-indexed)
|
|
26921
|
-
);
|
|
26922
|
-
/**
|
|
26923
|
-
* All styles return the same value (Braille Pattern Blank).
|
|
26924
|
-
* This method exists for API consistency with other widgets.
|
|
26925
|
-
*/
|
|
26926
|
-
setStyle(_style) {
|
|
26927
|
-
}
|
|
26928
|
-
/**
|
|
26929
|
-
* Return Braille Pattern Blank to create a visible empty separator line.
|
|
26930
|
-
* U+2800 occupies cell width but appears blank, ensuring the line renders.
|
|
26931
|
-
*/
|
|
26932
|
-
renderWithData(_data, _context) {
|
|
26933
|
-
return "\u2800";
|
|
26934
|
-
}
|
|
26935
|
-
};
|
|
26936
|
-
|
|
26937
|
-
// src/core/widget-factory.ts
|
|
26961
|
+
init_empty_line_widget();
|
|
26938
26962
|
init_git_tag_widget();
|
|
26939
26963
|
init_git_widget();
|
|
26940
26964
|
init_lines_widget();
|
|
@@ -27586,6 +27610,7 @@ var PokerWidget = class extends StdinDataWidget {
|
|
|
27586
27610
|
};
|
|
27587
27611
|
|
|
27588
27612
|
// src/core/widget-factory.ts
|
|
27613
|
+
init_sysmon_widget();
|
|
27589
27614
|
var WidgetFactory = class {
|
|
27590
27615
|
transcriptProvider;
|
|
27591
27616
|
systemProvider;
|