MCPcopy
hub / github.com/codeaashu/claude-code / formatDirectoryList

Function formatDirectoryList

src/tools/PowerShellTool/pathValidation.ts:805–815  ·  view source on GitHub ↗
(directories: string[])

Source from the content-addressed store, hash-verified

803}
804
805function formatDirectoryList(directories: string[]): string {
806 const dirCount = directories.length
807 if (dirCount <= MAX_DIRS_TO_LIST) {
808 return directories.map(dir => `'${dir}'`).join(', ')
809 }
810 const firstDirs = directories
811 .slice(0, MAX_DIRS_TO_LIST)
812 .map(dir => `'${dir}'`)
813 .join(', ')
814 return `${firstDirs}, and ${dirCount - MAX_DIRS_TO_LIST} more`
815}
816
817/**
818 * Expands tilde (~) at the start of a path to the user's home directory.

Callers 3

validateCommandPathsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected