Skip to content

Commit

Permalink
feat(settings): Add "More prompts" button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blarc committed Apr 16, 2023
1 parent ac69ce0 commit c9dd143
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## [Unreleased]
### Added
- Add more prompts button to settings.

### Changed
- Use jtokkit library for getting max content length for a model and check if prompt is too large.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ private const val BUNDLE = "messages.MyBundle"

object AICommitsBundle : DynamicBundle(BUNDLE) {

public val URL_BUG_REPORT = URL("https://github.com/Blarc/ai-commits-intellij-plugin/issues")
val URL_BUG_REPORT = URL("https://github.com/Blarc/ai-commits-intellij-plugin/issues")
val URL_PROMPTS_DISCUSSION = URL("https://github.com/Blarc/ai-commits-intellij-plugin/discussions/18");

@Suppress("SpreadOperator")
@JvmStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.intellij.ui.CommonActionsPanel
import com.intellij.ui.ToolbarDecorator
import com.intellij.ui.components.JBLabel
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.util.maximumWidth
import com.intellij.ui.util.minimumWidth
import kotlinx.coroutines.*
import java.util.*
Expand Down Expand Up @@ -97,6 +96,8 @@ class AppSettingsConfigurable : BoundConfigurable(message("settings.general.grou
label(message("settings.locale")).widthGroup("labelPrompt")
comboBox(Locale.getAvailableLocales().toList().sortedBy { it.displayName }, AppSettingsListCellRenderer())
.bindItem(AppSettings.instance::locale.toNullableProperty())
browserLink(message("settings.more-prompts"), AICommitsBundle.URL_PROMPTS_DISCUSSION.toString())
.align(AlignX.RIGHT)
}
row {
label(message("settings.prompt")).widthGroup("labelPrompt")
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages/MyBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ settings.prompt.description=Description
validation.unique=Value already exists.
settings.openAIProxy=OpenAI proxy url
settings.loadingModels=Loading OpenAI models...
settings.more-prompts=More prompts

0 comments on commit c9dd143

Please sign in to comment.