Skip to content
Open
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
123 changes: 123 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 23 additions & 22 deletions .run/Run IDE with Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--stacktrace" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<ForceTestExec>false</ForceTestExec>
<method v="2" />
</configuration>
</component>
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "ai.welltested"
version = "1.0-SNAPSHOT"
version = "1.1.2-SNAPSHOT"

repositories {
mavenCentral()
Expand All @@ -31,7 +31,7 @@ tasks {
}

patchPluginXml {
sinceBuild.set("222")
sinceBuild.set("213.*")
untilBuild.set("232.*")
}

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
kotlin.stdlib.default.dependency = false
kotlin.stdlib.default.dependency = false
org.gradle.daemon=false
8 changes: 8 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sat Apr 22 14:19:45 IST 2023
sdk.dir=/Users/keval/Library/Android/sdk
Binary file modified media/create.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 modified media/refactor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/main/kotlin/ai/welltested/fluttergpt/PluginStartupActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ai.welltested.fluttergpt

import ai.welltested.fluttergpt.utilities.ActionRegistry
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
import org.jetbrains.annotations.NotNull


class PluginStartupActivity : StartupActivity {

override fun runActivity(@NotNull project: Project) {
ActionRegistry.refreshActions( )

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ package ai.welltested.fluttergpt.tools.create
import ai.welltested.fluttergpt.repository.Message
import ai.welltested.fluttergpt.repository.OpenAIRepository
import ai.welltested.fluttergpt.utilities.extractDartCode
import com.intellij.icons.AllIcons
import com.intellij.notification.NotificationGroupManager
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.PlatformCoreDataKeys
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.Task
import com.intellij.openapi.ui.InputValidator
import com.intellij.openapi.ui.Messages
import com.intellij.psi.PsiDocumentManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.ui.InputValidator
import org.json.JSONObject

class CreateModelClass : AnAction() {

class CreateModelClass : AnAction("Model Class From JSON") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction
import org.json.JSONObject

class CreateRepoClassFromPostman : AnAction() {
class CreateRepoClassFromPostman : AnAction("API Repository from Postman JSON") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.intellij.psi.PsiDocumentManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction

class CodeFromBlueprint : AnAction() {
class CodeFromBlueprint : AnAction("Code: from Blueprint") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.intellij.psi.PsiDocumentManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction

class CreateWidgetFromDescription : AnAction() {
class CreateWidgetFromDescription : AnAction("Widget from Description") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.intellij.notification.NotificationGroupManager
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.PlatformCoreDataKeys
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.Task
Expand All @@ -16,7 +17,7 @@ import com.intellij.psi.PsiDocumentManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction

class FixErrors() : AnAction() {
class FixErrors() : AnAction("Fix Errors") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down Expand Up @@ -69,4 +70,14 @@ class FixErrors() : AnAction() {
}
}.queue()
}

override fun update(e: AnActionEvent) {
val editor = e.getData(CommonDataKeys.EDITOR)
val selectedText = editor?.selectionModel?.selectedText

// Set visibility and enabled state based on whether code is selected
e.presentation.isVisible = !selectedText.isNullOrBlank()
e.presentation.isEnabled = !selectedText.isNullOrBlank()
super.update(e)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.intellij.notification.NotificationGroupManager
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.PlatformCoreDataKeys
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.Task
Expand All @@ -15,7 +16,7 @@ import com.intellij.psi.PsiDocumentManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.WriteCommandAction

class RefactorFromInstructions : AnAction() {
class RefactorFromInstructions : AnAction("From Instructions") {
private val openAIRepo: OpenAIRepository = OpenAIRepository()

override fun actionPerformed(e: AnActionEvent) {
Expand Down Expand Up @@ -66,4 +67,14 @@ class RefactorFromInstructions : AnAction() {
}
}.queue()
}

override fun update(e: AnActionEvent) {
val editor = e.getData(CommonDataKeys.EDITOR)
val selectedText = editor?.selectionModel?.selectedText

// Set visibility and enabled state based on whether code is selected
e.presentation.isVisible = !selectedText.isNullOrBlank()
e.presentation.isEnabled = !selectedText.isNullOrBlank()
super.update(e)
}
}
Loading