feat(code-actions): add "Fix Code in Current Task" action

Adds ability to fix code within the context of an active task instead of starting a new one. This allows for more efficient workflow when already working with Roo.

Add new FIX_IN_CURRENT_TASK code action and command
Enhance ClineProvider to support context-aware code fixing
Update tests to verify new action functionality
This commit is contained in:
sam hoang
2025-01-27 14:24:26 +07:00
parent 3deeb0c28b
commit 85c49d8eff
4 changed files with 57 additions and 6 deletions

View File

@@ -194,7 +194,7 @@ export function activate(context: vscode.ExtensionContext) {
...(userInput ? { userInput } : {}),
}
await ClineProvider.handleCodeAction(promptType, params)
await ClineProvider.handleCodeAction(command, promptType, params)
},
),
)
@@ -217,6 +217,14 @@ export function activate(context: vscode.ExtensionContext) {
"E.g. Maintain backward compatibility",
)
registerCodeAction(
context,
"roo-cline.fixCodeInCurrentTask",
"FIX", // keep this for use the same prompt with FIX command
"What would you like Roo to fix?",
"E.g. Maintain backward compatibility",
)
registerCodeAction(
context,
"roo-cline.improveCode",