You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add interactive correction feature to CLI mode
This commit adds the ability to send corrections to the main agent while it's running.
Key features:
- Press Ctrl+M during agent execution to enter correction mode
- Type a correction message and send it to the agent
- Agent receives and incorporates the message into its context
- Similar to how parent agents can send messages to sub-agents
Closes#326
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,9 @@ mycoder "Implement a React component that displays a list of items"
35
35
# Run with a prompt from a file
36
36
mycoder -f prompt.txt
37
37
38
+
# Enable interactive corrections during execution (press Ctrl+M to send corrections)
39
+
mycoder --interactive "Implement a React component that displays a list of items"
40
+
38
41
# Disable user prompts for fully automated sessions
39
42
mycoder --userPrompt false"Generate a basic Express.js server"
40
43
@@ -119,6 +122,35 @@ export default {
119
122
120
123
CLI arguments will override settings in your configuration file.
121
124
125
+
## Interactive Corrections
126
+
127
+
MyCoder supports sending corrections to the main agent while it's running. This is useful when you notice the agent is going off track or needs additional information.
128
+
129
+
### Usage
130
+
131
+
1. Start MyCoder with the `--interactive` flag:
132
+
```bash
133
+
mycoder --interactive "Implement a React component"
134
+
```
135
+
136
+
2. While the agent is running, press `Ctrl+M` to enter correction mode
137
+
3. Type your correction or additional context
138
+
4. Press Enter to send the correction to the agent
139
+
140
+
The agent will receive your message and incorporate it into its decision-making process, similar to how parent agents can send messages to sub-agents.
141
+
142
+
### Configuration
143
+
144
+
You can enable interactive corrections in your configuration file:
145
+
146
+
```js
147
+
// mycoder.config.js
148
+
exportdefault {
149
+
// ... other options
150
+
interactive:true,
151
+
};
152
+
```
153
+
122
154
### GitHub Comment Commands
123
155
124
156
MyCoder can be triggered directly from GitHub issue comments using the flexible `/mycoder` command:
Add a feature to the CLI mode that allows users to send corrections to the main agent while it's running, similar to how sub-agents can receive messages via the `agentMessage` tool. This would enable users to provide additional context, corrections, or guidance to the main agent without restarting the entire process.
5
+
6
+
### Requirements
7
+
- Implement a key command that pauses the output and triggers a user prompt
8
+
- Allow the user to type a correction message
9
+
- Send the correction to the main agent using a mechanism similar to `agentMessage`
10
+
- Resume normal operation after the correction is sent
11
+
- Ensure the correction is integrated into the agent's context
12
+
13
+
### Implementation Considerations
14
+
- Reuse the existing `agentMessage` functionality
15
+
- Add a new tool for the main agent to receive messages from the user
16
+
- Modify the CLI to capture key commands during execution
17
+
- Handle the pausing and resuming of output during message entry
18
+
- Ensure the correction is properly formatted and sent to the agent
19
+
20
+
### Why this is valuable
21
+
This feature will make the tool more interactive and efficient, allowing users to steer the agent in the right direction without restarting when they notice the agent is going off track or needs additional information.
0 commit comments