mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 04:41:16 -05:00
Dont list_files on desktop when task starts
This commit is contained in:
@@ -1937,14 +1937,16 @@ ${this.customInstructions.trim()}
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (includeFileDetails) {
|
if (includeFileDetails) {
|
||||||
|
details += `\n\n# Current Working Directory (${cwd}) Files\n`
|
||||||
const isDesktop = cwd === path.join(os.homedir(), "Desktop")
|
const isDesktop = cwd === path.join(os.homedir(), "Desktop")
|
||||||
const [files, didHitLimit] = await listFiles(cwd, !isDesktop, 200)
|
if (isDesktop) {
|
||||||
const result = this.formatFilesList(cwd, files, didHitLimit)
|
// don't want to immediately access desktop since it would show permission popup
|
||||||
details += `\n\n# Current Working Directory (${cwd}) Files\n${result}${
|
details += "(Desktop files not shown automatically. Use list_files to explore if needed.)"
|
||||||
isDesktop
|
} else {
|
||||||
? "\n(Note: Only top-level contents shown for Desktop by default. Use list_files to explore further if necessary.)"
|
const [files, didHitLimit] = await listFiles(cwd, true, 200)
|
||||||
: ""
|
const result = this.formatFilesList(cwd, files, didHitLimit)
|
||||||
}`
|
details += result
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return `<environment_details>\n${details.trim()}\n</environment_details>`
|
return `<environment_details>\n${details.trim()}\n</environment_details>`
|
||||||
|
|||||||
Reference in New Issue
Block a user