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

Function refreshFilePaths

cli/src/hooks/use-suggestion-engine.ts:648–664  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

646 let cancelled = false
647
648 const refreshFilePaths = async () => {
649 try {
650 const projectRoot = getProjectRoot()
651 const freshTree = await getProjectFileTree({
652 projectRoot,
653 fs,
654 })
655
656 if (cancelled || fileRefreshIdRef.current !== requestId) {
657 return
658 }
659
660 setFilePaths(flattenFileTree(freshTree))
661 } catch (error) {
662 logger.debug({ error }, 'Failed to refresh file suggestions from disk')
663 }
664 }
665
666 void refreshFilePaths()
667

Callers 1

useSuggestionEngineFunction · 0.85

Calls 3

getProjectRootFunction · 0.90
getProjectFileTreeFunction · 0.90
flattenFileTreeFunction · 0.85

Tested by

no test coverage detected