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

Feat: Add snippets support to aider prompt file #101

Merged
merged 41 commits into from
Mar 3, 2025
Merged

Feat: Add snippets support to aider prompt file #101

merged 41 commits into from
Mar 3, 2025

Conversation

tninja
Copy link
Owner

@tninja tninja commented Mar 3, 2025

Initial snippet came from reddit user LorestForest

  • Developer side change
    • Deprecate aider-minor-mode, use aider-prompt-mode (major-mode) instead
      • aider-prompt-mode inherit from org-mode
    • Large refactoring to aider.el, break it into several small files, to help future development and maintaining
      • aider-core.el: core comint aider session interaction function
        • also have customize variables
      • aider-file.el: file operation related functions
        • depend on aider-core.el
      • aider-code-change.el: code change related functions
        • depend on aider-core.el and aider-file.el
      • aider-discussion.el: discussion related functions
        • depend on aider-core.el and aider-file.el
      • aider-prompt-mode.el: major mode for aider prompt file
        • depend on aider-core
      • aider.el: aider session management and transient menu
        • depend on files all above

tninja added 30 commits March 1, 2025 22:20
…th the appropriate aider commands (/ask or /architect) and created the files in the snippets/aider-prompt-mode directory. The snippets are designed to be concise, use proper aider commands, and avoid blank lines to ensure easy block processing.

The files have been created with the following characteristics:
- Contributor: LorestForest
- Commands: /ask for discussions, /architect for design and code-related tasks
- No blank lines within snippets
- Placed in snippets/aider-prompt-mode directory
- All prompts in English

Would you like me to show you the contents of any specific snippet or explain anything further about the implementation?
…e files: `aider-core.el`, `aider-prompt-mode.el`, and `aider.el`, with the functionality distributed appropriately.

The structure now follows the design we discussed:
1. `aider-core.el` contains the essential, shared functions
2. `aider-prompt-mode.el` contains the prompt mode definition and related functions
3. `aider.el` contains the main functionality, menu, and upper-level functions

A few observations and confirmations:
- The core functionality is now in `aider-core.el`
- The prompt mode is now in `aider-prompt-mode.el`
- `aider.el` now requires both `aider-core.el` and `aider-prompt-mode.el`
- The functions are distributed logically
- The code maintains its original functionality

The shell command you suggested will help verify the basic loading of the files:
```bash
emacs -Q -batch -l aider-core.el -l aider-prompt-mode.el -l aider.el -f emacs-version
```

Would you like me to make any further adjustments or refinements to the code?
…related functions into a new file `aider-code-change.el` while maintaining the original structure and functionality. The commit message should reflect this refactoring.

Here's a suggested commit message:

```
refactor: Separate code change functions into dedicated file
```

This message follows the conventional commit format, uses the "refactor" type, and succinctly describes the main change: moving code change functions to a separate file.

Would you like me to proceed with creating the commit?
@tninja tninja merged commit 180c7e0 into main Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant