claude-scope 0.8.18 → 0.8.21
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 +382 -73
- package/package.json +3 -2
package/dist/claude-scope.cjs
CHANGED
|
@@ -141,6 +141,13 @@ function createThemeColors(params) {
|
|
|
141
141
|
count: params.dockerCount ?? params.model,
|
|
142
142
|
running: params.dockerRunning ?? params.contextLow,
|
|
143
143
|
stopped: params.dockerStopped ?? params.contextHigh
|
|
144
|
+
},
|
|
145
|
+
sysmon: {
|
|
146
|
+
cpu: params.sysmonCpu,
|
|
147
|
+
ram: params.sysmonRam,
|
|
148
|
+
disk: params.sysmonDisk,
|
|
149
|
+
network: params.sysmonNetwork,
|
|
150
|
+
separator: params.sysmonSeparator
|
|
144
151
|
}
|
|
145
152
|
};
|
|
146
153
|
}
|
|
@@ -189,7 +196,12 @@ var init_gray_theme = __esm({
|
|
|
189
196
|
dockerLabel: gray,
|
|
190
197
|
dockerCount: gray,
|
|
191
198
|
dockerRunning: gray,
|
|
192
|
-
dockerStopped: gray
|
|
199
|
+
dockerStopped: gray,
|
|
200
|
+
sysmonCpu: gray,
|
|
201
|
+
sysmonRam: gray,
|
|
202
|
+
sysmonDisk: gray,
|
|
203
|
+
sysmonNetwork: gray,
|
|
204
|
+
sysmonSeparator: gray
|
|
193
205
|
})
|
|
194
206
|
};
|
|
195
207
|
}
|
|
@@ -261,8 +273,18 @@ var init_catppuccin_mocha_theme = __esm({
|
|
|
261
273
|
// Mauve
|
|
262
274
|
dockerRunning: rgb(166, 227, 161),
|
|
263
275
|
// Green
|
|
264
|
-
dockerStopped: rgb(243, 139, 168)
|
|
276
|
+
dockerStopped: rgb(243, 139, 168),
|
|
265
277
|
// Red
|
|
278
|
+
sysmonCpu: rgb(243, 139, 168),
|
|
279
|
+
// Red (alert)
|
|
280
|
+
sysmonRam: rgb(137, 180, 250),
|
|
281
|
+
// Blue (info)
|
|
282
|
+
sysmonDisk: rgb(238, 212, 159),
|
|
283
|
+
// Yellow (warning)
|
|
284
|
+
sysmonNetwork: rgb(166, 227, 161),
|
|
285
|
+
// Green (success)
|
|
286
|
+
sysmonSeparator: rgb(88, 91, 112)
|
|
287
|
+
// Dark gray
|
|
266
288
|
})
|
|
267
289
|
};
|
|
268
290
|
}
|
|
@@ -334,8 +356,18 @@ var init_cyberpunk_neon_theme = __esm({
|
|
|
334
356
|
// Purple neon
|
|
335
357
|
dockerRunning: rgb(0, 255, 122),
|
|
336
358
|
// Green neon
|
|
337
|
-
dockerStopped: rgb(255, 0, 122)
|
|
359
|
+
dockerStopped: rgb(255, 0, 122),
|
|
338
360
|
// Magenta neon
|
|
361
|
+
sysmonCpu: rgb(255, 0, 122),
|
|
362
|
+
// Magenta neon (alert)
|
|
363
|
+
sysmonRam: rgb(0, 191, 255),
|
|
364
|
+
// Cyan neon (info)
|
|
365
|
+
sysmonDisk: rgb(255, 214, 0),
|
|
366
|
+
// Yellow neon (warning)
|
|
367
|
+
sysmonNetwork: rgb(0, 255, 122),
|
|
368
|
+
// Green neon (success)
|
|
369
|
+
sysmonSeparator: rgb(68, 0, 102)
|
|
370
|
+
// Dark purple
|
|
339
371
|
})
|
|
340
372
|
};
|
|
341
373
|
}
|
|
@@ -407,8 +439,18 @@ var init_dracula_theme = __esm({
|
|
|
407
439
|
// Purple
|
|
408
440
|
dockerRunning: rgb(80, 250, 123),
|
|
409
441
|
// Green
|
|
410
|
-
dockerStopped: rgb(255, 85, 85)
|
|
442
|
+
dockerStopped: rgb(255, 85, 85),
|
|
411
443
|
// Red
|
|
444
|
+
sysmonCpu: rgb(255, 85, 85),
|
|
445
|
+
// Red (alert)
|
|
446
|
+
sysmonRam: rgb(139, 233, 253),
|
|
447
|
+
// Cyan (info)
|
|
448
|
+
sysmonDisk: rgb(255, 184, 108),
|
|
449
|
+
// Orange (warning)
|
|
450
|
+
sysmonNetwork: rgb(80, 250, 123),
|
|
451
|
+
// Green (success)
|
|
452
|
+
sysmonSeparator: rgb(68, 71, 90)
|
|
453
|
+
// Dark gray
|
|
412
454
|
})
|
|
413
455
|
};
|
|
414
456
|
}
|
|
@@ -469,8 +511,18 @@ var init_dusty_sage_theme = __esm({
|
|
|
469
511
|
// Gray
|
|
470
512
|
dockerRunning: rgb(135, 145, 140),
|
|
471
513
|
// Subtle sage
|
|
472
|
-
dockerStopped: rgb(165, 175, 160)
|
|
514
|
+
dockerStopped: rgb(165, 175, 160),
|
|
473
515
|
// Light sage
|
|
516
|
+
sysmonCpu: rgb(165, 175, 160),
|
|
517
|
+
// Light sage (alert)
|
|
518
|
+
sysmonRam: rgb(120, 140, 130),
|
|
519
|
+
// Dusty green (info)
|
|
520
|
+
sysmonDisk: rgb(150, 160, 145),
|
|
521
|
+
// Medium sage (warning)
|
|
522
|
+
sysmonNetwork: rgb(135, 145, 140),
|
|
523
|
+
// Subtle sage (success)
|
|
524
|
+
sysmonSeparator: rgb(90, 100, 110)
|
|
525
|
+
// Dark gray
|
|
474
526
|
})
|
|
475
527
|
};
|
|
476
528
|
}
|
|
@@ -542,8 +594,18 @@ var init_github_dark_dimmed_theme = __esm({
|
|
|
542
594
|
// Purple
|
|
543
595
|
dockerRunning: rgb(35, 134, 54),
|
|
544
596
|
// GitHub green
|
|
545
|
-
dockerStopped: rgb(248, 81, 73)
|
|
597
|
+
dockerStopped: rgb(248, 81, 73),
|
|
546
598
|
// GitHub red
|
|
599
|
+
sysmonCpu: rgb(248, 81, 73),
|
|
600
|
+
// GitHub red (alert)
|
|
601
|
+
sysmonRam: rgb(88, 166, 255),
|
|
602
|
+
// GitHub blue (info)
|
|
603
|
+
sysmonDisk: rgb(210, 153, 34),
|
|
604
|
+
// GitHub orange (warning)
|
|
605
|
+
sysmonNetwork: rgb(35, 134, 54),
|
|
606
|
+
// GitHub green (success)
|
|
607
|
+
sysmonSeparator: rgb(73, 79, 91)
|
|
608
|
+
// Dark gray
|
|
547
609
|
})
|
|
548
610
|
};
|
|
549
611
|
}
|
|
@@ -615,8 +677,18 @@ var init_monokai_theme = __esm({
|
|
|
615
677
|
// Purple
|
|
616
678
|
dockerRunning: rgb(166, 226, 46),
|
|
617
679
|
// Green
|
|
618
|
-
dockerStopped: rgb(174, 129, 255)
|
|
680
|
+
dockerStopped: rgb(174, 129, 255),
|
|
619
681
|
// Purple
|
|
682
|
+
sysmonCpu: rgb(249, 26, 114),
|
|
683
|
+
// Pink (alert)
|
|
684
|
+
sysmonRam: rgb(102, 217, 239),
|
|
685
|
+
// Cyan (info)
|
|
686
|
+
sysmonDisk: rgb(253, 151, 31),
|
|
687
|
+
// Orange (warning)
|
|
688
|
+
sysmonNetwork: rgb(166, 226, 46),
|
|
689
|
+
// Green (success)
|
|
690
|
+
sysmonSeparator: rgb(98, 114, 164)
|
|
691
|
+
// Dark gray
|
|
620
692
|
})
|
|
621
693
|
};
|
|
622
694
|
}
|
|
@@ -677,8 +749,18 @@ var init_muted_gray_theme = __esm({
|
|
|
677
749
|
// Lighter slate
|
|
678
750
|
dockerRunning: rgb(148, 163, 184),
|
|
679
751
|
// Subtle gray
|
|
680
|
-
dockerStopped: rgb(175, 188, 201)
|
|
752
|
+
dockerStopped: rgb(175, 188, 201),
|
|
681
753
|
// Light gray
|
|
754
|
+
sysmonCpu: rgb(175, 188, 201),
|
|
755
|
+
// Light gray (alert)
|
|
756
|
+
sysmonRam: rgb(156, 163, 175),
|
|
757
|
+
// Slate gray (info)
|
|
758
|
+
sysmonDisk: rgb(160, 174, 192),
|
|
759
|
+
// Medium gray (warning)
|
|
760
|
+
sysmonNetwork: rgb(148, 163, 184),
|
|
761
|
+
// Subtle gray (success)
|
|
762
|
+
sysmonSeparator: rgb(75, 85, 99)
|
|
763
|
+
// Dark gray
|
|
682
764
|
})
|
|
683
765
|
};
|
|
684
766
|
}
|
|
@@ -750,8 +832,18 @@ var init_nord_theme = __esm({
|
|
|
750
832
|
// Nordic white
|
|
751
833
|
dockerRunning: rgb(163, 190, 140),
|
|
752
834
|
// Nordic green
|
|
753
|
-
dockerStopped: rgb(191, 97, 106)
|
|
835
|
+
dockerStopped: rgb(191, 97, 106),
|
|
754
836
|
// Nordic red
|
|
837
|
+
sysmonCpu: rgb(191, 97, 106),
|
|
838
|
+
// Nordic red (alert)
|
|
839
|
+
sysmonRam: rgb(136, 192, 208),
|
|
840
|
+
// Nordic cyan (info)
|
|
841
|
+
sysmonDisk: rgb(235, 203, 139),
|
|
842
|
+
// Nordic yellow (warning)
|
|
843
|
+
sysmonNetwork: rgb(163, 190, 140),
|
|
844
|
+
// Nordic green (success)
|
|
845
|
+
sysmonSeparator: rgb(76, 86, 106)
|
|
846
|
+
// Nordic dark gray
|
|
755
847
|
})
|
|
756
848
|
};
|
|
757
849
|
}
|
|
@@ -823,8 +915,18 @@ var init_one_dark_pro_theme = __esm({
|
|
|
823
915
|
// Orange
|
|
824
916
|
dockerRunning: rgb(152, 195, 121),
|
|
825
917
|
// Green
|
|
826
|
-
dockerStopped: rgb(224, 108, 117)
|
|
918
|
+
dockerStopped: rgb(224, 108, 117),
|
|
827
919
|
// Red
|
|
920
|
+
sysmonCpu: rgb(224, 108, 117),
|
|
921
|
+
// Red (alert)
|
|
922
|
+
sysmonRam: rgb(97, 175, 239),
|
|
923
|
+
// Blue (info)
|
|
924
|
+
sysmonDisk: rgb(229, 192, 123),
|
|
925
|
+
// Yellow (warning)
|
|
926
|
+
sysmonNetwork: rgb(152, 195, 121),
|
|
927
|
+
// Green (success)
|
|
928
|
+
sysmonSeparator: rgb(91, 98, 113)
|
|
929
|
+
// Dark gray
|
|
828
930
|
})
|
|
829
931
|
};
|
|
830
932
|
}
|
|
@@ -896,8 +998,18 @@ var init_professional_blue_theme = __esm({
|
|
|
896
998
|
// Purple
|
|
897
999
|
dockerRunning: rgb(74, 222, 128),
|
|
898
1000
|
// Green
|
|
899
|
-
dockerStopped: rgb(248, 113, 113)
|
|
1001
|
+
dockerStopped: rgb(248, 113, 113),
|
|
900
1002
|
// Red
|
|
1003
|
+
sysmonCpu: rgb(248, 113, 113),
|
|
1004
|
+
// Red (alert)
|
|
1005
|
+
sysmonRam: rgb(96, 165, 250),
|
|
1006
|
+
// Light blue (info)
|
|
1007
|
+
sysmonDisk: rgb(251, 191, 36),
|
|
1008
|
+
// Amber (warning)
|
|
1009
|
+
sysmonNetwork: rgb(74, 222, 128),
|
|
1010
|
+
// Green (success)
|
|
1011
|
+
sysmonSeparator: rgb(100, 116, 139)
|
|
1012
|
+
// Dark slate
|
|
901
1013
|
})
|
|
902
1014
|
};
|
|
903
1015
|
}
|
|
@@ -969,8 +1081,18 @@ var init_rose_pine_theme = __esm({
|
|
|
969
1081
|
// Pine pink
|
|
970
1082
|
dockerRunning: rgb(156, 207, 216),
|
|
971
1083
|
// Pine cyan
|
|
972
|
-
dockerStopped: rgb(235, 111, 146)
|
|
1084
|
+
dockerStopped: rgb(235, 111, 146),
|
|
973
1085
|
// Pine red
|
|
1086
|
+
sysmonCpu: rgb(235, 111, 146),
|
|
1087
|
+
// Pine red (alert)
|
|
1088
|
+
sysmonRam: rgb(156, 207, 216),
|
|
1089
|
+
// Pine cyan (info)
|
|
1090
|
+
sysmonDisk: rgb(233, 201, 176),
|
|
1091
|
+
// Pine beige (warning)
|
|
1092
|
+
sysmonNetwork: rgb(156, 207, 216),
|
|
1093
|
+
// Pine cyan (success)
|
|
1094
|
+
sysmonSeparator: rgb(112, 88, 105)
|
|
1095
|
+
// Pine dark
|
|
974
1096
|
})
|
|
975
1097
|
};
|
|
976
1098
|
}
|
|
@@ -1042,8 +1164,18 @@ var init_semantic_classic_theme = __esm({
|
|
|
1042
1164
|
// Indigo
|
|
1043
1165
|
dockerRunning: rgb(34, 197, 94),
|
|
1044
1166
|
// Green
|
|
1045
|
-
dockerStopped: rgb(239, 68, 68)
|
|
1167
|
+
dockerStopped: rgb(239, 68, 68),
|
|
1046
1168
|
// Red
|
|
1169
|
+
sysmonCpu: rgb(239, 68, 68),
|
|
1170
|
+
// Red (alert)
|
|
1171
|
+
sysmonRam: rgb(59, 130, 246),
|
|
1172
|
+
// Blue (info)
|
|
1173
|
+
sysmonDisk: rgb(234, 179, 8),
|
|
1174
|
+
// Yellow (warning)
|
|
1175
|
+
sysmonNetwork: rgb(34, 197, 94),
|
|
1176
|
+
// Green (success)
|
|
1177
|
+
sysmonSeparator: rgb(75, 85, 99)
|
|
1178
|
+
// Dark gray
|
|
1047
1179
|
})
|
|
1048
1180
|
};
|
|
1049
1181
|
}
|
|
@@ -1104,8 +1236,18 @@ var init_slate_blue_theme = __esm({
|
|
|
1104
1236
|
// Neutral slate
|
|
1105
1237
|
dockerRunning: rgb(148, 163, 184),
|
|
1106
1238
|
// Subtle slate-blue
|
|
1107
|
-
dockerStopped: rgb(175, 188, 201)
|
|
1239
|
+
dockerStopped: rgb(175, 188, 201),
|
|
1108
1240
|
// Light slate
|
|
1241
|
+
sysmonCpu: rgb(175, 188, 201),
|
|
1242
|
+
// Light slate (alert)
|
|
1243
|
+
sysmonRam: rgb(100, 116, 139),
|
|
1244
|
+
// Cool slate (info)
|
|
1245
|
+
sysmonDisk: rgb(160, 174, 192),
|
|
1246
|
+
// Medium slate (warning)
|
|
1247
|
+
sysmonNetwork: rgb(148, 163, 184),
|
|
1248
|
+
// Subtle slate-blue (success)
|
|
1249
|
+
sysmonSeparator: rgb(71, 85, 105)
|
|
1250
|
+
// Dark slate
|
|
1109
1251
|
})
|
|
1110
1252
|
};
|
|
1111
1253
|
}
|
|
@@ -1177,8 +1319,18 @@ var init_solarized_dark_theme = __esm({
|
|
|
1177
1319
|
// Orange
|
|
1178
1320
|
dockerRunning: rgb(133, 153, 0),
|
|
1179
1321
|
// Olive
|
|
1180
|
-
dockerStopped: rgb(220, 50, 47)
|
|
1322
|
+
dockerStopped: rgb(220, 50, 47),
|
|
1181
1323
|
// Red
|
|
1324
|
+
sysmonCpu: rgb(220, 50, 47),
|
|
1325
|
+
// Red (alert)
|
|
1326
|
+
sysmonRam: rgb(38, 139, 210),
|
|
1327
|
+
// Blue (info)
|
|
1328
|
+
sysmonDisk: rgb(181, 137, 0),
|
|
1329
|
+
// Yellow (warning)
|
|
1330
|
+
sysmonNetwork: rgb(133, 153, 0),
|
|
1331
|
+
// Olive (success)
|
|
1332
|
+
sysmonSeparator: rgb(7, 54, 66)
|
|
1333
|
+
// Base02
|
|
1182
1334
|
})
|
|
1183
1335
|
};
|
|
1184
1336
|
}
|
|
@@ -1250,8 +1402,18 @@ var init_tokyo_night_theme = __esm({
|
|
|
1250
1402
|
// Teal
|
|
1251
1403
|
dockerRunning: rgb(146, 180, 203),
|
|
1252
1404
|
// Cyan
|
|
1253
|
-
dockerStopped: rgb(249, 86, 119)
|
|
1405
|
+
dockerStopped: rgb(249, 86, 119),
|
|
1254
1406
|
// Red
|
|
1407
|
+
sysmonCpu: rgb(249, 86, 119),
|
|
1408
|
+
// Red (alert)
|
|
1409
|
+
sysmonRam: rgb(122, 132, 173),
|
|
1410
|
+
// Blue (info)
|
|
1411
|
+
sysmonDisk: rgb(232, 166, 162),
|
|
1412
|
+
// Pink-red (warning)
|
|
1413
|
+
sysmonNetwork: rgb(146, 180, 203),
|
|
1414
|
+
// Cyan (success)
|
|
1415
|
+
sysmonSeparator: rgb(77, 82, 120)
|
|
1416
|
+
// Dark blue-gray
|
|
1255
1417
|
})
|
|
1256
1418
|
};
|
|
1257
1419
|
}
|
|
@@ -1323,8 +1485,18 @@ var init_vscode_dark_plus_theme = __esm({
|
|
|
1323
1485
|
// Blue
|
|
1324
1486
|
dockerRunning: rgb(74, 222, 128),
|
|
1325
1487
|
// Green
|
|
1326
|
-
dockerStopped: rgb(171, 178, 191)
|
|
1488
|
+
dockerStopped: rgb(171, 178, 191),
|
|
1327
1489
|
// Gray
|
|
1490
|
+
sysmonCpu: rgb(248, 113, 113),
|
|
1491
|
+
// Red (alert)
|
|
1492
|
+
sysmonRam: rgb(96, 165, 250),
|
|
1493
|
+
// Blue (info)
|
|
1494
|
+
sysmonDisk: rgb(251, 191, 36),
|
|
1495
|
+
// Yellow (warning)
|
|
1496
|
+
sysmonNetwork: rgb(74, 222, 128),
|
|
1497
|
+
// Green (success)
|
|
1498
|
+
sysmonSeparator: rgb(86, 92, 104)
|
|
1499
|
+
// Dark gray
|
|
1328
1500
|
})
|
|
1329
1501
|
};
|
|
1330
1502
|
}
|
|
@@ -1529,24 +1701,27 @@ var init_widget_registry = __esm({
|
|
|
1529
1701
|
"src/core/widget-registry.ts"() {
|
|
1530
1702
|
"use strict";
|
|
1531
1703
|
WidgetRegistry = class {
|
|
1532
|
-
widgets =
|
|
1704
|
+
widgets = [];
|
|
1533
1705
|
/**
|
|
1534
1706
|
* Register a widget
|
|
1535
1707
|
*/
|
|
1536
1708
|
async register(widget, context) {
|
|
1537
|
-
if (this.widgets.has(widget.id)) {
|
|
1538
|
-
throw new Error(`Widget with id '${widget.id}' already registered`);
|
|
1539
|
-
}
|
|
1540
1709
|
if (context) {
|
|
1541
1710
|
await widget.initialize(context);
|
|
1542
1711
|
}
|
|
1543
|
-
this.widgets.
|
|
1712
|
+
this.widgets.push(widget);
|
|
1544
1713
|
}
|
|
1545
1714
|
/**
|
|
1546
1715
|
* Unregister a widget
|
|
1716
|
+
* @param widgetOrId Widget instance or widget id
|
|
1547
1717
|
*/
|
|
1548
|
-
async unregister(
|
|
1549
|
-
|
|
1718
|
+
async unregister(widgetOrId) {
|
|
1719
|
+
let widget;
|
|
1720
|
+
if (typeof widgetOrId === "string") {
|
|
1721
|
+
widget = this.widgets.find((w) => w.id === widgetOrId);
|
|
1722
|
+
} else {
|
|
1723
|
+
widget = this.widgets.find((w) => w === widgetOrId);
|
|
1724
|
+
}
|
|
1550
1725
|
if (!widget) {
|
|
1551
1726
|
return;
|
|
1552
1727
|
}
|
|
@@ -1555,26 +1730,29 @@ var init_widget_registry = __esm({
|
|
|
1555
1730
|
await widget.cleanup();
|
|
1556
1731
|
}
|
|
1557
1732
|
} finally {
|
|
1558
|
-
this.widgets.
|
|
1733
|
+
const index = this.widgets.indexOf(widget);
|
|
1734
|
+
if (index !== -1) {
|
|
1735
|
+
this.widgets.splice(index, 1);
|
|
1736
|
+
}
|
|
1559
1737
|
}
|
|
1560
1738
|
}
|
|
1561
1739
|
/**
|
|
1562
1740
|
* Get a widget by id
|
|
1563
1741
|
*/
|
|
1564
1742
|
get(id) {
|
|
1565
|
-
return this.widgets.
|
|
1743
|
+
return this.widgets.find((w) => w.id === id);
|
|
1566
1744
|
}
|
|
1567
1745
|
/**
|
|
1568
1746
|
* Check if widget is registered
|
|
1569
1747
|
*/
|
|
1570
1748
|
has(id) {
|
|
1571
|
-
return this.widgets.
|
|
1749
|
+
return this.widgets.some((w) => w.id === id);
|
|
1572
1750
|
}
|
|
1573
1751
|
/**
|
|
1574
1752
|
* Get all registered widgets
|
|
1575
1753
|
*/
|
|
1576
1754
|
getAll() {
|
|
1577
|
-
return
|
|
1755
|
+
return [...this.widgets];
|
|
1578
1756
|
}
|
|
1579
1757
|
/**
|
|
1580
1758
|
* Get only enabled widgets
|
|
@@ -1586,12 +1764,12 @@ var init_widget_registry = __esm({
|
|
|
1586
1764
|
* Clear all widgets
|
|
1587
1765
|
*/
|
|
1588
1766
|
async clear() {
|
|
1589
|
-
for (const widget of this.widgets
|
|
1767
|
+
for (const widget of this.widgets) {
|
|
1590
1768
|
if (widget.cleanup) {
|
|
1591
1769
|
await widget.cleanup();
|
|
1592
1770
|
}
|
|
1593
1771
|
}
|
|
1594
|
-
this.widgets
|
|
1772
|
+
this.widgets = [];
|
|
1595
1773
|
}
|
|
1596
1774
|
};
|
|
1597
1775
|
}
|
|
@@ -1792,13 +1970,13 @@ function truncatePath(path2) {
|
|
|
1792
1970
|
return path2;
|
|
1793
1971
|
}
|
|
1794
1972
|
const parts = path2.split("/");
|
|
1795
|
-
return
|
|
1973
|
+
return ".../" + parts[parts.length - 1];
|
|
1796
1974
|
}
|
|
1797
1975
|
function formatTool(name, target, colors2) {
|
|
1798
1976
|
const nameStr = colorize(name, colors2.tools.name);
|
|
1799
1977
|
if (target) {
|
|
1800
|
-
const targetStr = colorize(
|
|
1801
|
-
return
|
|
1978
|
+
const targetStr = colorize(": " + truncatePath(target), colors2.tools.target);
|
|
1979
|
+
return nameStr + targetStr;
|
|
1802
1980
|
}
|
|
1803
1981
|
return nameStr;
|
|
1804
1982
|
}
|
|
@@ -1812,7 +1990,7 @@ function pluralizeTool(name) {
|
|
|
1812
1990
|
Grep: "Greps",
|
|
1813
1991
|
Glob: "Globs"
|
|
1814
1992
|
};
|
|
1815
|
-
return irregular[name] ||
|
|
1993
|
+
return irregular[name] || name + "s";
|
|
1816
1994
|
}
|
|
1817
1995
|
function getDefaultColors() {
|
|
1818
1996
|
return {
|
|
@@ -1884,6 +2062,13 @@ function getDefaultColors() {
|
|
|
1884
2062
|
count: "\x1B[37m",
|
|
1885
2063
|
running: "\x1B[32m",
|
|
1886
2064
|
stopped: "\x1B[31m"
|
|
2065
|
+
},
|
|
2066
|
+
sysmon: {
|
|
2067
|
+
cpu: "\x1B[31m",
|
|
2068
|
+
ram: "\x1B[36m",
|
|
2069
|
+
disk: "\x1B[33m",
|
|
2070
|
+
network: "\x1B[32m",
|
|
2071
|
+
separator: "\x1B[90m"
|
|
1887
2072
|
}
|
|
1888
2073
|
};
|
|
1889
2074
|
}
|
|
@@ -1919,19 +2104,19 @@ var init_styles = __esm({
|
|
|
1919
2104
|
const completedCount = completedMap.get(name) ?? 0;
|
|
1920
2105
|
if (runningCount > 0 && completedCount > 0) {
|
|
1921
2106
|
const nameStr = colorize(name, c.tools.name);
|
|
1922
|
-
const runningStr = colorize(
|
|
1923
|
-
const doneStr = colorize(
|
|
1924
|
-
parts.push(
|
|
2107
|
+
const runningStr = colorize(runningCount + " running", c.tools.running);
|
|
2108
|
+
const doneStr = colorize(completedCount + " done", c.tools.completed);
|
|
2109
|
+
parts.push(nameStr + " (" + runningStr + ", " + doneStr + ")");
|
|
1925
2110
|
} else if (completedCount > 0) {
|
|
1926
2111
|
const pluralName = pluralizeTool(name);
|
|
1927
2112
|
const nameStr = colorize(pluralName, c.tools.name);
|
|
1928
|
-
const countStr = colorize(
|
|
1929
|
-
parts.push(
|
|
2113
|
+
const countStr = colorize(String(completedCount), c.tools.count);
|
|
2114
|
+
parts.push(nameStr + ": " + countStr);
|
|
1930
2115
|
} else if (runningCount > 0) {
|
|
1931
2116
|
const nameStr = colorize(name, c.tools.name);
|
|
1932
|
-
const runningStr = colorize(
|
|
2117
|
+
const runningStr = colorize(runningCount + " running", c.tools.running);
|
|
1933
2118
|
const doneStr = colorize("0 done", c.tools.completed);
|
|
1934
|
-
parts.push(
|
|
2119
|
+
parts.push(nameStr + " (" + runningStr + ", " + doneStr + ")");
|
|
1935
2120
|
}
|
|
1936
2121
|
}
|
|
1937
2122
|
if (parts.length === 0) {
|
|
@@ -1946,10 +2131,10 @@ var init_styles = __esm({
|
|
|
1946
2131
|
const parts = [];
|
|
1947
2132
|
const c = colors2 ?? getDefaultColors();
|
|
1948
2133
|
for (const tool of data.running) {
|
|
1949
|
-
parts.push(
|
|
2134
|
+
parts.push("[" + colorize(tool.name, c.tools.name) + "]");
|
|
1950
2135
|
}
|
|
1951
2136
|
for (const [name] of data.completed.slice(0, 3)) {
|
|
1952
|
-
parts.push(
|
|
2137
|
+
parts.push("[" + colorize(name, c.tools.completed) + "]");
|
|
1953
2138
|
}
|
|
1954
2139
|
if (parts.length === 0) {
|
|
1955
2140
|
return "";
|
|
@@ -1999,18 +2184,18 @@ var init_styles = __esm({
|
|
|
1999
2184
|
const emoji = emojis[name] ?? "\u{1F527}";
|
|
2000
2185
|
if (runningCount > 0 && completedCount > 0) {
|
|
2001
2186
|
const nameStr = colorize(name, c.tools.name);
|
|
2002
|
-
const runningStr = colorize(
|
|
2003
|
-
const doneStr = colorize(
|
|
2004
|
-
parts.push(
|
|
2187
|
+
const runningStr = colorize("\u25B6" + runningCount, c.tools.running);
|
|
2188
|
+
const doneStr = colorize("\u2713" + completedCount, c.tools.completed);
|
|
2189
|
+
parts.push(emoji + " " + nameStr + " (" + runningStr + ", " + doneStr + ")");
|
|
2005
2190
|
} else if (completedCount > 0) {
|
|
2006
2191
|
const pluralName = pluralizeTool(name);
|
|
2007
2192
|
const nameStr = colorize(pluralName, c.tools.name);
|
|
2008
|
-
const countStr = colorize(
|
|
2009
|
-
parts.push(
|
|
2193
|
+
const countStr = colorize(String(completedCount), c.tools.count);
|
|
2194
|
+
parts.push(emoji + " " + nameStr + ": " + countStr);
|
|
2010
2195
|
} else if (runningCount > 0) {
|
|
2011
2196
|
const nameStr = colorize(name, c.tools.name);
|
|
2012
|
-
const runningStr = colorize(
|
|
2013
|
-
parts.push(
|
|
2197
|
+
const runningStr = colorize("\u25B6" + runningCount, c.tools.running);
|
|
2198
|
+
parts.push(emoji + " " + nameStr + " (" + runningStr + ")");
|
|
2014
2199
|
}
|
|
2015
2200
|
}
|
|
2016
2201
|
if (parts.length === 0) {
|
|
@@ -2026,13 +2211,13 @@ var init_styles = __esm({
|
|
|
2026
2211
|
const c = colors2 ?? getDefaultColors();
|
|
2027
2212
|
for (const tool of data.running) {
|
|
2028
2213
|
const label = colorize("Running:", c.tools.running);
|
|
2029
|
-
parts.push(
|
|
2214
|
+
parts.push(label + " " + formatTool(tool.name, tool.target, c));
|
|
2030
2215
|
}
|
|
2031
2216
|
const sorted = data.completed.slice(0, 3);
|
|
2032
2217
|
for (const [name, count] of sorted) {
|
|
2033
2218
|
const label = colorize("Completed:", c.tools.completed);
|
|
2034
|
-
const countStr = colorize(
|
|
2035
|
-
parts.push(
|
|
2219
|
+
const countStr = colorize("(" + count + "x)", c.tools.count);
|
|
2220
|
+
parts.push(label + " " + name + " " + countStr);
|
|
2036
2221
|
}
|
|
2037
2222
|
if (parts.length === 0) {
|
|
2038
2223
|
return "";
|
|
@@ -2047,19 +2232,19 @@ var init_styles = __esm({
|
|
|
2047
2232
|
const allTools = [
|
|
2048
2233
|
...data.running.map((t) => {
|
|
2049
2234
|
const indicator = colorize("\u25D0", c.tools.running);
|
|
2050
|
-
return
|
|
2235
|
+
return indicator + " " + formatTool(t.name, t.target, c);
|
|
2051
2236
|
}),
|
|
2052
2237
|
...data.completed.slice(0, 3).map(([name, count]) => {
|
|
2053
2238
|
const indicator = colorize("\u2713", c.tools.completed);
|
|
2054
|
-
const countStr = colorize(
|
|
2055
|
-
return
|
|
2239
|
+
const countStr = colorize("\xD7" + count, c.tools.count);
|
|
2240
|
+
return indicator + " " + name + " " + countStr;
|
|
2056
2241
|
})
|
|
2057
2242
|
];
|
|
2058
2243
|
if (allTools.length === 0) {
|
|
2059
2244
|
return "";
|
|
2060
2245
|
}
|
|
2061
2246
|
const prefix = colors2 ? colorize("Tools:", c.semantic.info) : "Tools:";
|
|
2062
|
-
return
|
|
2247
|
+
return prefix + ": " + allTools.join(" | ");
|
|
2063
2248
|
},
|
|
2064
2249
|
/**
|
|
2065
2250
|
* indicator: ● bullet indicators
|
|
@@ -2069,11 +2254,11 @@ var init_styles = __esm({
|
|
|
2069
2254
|
const c = colors2 ?? getDefaultColors();
|
|
2070
2255
|
for (const tool of data.running) {
|
|
2071
2256
|
const bullet = colorize("\u25CF", c.semantic.info);
|
|
2072
|
-
parts.push(
|
|
2257
|
+
parts.push(bullet + " " + formatTool(tool.name, tool.target, c));
|
|
2073
2258
|
}
|
|
2074
2259
|
for (const [name] of data.completed.slice(0, 3)) {
|
|
2075
2260
|
const bullet = colorize("\u25CF", c.tools.completed);
|
|
2076
|
-
parts.push(
|
|
2261
|
+
parts.push(bullet + " " + name);
|
|
2077
2262
|
}
|
|
2078
2263
|
if (parts.length === 0) {
|
|
2079
2264
|
return "";
|
|
@@ -8024,6 +8209,127 @@ init_git_tag_widget();
|
|
|
8024
8209
|
init_git_widget();
|
|
8025
8210
|
init_lines_widget();
|
|
8026
8211
|
init_model_widget();
|
|
8212
|
+
|
|
8213
|
+
// src/widgets/sysmon-widget.ts
|
|
8214
|
+
init_widget_types();
|
|
8215
|
+
init_theme();
|
|
8216
|
+
|
|
8217
|
+
// src/widgets/sysmon/styles.ts
|
|
8218
|
+
init_colors();
|
|
8219
|
+
function formatGB(gb) {
|
|
8220
|
+
if (gb < 1) {
|
|
8221
|
+
return `${Math.round(gb * 1024)}MB`;
|
|
8222
|
+
}
|
|
8223
|
+
const formatted = gb.toFixed(1);
|
|
8224
|
+
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}GB` : `${formatted}GB`;
|
|
8225
|
+
}
|
|
8226
|
+
function formatMB(mb) {
|
|
8227
|
+
if (mb < 0.1) {
|
|
8228
|
+
const kb = mb * 1024;
|
|
8229
|
+
const formatted2 = kb.toFixed(1);
|
|
8230
|
+
return formatted2.endsWith(".0") ? `${formatted2.slice(0, -2)}KB` : `${formatted2}KB`;
|
|
8231
|
+
}
|
|
8232
|
+
const formatted = mb.toFixed(1);
|
|
8233
|
+
return formatted.endsWith(".0") ? `${formatted.slice(0, -2)}MB` : `${formatted}MB`;
|
|
8234
|
+
}
|
|
8235
|
+
var sysmonStyles = {
|
|
8236
|
+
balanced: (data, colors2) => {
|
|
8237
|
+
const cpu = colors2 ? colorize(`CPU ${data.cpu.percent}%`, colors2.cpu) : `CPU ${data.cpu.percent}%`;
|
|
8238
|
+
const ram = colors2 ? colorize(`RAM ${formatGB(data.memory.used)}`, colors2.ram) : `RAM ${formatGB(data.memory.used)}`;
|
|
8239
|
+
const disk = colors2 ? colorize(`Disk ${data.disk.percent}%`, colors2.disk) : `Disk ${data.disk.percent}%`;
|
|
8240
|
+
const net = colors2 ? colorize(`Net \u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `Net \u2193${formatMB(data.network.rxSec)}/s`;
|
|
8241
|
+
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
8242
|
+
return `${cpu} ${sep} ${ram} ${sep} ${disk} ${sep} ${net}`;
|
|
8243
|
+
},
|
|
8244
|
+
compact: (data, colors2) => {
|
|
8245
|
+
const cpu = colors2 ? colorize(`CPU${data.cpu.percent}%`, colors2.cpu) : `CPU${data.cpu.percent}%`;
|
|
8246
|
+
const ram = colors2 ? colorize(`RAM${formatGB(data.memory.used)}`, colors2.ram) : `RAM${formatGB(data.memory.used)}`;
|
|
8247
|
+
const disk = colors2 ? colorize(`D${data.disk.percent}%`, colors2.disk) : `D${data.disk.percent}%`;
|
|
8248
|
+
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
8249
|
+
return `${cpu} ${ram} ${disk} ${net}`;
|
|
8250
|
+
},
|
|
8251
|
+
playful: (data, colors2) => {
|
|
8252
|
+
const cpu = colors2 ? colorize(`${data.cpu.percent}%`, colors2.cpu) : `${data.cpu.percent}%`;
|
|
8253
|
+
const ram = colors2 ? colorize(formatGB(data.memory.used), colors2.ram) : formatGB(data.memory.used);
|
|
8254
|
+
const disk = colors2 ? colorize(`${data.disk.percent}%`, colors2.disk) : `${data.disk.percent}%`;
|
|
8255
|
+
const net = colors2 ? colorize(`\u2193${formatMB(data.network.rxSec)}/s`, colors2.network) : `\u2193${formatMB(data.network.rxSec)}/s`;
|
|
8256
|
+
const sep = colors2 ? colorize("|", colors2.separator) : "|";
|
|
8257
|
+
return `\u{1F5A5}\uFE0F ${cpu} ${sep} \u{1F4BE} ${ram} ${sep} \u{1F4BF} ${disk} ${sep} \u{1F310} ${net}`;
|
|
8258
|
+
},
|
|
8259
|
+
verbose: (data, colors2) => {
|
|
8260
|
+
const cpu = colors2 ? colorize(`CPU: ${data.cpu.percent}%`, colors2.cpu) : `CPU: ${data.cpu.percent}%`;
|
|
8261
|
+
const ram = colors2 ? colorize(`RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`, colors2.ram) : `RAM: ${formatGB(data.memory.used)}/${formatGB(data.memory.total)}`;
|
|
8262
|
+
const disk = colors2 ? colorize(`Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`, colors2.disk) : `Disk: ${formatGB(data.disk.used)}/${formatGB(data.disk.total)}`;
|
|
8263
|
+
const net = colors2 ? colorize(
|
|
8264
|
+
`Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`,
|
|
8265
|
+
colors2.network
|
|
8266
|
+
) : `Net: \u2193${formatMB(data.network.rxSec)}/s \u2191${formatMB(data.network.txSec)}/s`;
|
|
8267
|
+
return `${cpu} | ${ram} | ${disk} | ${net}`;
|
|
8268
|
+
}
|
|
8269
|
+
};
|
|
8270
|
+
|
|
8271
|
+
// src/widgets/sysmon-widget.ts
|
|
8272
|
+
var SysmonWidget = class {
|
|
8273
|
+
id = "sysmon";
|
|
8274
|
+
metadata = createWidgetMetadata(
|
|
8275
|
+
"Sysmon",
|
|
8276
|
+
"System monitoring: CPU, RAM, Disk, Network metrics",
|
|
8277
|
+
"1.0.0",
|
|
8278
|
+
"claude-scope",
|
|
8279
|
+
2
|
|
8280
|
+
// Default to line 2
|
|
8281
|
+
);
|
|
8282
|
+
colors;
|
|
8283
|
+
provider;
|
|
8284
|
+
_lineOverride;
|
|
8285
|
+
styleFn = sysmonStyles.balanced;
|
|
8286
|
+
currentMetrics = null;
|
|
8287
|
+
updateIntervalMs = 2500;
|
|
8288
|
+
// 2.5 seconds
|
|
8289
|
+
enabled = true;
|
|
8290
|
+
constructor(colors2, provider) {
|
|
8291
|
+
this.colors = colors2 ?? DEFAULT_THEME;
|
|
8292
|
+
this.provider = provider ?? null;
|
|
8293
|
+
}
|
|
8294
|
+
async initialize(context) {
|
|
8295
|
+
this.enabled = context.config?.enabled !== false;
|
|
8296
|
+
if (!this.provider || !this.enabled) {
|
|
8297
|
+
return;
|
|
8298
|
+
}
|
|
8299
|
+
this.currentMetrics = await this.provider.getMetrics();
|
|
8300
|
+
this.provider.startUpdate(this.updateIntervalMs, (metrics) => {
|
|
8301
|
+
this.currentMetrics = metrics;
|
|
8302
|
+
});
|
|
8303
|
+
}
|
|
8304
|
+
async render(_context) {
|
|
8305
|
+
if (!this.currentMetrics || !this.isEnabled()) {
|
|
8306
|
+
return null;
|
|
8307
|
+
}
|
|
8308
|
+
return this.styleFn(this.currentMetrics, this.colors.sysmon);
|
|
8309
|
+
}
|
|
8310
|
+
async update(_data) {
|
|
8311
|
+
}
|
|
8312
|
+
isEnabled() {
|
|
8313
|
+
return this.enabled && this.provider !== null;
|
|
8314
|
+
}
|
|
8315
|
+
async cleanup() {
|
|
8316
|
+
this.provider?.stopUpdate();
|
|
8317
|
+
}
|
|
8318
|
+
setStyle(style = "balanced") {
|
|
8319
|
+
const fn = sysmonStyles[style];
|
|
8320
|
+
if (fn) {
|
|
8321
|
+
this.styleFn = fn;
|
|
8322
|
+
}
|
|
8323
|
+
}
|
|
8324
|
+
setLine(line) {
|
|
8325
|
+
this._lineOverride = line;
|
|
8326
|
+
}
|
|
8327
|
+
getLine() {
|
|
8328
|
+
return this._lineOverride ?? this.metadata.line ?? 2;
|
|
8329
|
+
}
|
|
8330
|
+
};
|
|
8331
|
+
|
|
8332
|
+
// src/cli/commands/quick-config/preview.ts
|
|
8027
8333
|
init_demo_data();
|
|
8028
8334
|
|
|
8029
8335
|
// src/cli/commands/quick-config/index.ts
|
|
@@ -8082,6 +8388,9 @@ async function ensureDefaultConfig() {
|
|
|
8082
8388
|
|
|
8083
8389
|
// src/config/config-loader.ts
|
|
8084
8390
|
function getConfigPath() {
|
|
8391
|
+
if (process.env.CLAUDE_SCOPE_CONFIG) {
|
|
8392
|
+
return process.env.CLAUDE_SCOPE_CONFIG;
|
|
8393
|
+
}
|
|
8085
8394
|
return (0, import_node_path4.join)((0, import_node_os4.homedir)(), ".claude-scope", "config.json");
|
|
8086
8395
|
}
|
|
8087
8396
|
async function loadWidgetConfig() {
|
|
@@ -8864,6 +9173,8 @@ var WidgetFactory = class {
|
|
|
8864
9173
|
return new DockerWidget(DEFAULT_THEME);
|
|
8865
9174
|
case "poker":
|
|
8866
9175
|
return new PokerWidget(DEFAULT_THEME);
|
|
9176
|
+
case "sysmon":
|
|
9177
|
+
return new SysmonWidget(DEFAULT_THEME);
|
|
8867
9178
|
case "empty-line":
|
|
8868
9179
|
return new EmptyLineWidget();
|
|
8869
9180
|
default:
|
|
@@ -8888,6 +9199,7 @@ var WidgetFactory = class {
|
|
|
8888
9199
|
"dev-server",
|
|
8889
9200
|
"docker",
|
|
8890
9201
|
"poker",
|
|
9202
|
+
"sysmon",
|
|
8891
9203
|
"empty-line"
|
|
8892
9204
|
];
|
|
8893
9205
|
}
|
|
@@ -9079,18 +9391,12 @@ async function readStdin() {
|
|
|
9079
9391
|
}
|
|
9080
9392
|
return Buffer.concat(chunks).toString("utf8");
|
|
9081
9393
|
}
|
|
9082
|
-
function applyWidgetConfig(widget,
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
}
|
|
9089
|
-
if (typeof widget.setLine === "function") {
|
|
9090
|
-
widget.setLine(parseInt(lineNum, 10));
|
|
9091
|
-
}
|
|
9092
|
-
break;
|
|
9093
|
-
}
|
|
9394
|
+
function applyWidgetConfig(widget, widgetConfig) {
|
|
9395
|
+
if (typeof widget.setStyle === "function" && isValidWidgetStyle(widgetConfig.style)) {
|
|
9396
|
+
widget.setStyle(widgetConfig.style);
|
|
9397
|
+
}
|
|
9398
|
+
if (typeof widget.setLine === "function" && typeof widgetConfig.line === "number") {
|
|
9399
|
+
widget.setLine(widgetConfig.line);
|
|
9094
9400
|
}
|
|
9095
9401
|
}
|
|
9096
9402
|
async function main() {
|
|
@@ -9111,11 +9417,14 @@ async function main() {
|
|
|
9111
9417
|
const widgetConfig = await loadWidgetConfig();
|
|
9112
9418
|
const factory = new WidgetFactory();
|
|
9113
9419
|
if (widgetConfig) {
|
|
9114
|
-
for (const [
|
|
9420
|
+
for (const [lineNum, widgets] of Object.entries(widgetConfig.lines)) {
|
|
9115
9421
|
for (const widgetConfigItem of widgets) {
|
|
9116
9422
|
const widget = factory.createWidget(widgetConfigItem.id);
|
|
9117
9423
|
if (widget) {
|
|
9118
|
-
applyWidgetConfig(widget,
|
|
9424
|
+
applyWidgetConfig(widget, {
|
|
9425
|
+
...widgetConfigItem,
|
|
9426
|
+
line: parseInt(lineNum, 10)
|
|
9427
|
+
});
|
|
9119
9428
|
await registry.register(widget);
|
|
9120
9429
|
}
|
|
9121
9430
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-scope",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.21",
|
|
4
4
|
"description": "Claude Code plugin for session status and analytics",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@inquirer/prompts": "^7.10.1"
|
|
54
|
+
"@inquirer/prompts": "^7.10.1",
|
|
55
|
+
"systeminformation": "^5.30.3"
|
|
55
56
|
}
|
|
56
57
|
}
|