Skip to content

Commit 6a96ac6

Browse files
authored
1.4.1 (#151)
* Prototype welcome page * Configurations for welcome screen * Update plugin.xml * Update welcomePage.md * Update README.md * Delete IdeaKotlinInterpreter.kt
1 parent 992464c commit 6a96ac6

File tree

10 files changed

+599
-513
lines changed

10 files changed

+599
-513
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
# intellij-aicoder
1+
# **AI Coding Assistant: The Ultimate IntelliJ Plugin for Developers**
22

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

77
<!-- Plugin description -->
88

9-
# **AI Coding Assistant: The Ultimate IntelliJ Plugin for Developers**
10-
11-
![Build](https://github.com/SimiaCryptus/intellij-aicoder/workflows/Build/badge.svg)
12-
[![Version](https://img.shields.io/jetbrains/plugin/v/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)
13-
[![Downloads](https://img.shields.io/jetbrains/plugin/d/20724-ai-coding-assistant.svg)](https://plugins.jetbrains.com/plugin/20724-ai-coding-assistant)
14-
159
Are you a developer looking to supercharge your coding workflow? Look no further than AI Coding Assistant, the
1610
game-changing IntelliJ plugin that harnesses the power of cutting-edge Language Model APIs to revolutionize the way you
1711
code!
1812

1913
## **Key Features**
2014

2115
* 🌐 **Extensive API Support**: AI Coding Assistant seamlessly integrates with a wide range of leading LLM APIs,
22-
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/),
16+
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/),
2317
and [ModelsLab](https://modelslab.com/dashboard/). Get your API keys and unlock a world of possibilities!
2418

2519
* 💸 **No Membership Fees**: While API access is typically paid, AI Coding Assistant charges no base fee. You only pay

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginName=intellij-aicoder
22
pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder
3-
pluginVersion=1.4.0
3+
pluginVersion=1.4.1
44

55
jvmArgs=-Xmx8g
66
org.gradle.jvmargs=-Xmx8g

src/main/kotlin/com/github/simiacryptus/aicoder/ApplicationEvents.kt

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsComponent.kt

Lines changed: 118 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -33,126 +33,137 @@ class AppSettingsComponent : com.intellij.openapi.Disposable {
3333
// }
3434
// })
3535

36-
@Suppress("unused")
37-
@Name("Human Language")
38-
val humanLanguage = JBTextField()
39-
40-
@Suppress("unused")
41-
@Name("Listening Port")
42-
val listeningPort = JBTextField()
43-
44-
@Suppress("unused")
45-
@Name("Listening Endpoint")
46-
val listeningEndpoint = JBTextField()
47-
48-
@Suppress("unused")
49-
@Name("Suppress Errors")
50-
val suppressErrors = JBCheckBox()
51-
52-
@Suppress("unused")
53-
@Name("Model")
54-
val smartModel = ComboBox<String>()
55-
56-
@Suppress("unused")
57-
@Name("Model")
58-
val fastModel = ComboBox<String>()
59-
60-
@Suppress("unused")
61-
@Name("Enable API Log")
62-
val apiLog = JBCheckBox()
63-
64-
@Suppress("unused")
65-
val openApiLog = JButton(object : AbstractAction("Open API Log") {
66-
override fun actionPerformed(e: ActionEvent) {
67-
AppSettingsState.auxiliaryLog?.let {
68-
if (it.exists()) {
69-
val project = ApplicationManager.getApplication().runReadAction<Project> {
70-
ProjectManager.getInstance().openProjects.firstOrNull()
71-
}
72-
ApplicationManager.getApplication().invokeLater {
73-
val virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(it)
74-
val openFileDescriptor = OpenFileDescriptor(project, virtualFile!!, virtualFile.length.toInt())
75-
FileEditorManager.getInstance(project!!).openTextEditor(openFileDescriptor, true)?.document?.setReadOnly(
76-
true
77-
)
78-
}
36+
@Suppress("unused")
37+
@Name("Human Language")
38+
val humanLanguage = JBTextField()
39+
40+
@Suppress("unused")
41+
@Name("Listening Port")
42+
val listeningPort = JBTextField()
43+
44+
@Suppress("unused")
45+
@Name("Listening Endpoint")
46+
val listeningEndpoint = JBTextField()
47+
48+
@Suppress("unused")
49+
@Name("Suppress Errors")
50+
val suppressErrors = JBCheckBox()
51+
52+
@Suppress("unused")
53+
@Name("Model")
54+
val smartModel = ComboBox<String>()
55+
56+
@Suppress("unused")
57+
@Name("Model")
58+
val fastModel = ComboBox<String>()
59+
60+
@Suppress("unused")
61+
@Name("Enable API Log")
62+
val apiLog = JBCheckBox()
63+
64+
@Suppress("unused")
65+
val openApiLog = JButton(object : AbstractAction("Open API Log") {
66+
override fun actionPerformed(e: ActionEvent) {
67+
AppSettingsState.auxiliaryLog?.let {
68+
if (it.exists()) {
69+
val project = ApplicationManager.getApplication().runReadAction<Project> {
70+
ProjectManager.getInstance().openProjects.firstOrNull()
71+
}
72+
ApplicationManager.getApplication().invokeLater {
73+
val virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(it)
74+
val openFileDescriptor = OpenFileDescriptor(project, virtualFile!!, virtualFile.length.toInt())
75+
FileEditorManager.getInstance(project!!)
76+
.openTextEditor(openFileDescriptor, true)?.document?.setReadOnly(
77+
true
78+
)
79+
}
80+
}
81+
}
7982
}
80-
}
81-
}
82-
})
83+
})
84+
85+
86+
@Suppress("unused")
87+
val clearApiLog = JButton(object : AbstractAction("Clear API Log") {
88+
override fun actionPerformed(e: ActionEvent) {
89+
val openAIClient = IdeaOpenAIClient.instance
90+
openAIClient.logStreams.retainAll { it.close(); false }
91+
AppSettingsState.auxiliaryLog?.let {
92+
if (it.exists()) {
93+
it.delete()
94+
}
95+
openAIClient.logStreams.add(FileOutputStream(it, true).buffered())
96+
}
97+
}
98+
})
8399

84100

85-
@Suppress("unused")
86-
val clearApiLog = JButton(object : AbstractAction("Clear API Log") {
87-
override fun actionPerformed(e: ActionEvent) {
88-
val openAIClient = IdeaOpenAIClient.instance
89-
openAIClient.logStreams.retainAll { it.close(); false }
90-
AppSettingsState.auxiliaryLog?.let {
91-
if (it.exists()) {
92-
it.delete()
93-
}
94-
openAIClient.logStreams.add(FileOutputStream(it, true).buffered())
95-
}
101+
@Suppress("unused")
102+
@Name("Developer Tools")
103+
val devActions = JBCheckBox()
104+
105+
@Suppress("unused")
106+
@Name("Edit API Requests")
107+
val editRequests = JBCheckBox()
108+
109+
@Suppress("unused")
110+
@Name("Plugin Home")
111+
val pluginHome = JBTextField()
112+
113+
@Suppress("unused")
114+
val choosePluginHome = com.intellij.openapi.ui.TextFieldWithBrowseButton(pluginHome).apply {
115+
addBrowseFolderListener(
116+
"Select Plugin Home Directory",
117+
null,
118+
null,
119+
FileChooserDescriptorFactory.createSingleFolderDescriptor()
120+
)
96121
}
97-
})
98-
99-
100-
@Suppress("unused")
101-
@Name("Developer Tools")
102-
val devActions = JBCheckBox()
103-
104-
@Suppress("unused")
105-
@Name("Edit API Requests")
106-
val editRequests = JBCheckBox()
107-
108-
@Suppress("unused")
109-
@Name("Plugin Home")
110-
val pluginHome = JBTextField()
111-
112-
@Suppress("unused")
113-
val choosePluginHome = com.intellij.openapi.ui.TextFieldWithBrowseButton(pluginHome).apply {
114-
addBrowseFolderListener("Select Plugin Home Directory", null, null, FileChooserDescriptorFactory.createSingleFolderDescriptor())
115-
}
116-
117-
@Suppress("unused")
118-
@Name("Temperature")
119-
val temperature = JBTextField()
120-
121-
@Name("APIs")
122-
val apis = JBTable(DefaultTableModel(arrayOf("Provider", "Key", "Base URL"), 0)).apply {
123-
columnModel.getColumn(0).preferredWidth = 100
124-
columnModel.getColumn(1).preferredWidth = 200
125-
columnModel.getColumn(2).preferredWidth = 200
126-
val keyColumnIndex = 1
127-
getColumnModel().getColumn(keyColumnIndex).cellRenderer = object : DefaultTableCellRenderer() {
128-
override fun setValue(value: Any?) {
129-
text =
130-
if (value is String && value.isNotEmpty()) value.map { '*' }.joinToString("") else value?.toString() ?: ""
131-
}
122+
123+
@Suppress("unused")
124+
@Name("Show Welcome Screen")
125+
val showWelcomeScreen = JBCheckBox("Show Welcome Screen", true)
126+
127+
@Suppress("unused")
128+
@Name("Temperature")
129+
val temperature = JBTextField()
130+
131+
@Name("APIs")
132+
val apis = JBTable(DefaultTableModel(arrayOf("Provider", "Key", "Base URL"), 0)).apply {
133+
columnModel.getColumn(0).preferredWidth = 100
134+
columnModel.getColumn(1).preferredWidth = 200
135+
columnModel.getColumn(2).preferredWidth = 200
136+
val keyColumnIndex = 1
137+
getColumnModel().getColumn(keyColumnIndex).cellRenderer = object : DefaultTableCellRenderer() {
138+
override fun setValue(value: Any?) {
139+
text =
140+
if (value is String && value.isNotEmpty()) value.map { '*' }.joinToString("") else value?.toString()
141+
?: ""
142+
}
143+
}
132144
}
133-
}
134145

135-
@Name("Editor Actions")
136-
var usage = UsageTable(ApplicationServices.usageManager)
146+
@Name("Editor Actions")
147+
var usage = UsageTable(ApplicationServices.usageManager)
137148

138-
init {
149+
init {
139150
// tokenCounter.isEditable = false
140151
// this.modelName.addItem(ChatModels.GPT35Turbo.modelName)
141152
// this.modelName.addItem(ChatModels.GPT4.modelName)
142153
// this.modelName.addItem(ChatModels.GPT4Turbo.modelName)
143-
ChatModels.values().forEach {
154+
ChatModels.values().forEach {
144155
// this.modelName.addItem(it.key)
145-
this.smartModel.addItem(it.value.modelName)
146-
this.fastModel.addItem(it.value.modelName)
147-
}
156+
this.smartModel.addItem(it.value.modelName)
157+
this.fastModel.addItem(it.value.modelName)
158+
}
148159
// this.modelName.isEditable = true
149-
this.smartModel.isEditable = true
150-
this.fastModel.isEditable = true
151-
}
160+
this.smartModel.isEditable = true
161+
this.fastModel.isEditable = true
162+
}
152163

153-
companion object {
154-
}
164+
companion object {
165+
}
155166

156-
override fun dispose() {
157-
}
167+
override fun dispose() {
168+
}
158169
}

0 commit comments

Comments
 (0)