Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 0 additions & 76 deletions .github/workflows/build-plugin.yml

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/kotlin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ on:
branches: [ "main" ]
paths:
- 'ide-plugins/**'
release:
types: [published]

jobs:
build-kotlin-plugin:
name: 'Build (Java 17)'
runs-on: ubuntu-latest
permissions:
contents: read
contents: write

steps:
- name: Checkout repository
Expand Down Expand Up @@ -82,8 +84,10 @@ jobs:
mkdir -p plugin-extracted
# Extract the plugin zip
unzip -q "$PLUGIN_FILE" -d plugin-extracted/
# Remove the original zip
rm "$PLUGIN_FILE"
# For non-release builds, remove the original zip
if [ "${{ github.event_name }}" != "release" ]; then
rm "$PLUGIN_FILE"
fi
fi
if: success()

Expand All @@ -92,4 +96,12 @@ jobs:
with:
name: intellij-plugin-pr-${{ github.event.pull_request.number || github.run_number }}
path: ide-plugins/build/distributions/plugin-extracted/
if: success()
if: success() && github.event_name != 'release'

- name: Upload to Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: ide-plugins/build/distributions/plugin-extracted/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 16 additions & 14 deletions ide-plugins/src/main/kotlin/com/picocode/PicoCodeStatusBarWidget.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.wm.StatusBar
import com.intellij.openapi.wm.StatusBarWidget
import com.intellij.openapi.wm.StatusBarWidgetFactory
import com.intellij.openapi.wm.ToolWindowManager
import com.intellij.openapi.ui.Messages
import com.intellij.util.Consumer
import com.google.gson.Gson
import com.google.gson.JsonObject
Expand Down Expand Up @@ -93,20 +91,24 @@ class PicoCodeStatusBarWidget(private val project: Project) : StatusBarWidget,

override fun getClickConsumer(): Consumer<MouseEvent>? {
return Consumer {
// Open the PicoCode RAG tool window on click
// Open the PicoCode chat dialog on click
ApplicationManager.getApplication().invokeLater {
val toolWindowManager = ToolWindowManager.getInstance(project)
val toolWindow = toolWindowManager.getToolWindow("PicoCode RAG")

if (toolWindow != null) {
toolWindow.show()
} else {
Messages.showInfoMessage(
project,
"PicoCode RAG tool window is not available. Please ensure the plugin is properly installed.",
"PicoCode RAG"
)
val chatContent = PicoCodeToolWindowContent(project)
val dialog = object : com.intellij.openapi.ui.DialogWrapper(project) {
init {
init()
title = "PicoCode RAG Assistant"
}

override fun createCenterPanel(): javax.swing.JComponent {
return chatContent.getContent()
}

override fun createActions(): Array<com.intellij.openapi.ui.DialogWrapper.DialogWrapperAction> {
return emptyArray() // No default OK/Cancel buttons
}
}
dialog.show()
}
}
}
Expand Down
Loading