Skip to content

Commit 229f608

Browse files
committed
refactor: simplify image generation success messages
- Remove redundant text from success messages - Display only the file path in both chat and tool result - Maintain consistency with other file creation tools
1 parent 73a42a3 commit 229f608

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/core/tools/generateImageTool.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,12 @@ export async function generateImageTool(
177177
cline.didEditFile = true
178178

179179
// Display the generated image in the chat using a text message with the image
180-
await cline.say("text", `Image generated and saved to: ${getReadablePath(cline.cwd, finalPath)}`, [
181-
result.imageData,
182-
])
180+
await cline.say("text", getReadablePath(cline.cwd, finalPath), [result.imageData])
183181

184182
// Record successful tool usage
185183
cline.recordToolUsage("generate_image")
186184

187-
pushToolResult(
188-
formatResponse.toolResult(`Image created successfully at ${getReadablePath(cline.cwd, finalPath)}`),
189-
)
185+
pushToolResult(formatResponse.toolResult(getReadablePath(cline.cwd, finalPath)))
190186

191187
return
192188
}

0 commit comments

Comments
 (0)