-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Description
Cascade throws an internal error when attempting to read .png files using the read_file tool or citation format.
Steps to Reproduce
- Have a
.pngfile in workspace (e.g., Unity sprite asset) - Use citation format like
@path/to/file.png:1or callread_filetool - Error occurs immediately
Actual Behavior
Invalid argument: an internal error occurred (error ID: e627f23aa1d5490fb70889e9d2e059ee) and crashed cascade
Expected Behavior
- PNG files should be viewable like JPG/GIF formats
- OR: Clear error message stating PNG is not supported
Environment
- OS: Windows 11
- Windsurf Version: Latest stable
- Tool:
read_file - File Type:
.png - Context: Unity game development project
Impact
- Severity: Medium-High
- PNG is the standard format for game development (Unity assets: sprites, textures, UI)
- Users cannot preview their game assets without manual conversion
- Workaround exists but is cumbersome and breaks workflow
Current Workaround
Convert PNG → JPG temporarily via PowerShell:
Add-Type -AssemblyName System.Drawing
$img = [System.Drawing.Image]::FromFile("file.png")
$img.Save("temp.jpg", [System.Drawing.Imaging.ImageFormat]::Jpeg)
$img.Dispose()
# Read JPG, then delete temp file
Additional Context
Working formats: .jpg, .gif
Also broken: .bmp (file too large error), .tif (null bytes error)
This significantly impacts game developers using Unity/Unreal/Godot where PNG is the primary asset format
Suggested Fix
Either:
Add PNG support to read_file tool (preferred)
Return user-friendly error message: "PNG format not supported. Please use JPG or GIF."Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels