Skip to content

Commit 56c9789

Browse files
committed
fix(devti): handle empty plan items and add custom engine settings
- Update PlanLangSketch to handle empty plan items by clearing the content panel - Add new settings for custom engine configuration: - Delay seconds - Custom response format - Custom response type - Custom request body format - Custom request header format - Update both English and Chinese properties files with new setting labels
1 parent 60bb370 commit 56c9789

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/plan/PlanLangSketch.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ class PlanController(
4141
}
4242

4343
fun updatePlan(newPlanItems: List<AgentTaskEntry>) {
44-
if (newPlanItems.isEmpty()) return
44+
if (newPlanItems.isEmpty()) {
45+
contentPanel.removeAll()
46+
contentPanel.revalidate()
47+
contentPanel.repaint()
48+
return
49+
}
4550

4651
val taskStateMap = mutableMapOf<String, Pair<Boolean, TaskStatus>>()
4752
agentTaskItems.forEach { planItem ->

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ settings.maxTokenLengthParam=Max token length
4444
settings.customEngineServerParam=LLM Server Address
4545
settings.customModelParam=Model Name
4646
settings.customEngineTokenParam=LLM API Key/Token
47+
settings.delaySecondsParam=Quest Delay Seconds
48+
settings.customEngineResponseFormatParam=Custom Response Format (Json Path)
49+
settings.customEngineResponseTypeParam=Custom Response Type
50+
settings.customEngineRequestBodyFormatParam=Custom Request Body Format (Json)
51+
settings.customEngineRequestHeaderFormatParam=Custom Request Header Format (Json)
4752

4853
customize.title=Custom Agent
4954
counit.agent.enable.label=Enable custom agent (experimental)

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ settings.maxTokenLengthParam=最大 token 长度
4242
settings.customEngineServerParam=LLM 服务器 URL
4343
settings.customModelParam=模型名称
4444
settings.customEngineTokenParam=LLM 服务器密钥
45-
45+
settings.delaySecondsParam=请求延迟秒数(可选)
46+
settings.customEngineResponseFormatParam=自定义响应格式(Json 路径)
47+
settings.customEngineResponseTypeParam=自定义响应类型
48+
settings.customEngineRequestBodyFormatParam=自定义请求主体格式(Json)
49+
settings.customEngineRequestHeaderFormatParam=自定义请求头格式(Json)
4650

4751
customize.title=自定义智能体
4852
counit.agent.enable.label=启用自定义智能体(实验性)

0 commit comments

Comments
 (0)