mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
feat: add 'Add To Context' code action
- Add new command registration and menu item - Add new code action type and command ID - Add support prompt config for adding code to context - Add message handling in webview for setting chat box content - Add logic to append selected code to existing chat input
This commit is contained in:
@@ -172,7 +172,6 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
context: vscode.ExtensionContext,
|
||||
command: string,
|
||||
promptType: keyof typeof ACTION_NAMES,
|
||||
inNewTask: boolean,
|
||||
inputPrompt?: string,
|
||||
inputPlaceholder?: string,
|
||||
) => {
|
||||
@@ -222,10 +221,10 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
inputPlaceholder?: string,
|
||||
) => {
|
||||
// Register new task version
|
||||
registerCodeAction(context, baseCommand, promptType, true, inputPrompt, inputPlaceholder)
|
||||
registerCodeAction(context, baseCommand, promptType, inputPrompt, inputPlaceholder)
|
||||
|
||||
// Register current task version
|
||||
registerCodeAction(context, `${baseCommand}InCurrentTask`, promptType, false, inputPrompt, inputPlaceholder)
|
||||
registerCodeAction(context, `${baseCommand}InCurrentTask`, promptType, inputPrompt, inputPlaceholder)
|
||||
}
|
||||
|
||||
// Register code action commands
|
||||
@@ -253,6 +252,8 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
"E.g. Focus on performance optimization",
|
||||
)
|
||||
|
||||
registerCodeAction(context, "roo-cline.addToContext", "ADD_TO_CONTEXT")
|
||||
|
||||
return createClineAPI(outputChannel, sidebarProvider)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user