-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Description
What do you want to change?
Add support for overriding command names, and automatically resolving command name conflicts.
Why?
Extensions are great but they tend to use common verbs/nouns for commands resulting in extensions not loading:
[Extension issues]
user ~/projects/mitsuhiko-agent-stuff/pi-extensions/review.ts
Command "/review" conflicts with /Users/james/projects/tmustier-pi-extensions/files-widget/index.ts
auto (project) ~/projects/pi-mono/.pi/extensions/diff.ts
Command "/diff" conflicts with /Users/james/projects/tmustier-pi-extensions/files-widget/index.ts
How? (optional)
Here are three cases we could support:
- Overriding individual commands:
tmustier-pi-extensions/files-widget/index.tsreview->review-tui - Prefixing all commands in an extension:
tmustier-pi-extensions/files-widget/index.tsprefixfiles:->files:review,files:diff,files:files. - Automatically disambiguating based on extension name when there is a conflict:
tmustier-pi-extensions/files-widget/index.ts->files-widget:review,files-widget:diff
Locally to unblock myself, I wired it into a new top-level setting:
"commandMappings": [
{
"extensionPath": "~/projects/mitsuhiko-agent-stuff/pi-extensions/review.ts",
"map": {
"review": "agent-review",
"status": "agent-status"
}
},
{
"extensionPath": "~/projects/tmustier-pi-extensions/files-widget/index.ts",
"prefix": "files:"
}
]
But you could see this being pushed into the extension specification in extensions and packages.extensions.
Metadata
Metadata
Assignees
Labels
No labels