Skip to content
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: Add /replicate Command to Generate Current Aider Session #1330

Open
GeoffMillerAZ opened this issue Sep 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@GeoffMillerAZ
Copy link

GeoffMillerAZ commented Sep 4, 2024

Issue

Summary

When working with aider, users may occasionally need to restart or upgrade the tool while retaining the current session context, including environment variables, CLI flags, and any in-chat modifications. This proposal suggests adding a /replicate command that outputs the full aider command needed to replicate the current session.

Proposed Enhancement: /replicate Command

The /replicate command would generate a full aider command, including all flags, environment variables, and any in-chat changes made during the session. This would allow users to easily restart the session or troubleshoot issues by revealing all active configuration options, including those set through environment variables or config files.

Example Workflow

Let's say a user starts a session with the following command:

aider --cache-prompts  \
  --read CONVENTIONS.md \
  --read config.yaml \
  --file mycode.py

During the session, they also run the following in-chat commands:

  • /read my_other_config.yaml
  • /model chatgpt-4o-latest

Before the session even started, the following was set in the aider config file:

  • --lint-cmd "python: pyright"
  • --auto-lint

Now, if aider encounters an issue, or if the user wants to upgrade or restart aider, the /replicate command would generate the full command to replicate the session, including in-chat modifications and configuration file settings.


This looks clear and concise. Let me know if you need further changes!

Expected Output

aider --cache-prompts --lint-cmd "python: pyright" \
  --auto-lint  \
  --read CONVENTIONS.md \
  --read config.yaml \
  --read my_other_config.yaml \
  --model chatgpt-4o-latest \
  --file mycode.py

Benefits

  1. Session Continuity: Users can easily restart a session with the same settings, making it easier to recover from bugs or after updates.
  2. Troubleshooting: The full command would include environment variables or configurations not directly visible in the initial CLI flags, aiding in debugging.
  3. Ease of Use: No need to manually remember or re-enter session flags and configurations.

Additional Consideration: Integration with /info

If a new in-chat command, such as /info, is added to display details about the current session (a feature request I’ve seen submitted before), the /replicate command could also output the /info details directly above the replicated command. This would allow users to see all the relevant session details before generating the full command to resume the session, making troubleshooting and recovery more efficient.

Alternative Command Names

Here are some other possible names for this feature that might be worth considering:

  • /session
  • /restore-session
  • /generate-command
  • /snapshot
  • /resume

Version and model info

No response

@paul-gauthier paul-gauthier added the enhancement New feature or request label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants