feat(starter): bind liteflow.agent into LiteflowConfig via LiteflowProperty

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
everywhere.z
2026-04-19 19:14:40 +08:00
parent b04b22d407
commit e28308b471
2 changed files with 13 additions and 0 deletions

View File

@@ -107,6 +107,10 @@ public class LiteflowProperty {
@NestedConfigurationProperty
private ChainCacheProperty chainCache;
// Agent配置
@NestedConfigurationProperty
private com.yomahub.liteflow.property.agent.AgentConfig agent;
public static class ChainCacheProperty {
// 是否启用规则缓存
private Boolean enabled;
@@ -378,4 +382,12 @@ public class LiteflowProperty {
public void setEnableVirtualThread(boolean enableVirtualThread) {
this.enableVirtualThread = enableVirtualThread;
}
public com.yomahub.liteflow.property.agent.AgentConfig getAgent() {
return agent;
}
public void setAgent(com.yomahub.liteflow.property.agent.AgentConfig agent) {
this.agent = agent;
}
}

View File

@@ -56,6 +56,7 @@ public class LiteflowPropertyAutoConfiguration {
liteflowConfig.setEnableVirtualThread(property.isEnableVirtualThread());
liteflowConfig.setChainCacheEnabled(property.getChainCache().isEnabled());
liteflowConfig.setChainCacheCapacity(property.getChainCache().getCapacity());
liteflowConfig.setAgent(property.getAgent());
return liteflowConfig;
}