Skip to content

Commit 2bdb46c

Browse files
committed
feat(settings): add enable render webview option
- Add enableRenderWebview checkbox to AutoDevCoderConfigurable- Add enableRenderWebview property to AutoDevCoderSettingService - Add
1 parent fcd549c commit 2bdb46c

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

core/src/main/kotlin/cc/unitmesh/devti/settings/coder/AutoDevCoderConfigurable.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class AutoDevCoderConfigurable(private val project: Project) : BoundConfigurable
3131
private val enableAutoRepairDiff = JCheckBox()
3232
private val enableAutoRunTerminal = JCheckBox()
3333
private val enableAutoLintCode = JCheckBox()
34+
private val enableRenderWebview = JCheckBox()
3435

3536

3637
val settings = project.service<AutoDevCoderSettingService>()
@@ -145,6 +146,15 @@ class AutoDevCoderConfigurable(private val project: Project) : BoundConfigurable
145146
)
146147
}
147148

149+
row(jLabel("settings.autodev.coder.enableRenderWebview")) {
150+
fullWidthCell(enableRenderWebview)
151+
.bind(
152+
componentGet = { it.isSelected },
153+
componentSet = { component, value -> component.isSelected = value },
154+
prop = state::enableRenderWebview.toMutableProperty()
155+
)
156+
}
157+
148158
row(jLabel("settings.external.team.prompts.path")) {
149159
fullWidthCell(teamPromptsField)
150160
.bind(
@@ -168,6 +178,7 @@ class AutoDevCoderConfigurable(private val project: Project) : BoundConfigurable
168178
it.enableAutoRepairDiff = state.enableAutoRepairDiff
169179
it.enableAutoRunTerminal = state.enableAutoRunTerminal
170180
it.enableAutoLintCode = state.enableAutoLintCode
181+
it.enableRenderWebview = state.enableRenderWebview
171182
}
172183
}
173184
}

core/src/main/kotlin/cc/unitmesh/devti/settings/coder/AutoDevCoderSettingService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class AutoDevCoderSettingService(
3131
var enableRenameSuggestion by property(false)
3232
var enableAutoRunTerminal by property(false)
3333
var enableAutoLintCode by property(false)
34+
var enableRenderWebview by property(false)
3435
var teamPromptsDir by property("prompts") { it.isEmpty() }
3536

3637
override fun copy(): AutoDevCoderSettings {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ settings.autodev.coder.enableRenameSuggestion=Enable Rename suggestion
131131
settings.autodev.coder.enableAutoRepairDiff=Enable auto repair diff
132132
settings.autodev.coder.enableAutoRunTerminal=Enable auto run terminal
133133
settings.autodev.coder.enableAutoLintCode=Enable auto lint patch code
134+
settings.autodev.coder.enableRenderWebview=Enable render chat in WebView
134135
shell.command.suggestion.action.default.text=How to check out a branch?
135136
batch.nothing.to.testing=Nothing to AutoTest
136137
intentions.chat.code.test.verify=Verify test

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ settings.autodev.coder.enableRenameSuggestion=启用重命名建议
131131
settings.autodev.coder.enableAutoRepairDiff=启用自动修复 diff
132132
settings.autodev.coder.enableAutoRunTerminal=启用自动运行终端(有风险)
133133
settings.autodev.coder.enableAutoLintCode=启用自动修复 Lint 代码
134+
settings.autodev.coder.enableRenderWebview=在聊天页面中启用渲染 WebView
134135
shell.command.suggestion.action.default.text=如何创建一个新的分支?
135136
batch.nothing.to.testing=没有要 AutoTest 的内容
136137
intentions.chat.code.test.verify=验证测试中

0 commit comments

Comments
 (0)