Skip to content

Commit

Permalink
fix(gui): correct issue submission link and add hover text
Browse files Browse the repository at this point in the history
The issue submission link was not working properly and lacked hover text for user guidance. This commit fixes the link to open the correct GitHub issue page and adds a tooltip with additional information.
  • Loading branch information
phodal committed Mar 8, 2024
1 parent 1ee6ad2 commit 70f24f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt
Expand Up @@ -29,6 +29,7 @@ import com.intellij.ui.components.JBLabel
import com.intellij.ui.components.JBScrollPane
import com.intellij.ui.components.panels.VerticalLayout
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.dsl.gridLayout.UnscaledGapsY
import com.intellij.util.ui.JBFont
import com.intellij.util.ui.JBUI
import com.intellij.util.ui.UIUtil
Expand Down Expand Up @@ -77,10 +78,11 @@ class ChatCodingPanel(private val chatCodingService: ChatCodingService, val disp

progressBar = JProgressBar()

val actionLink = ActionLink(AutoDevBundle.message("label.submit.issue")) {
BrowserUtil.browse(AutoDevBundle.message("chat.panel.submit.issue.url"))
val actionLink = panel {
row {
text(AutoDevBundle.message("label.submit.issue"))
}.customize(UnscaledGapsY(0, 18));
}
actionLink.setExternalLinkIcon()

inputSection = AutoDevInputSection(chatCodingService.project, disposable)
inputSection.addListener(object : AutoDevInputListener {
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/messages/AutoDevBundle.properties
Expand Up @@ -37,8 +37,7 @@ autodev.custom.prompt.placeholder=Custom your prompt here
autodev.custom.intentions.family=Custom Intention

tooltip.thanks=Thanks for like, but we don't support this
label.submit.issue=Want new feature?
chat.panel.submit.issue.url=https://github.com/unit-mesh/auto-dev/issues
label.submit.issue=<a href="https://github.com/unit-mesh/auto-dev/issues">Want new feature?</a>

# don't remove the following line and don't rename them unless change [LLMSettingCompoent] class
settings.languageParam=Language
Expand Down

0 comments on commit 70f24f4

Please sign in to comment.