diff --git a/jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/plugin/roo/RooCodeButtonProvider.kt b/jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/plugin/roo/RooCodeButtonProvider.kt index 02449d59..4cb32265 100644 --- a/jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/plugin/roo/RooCodeButtonProvider.kt +++ b/jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/plugin/roo/RooCodeButtonProvider.kt @@ -40,6 +40,7 @@ class RooCodeButtonProvider : ExtensionButtonProvider { MCPButtonClickAction(), HistoryButtonClickAction(), MarketplaceButtonClickAction(), + CloudButtonClickAction(), SettingsButtonClickAction() ) } @@ -161,6 +162,31 @@ class RooCodeButtonProvider : ExtensionButtonProvider { } } + /** + * Action that handles clicks on the Cloud button in the UI. + * Executes the corresponding VSCode command when triggered. + */ + class CloudButtonClickAction : AnAction() { + private val logger: Logger = Logger.getInstance(CloudButtonClickAction::class.java) + private val commandId: String = "roo-cline.cloudButtonClicked" + + init { + templatePresentation.icon = AllIcons.Javaee.WebService + templatePresentation.text = "Cloud" + templatePresentation.description = "Cloud" + } + + /** + * Performs the action when the Cloud button is clicked. + * + * @param e The action event containing context information + */ + override fun actionPerformed(e: AnActionEvent) { + logger.info("Cloud button clicked") + executeCommand(commandId, e.project) + } + } + /** * Action that handles clicks on the Settings button in the UI. * Executes the corresponding VSCode command when triggered.