MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / findProjectRootByMarkers

Function findProjectRootByMarkers

agentContext/builder.go:418–436  ·  view source on GitHub ↗
(start string, markers []string)

Source from the content-addressed store, hash-verified

416 }
417 }
418 return result, nil
419}
420
421func instructionHomeDir() string {
422 if home := strings.TrimSpace(os.Getenv("HOME")); home != "" {
423 return home
424 }
425 home, _ := os.UserHomeDir()
426 return home
427}
428
429func findLuminaProjectRoot(cwd string) (string, error) {
430 cfg := config.NewConfigForCWD(cwd)
431 result, err := DiscoverProjectDocs(cwd, cfg)
432 if err != nil {
433 return "", err
434 }
435 if result.FallbackPath != "" {
436 return filepath.Dir(result.FallbackPath), nil
437 }
438 if len(result.Docs) > 0 {
439 return result.Root, nil

Callers 1

DiscoverProjectDocsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected