Skip to content

Commit 6265a19

Browse files
committed
#930 | Added mcpServerUrl to copilot config
1 parent 8ac7322 commit 6265a19

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

avni-server-api/src/main/java/org/avni/server/web/util/Configuration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public class Configuration {
2626
@Value("${avni.base.url}")
2727
private String baseUrl;
2828

29+
@Value("${avni.mcp.server.url}")
30+
private String mcpServerUrl;
31+
2932
public List<ReportingSystem> getReportingSystems() {
3033
return reportingSystems;
3134
}
@@ -47,9 +50,9 @@ public RestTemplate restTemplate() {
4750

4851
public CopilotConfig createCopilotConfig() {
4952
if ("dummy".equals(copilotToken)) {
50-
return new CopilotConfig(null, copilotEnabled, baseUrl);
53+
return new CopilotConfig(null, copilotEnabled, baseUrl, mcpServerUrl);
5154
}
5255

53-
return new CopilotConfig(copilotToken, copilotEnabled, baseUrl);
56+
return new CopilotConfig(copilotToken, copilotEnabled, baseUrl, mcpServerUrl);
5457
}
5558
}

avni-server-api/src/main/java/org/avni/server/web/util/CopilotConfig.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ public class CopilotConfig {
1313
@JsonProperty("base_url")
1414
private String baseUrl;
1515

16+
@JsonProperty("mcp_server_url")
17+
private String mcpServerUrl;
18+
1619
public CopilotConfig() {
1720
}
1821

19-
public CopilotConfig(String avniCopilotToken, Boolean avniCopilotEnabled, String baseUrl) {
22+
public CopilotConfig(String avniCopilotToken, Boolean avniCopilotEnabled, String baseUrl, String mcpServerUrl) {
2023
this.avniCopilotToken = avniCopilotToken;
2124
this.avniCopilotEnabled = avniCopilotEnabled;
2225
this.baseUrl = baseUrl;
26+
this.mcpServerUrl = mcpServerUrl;
2327
}
2428

2529
public String getAvniCopilotToken() {
@@ -45,4 +49,12 @@ public String getBaseUrl() {
4549
public void setBaseUrl(String baseUrl) {
4650
this.baseUrl = baseUrl;
4751
}
52+
53+
public String getMcpServerUrl() {
54+
return mcpServerUrl;
55+
}
56+
57+
public void setMcpServerUrl(String mcpServerUrl) {
58+
this.mcpServerUrl = mcpServerUrl;
59+
}
4860
}

0 commit comments

Comments
 (0)