Skip to content

Commit 802fa5d

Browse files
committed
fix: re-check model image support before including images in the result
1 parent ba397ce commit 802fa5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/tools/readFileTool.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,9 @@ export async function readFileTool(
730730
// Combine all images: feedback images first, then file images
731731
const allImages = [...feedbackImages, ...fileImageUrls]
732732

733-
// Use the supportsImages check from the beginning of the function
734-
const imagesToInclude = supportsImages ? allImages : []
733+
// Re-check if the model supports images before including them, in case it changed during execution.
734+
const finalModelSupportsImages = cline.api.getModel().info.supportsImages ?? false
735+
const imagesToInclude = finalModelSupportsImages ? allImages : []
735736

736737
// Push the result with appropriate formatting
737738
if (statusMessage || imagesToInclude.length > 0) {

0 commit comments

Comments
 (0)