Преглед изворни кода

fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (#6902)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Daniel <[email protected]>
NaccOll пре 6 месеци
родитељ
комит
3f4af18bf7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/tools/codebaseSearchTool.ts

+ 1 - 1
src/core/tools/codebaseSearchTool.ts

@@ -17,7 +17,7 @@ export async function codebaseSearchTool(
 	removeClosingTag: RemoveClosingTag,
 ) {
 	const toolName = "codebase_search"
-	const workspacePath = getWorkspacePath()
+	const workspacePath = (cline.cwd && cline.cwd.trim() !== '') ? cline.cwd : getWorkspacePath()
 
 	if (!workspacePath) {
 		// This case should ideally not happen if Cline is initialized correctly