Skip to content

Commit dffd6b6

Browse files
author
韩绍康59912
committed
增加对costrict中登陆按钮的支持
1 parent ecc2e96 commit dffd6b6

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

jetbrains_plugin/src/main/kotlin/com/sina/weibo/agent/extensions/plugin/costrict/CostrictCodeButtonProvider.kt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class CostrictCodeButtonProvider : ExtensionButtonProvider {
4040
MCPButtonClickAction(),
4141
HistoryButtonClickAction(),
4242
MarketplaceButtonClickAction(),
43-
SettingsButtonClickAction()
43+
SettingsButtonClickAction(),
44+
AccountButtonClickAction(),
4445
)
4546
}
4647

@@ -111,6 +112,27 @@ class CostrictCodeButtonProvider : ExtensionButtonProvider {
111112
}
112113
}
113114

115+
class AccountButtonClickAction : AnAction() {
116+
private val logger: Logger = Logger.getInstance(AccountButtonClickAction::class.java)
117+
private val commandId: String = "zgsm.cloudButtonClicked"
118+
119+
init {
120+
templatePresentation.icon = AllIcons.General.User
121+
templatePresentation.text = "Account"
122+
templatePresentation.description = "Account"
123+
}
124+
125+
/**
126+
* Performs the action when the MCP button is clicked.
127+
*
128+
* @param e The action event containing context information
129+
*/
130+
override fun actionPerformed(e: AnActionEvent) {
131+
logger.info("Account clicked")
132+
executeCommand(commandId, e.project)
133+
}
134+
}
135+
114136
/**
115137
* Action that handles clicks on the MCP button in the UI.
116138
* Executes the corresponding VSCode command when triggered.

0 commit comments

Comments
 (0)