mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-19 07:54:46 +00:00
fix: duplicate actions and other keymap improvements (fixes #826)
This commit is contained in:
parent
c2d683fd7c
commit
6044f88697
3 changed files with 22 additions and 16 deletions
|
|
@ -12,7 +12,6 @@ public class OpenNewChatAction extends AnAction {
|
|||
|
||||
public OpenNewChatAction() {
|
||||
super(Icons.OpenNewTab);
|
||||
EditorActionsUtil.registerAction(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@ class AddSelectionToContextAction : BaseEditorAction(AllIcons.General.Add) {
|
|||
val chatTabPanel = chatToolWindowContentManager
|
||||
.tryFindActiveChatTabPanel()
|
||||
.orElseThrow()
|
||||
|
||||
val toolwindow = chatToolWindowContentManager.toolWindow
|
||||
if (!toolwindow.isActive) {
|
||||
toolwindow.show()
|
||||
}
|
||||
|
||||
chatTabPanel.addSelection(editor.virtualFile, editor.selectionModel)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,17 +140,10 @@
|
|||
description="Creates a new chat session">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt shift N" replace-all="true"/>
|
||||
</action>
|
||||
<action
|
||||
id="CodeGPT.AddSelectionToContext"
|
||||
class="ee.carlrobert.codegpt.actions.editor.AddSelectionToContextAction"
|
||||
text="Include Selection in Prompt"
|
||||
description="Adds the selected text to the CodeGPT context">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift I" replace-all="true"/>
|
||||
</action>
|
||||
<action
|
||||
id="CodeGPT.ContextMenuEditCodeAction"
|
||||
text="Edit Code"
|
||||
description="Edit code in natural language"
|
||||
description="Edit code from editor's context menu"
|
||||
class="ee.carlrobert.codegpt.actions.editor.EditCodeContextMenuAction">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift K" replace-all="true"/>
|
||||
</action>
|
||||
|
|
@ -208,16 +201,10 @@
|
|||
<action
|
||||
id="CodeGPT.FloatingMenuEditCodeAction"
|
||||
text="Edit Code"
|
||||
description="Edit code in natural language"
|
||||
description="Edit code from editor's floating menu"
|
||||
class="ee.carlrobert.codegpt.actions.editor.EditCodeFloatingMenuAction">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift K" replace-all="true"/>
|
||||
</action>
|
||||
<action
|
||||
id="CodeGPT.AddSelectionToContextAction"
|
||||
text="Include Selection in Prompt"
|
||||
class="ee.carlrobert.codegpt.actions.editor.AddSelectionToContextAction">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift I" replace-all="true"/>
|
||||
</action>
|
||||
<add-to-group
|
||||
group-id="Floating.CodeToolbar"
|
||||
relative-to-action="ProjectViewPopupMenuRefactoringGroup"
|
||||
|
|
@ -225,6 +212,17 @@
|
|||
<separator/>
|
||||
</group>
|
||||
|
||||
<action
|
||||
id="CodeGPT.AddSelectionToContext"
|
||||
class="ee.carlrobert.codegpt.actions.editor.AddSelectionToContextAction"
|
||||
text="Include Selection in Prompt"
|
||||
description="Adds the selected text to the CodeGPT context">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift I" replace-all="true"/>
|
||||
|
||||
<add-to-group group-id="action.editor.group.EditorActionGroup" anchor="after" relative-to-action="CodeGPT.NewChat"/>
|
||||
<add-to-group group-id="CodeGPT.FloatingCodeToolbarMenuRootGroup" anchor="after" relative-to-action="CodeGPT.FloatingMenuEditCodeAction"/>
|
||||
</action>
|
||||
|
||||
<action
|
||||
id="codegpt.openSettings"
|
||||
text="Open Settings"
|
||||
|
|
@ -299,13 +297,16 @@
|
|||
<add-to-group group-id="Vcs.MessageActionGroup" anchor="first"/>
|
||||
<action
|
||||
id="CodeGPT.GenerateGitCommitMessage"
|
||||
text="Generate Commit Message"
|
||||
class="ee.carlrobert.codegpt.actions.GenerateCommitMessageAction"/>
|
||||
<action
|
||||
id="CodeGPT.GenerateGitCommitMessageWithAdditionalInput"
|
||||
text="Generate Commit Message with Additional Input"
|
||||
class="ee.carlrobert.codegpt.actions.GenerateCommitMessageWithAdditionalInputAction"/>
|
||||
<separator/>
|
||||
<action
|
||||
id="CodeGPT.ReviewChanges"
|
||||
text="Review Changes"
|
||||
class="ee.carlrobert.codegpt.actions.ReviewChangesAction"/>
|
||||
</group>
|
||||
</actions>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue