Skip to content

Commit cbf1b01

Browse files
edenreichclaude
andcommitted
fix: Update artifact parts access for ADK 0.17.0 type changes
The Part struct now has a direct File *FilePart field, and FilePart has FileWithURI *string. Updated to access these fields directly with nil checks instead of using type assertions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6e308bb commit cbf1b01

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

skills/take_screenshot.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,8 @@ func (s *TakeScreenshotSkill) createArtifactFromScreenshot(ctx context.Context,
266266
artifactService.AddArtifactToTask(task, artifact)
267267

268268
if len(artifact.Parts) > 0 {
269-
if filePart, ok := artifact.Parts[0].(types.FilePart); ok {
270-
if fileWithURI, ok := filePart.File.(types.FileWithUri); ok {
271-
return fileWithURI.URI, artifact.ArtifactID, nil
272-
}
269+
if artifact.Parts[0].File != nil && artifact.Parts[0].File.FileWithURI != nil {
270+
return *artifact.Parts[0].File.FileWithURI, artifact.ArtifactID, nil
273271
}
274272
}
275273

0 commit comments

Comments
 (0)