fix: info command version detection, skills display, and documentation updates#149
fix: info command version detection, skills display, and documentation updates#149
Conversation
- Fix version detection on Windows and when installed globally by using import.meta.url with proper path resolution (similar to skill-installer.ts) - Add skills information to system info output including: - Bundled skills available for installation - Custom skills directory (if configured) - Per-agent installed skills with paths - Update all output formats (text, JSON, copyable) to include skills data - Add comprehensive tests for new functionality Fixes issue where version showed as "unknown" on Windows due to incorrect __dirname usage in ESM bundles.
- Fix incorrect 'u' key references to 'T' (Shift+T) for toggling the subagent tree panel in: - README.md - claude.mdx agent documentation - droid.mdx agent documentation - Add prompt template precedence table to options.mdx showing the resolution order from CLI flag to built-in fallback - Update keyboard shortcut table in README to include 't' for cycling detail level and 'o' for cycling panel views
The OpenCode agent's skills directory was incorrectly set to ~/.opencode/skill/ (singular) instead of ~/.config/opencode/skills/ (plural, XDG-compliant location). Updated: - opencode.ts: Agent plugin skillsPaths configuration - skills.ts: Help text showing supported agents - skills.test.ts: Test assertion for path detection - installation.mdx: Documentation table
- README.md: Add table showing skills location for each agent (Claude, OpenCode, Factory Droid) - setup.mdx: Add "Skills Locations by Agent" table section - setup.mdx: Update troubleshooting to show mkdir commands for all three agents This makes it clear where skills are installed for each supported agent, improving discoverability.
Add support for installing skills to project-local directories in addition to global (personal) directories. Local skills take precedence over global skills, enabling project-specific customizations. Changes: - Add --local and --global flags to `ralph-tui skills install` - Update `ralph-tui skills list` to show both global and local status - Show both global and local paths for each agent - Update help text with comprehensive location documentation - Update installation.mdx and setup.mdx with local skills info Local skill paths per agent: - Claude Code: .claude/skills/ - OpenCode: .opencode/skills/ - Factory Droid: .factory/skills/
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughPer-agent skills discovery and reporting are added to system info; package.json path resolution is refactored for bundled vs development builds; the skills CLI gains local/global install scopes with precedence (local > global); OpenCode agent skill paths updated; TUI shortcuts and documentation updated to reflect these changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Client (CLI)
participant CLI as ralph CLI
participant Cmd as skills command
participant Installer as Installer/Status
participant FS as Filesystem/Agents
User->>CLI: ralph skills install --local|--global
CLI->>Cmd: parse args (scope, agent, skill)
Cmd->>Installer: determine targets (global path, repo path using cwd)
Installer->>FS: list/check skill dirs (bundled, custom, agent paths)
FS-->>Installer: skill presence/status
Installer->>FS: install skill to target path(s)
FS-->>Installer: install result
Installer-->>Cmd: aggregated per-target status (local vs global)
Cmd-->>CLI: render status with precedence note (local > global)
CLI-->>User: display install/list output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
==========================================
+ Coverage 45.74% 45.97% +0.23%
==========================================
Files 63 63
Lines 15988 16101 +113
==========================================
+ Hits 7313 7402 +89
- Misses 8675 8699 +24
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@website/content/docs/configuration/options.mdx`:
- Around line 368-383: Update the Prompt Template Precedence section in
website/content/docs/configuration/options.mdx to match the real 4-tier
resolution: combine CLI `--prompt` and config `prompt_template` into the same
top-priority entry (first-match wins), replace the project-level path with
`.ralph-tui-prompt.hbs` (or configured via `.ralph-tui/config.toml`) instead of
`.ralph-tui/templates/{tracker}.hbs`, update the user-level path to
`~/.config/ralph-tui/` with filenames like `prompt.md` or `prompt-beads.md` (not
`~/.config/ralph-tui/templates/{tracker}.hbs`), remove the non-existent "Tracker
plugin template" tier, ensure the built-in default remains lowest priority, and
change the Callout command text to use `ralph-tui template show` (not `view`) so
the table and tip accurately reflect the implementation.
🧹 Nitpick comments (2)
src/commands/info.ts (1)
26-35: Consider tightening the dist directory detection to avoid false positives.The
endsWith('dist')check could match paths wheredistis part of another directory name (e.g.,/path/mydist). While unlikely in practice since the path originates fromimport.meta.url, a more robust check would verify the path separator:Suggested improvement
export function computePackageJsonPath(currentDir: string): string { - if (currentDir.endsWith('dist') || currentDir.includes('/dist/') || currentDir.includes('\\dist\\')) { + const isDist = currentDir === 'dist' || + currentDir.endsWith('/dist') || + currentDir.endsWith('\\dist') || + currentDir.includes('/dist/') || + currentDir.includes('\\dist\\'); + if (isDist) { return join(currentDir, '..', 'package.json'); } return join(currentDir, '..', '..', 'package.json'); }src/commands/info.test.ts (1)
484-488: The Windows path assertion could be strengthened.The current assertion
toContain('package.json')is quite permissive. On non-Windows systems,path.joindoesn't interpret backslashes as path separators, so this test may pass for the wrong reason. Consider adding a comment explaining this limitation or using a conditional assertion based onprocess.platform.Suggested improvement
test('handles Windows-style dist path', () => { + // Note: path.join behaviour with Windows paths on Unix is platform-dependent. + // This test verifies the dist detection logic works with backslash separators, + // even if the resulting path isn't fully correct on non-Windows systems. const result = computePackageJsonPath('C:\\app\\dist'); expect(result).toContain('package.json'); });
- Combine CLI --prompt and config prompt_template into single top-priority entry - Update project-level path description to .ralph-tui-prompt.hbs - Update user-level path to ~/.config/ralph-tui/prompt.md format - Remove non-existent "Tracker plugin template" tier - Fix command to ralph-tui template show (not view)
fix: info command version detection, skills display, and documentation updates
Summary
This PR addresses several issues and improvements:
ralph-tui infoshowing "version: unknown" on Windows by usingimport.meta.urlinstead of__dirnamefor ESM path resolutionralph-tui info: Now displays bundled skills, custom skills directory, and per-agent installed skills status~/.opencode/skill/to~/.config/opencode/skills/(XDG-compliant)--localflag for skills install: Allow installing skills to project-local directories (which take precedence over global)Changes
Code Changes
src/commands/info.ts- ESM-compatible version detection, skills info collectionsrc/commands/info.test.ts- Tests for new functionalitysrc/commands/skills.ts- Add--local/--globalflags, show both paths in listsrc/plugins/agents/builtin/opencode.ts- Fix skills path to XDG-compliant locationDocumentation Updates
README.md- Skills location table, keyboard shortcutswebsite/content/docs/cli/setup.mdx- Skills locations per agentwebsite/content/docs/getting-started/installation.mdx- Skills management sectionwebsite/content/docs/configuration/options.mdx- Prompt precedence tablewebsite/content/docs/plugins/agents/claude.mdx- Fix 'u' → 'T' for subagent treewebsite/content/docs/plugins/agents/droid.mdx- Fix 'u' → 'T' for subagent treeTest plan
bun run typecheckpassesbun run buildpassesralph-tui infoshows correct version (not "unknown")ralph-tui infoshows skills section with per-agent statusralph-tui skills listshows both global and local pathsralph-tui skills install --localinstalls to project directorySummary by CodeRabbit
New Features
Documentation
Other
✏️ Tip: You can customize this high-level summary in your review settings.