MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / shouldShowProjectPicker

Function shouldShowProjectPicker

cli/src/utils/project-picker.ts:3–12  ·  view source on GitHub ↗
(
  startCwd: string,
  homeDir: string,
)

Source from the content-addressed store, hash-verified

1import path from 'path'
2
3export function shouldShowProjectPicker(
4 startCwd: string,
5 homeDir: string,
6): boolean {
7 const relativeToHome = path.relative(startCwd, homeDir)
8 return (
9 relativeToHome === '' ||
10 (!relativeToHome.startsWith('..') && !path.isAbsolute(relativeToHome))
11 )
12}

Callers 2

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected