Skip to content

Commit

Permalink
1.4.1 (#151)
Browse files Browse the repository at this point in the history
* Prototype welcome page

* Configurations for welcome screen

* Update plugin.xml

* Update welcomePage.md

* Update README.md

* Delete IdeaKotlinInterpreter.kt
  • Loading branch information
acharneski authored Apr 15, 2024
1 parent 992464c commit 6a96ac6
Show file tree
Hide file tree
Showing 10 changed files with 599 additions and 513 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
# intellij-aicoder
# **AI Coding Assistant: The Ultimate IntelliJ Plugin for Developers**

![Build](https://github.com/SimiaCryptus/intellij-aicoder/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)

<!-- Plugin description -->

# **AI Coding Assistant: The Ultimate IntelliJ Plugin for Developers**

![Build](https://github.com/SimiaCryptus/intellij-aicoder/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)

Are you a developer looking to supercharge your coding workflow? Look no further than AI Coding Assistant, the
game-changing IntelliJ plugin that harnesses the power of cutting-edge Language Model APIs to revolutionize the way you
code!

## **Key Features**

* 🌐 **Extensive API Support**: AI Coding Assistant seamlessly integrates with a wide range of leading LLM APIs,
including [OpenAI](https://platform.openai.com/), [AWS Bedrock](https://console.aws.amazon.com/bedrock/), [Anthropic](https://api.anthropic.com/v1), [Google Generative Language](https://generativelanguage.googleapis.com/), [Groq](https://console.groq.com/), [Perplexity AI](https://www.perplexity.ai/),
including [OpenAI](https://platform.openai.com/), [AWS Bedrock](https://console.aws.amazon.com/bedrock/), [Anthropic](https://api.anthropic.com/v1), [Google](https://generativelanguage.googleapis.com/), [Groq](https://console.groq.com/), [Perplexity AI](https://www.perplexity.ai/),
and [ModelsLab](https://modelslab.com/dashboard/). Get your API keys and unlock a world of possibilities!

* 💸 **No Membership Fees**: While API access is typically paid, AI Coding Assistant charges no base fee. You only pay
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginName=intellij-aicoder
pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder
pluginVersion=1.4.0
pluginVersion=1.4.1

jvmArgs=-Xmx8g
org.gradle.jvmargs=-Xmx8g
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,126 +33,137 @@ class AppSettingsComponent : com.intellij.openapi.Disposable {
// }
// })

@Suppress("unused")
@Name("Human Language")
val humanLanguage = JBTextField()

@Suppress("unused")
@Name("Listening Port")
val listeningPort = JBTextField()

@Suppress("unused")
@Name("Listening Endpoint")
val listeningEndpoint = JBTextField()

@Suppress("unused")
@Name("Suppress Errors")
val suppressErrors = JBCheckBox()

@Suppress("unused")
@Name("Model")
val smartModel = ComboBox<String>()

@Suppress("unused")
@Name("Model")
val fastModel = ComboBox<String>()

@Suppress("unused")
@Name("Enable API Log")
val apiLog = JBCheckBox()

@Suppress("unused")
val openApiLog = JButton(object : AbstractAction("Open API Log") {
override fun actionPerformed(e: ActionEvent) {
AppSettingsState.auxiliaryLog?.let {
if (it.exists()) {
val project = ApplicationManager.getApplication().runReadAction<Project> {
ProjectManager.getInstance().openProjects.firstOrNull()
}
ApplicationManager.getApplication().invokeLater {
val virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(it)
val openFileDescriptor = OpenFileDescriptor(project, virtualFile!!, virtualFile.length.toInt())
FileEditorManager.getInstance(project!!).openTextEditor(openFileDescriptor, true)?.document?.setReadOnly(
true
)
}
@Suppress("unused")
@Name("Human Language")
val humanLanguage = JBTextField()

@Suppress("unused")
@Name("Listening Port")
val listeningPort = JBTextField()

@Suppress("unused")
@Name("Listening Endpoint")
val listeningEndpoint = JBTextField()

@Suppress("unused")
@Name("Suppress Errors")
val suppressErrors = JBCheckBox()

@Suppress("unused")
@Name("Model")
val smartModel = ComboBox<String>()

@Suppress("unused")
@Name("Model")
val fastModel = ComboBox<String>()

@Suppress("unused")
@Name("Enable API Log")
val apiLog = JBCheckBox()

@Suppress("unused")
val openApiLog = JButton(object : AbstractAction("Open API Log") {
override fun actionPerformed(e: ActionEvent) {
AppSettingsState.auxiliaryLog?.let {
if (it.exists()) {
val project = ApplicationManager.getApplication().runReadAction<Project> {
ProjectManager.getInstance().openProjects.firstOrNull()
}
ApplicationManager.getApplication().invokeLater {
val virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(it)
val openFileDescriptor = OpenFileDescriptor(project, virtualFile!!, virtualFile.length.toInt())
FileEditorManager.getInstance(project!!)
.openTextEditor(openFileDescriptor, true)?.document?.setReadOnly(
true
)
}
}
}
}
}
}
})
})


@Suppress("unused")
val clearApiLog = JButton(object : AbstractAction("Clear API Log") {
override fun actionPerformed(e: ActionEvent) {
val openAIClient = IdeaOpenAIClient.instance
openAIClient.logStreams.retainAll { it.close(); false }
AppSettingsState.auxiliaryLog?.let {
if (it.exists()) {
it.delete()
}
openAIClient.logStreams.add(FileOutputStream(it, true).buffered())
}
}
})


@Suppress("unused")
val clearApiLog = JButton(object : AbstractAction("Clear API Log") {
override fun actionPerformed(e: ActionEvent) {
val openAIClient = IdeaOpenAIClient.instance
openAIClient.logStreams.retainAll { it.close(); false }
AppSettingsState.auxiliaryLog?.let {
if (it.exists()) {
it.delete()
}
openAIClient.logStreams.add(FileOutputStream(it, true).buffered())
}
@Suppress("unused")
@Name("Developer Tools")
val devActions = JBCheckBox()

@Suppress("unused")
@Name("Edit API Requests")
val editRequests = JBCheckBox()

@Suppress("unused")
@Name("Plugin Home")
val pluginHome = JBTextField()

@Suppress("unused")
val choosePluginHome = com.intellij.openapi.ui.TextFieldWithBrowseButton(pluginHome).apply {
addBrowseFolderListener(
"Select Plugin Home Directory",
null,
null,
FileChooserDescriptorFactory.createSingleFolderDescriptor()
)
}
})


@Suppress("unused")
@Name("Developer Tools")
val devActions = JBCheckBox()

@Suppress("unused")
@Name("Edit API Requests")
val editRequests = JBCheckBox()

@Suppress("unused")
@Name("Plugin Home")
val pluginHome = JBTextField()

@Suppress("unused")
val choosePluginHome = com.intellij.openapi.ui.TextFieldWithBrowseButton(pluginHome).apply {
addBrowseFolderListener("Select Plugin Home Directory", null, null, FileChooserDescriptorFactory.createSingleFolderDescriptor())
}

@Suppress("unused")
@Name("Temperature")
val temperature = JBTextField()

@Name("APIs")
val apis = JBTable(DefaultTableModel(arrayOf("Provider", "Key", "Base URL"), 0)).apply {
columnModel.getColumn(0).preferredWidth = 100
columnModel.getColumn(1).preferredWidth = 200
columnModel.getColumn(2).preferredWidth = 200
val keyColumnIndex = 1
getColumnModel().getColumn(keyColumnIndex).cellRenderer = object : DefaultTableCellRenderer() {
override fun setValue(value: Any?) {
text =
if (value is String && value.isNotEmpty()) value.map { '*' }.joinToString("") else value?.toString() ?: ""
}

@Suppress("unused")
@Name("Show Welcome Screen")
val showWelcomeScreen = JBCheckBox("Show Welcome Screen", true)

@Suppress("unused")
@Name("Temperature")
val temperature = JBTextField()

@Name("APIs")
val apis = JBTable(DefaultTableModel(arrayOf("Provider", "Key", "Base URL"), 0)).apply {
columnModel.getColumn(0).preferredWidth = 100
columnModel.getColumn(1).preferredWidth = 200
columnModel.getColumn(2).preferredWidth = 200
val keyColumnIndex = 1
getColumnModel().getColumn(keyColumnIndex).cellRenderer = object : DefaultTableCellRenderer() {
override fun setValue(value: Any?) {
text =
if (value is String && value.isNotEmpty()) value.map { '*' }.joinToString("") else value?.toString()
?: ""
}
}
}
}

@Name("Editor Actions")
var usage = UsageTable(ApplicationServices.usageManager)
@Name("Editor Actions")
var usage = UsageTable(ApplicationServices.usageManager)

init {
init {
// tokenCounter.isEditable = false
// this.modelName.addItem(ChatModels.GPT35Turbo.modelName)
// this.modelName.addItem(ChatModels.GPT4.modelName)
// this.modelName.addItem(ChatModels.GPT4Turbo.modelName)
ChatModels.values().forEach {
ChatModels.values().forEach {
// this.modelName.addItem(it.key)
this.smartModel.addItem(it.value.modelName)
this.fastModel.addItem(it.value.modelName)
}
this.smartModel.addItem(it.value.modelName)
this.fastModel.addItem(it.value.modelName)
}
// this.modelName.isEditable = true
this.smartModel.isEditable = true
this.fastModel.isEditable = true
}
this.smartModel.isEditable = true
this.fastModel.isEditable = true
}

companion object {
}
companion object {
}

override fun dispose() {
}
override fun dispose() {
}
}
Loading

0 comments on commit 6a96ac6

Please sign in to comment.