File tree Expand file tree Collapse file tree
src/main/java/com/github/copilot/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public void setAgentDisplayName(String agentDisplayName) {
6060 }
6161
6262 public String [] getTools () {
63- return tools ;
63+ return tools == null ? null : tools . clone () ;
6464 }
6565
6666 public void setTools (String [] tools ) {
Original file line number Diff line number Diff line change 77import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
88import com .fasterxml .jackson .annotation .JsonProperty ;
99
10+ import java .util .Collections ;
1011import java .util .Map ;
1112
1213/**
@@ -98,7 +99,7 @@ public void setError(Error error) {
9899 }
99100
100101 public Map <String , Object > getToolTelemetry () {
101- return toolTelemetry ;
102+ return toolTelemetry == null ? null : Collections . unmodifiableMap ( toolTelemetry ) ;
102103 }
103104
104105 public void setToolTelemetry (Map <String , Object > toolTelemetry ) {
Original file line number Diff line number Diff line change 77import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
88import com .fasterxml .jackson .annotation .JsonProperty ;
99
10+ import java .util .Collections ;
1011import java .util .List ;
1112
1213/**
@@ -65,7 +66,7 @@ public void setTransformedContent(String transformedContent) {
6566 }
6667
6768 public List <Attachment > getAttachments () {
68- return attachments ;
69+ return attachments == null ? null : Collections . unmodifiableList ( attachments ) ;
6970 }
7071
7172 public void setAttachments (List <Attachment > attachments ) {
Original file line number Diff line number Diff line change 44
55package com .github .copilot .sdk .json ;
66
7+ import java .util .Collections ;
78import java .util .List ;
89import java .util .Map ;
910
@@ -128,7 +129,7 @@ public CustomAgentConfig setDescription(String description) {
128129 * @return the list of tool identifiers
129130 */
130131 public List <String > getTools () {
131- return tools ;
132+ return tools == null ? null : Collections . unmodifiableList ( tools ) ;
132133 }
133134
134135 /**
@@ -175,7 +176,7 @@ public CustomAgentConfig setPrompt(String prompt) {
175176 * @return the MCP servers map
176177 */
177178 public Map <String , Object > getMcpServers () {
178- return mcpServers ;
179+ return mcpServers == null ? null : Collections . unmodifiableMap ( mcpServers ) ;
179180 }
180181
181182 /**
Original file line number Diff line number Diff line change 44
55package com .github .copilot .sdk .json ;
66
7+ import java .util .Collections ;
78import java .util .List ;
89
910import com .fasterxml .jackson .annotation .JsonInclude ;
@@ -60,7 +61,7 @@ public MessageOptions setPrompt(String prompt) {
6061 * @return the list of attachments
6162 */
6263 public List <Attachment > getAttachments () {
63- return attachments ;
64+ return attachments == null ? null : Collections . unmodifiableList ( attachments ) ;
6465 }
6566
6667 /**
You can’t perform that action at this time.
0 commit comments