Skip to content

Commit 8de8cdf

Browse files
iamaeroplaneclaude
andcommitted
fix(extensions): clarify cmd_count comment — per-agent max, not total
The comment said 'covers all agents' implying a total, but cmd_count uses max() across agents (per-agent count). Updated comment to explain the max() choice and why sum() would double-count. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8744262 commit 8de8cdf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,8 +3190,10 @@ def extension_remove(
31903190
# Get extension info for command and skill counts
31913191
ext_manifest = manager.get_extension(extension_id)
31923192
reg_meta = manager.registry.get(extension_id)
3193-
# Derive cmd_count from the registry's registered_commands (includes aliases,
3194-
# covers all agents) rather than from the manifest (primary commands only).
3193+
# Derive cmd_count from the registry's registered_commands (includes aliases)
3194+
# rather than from the manifest (primary commands only). Use max() across
3195+
# agents to get the per-agent count; sum() would double-count since users
3196+
# think in logical commands, not per-agent file counts.
31953197
# Use get() without a default so we can distinguish "key missing" (fall back
31963198
# to manifest) from "key present but empty dict" (zero commands registered).
31973199
registered_commands = reg_meta.get("registered_commands") if isinstance(reg_meta, dict) else None

0 commit comments

Comments
 (0)