Skip to content

Commit

Permalink
Fix right-click Cody commands selection (#290)
Browse files Browse the repository at this point in the history
## Test plan
- execute a command (a recipe) from the context menu
  • Loading branch information
mkondratek authored Jan 12, 2024
1 parent c3c9c63 commit 36d9c23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ class CodyToolWindowContent(private val project: Project) : UpdatableChat {
object : DumbAwareAction(recipe.title) {
override fun actionPerformed(e: AnActionEvent) {
GraphQlLogger.logCodyEvent(project, "recipe:" + recipe.id, "clicked")
val editorManager = FileEditorManager.getInstance(project)
CodyEditorFactoryListener.Util.informAgentAboutEditorChange(
editorManager.selectedTextEditor)
sendMessage(project, recipe.title, recipe.id)
}
}
Expand Down

0 comments on commit 36d9c23

Please sign in to comment.