Skip to content

Commit

Permalink
fix(chat-coding-panel): improve handling of request intentions #51
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 4, 2024
1 parent b0bb226 commit 9fa1808
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -6,7 +6,6 @@ import cc.unitmesh.devti.gui.chat.ChatContext
import cc.unitmesh.devti.gui.chat.ChatRole
import cc.unitmesh.devti.llms.LlmFactory
import cc.unitmesh.devti.provider.ContextPrompter
import cc.unitmesh.devti.counit.configurable.customRagSettings
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.logger
Expand All @@ -30,7 +29,7 @@ class CoUnitPreProcessor(val project: Project) {

val response = coUnitPromptGenerator.findIntention(request)
if (response == null) {
LOG.error("can not find intention for request: $request")
logger.error("can not find intention for request: $request")
return
}

Expand Down Expand Up @@ -81,7 +80,7 @@ class CoUnitPreProcessor(val project: Project) {
}

companion object {
private val LOG = logger<CoUnitPreProcessor>()
private val logger = logger<CoUnitPreProcessor>()
}
}

4 changes: 2 additions & 2 deletions src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt
Expand Up @@ -68,10 +68,10 @@ class ChatCodingPanel(private val chatCodingService: ChatCodingService, val disp
myScrollPane.verticalScrollBar.autoscrolls = true
myScrollPane.background = UIUtil.getListBackground()

progressBar = JProgressBar().apply { preferredHeight = JBUI.scale(2) }
progressBar = JProgressBar(2)

val actionLink = ActionLink(AutoDevBundle.message("label.submit.issue")) {
BrowserUtil.browse("https://github.com/unit-mesh/auto-dev/issues")
BrowserUtil.browse(AutoDevBundle.message("chat.panel.submit.issue.url"))
}
actionLink.setExternalLinkIcon()

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages/AutoDevBundle.properties
Expand Up @@ -37,6 +37,7 @@ autodev.custom.prompt.placeholder=Custom your prompt here

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

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

0 comments on commit 9fa1808

Please sign in to comment.