-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Enhance /run Command to Support Piping Content into the Session #2740
Comments
I know that the /run command already offers to add command output to the chat. For example, however it would still be useful to be able to insert the output of commands into arbitrary parts of an aider prompt |
^^This is the sort of thing I want to be able to do, but all this does is add the output to the chat, not execute it as a prompt |
Related; this could be useful Tool Reference Injection: Use a special syntax (e.g., @tool, or !bash_command) to reference external tools like
This could also be activated when using E.g. in VSCode, while aider is being used in
|
Description: Allow users to dynamically insert evaluated output into their prompts using shell-like syntax (e.g., Example: Fix the bug in → Becomes: Fix the bug in NullPointerException in line 42. The current branch is main. Implementation: 1 Parse User Input: Identify $(...) patterns using regex. Benefits: • Dynamic Context: Insert real-time information into prompts. Challenges: • Security: Prevent command injection and ensure safe execution. Next Steps: 1 Implement and test the feature in io.py. ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────── |
Description:
The existing /run command in Aider allows users to execute shell commands. However, it could be
enhanced to directly pipe the output of those commands into the interactive session for further
interaction.
Proposed Solution:
Modify the /run command to include an option or syntax that pipes the output of the executed
command into the session. For example:
/run cat blah.txt --pipe
or
/run echo "This is some text" --pipe
This would inject the output of the command into the session as if it were typed directly by the
user.
Use Case:
• Dynamically inject file content or command output into the session for analysis or modification.
• Streamline workflows where dynamic content needs to be included without leaving the interactive
session.
Example Workflow:
1 Start an interactive Aider session:
2 Inside the Aider prompt, use the /run command to pipe content:
This would inject the contents of requirements.txt into the session for further interaction.
Benefits:
• Leverages existing functionality (/run) to avoid introducing new commands.
• Improves efficiency for users who rely on dynamic content.
• Better integration with command-line workflows without leaving the interactive session.
Aider version: 0.70.0
Python version: 3.12.3
Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39
Python implementation: CPython
Virtual environment: Yes
OS: Linux 6.8.0-51-generic (64bit)
Git version: git version 2.43.0
The text was updated successfully, but these errors were encountered: