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

Function GetEnvInfo

agentContext/builder.go:487–508  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

485 out = append(out, reversed[i])
486 }
487 return out
488}
489
490func projectInstructionDirectory(cwd string) (string, error) {
491 current, err := resolveAbsPath(cwd)
492 if err != nil {
493 return "", err
494 }
495 if info, statErr := os.Stat(current); statErr == nil && !info.IsDir() {
496 current = filepath.Dir(current)
497 }
498 return current, nil
499}
500
501func resolveAbsPath(path string) (string, error) {
502 resolved, err := filepath.EvalSymlinks(path)
503 if err == nil {
504 return resolved, nil
505 }
506 abs, err := filepath.Abs(path)
507 if err != nil {
508 return path, err
509 }
510 return abs, nil
511}

Callers 1

BuildEnvSectionFunction · 0.85

Calls 1

currentPromptHooksFunction · 0.85

Tested by

no test coverage detected