Skip to content

Commit edc3e8c

Browse files
committed
fix(actions): fix variable name in CommitMessageSuggestionAction
Changed variable name from historyExample to historyExamples for clarity and consistency.
1 parent 0b23f53 commit edc3e8c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/completion/dataprovider/ToolHub.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ package cc.unitmesh.devti.language.completion.dataprovider
22

33
import cc.unitmesh.devti.agent.model.CustomAgentConfig
44

5+
/**
6+
* The tool hub provides a list of tools - agents and commands for the AI Agent to decide which one to call
7+
* For example, you prompt could be:
8+
* ```devin
9+
* Here is the tools you can use:
10+
* $agent
11+
* ```
12+
*/
513
enum class ToolHub(val summaryName: String, val type: String, val description: String) {
614
AGENT("Agent", CustomAgentConfig::class.simpleName.toString(), "DevIns all agent for AI Agent to call"),
715
COMMAND("Command", BuiltinCommand::class.simpleName.toString(), "DevIns all commands for AI Agent to call"),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ class CommitMessageSuggestionAction : ChatBaseAction() {
146146
val templateRender = TemplateRender("genius/practises")
147147
val template = templateRender.getTemplate("gen-commit-msg.vm")
148148

149-
val historyExample = try {
149+
val historyExamples = try {
150150
findExampleCommitMessages(project) ?: ""
151151
} catch (e: Exception) {
152152
logger.warn("Cannot get example commit messages.", e)
153153
""
154154
}
155155

156156
templateRender.context = CommitMsgGenContext(
157-
historyExample = historyExample,
157+
historyExamples = historyExamples,
158158
diffContent = diff,
159159
)
160160
val prompter = templateRender.renderTemplate(template)
@@ -166,6 +166,6 @@ class CommitMessageSuggestionAction : ChatBaseAction() {
166166

167167

168168
data class CommitMsgGenContext(
169-
var historyExample: String = "",
169+
var historyExamples: String = "",
170170
var diffContent: String = "",
171171
)

0 commit comments

Comments
 (0)