From 36d9c238188070e315f9909ef4eb273b17a233d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kondratek?= Date: Fri, 12 Jan 2024 11:57:15 +0100 Subject: [PATCH] Fix right-click Cody commands selection (#290) ## Test plan - execute a command (a recipe) from the context menu --- src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt b/src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt index eb77514dc2..2051ebf285 100644 --- a/src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt +++ b/src/main/kotlin/com/sourcegraph/cody/CodyToolWindowContent.kt @@ -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) } }