claude-scope 0.6.10 → 0.6.11
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 +46 -11
- package/package.json +1 -1
package/dist/claude-scope.cjs
CHANGED
|
@@ -1491,23 +1491,58 @@ function formatTool(name, target, colors) {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
return nameStr;
|
|
1493
1493
|
}
|
|
1494
|
+
function pluralizeTool(name) {
|
|
1495
|
+
const irregular = {
|
|
1496
|
+
Task: "Tasks",
|
|
1497
|
+
Bash: "Bash",
|
|
1498
|
+
Edit: "Edits",
|
|
1499
|
+
Read: "Reads",
|
|
1500
|
+
Write: "Writes",
|
|
1501
|
+
Grep: "Greps",
|
|
1502
|
+
Glob: "Globs"
|
|
1503
|
+
};
|
|
1504
|
+
return irregular[name] || `${name}s`;
|
|
1505
|
+
}
|
|
1494
1506
|
var activeToolsStyles = {
|
|
1495
1507
|
/**
|
|
1496
|
-
* balanced:
|
|
1508
|
+
* balanced: Group tools by name, showing running and completed counts together
|
|
1509
|
+
* - Running + completed: "ToolName (1 running, 6 done)"
|
|
1510
|
+
* - Only completed: "Tools: 6"
|
|
1511
|
+
* - No symbols, just text format
|
|
1497
1512
|
*/
|
|
1498
1513
|
balanced: (data, colors) => {
|
|
1499
1514
|
const parts = [];
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
);
|
|
1515
|
+
const c = colors ?? getDefaultColors();
|
|
1516
|
+
const allToolNames = /* @__PURE__ */ new Set();
|
|
1517
|
+
for (const tool of data.running) {
|
|
1518
|
+
allToolNames.add(tool.name);
|
|
1505
1519
|
}
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1520
|
+
for (const name of data.completed.keys()) {
|
|
1521
|
+
allToolNames.add(name);
|
|
1522
|
+
}
|
|
1523
|
+
const runningCounts = /* @__PURE__ */ new Map();
|
|
1524
|
+
for (const tool of data.running) {
|
|
1525
|
+
runningCounts.set(tool.name, (runningCounts.get(tool.name) ?? 0) + 1);
|
|
1526
|
+
}
|
|
1527
|
+
for (const name of allToolNames) {
|
|
1528
|
+
const runningCount = runningCounts.get(name) ?? 0;
|
|
1529
|
+
const completedCount = data.completed.get(name) ?? 0;
|
|
1530
|
+
if (runningCount > 0 && completedCount > 0) {
|
|
1531
|
+
const nameStr = colorize(name, c.tools.name);
|
|
1532
|
+
const runningStr = colorize(`${runningCount} running`, c.tools.running);
|
|
1533
|
+
const doneStr = colorize(`${completedCount} done`, c.tools.completed);
|
|
1534
|
+
parts.push(`${nameStr} (${runningStr}, ${doneStr})`);
|
|
1535
|
+
} else if (completedCount > 0) {
|
|
1536
|
+
const pluralName = pluralizeTool(name);
|
|
1537
|
+
const nameStr = colorize(pluralName, c.tools.name);
|
|
1538
|
+
const countStr = colorize(`${completedCount}`, c.tools.count);
|
|
1539
|
+
parts.push(`${nameStr}: ${countStr}`);
|
|
1540
|
+
} else if (runningCount > 0) {
|
|
1541
|
+
const nameStr = colorize(name, c.tools.name);
|
|
1542
|
+
const runningStr = colorize(`${runningCount} running`, c.tools.running);
|
|
1543
|
+
const doneStr = colorize("0 done", c.tools.completed);
|
|
1544
|
+
parts.push(`${nameStr} (${runningStr}, ${doneStr})`);
|
|
1545
|
+
}
|
|
1511
1546
|
}
|
|
1512
1547
|
if (parts.length === 0) {
|
|
1513
1548
|
return "";
|