File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -241,9 +241,7 @@ export async function generateImageTool(
241241
242242 // Get the webview URI for the image
243243 const provider = cline . providerRef . deref ( )
244- // Use forward slashes for consistency across platforms in the imagePath
245244 const fullImagePath = path . join ( cline . cwd , finalPath )
246- const normalizedImagePath = fullImagePath . replace ( / \\ / g, "/" )
247245
248246 // Convert to webview URI if provider is available
249247 let imageUri = provider ?. convertToWebviewUri ?.( fullImagePath ) ?? vscode . Uri . file ( fullImagePath ) . toString ( )
@@ -252,8 +250,8 @@ export async function generateImageTool(
252250 const cacheBuster = Date . now ( )
253251 imageUri = imageUri . includes ( "?" ) ? `${ imageUri } &t=${ cacheBuster } ` : `${ imageUri } ?t=${ cacheBuster } `
254252
255- // Send the image with the webview URI (use normalized path for consistency)
256- await cline . say ( "image" , JSON . stringify ( { imageUri, imagePath : normalizedImagePath } ) )
253+ // Send the image with the webview URI
254+ await cline . say ( "image" , JSON . stringify ( { imageUri, imagePath : fullImagePath } ) )
257255 pushToolResult ( formatResponse . toolResult ( getReadablePath ( cline . cwd , finalPath ) ) )
258256
259257 return
You can’t perform that action at this time.
0 commit comments