-
Notifications
You must be signed in to change notification settings - Fork 59
Aider module support agentAPI #356
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
base: main
Are you sure you want to change the base?
Conversation
@matifali @DevelopmentCats, most of the module works fine, but now I’m implementing MCP configuration and task prompts with active chatting. ![]() The --message flag disables chat mode, runs only the prompt, and then exits the program. I’m trying to find a way to keep chat mode running inside the module. |
@Harsh9485, I think we should run in chat mode using AgentAPI by default, but provide the option to use message mode and disable AgentAPI (i.e., Coder Tasks) integration if a user wants to run in that mode. |
So should I give the user three options: |
Yes @Harsh9485 |
@matifali, unfortunately we can’t run interactive mode with the --message flag. What should I do now? |
…egistry into aider-tasks-agentapi-support
…egistry into aider-tasks-agentapi-support
@matifali @DevelopmentCats. PR ready to review. |
@matifali @DevelopmentCats, I have added the MCP server configuration. |
@matifali @DevelopmentCats, let me know if you need any changes in the code. |
registry/coder/modules/aider/main.tf
Outdated
@@ -138,7 +119,7 @@ variable "ai_provider" { | |||
variable "ai_model" { | |||
type = string | |||
description = "AI model to use with Aider. Can use Aider's built-in aliases like '4o' (gpt-4o), 'sonnet' (claude-3-7-sonnet), 'opus' (claude-3-opus), etc." | |||
default = "sonnet" | |||
default = "gemini" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not choose a default and make this a required parameter.
registry/coder/modules/aider/main.tf
Outdated
variable "agentapi_version" { | ||
type = string | ||
description = "The version of AgentAPI to install." | ||
default = "v0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default = "v0.3.0" | |
default = "v0.6.3" |
Latest as per today
install_aider = true | ||
ai_provider = "google" | ||
ai_model = "gemini" | ||
install_agentapi = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install_aider = true | |
ai_provider = "google" | |
ai_model = "gemini" | |
install_agentapi = true | |
ai_provider = "google" | |
ai_model = "gemini" |
Leave out the optional inputs from the first example
- **Project Integration**: Works with any project directory, including Git repositories | ||
- **Browser UI**: Use Aider in your browser with a modern web interface instead of the terminal | ||
- **Non-Interactive Mode**: Automatically processes tasks when provided via the `task_prompt` variable | ||
- Include the [Coder Login](https://registry.coder.com/modules/coder-login/coder) module in your template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Include the [Coder Login](https://registry.coder.com/modules/coder-login/coder) module in your template |
No longer needed
data "coder_parameter" "ai_prompt" { | ||
name = "AI Prompt" | ||
description = "Write an initial prompt for Aider to work on." | ||
type = "string" | ||
default = "" | ||
mutable = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L'et''s move this into the module source.
ai_provider = "google" | ||
ai_model = "gemini" | ||
install_agentapi = true | ||
task_prompt = data.coder_parameter.ai_prompt.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still keep this to let admins provide a default prompt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this line of code: task_prompt = data.coder_parameter.ai_prompt.value because I moved ai_prompt into the module source.
Moving ai_prompt into the module source is a good idea, since it removes the need for users to manually set it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add input to disable agentAPI and coder tasks altogether? Like a mode that only installs the agent. I am looking for something like.
- Refactor to support Coder Tasks with AgentAPI with "AI Prompt" included
- An install-only mode without running or starting the task also skips AgentAPI installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matifali, I have a better idea. We won’t modify this Aider module, so it will fulfill the requirement: An install-only mode without running or starting the task also skips AgentAPI installation.
Instead, I’ll create a new PR to add Aider_CLI with this code. That will fulfill the requirement: Refactor to support Coder Tasks with AgentAPI with ‘AI Prompt’ included.
I’ll also move this code into the coder-labs folder, since all modules in this folder support AgentAPI. This way, both requirements will be fulfilled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets not break this into 2 modules. It will be too much to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My plan is :-
- I'll create input variable in module toso the user can choose whether they want to use with agentapi + Task or not, and What would be a good name for this variable?
- If I implement this, it makes sense to remove the install_agentapi variable and instead set the value dynamically based on the condition.
registry/registry/coder/modules/aider/main.tf
Lines 131 to 135 in 8985231
variable "install_agentapi" { type = bool description = "Whether to install AgentAPI." default = true } - If the user decides not to use these, then we should give them a CLI Aider agent, similar to what this module currently provides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes instead use a new varibale named use_tasks = true
default value is true
> [!IMPORTANT] | ||
> For using **Coder Tasks** with Aider, make sure to pass the `AI Prompt` parameter and set `ai_api_key`. | ||
> This ensures task reporting and status updates work seamlessly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can eb removed if we move AI Prompt
into the module.
hey @matifali |
@Harsh9485 while refactoring Claude code module, we ran into an issue where it was not possible to conditionally disable the Coder Tasks e.g. "AI Prompt" needs to exist. |
@matifali, what if we implement my earlier idea? We could create a new 'Aider CLI' module for the Coder Tasks instead of modifying the existing one. I believe this would solve the problem and meet your requirement. |
Hey @matifali, could you let me know what the current plan is? I'd like to start working on it and just want to make sure the plan is still the same.
|
Hi @Harsh9485 leta revert these changes as currently there is no clean way to dual-purpose the module. I will also ask @35C4n0r to guide you as they are refactoring the Claude Code module. |
I'm refactoring the aider module now. |
I'll refactor the MCP part shortly. registry/registry/coder/modules/aider/main.tf Lines 203 to 224 in 79ae316
|
hey @matifali @DevelopmentCats, registry/registry/coder/modules/aider/scripts/start.sh Lines 30 to 34 in 79ae316
|
Hey @matifali, I commented out the code you suggested for choosing between the two agents. I think we're dropping that plan now, so I'll remove it soon. registry/registry/coder/modules/aider/scripts/start.sh Lines 25 to 28 in 79ae316
|
The Aider agent doesn't have native support for MCP configuration. Is it okay if I use third-party software? and please let me know what should I do? |
Closes #239
/claim #239
Description
video :- https://www.loom.com/share/d1d1d54d48bc45c4a48271ca9a387a88?sid=933e250d-78f8-4a7f-9745-0e908c0ee4d9
Type of Change
Module Information
Path:
registry/coder/modules/aider
New version:
v1.0.0
Breaking change: [ ] Yes [x] No
Testing & Validation
bun test
)bun run fmt
)Related Issues