Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions agentscope-core/src/main/java/io/agentscope/core/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,13 @@ public static String getUserAgent() {
"agentscope-java/%s; java/%s; platform/%s",
VERSION, System.getProperty("java.version"), System.getProperty("os.name"));
}

/**
* Returns the AgentScope Java version.
*
* @return version string (e.g., "1.0.10-SNAPSHOT")
*/
public static String getVersion() {
return VERSION;
}
Comment on lines +53 to +55

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This method is redundant as it provides a getter for the VERSION constant, which is already public. Having two public access points for the same value can lead to inconsistent usage across the codebase. For better encapsulation, the VERSION constant should be made private, and this getter should be the sole public access point. Please consider addressing this in a follow-up change to improve the API design.

}
Loading