refactor(config): adjust method init and onReload to support polymorphic config loading

This commit is contained in:
2026-04-04 23:34:00 +08:00
parent 6503ec32b4
commit 50db3fa7b2
3 changed files with 38 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
package work.slhaf.partner.runtime.interaction;
import com.alibaba.fastjson2.JSONObject;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import work.slhaf.partner.api.agent.runtime.config.Config;
@@ -26,7 +27,7 @@ public class WebSocketGatewayRegistry implements Configurable {
}
@Override
public void init(@NotNull WebSocketConfig config) {
public void init(@NotNull WebSocketConfig config, JSONObject json) {
new WebSocketGateway(config.port, config.heartbeatInterval);
}