Uh oh!
There was an error while loading. Please reload this page.
feat(config): load commands from .agents - #27973
Conversation
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
ee6a791 to
01b622eCompareAutomated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#27972
Type of change
What does this PR do?
Adds command discovery from
.agents/commands/**/*.md, matching the existing.agents/skillsconvention.Previously slash command markdown was discovered from
.opencode/commandand.opencode/commandsonly. This change scans project.agentsdirectories and global~/.agents, then reuses the existing command loader. The command-name derivation now recognizes.agents/commands, so nested commands keep the existingnested/namebehavior.Prior related work: #12486 requested the same
.agents/commandssupport and was closed as stale, and #12488 was an unmerged duplicate implementation PR that was also closed as stale. #14240 is related but broader because it asks for configurable command and agent search paths.How did you verify your code works?
Ran:
bun test test/config/config.test.ts --timeout 30000 --test-name-pattern "loads commands"bun typecheckAlso ran a manual loader probe against a temporary
.agents/commandstree containingqa.mdandnested/check.md, and confirmed both commands loaded with the expected names and templates.Screenshots / recordings
Not applicable; this is a config loading change.
Checklist
If you do not follow this template your PR will be automatically rejected.