Skip to content

Commit e1b177f

Browse files
committed
fix(chat-coding-service): handle prompt and response with newChatContext as true
1 parent 0fbdc91 commit e1b177f

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

exts/database/src/main/kotlin/cc/unitmesh/database/actions/GenerateEntityAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class GenerateEntityAction : ChatBaseIntention() {
4545
service.handlePromptAndResponse(panel, object : ContextPrompter() {
4646
override fun displayPrompt(): String = prompter
4747
override fun requestPrompt(): String = prompter
48-
}, null, false)
48+
}, null, true)
4949
}
5050
}
5151
}

exts/database/src/main/kotlin/cc/unitmesh/database/actions/GenerateFunctionAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class GenerateFunctionAction : ChatBaseIntention() {
5353
service.handlePromptAndResponse(panel, object : ContextPrompter() {
5454
override fun displayPrompt(): String = prompter
5555
override fun requestPrompt(): String = prompter
56-
}, null, false)
56+
}, null, true)
5757
}
5858
}
5959

exts/database/src/main/kotlin/cc/unitmesh/database/actions/GenerateUnittestAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class GenerateUnittestAction : ChatBaseIntention() {
4444
service.handlePromptAndResponse(panel, object : ContextPrompter() {
4545
override fun displayPrompt(): String = prompter
4646
override fun requestPrompt(): String = prompter
47-
}, null, false)
47+
}, null, true)
4848
}
4949
}
5050
}

src/main/kotlin/cc/unitmesh/devti/actions/vcs/ReleaseNoteSuggestionAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ReleaseNoteSuggestionAction : AnAction() {
3636
chatCodingService.handlePromptAndResponse(contentPanel, object : ContextPrompter() {
3737
override fun displayPrompt(): String = prompt
3838
override fun requestPrompt(): String = prompt
39-
}, null, false)
39+
}, null, true)
4040
}
4141
}
4242
}

src/main/kotlin/cc/unitmesh/devti/gui/SendToWindow.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ fun sendToChatPanel(project: Project, runnable: (ChatCodingPanel, ChatCodingServ
4242

4343
fun sendToChatPanel(project: Project, actionType: ChatActionType, prompter: ContextPrompter) {
4444
sendToChatWindow(project, actionType) { contentPanel, chatCodingService ->
45-
chatCodingService.handlePromptAndResponse(contentPanel, prompter, newChatContext = false)
45+
chatCodingService.handlePromptAndResponse(contentPanel, prompter, newChatContext = true)
4646
}
4747
}

src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ChatCodingService(var actionType: ChatActionType, val project: Project) {
2828
ui: ChatCodingPanel,
2929
prompter: ContextPrompter,
3030
context: ChatContext? = null,
31-
newChatContext: Boolean,
31+
newChatContext: Boolean
3232
) {
3333
var requestPrompt = prompter.requestPrompt()
3434
var displayPrompt = prompter.displayPrompt()

0 commit comments

Comments
 (0)