Skip to content

Commit 84962cf

Browse files
committed
Revert "fix: normalize path separators for Windows compatibility in generateImageTool"
This reverts commit 80876ab.
1 parent 80876ab commit 84962cf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/core/tools/generateImageTool.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)