Skip to content

Commit bb4be32

Browse files
committed
feat(chat): add BRIDGE action type and translations #308
Introduce a new BRIDGE action type with corresponding translations in the AutoDevBundle properties files. This includes adding the necessary Kotlin code to handle the BRIDGE template rendering.
1 parent 4fddf6b commit bb4be32

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/message/ChatActionType.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ enum class ChatActionType(var context: ChatTemplateContext) {
3636
CUSTOM_AGENT(ChatTemplateContext()),
3737
CODE_REVIEW(ChatTemplateContext()),
3838
INLINE_CHAT(ChatTemplateContext()),
39-
SKETCH(ChatTemplateContext())
39+
SKETCH(ChatTemplateContext()),
40+
BRIDGE(ChatTemplateContext())
4041
;
4142

4243
fun instruction(lang: String = "", project: Project?): TextTemplatePrompt {
@@ -104,6 +105,14 @@ enum class ChatActionType(var context: ChatTemplateContext) {
104105

105106
TextTemplatePrompt(displayText, template, templateRender, this.context)
106107
}
108+
109+
BRIDGE -> {
110+
val displayText = AutoDevBundle.message("prompts.autodev.bridge", lang)
111+
val templateRender = TemplateRender(GENIUS_CODE)
112+
val template = templateRender.getTemplate("bridge.vm")
113+
114+
TextTemplatePrompt(displayText, template, templateRender, this.context)
115+
}
107116
}
108117
}
109118
}

core/src/main/resources/messages/AutoDevBundle_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ prompts.autodev.sketch=Sketch
217217
sketch.composer.mode=Composer Mode
218218
sketch.lint.error.tooltip=Click to view all errors
219219
sketch.lint.error=Found Lint issue: {0}
220-
221220
custom.action=Custom Action
222221
custom.living.documentation=Custom Living Documentation
223222
sketch.dependencies.check=Check dependencies has Issues
223+
prompts.autodev.bridge=Bridge

core/src/main/resources/messages/AutoDevBundle_zh.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,4 @@ sketch.lint.error=发现 {0} 个 Lint/Inspection 错误
219219
custom.action=Custom Action
220220
custom.living.documentation=Custom Living Documentation
221221
sketch.dependencies.check=Check dependencies has Issues
222+
prompts.autodev.bridge=Bridge

0 commit comments

Comments
 (0)