generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(terminal): add basic support for AI-generated shell scripts #135
This commit introduces a new extension module for terminal support, including a plugin and an action to generate shell scripts using AI. The `ext-terminal` module is added to the project and its dependencies are configured. The `plugin.xml` file is updated to include the `cc.unitmesh.terminal` module, and a new file `cc.unitmesh.terminal.xml` is created with the necessary plugin configuration. Additionally, the `QuickAssistantAction` class is modified to include a new action for generating shell scripts, and the `autodev-core.xml` file is updated to add this action to the appropriate group. The `settings.gradle.kts` file is also updated to include the `ext-terminal` module in the project setup.
- Loading branch information
Showing
7 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
exts/ext-terminal/src/main/kotlin/cc/unitmesh/terminal/GenShellAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package cc.unitmesh.terminal | ||
|
||
import com.intellij.openapi.actionSystem.AnAction | ||
import com.intellij.openapi.actionSystem.AnActionEvent | ||
import com.intellij.openapi.actionSystem.CommonDataKeys | ||
import com.intellij.openapi.editor.ex.EditorEx | ||
|
||
class GenShellAction: AnAction() { | ||
override fun actionPerformed(e: AnActionEvent) { | ||
val editor = e.getData(CommonDataKeys.EDITOR) as? EditorEx ?: return | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
exts/ext-terminal/src/main/resources/cc.unitmesh.terminal.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<idea-plugin package="cc.unitmesh.terminal"> | ||
<!--suppress PluginXmlValidity --> | ||
<dependencies> | ||
<plugin id="org.jetbrains.plugins.terminal"/> | ||
</dependencies> | ||
|
||
<actions> | ||
|
||
<action id="genShell" | ||
class="cc.unitmesh.terminal.GenShellAction" | ||
description="Ask AI to generate shell" | ||
icon="cc.unitmesh.devti.AutoDevIcons.AI_COPILOT" | ||
> | ||
|
||
<add-to-group group-id="TerminalToolwindowActionGroup" anchor="last"/> | ||
</action> | ||
</actions> | ||
</idea-plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters