-
Notifications
You must be signed in to change notification settings - Fork 7.5k
fix: unofficial PyPI warning (#1982) and legacy extension command name auto-correction (#2017) #2027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: unofficial PyPI warning (#1982) and legacy extension command name auto-correction (#2017) #2027
Changes from all commits
879ddd4
b2c4f99
44d1996
fc99452
16f03ff
d643d0f
61984d4
ee106d1
bc3edb1
b7d22da
b137f44
8744262
8de8cdf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3132,6 +3132,10 @@ def extension_add( | |
| console.print("\n[green]✓[/green] Extension installed successfully!") | ||
| console.print(f"\n[bold]{manifest.name}[/bold] (v{manifest.version})") | ||
| console.print(f" {manifest.description}") | ||
|
|
||
| for warning in manifest.warnings: | ||
| console.print(f"\n[yellow]⚠ Compatibility warning:[/yellow] {warning}") | ||
|
|
||
| console.print("\n[bold cyan]Provided commands:[/bold cyan]") | ||
| for cmd in manifest.commands: | ||
| console.print(f" • {cmd['name']} - {cmd.get('description', '')}") | ||
|
|
@@ -3185,15 +3189,28 @@ def extension_remove( | |
|
|
||
| # Get extension info for command and skill counts | ||
| ext_manifest = manager.get_extension(extension_id) | ||
| cmd_count = len(ext_manifest.commands) if ext_manifest else 0 | ||
| reg_meta = manager.registry.get(extension_id) | ||
| # Derive cmd_count from the registry's registered_commands (includes aliases) | ||
| # rather than from the manifest (primary commands only). Use max() across | ||
| # agents to get the per-agent count; sum() would double-count since users | ||
| # think in logical commands, not per-agent file counts. | ||
| # Use get() without a default so we can distinguish "key missing" (fall back | ||
| # to manifest) from "key present but empty dict" (zero commands registered). | ||
| registered_commands = reg_meta.get("registered_commands") if isinstance(reg_meta, dict) else None | ||
| if isinstance(registered_commands, dict): | ||
| cmd_count = max( | ||
| (len(v) for v in registered_commands.values() if isinstance(v, list)), | ||
| default=0, | ||
| ) | ||
| else: | ||
| cmd_count = len(ext_manifest.commands) if ext_manifest else 0 | ||
| raw_skills = reg_meta.get("registered_skills") if reg_meta else None | ||
| skill_count = len(raw_skills) if isinstance(raw_skills, list) else 0 | ||
|
|
||
| # Confirm removal | ||
| if not force: | ||
| console.print("\n[yellow]⚠ This will remove:[/yellow]") | ||
| console.print(f" • {cmd_count} commands from AI agent") | ||
| console.print(f" • {cmd_count} command{'s' if cmd_count != 1 else ''} per agent") | ||
| if skill_count: | ||
|
Comment on lines
3211
to
3214
|
||
| console.print(f" • {skill_count} agent skill(s)") | ||
| console.print(f" • Extension directory: .specify/extensions/{extension_id}/") | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.