Repository navigation
fix(opencode): ignore node_modules during config and skill discovery - #37219
ulises-jeremias wants to merge 3 commits into
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Closes anomalyco#30337 Config and skill discovery use glob scans rooted at .opencode/ with recursive patterns (**/*.md, **/SKILL.md) and follow every directory — including node_modules/ installed by @opencode-ai/plugin. Add ignore: ["**/node_modules/**"] to all .opencode/ glob scans and thread the ignore option through Glob.scan's Options interface.
a17f781 to
13fc1fc
Compare
|
This solves an actual issue. Thank you for fixing this! |
|
Automated 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 #30337
Type of change
What does this PR do?
Config and skill discovery use glob scans rooted at
.opencode/with recursive patterns (**/*.md,**/SKILL.md) and traverse every directory — includingnode_modules/installed by@opencode-ai/plugin. This causes a startup hang/freeze when.opencode/node_modules/exists with thousands of files.Changes:
packages/core/src/util/glob.ts— addignoreoption toGlob.Optionsand thread it through to the underlying glob implementationpackages/opencode/src/config/agent.ts— ignore**/node_modules/**in agent/mode discoverypackages/opencode/src/config/command.ts— ignore**/node_modules/**in command discoverypackages/opencode/src/config/plugin.ts— ignore**/node_modules/**in plugin discoverypackages/opencode/src/skill/index.ts— ignore**/node_modules/**in skill scanningHow did you verify your code works?
Added regression tests for each affected path:
Glob.scanignores**/node_modules/**patterns.opencode/node_modules/.opencode/node_modules/Screenshots / recordings
N/A — no UI changes.
Checklist