[FEATURE] Pass <ide_opened_file> and <ide_selection> to command invocations
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I would like to run a .claude/commands/foo.md command against the currently opened file. I switch focus to the Claude Code pane and type /foo. However, the command is not passed <ide_opened_file> nor <ide_selection> and so does not know my context, does not know which file I am looking at.
Is there a reason commands don't receive <ide_opened_file> nor <ide_selection>?
Proposed Solution
Pass <ide_opened_file> and <ide_selection> to /command invocations.
Alternative Solutions
Currently, I run my commands as @foo instead of /foo.
Priority
Low - Nice to have
Feature Category
Interactive mode (TUI)
Use Case Example
Suppose the command is fix-todos.md which says Address all TODO comments in the currently opened file.. /fix-todos will not work -- lacks <ide_opened_file> -- even though typing those instructions manually into the chat pane will work -- receives <ide_opened_file>.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗