Skip to content

fix(core): Fix MediaUtils parse path extension#981

Open
guanxuc wants to merge 6 commits intoagentscope-ai:mainfrom
guanxuc:fix-MediaUtils-977
Open

fix(core): Fix MediaUtils parse path extension#981
guanxuc wants to merge 6 commits intoagentscope-ai:mainfrom
guanxuc:fix-MediaUtils-977

Conversation

@guanxuc
Copy link
Contributor

@guanxuc guanxuc commented Mar 16, 2026

AgentScope-Java Version

1.0.11

Description

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../java/io/agentscope/core/formatter/MediaUtils.java 93.75% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@LearningGp LearningGp requested a review from Copilot March 24, 2026 07:07
@guanxuc guanxuc force-pushed the fix-MediaUtils-977 branch from ffa1c12 to 02b8a2d Compare March 24, 2026 13:50
@guanxuc guanxuc requested review from a team and LearningGp March 24, 2026 13:50
@guanxuc
Copy link
Contributor Author

guanxuc commented Mar 24, 2026

@LearningGp Thanks for your review and good suggestion! I have fixed the code by strip the path.

@guanxuc guanxuc force-pushed the fix-MediaUtils-977 branch from 02b8a2d to 6ab3ac4 Compare March 26, 2026 03:23
@guanxuc guanxuc requested a review from LearningGp March 26, 2026 03:25
@guanxuc guanxuc marked this pull request as draft March 26, 2026 04:30
@guanxuc guanxuc marked this pull request as ready for review March 26, 2026 05:59
@guanxuc
Copy link
Contributor Author

guanxuc commented Mar 26, 2026

@LearningGp I have changed the parse code logic. Use java.net.URI to parse url path and use java.nio.file.Path to parse file path, I think that will be better, PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:MediaUtils.getExtension() 的实现 bug

2 participants