Skip to content

Commit 5752932

Browse files
committed
fix: ClasspathSkillRepository loads skill failed in multi-module java project
1 parent a7eb5de commit 5752932

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

agentscope-core/src/main/java/io/agentscope/core/skill/repository/ClasspathSkillRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ protected ClasspathSkillRepository(String resourcePath, String source, ClassLoad
139139
if ("jar".equals(uri.getScheme())) {
140140
this.isJar = true;
141141
this.fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap());
142-
String actualResourcePath = uri.getSchemeSpecificPart().split("!")[1];
142+
String schemeSpecificUriPath = uri.getSchemeSpecificPart();
143+
String actualResourcePath = schemeSpecificUriPath.substring(schemeSpecificUriPath.lastIndexOf("!") + 1);
143144
logger.info("Actual resource path: {}", actualResourcePath);
144145
this.skillBasePath = fileSystem.getPath(actualResourcePath);
145146
} else {

0 commit comments

Comments
 (0)