MCPcopy Index your code
hub / github.com/codeaashu/claude-code / addDirHelpMessage

Function addDirHelpMessage

src/commands/add-dir/validation.ts:95–110  ·  view source on GitHub ↗
(result: AddDirectoryResult)

Source from the content-addressed store, hash-verified

93}
94
95export function addDirHelpMessage(result: AddDirectoryResult): string {
96 switch (result.resultType) {
97 case 'emptyPath':
98 return 'Please provide a directory path.'
99 case 'pathNotFound':
100 return `Path ${chalk.bold(result.absolutePath)} was not found.`
101 case 'notADirectory': {
102 const parentDir = dirname(result.absolutePath)
103 return `${chalk.bold(result.directoryPath)} is not a directory. Did you mean to add the parent directory ${chalk.bold(parentDir)}?`
104 }
105 case 'alreadyInWorkingDirectory':
106 return `${chalk.bold(result.directoryPath)} is already accessible within the existing working directory ${chalk.bold(result.workingDir)}.`
107 case 'success':
108 return `Added ${chalk.bold(result.absolutePath)} as a working directory.`
109 }
110}
111
112

Callers 3

AddWorkspaceDirectoryFunction · 0.85
callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected