Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkondratek committed Feb 12, 2024
1 parent 2aefbbe commit 65ba720
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/main/java/com/sourcegraph/cody/PromptPanel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PromptPanel(project: Project, private val chatSession: ChatSession) : JLay

init {
/** Initialize view */
textArea.emptyText.text = CodyBundle.getString("PromptPanel.ask-cody")
textArea.emptyText.text = CodyBundle.getString("PromptPanel.ask-cody.message")
scrollPane.border = EmptyBorder(JBUI.emptyInsets())
scrollPane.background = UIUtil.getPanelBackground()

Expand Down Expand Up @@ -243,6 +243,10 @@ class PromptPanel(project: Project, private val chatSession: ChatSession) : JLay
}
}

fun updateEmptyTextAfterFirstMessage() {
textArea.emptyText.text = CodyBundle.getString("PromptPanel.ask-cody.follow-up-message")
}

companion object {
private const val CHAT_MESSAGE_HISTORY_CAPACITY = 100
private val KEY_ENTER = KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), null)
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/com/sourcegraph/cody/chat/ui/ChatPanel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class ChatPanel(project: Project, chatSession: ChatSession) :
if (messagesPanel.componentCount == 1) {
modelDropdown.isEnabled = false
}
promptPanel.updateEmptyTextAfterFirstMessage()
messagesPanel.addOrUpdateMessage(message, index, shouldAddBlinkingCursor)
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/CodyBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ popup.select-chat=Select Chat
popup.remove-chat=Remove Chat
popup.remove-all-chats=Remove All Chats

PromptPanel.ask-cody=Message (use @ to include files)...

PromptPanel.ask-cody.message=Message (type @ to include specific files as context)
PromptPanel.ask-cody.follow-up-message=Follow-up message (type @ to include specific files as context)

0 comments on commit 65ba720

Please sign in to comment.