Editor Integration Troubleshooting
Common issues and solutions for Radium editor integrations.
General Issuesβ
CLI Not Foundβ
Symptoms:
- Error: "rad: command not found"
- Commands fail to execute
- Extension reports CLI missing
Solutions:
-
Verify Radium CLI installation:
which rad
rad --version -
Add to PATH:
- Linux/macOS: Add to
~/.bashrcor~/.zshrc - Windows: Add to system PATH
- Linux/macOS: Add to
-
Restart editor after installation
-
Verify in editor terminal:
- VS Code: Open integrated terminal, run
rad --version - Neovim: Run
:!rad --version
- VS Code: Open integrated terminal, run
Extension Not Loadingβ
Symptoms:
- Commands not available
- No error messages
- Extension appears installed but non-functional
Solutions:
-
Check Extension Installation:
rad extension listVerify extension appears in list
-
Verify Extension Structure:
- Check
radium-extension.jsonexists - Verify manifest is valid JSON
- Ensure required directories exist
- Check
-
Check Extension Location:
- User-level:
~/.radium/extensions/<extension-name>/ - Workspace-level:
.radium/extensions/<extension-name>/
- User-level:
-
Reload Editor:
- Neovim:
:source ~/.config/nvim/init.luaor restart - VS Code:
Ctrl+Shift+Pβ "Developer: Reload Window"
- Neovim:
Hooks Not Executingβ
Symptoms:
- Context not injected
- Code blocks not extracted
- Agent doesn't receive file information
Solutions:
-
Verify Hook Files Exist:
ls ~/.radium/extensions/radium-nvim/hooks/
# Should show: editor-context.toml, code-apply.toml -
Check Hook Configuration:
- Verify TOML syntax is valid
- Check hook types are correct:
before_tool,after_tool - Ensure
enabled = true
-
Test Hook Registration:
rad hooks list # If available -
Check Hook Scripts:
- Verify script files are executable:
chmod +x hooks/*.sh - Test scripts manually if possible
- Verify script files are executable:
Neovim Specificβ
Commands Not Registeredβ
Symptoms:
:RadiumSendSelectionnot foundE492: Not an editor command
Solutions:
-
Check Plugin Loading:
:lua print(require("radium"))Should not error
-
Verify Plugin Path:
:lua print(vim.fn.stdpath("data") .. "/site/pack/*/start/radium-nvim") -
Check Lua Module:
:lua print(package.path)Verify plugin directory in path
-
Manually Load:
:lua require("radium")
Visual Selection Issuesβ
Symptoms:
- Selection empty
- Wrong code selected
- Context extraction fails
Solutions:
-
Ensure Visual Mode:
- Use
v(character),V(line), orCtrl-v(block) - Verify selection highlighted
- Use
-
Check Selection Functions:
:lua print(vim.fn.mode()) -- Should show 'v', 'V', or '' -
Test Selection Retrieval:
:lua local utils = require("radium.utils"); print(utils.get_visual_selection())
Diff Preview Not Workingβ
Symptoms:
- No diff shown
- Error when applying
- Preview window not opening
Solutions:
-
Check Neovim Version:
- Requires Neovim 0.5+ for floating windows
- Verify:
:version
-
Test Diff Function:
:lua local diff = require("radium.diff"); print(diff.generate_diff("old", "new")) -
Check Window API:
:lua print(vim.api.nvim_open_win)Should not be nil
VS Code Specificβ
Commands Not in Paletteβ
Symptoms:
- "Radium: Send Selection" not appearing
- Extension installed but commands missing
Solutions:
-
Check Extension Activation:
- Open Output panel
- Select "Radium" channel
- Look for activation messages
-
Verify package.json:
- Check
contributes.commandssection - Ensure command IDs match
- Check
-
Reload Window:
Ctrl+Shift+Pβ "Developer: Reload Window"
-
Check Extension Logs:
- View β Output β Select "Radium"
Terminal Not Openingβ
Symptoms:
- Chat command doesn't open terminal
- Terminal opens but empty
- Error creating terminal
Solutions:
-
Check Terminal API:
- Verify VS Code version 1.74.0+
- Test:
Ctrl+` (backtick) to open terminal manually
-
Check Terminal Permissions:
- Verify terminal creation not blocked
- Check workspace settings
-
Test Terminal Creation:
// In extension developer console
vscode.window.createTerminal({ name: "Test" }).show();
Diff Viewer Issuesβ
Symptoms:
- Diff not showing
- "Apply" button missing
- Preview incorrect
Solutions:
-
Check VS Code Version:
- Requires 1.74.0+ for diff API
- Update VS Code if needed
-
Verify Diff API:
- Test with simple diff manually
- Check for API changes in VS Code updates
-
Check Output Format:
- Ensure code blocks properly extracted
- Verify JSON structure
Clipboard Modeβ
Clipboard Access Deniedβ
Symptoms:
- "Failed to read from clipboard"
- Permission errors
- Empty clipboard when content exists
Solutions:
-
Check Permissions:
- macOS: Grant terminal app clipboard access in System Preferences
- Linux: May need
xcliporxselinstalled - Windows: Usually works by default
-
Test Clipboard Access:
# macOS
pbpaste
# Linux
xclip -selection clipboard -o
# Windows
clip -
Install Dependencies:
# Linux (Ubuntu/Debian)
sudo apt-get install xclip
# Or xsel
sudo apt-get install xsel
File Path Not Parsedβ
Symptoms:
- Annotation not recognized
- Language detection fails
- File path missing in context
Solutions:
-
Check Annotation Format:
- Must be on first line
- Format:
// File: pathor# File: path - No extra spaces or characters
-
Test Parsing:
echo "// File: test.rs\nfn main() {}" | rad clipboard send -
Verify Parser:
- Check regex patterns in
parser.rs - Test with different comment styles
- Check regex patterns in
Language Detection Failsβ
Symptoms:
- Language shows as "unknown"
- Wrong language detected
- No language information
Solutions:
-
Add File Extension:
- Include file extension in path annotation
- Example:
// File: src/main.rs
-
Use Explicit Annotation:
- Add language hint in annotation
- Provide filetype in context manually
-
Check Detection Patterns:
- Verify code patterns match known languages
- Check shebang detection for scripts
Performance Issuesβ
Slow Command Executionβ
Symptoms:
- Commands take long time
- Editor freezes during execution
- Timeout errors
Solutions:
-
Check Agent Response Time:
- Test agent directly:
rad step code-agent - Verify network/model API response times
- Test agent directly:
-
Optimize Context:
- Reduce surrounding lines count
- Limit selection size for large files
-
Check Hook Performance:
- Verify hooks aren't doing expensive operations
- Test hook execution time
Memory Usageβ
Symptoms:
- High memory consumption
- Editor becomes slow
- Out of memory errors
Solutions:
-
Limit Output Size:
- Truncate large agent responses
- Process output in chunks
-
Clear Stored Data:
- Clear buffer variables periodically
- Reset agent output storage
Getting Helpβ
Debug Modeβ
Enable debug logging:
Neovim:
vim.g.radium_debug = true
VS Code:
{
"radium.debug": true
}
Log Filesβ
Check log files for errors:
- Neovim:
:messages - VS Code: View β Output β "Radium"
- CLI: Check stderr output
Reporting Issuesβ
When reporting issues, include:
- Editor version
- Extension version
- Radium CLI version
- Error messages/logs
- Steps to reproduce
- System information