Skip to content

Commit

Permalink
Merge pull request #2 from Kvadratni/mnovich/require-restart-on-update
Browse files Browse the repository at this point in the history
require restart on install/update
  • Loading branch information
Kvadratni authored Sep 12, 2024
2 parents 38c70e8 + 5c465c6 commit 4173ef0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Goose IntelliJ Plugin is designed to integrate the Goose AI assistant into the I
- **Smart Code Analysis**: Select code and get insights from the Goose AI.
- **Interactive Terminal**: Integrated terminal with Goose AI session support.
- **File and Directory Information**: Ask Goose about specific files or directories within your project.
- **Profile Selection**: Select and manage Goose AI profiles within IntelliJ.
- **Customizable Settings**: Configure Goose AI settings and preferences.
- **Dark Mode Support**: Compatible with IntelliJ's dark theme.
- **Session Persistence**: Saves and restores Goose AI sessions.

## Installation
1. Download the plugin from the IntelliJ Plugin Marketplace.
Expand All @@ -21,18 +25,27 @@ To open the Goose Terminal, click on the Goose icon in the tool window bar.

### Sending Code to Goose
1. Select the code you want to analyze.
2. Right-click and select `Ask Goose About This`.
2. Right-click and select `Ask Goose To Explain Selection`.
3. View the analysis results in the Goose Terminal.

![Send to Goose](images/send_to_goose.png)

### Asking Goose About a File or Directory
1. Right-click on a file or directory in the Project view.
2. Select `Ask Goose About This`.
2. Select `Ask Goose to Explain This File`.
3. Goose will provide information about the selected item in the terminal.

![Ask Goose About File](images/ask_goose_about_file.png)

### Selecting a Goose Profile
1. Navigate to the `Goose` menu in the Tools menu.
2. Select `Select Goose Profile`.

![Select Goose Profile](images/select_goose_profile_menu.png)
3. Choose or add a new profile from the dialog that appears.

![Select Goose Profile](images/select_goose_profile.png)

## Development
### Prerequisites
- IntelliJ IDEA 2020.1 or later
Expand Down
Binary file added images/select_goose_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select_goose_profile_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.block.gooseintellij

import com.intellij.ide.plugins.IdeaPluginDescriptor
import com.intellij.ide.plugins.PluginStateListener
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.ex.ApplicationEx
import com.intellij.openapi.ui.Messages

class GoosePluginStateListener : PluginStateListener {

override fun install(pluginDescriptor: IdeaPluginDescriptor) {
showRestartNotification()
}

private fun showRestartNotification() {
val application = ApplicationManager.getApplication() as ApplicationEx
Messages.showInfoMessage("To complete the installation of the Goose plugin, IDE restart is required.", "Restart Required")
application.restart(true)
}
}
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
factoryClass="com.block.gooseintellij.toolWindow.GooseTerminalWidgetFactory"/>
<notificationGroup id="Goose Notifications" displayType="BALLOON"/>
</extensions>
<applicationListeners>
<listener class="com.block.gooseintellij.GoosePluginStateListener" topic="com.intellij.ide.plugins.PluginStateListener"/>
</applicationListeners>
</idea-plugin>

0 comments on commit 4173ef0

Please sign in to comment.