File tree Expand file tree Collapse file tree
src/main/java/io/github/easy4j/opencode/api/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package io .github .easy4j .opencode .api .model ;
22
3+ import com .fasterxml .jackson .annotation .JsonAnyGetter ;
4+ import com .fasterxml .jackson .annotation .JsonAnySetter ;
5+ import com .fasterxml .jackson .annotation .JsonIgnore ;
36import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
47import com .fasterxml .jackson .annotation .JsonProperty ;
58import lombok .Data ;
69
10+ import java .util .LinkedHashMap ;
711import java .util .Map ;
812
913/**
@@ -113,9 +117,20 @@ public class OpenCodeConfig {
113117 private Map <String , Object > experimental ;
114118
115119 /**
116- * 兜底字段:未知字段落这里
120+ * Unknown root configuration fields retained for forward-compatible round trips.
117121 */
118- private Map <String , Object > extra ;
122+ @ JsonIgnore
123+ private Map <String , Object > extra = new LinkedHashMap <>();
124+
125+ @ JsonAnySetter
126+ public void putExtra (String key , Object value ) {
127+ extra .put (key , value );
128+ }
129+
130+ @ JsonAnyGetter
131+ public Map <String , Object > anyExtra () {
132+ return extra ;
133+ }
119134 /**
120135 * MCP 服务器注册表,键为服务器唯一名称(见 MCP servers 文档)。
121136 * 每项为 {@code local}(stdio)或 {@code remote}(HTTP/SSE)形态。
You can’t perform that action at this time.
0 commit comments