Skip to content

Conversation

@j4rviscmd
Copy link
Owner

@j4rviscmd j4rviscmd commented Jan 22, 2026

Summary

image
  • Fix path resolution in command-installer.ts that was broken after bundling
  • Add findCommandsDir() function to try multiple candidate paths
  • Support both production (dist/index.js) and development (src/config/) environments
  • Remove unnecessary warning log when commands directory is not found
  • Bump version to 0.1.2

Background

When all code is bundled into dist/index.js, the relative path "../.." went too far up the directory tree, causing the commands directory to not be found. The fix tries multiple paths in order:

  1. ../commands (for bundled production)
  2. ../../commands (for development)

Test plan

  • Verify commands are copied to ~/.config/opencode/command/ on plugin initialization
  • Test in production (npm installed package)
  • Test in development (local source)

🤖 Generated with Claude Code

…ments

The path resolution in command-installer.ts was incorrect after bundling.
When all code is bundled into dist/index.js, the relative path "../.."
went too far up the directory tree.

- Add findCommandsDir() to try multiple candidate paths
- Support both production (dist/index.js) and development (src/config/)
- Remove unnecessary warning log when directory not found
- Bump version to 0.1.2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@j4rviscmd j4rviscmd merged commit bde5527 into main Jan 22, 2026
1 check passed
@j4rviscmd j4rviscmd deleted the feat/auto-copy-command-files branch January 22, 2026 02:51
@j4rviscmd
Copy link
Owner Author

local: ok
prd: ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants