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

Function LoadProjectInstructionsWithConfig

agentContext/builder.go:356–366  ·  view source on GitHub ↗
(cwd string, cfg config.Config)

Source from the content-addressed store, hash-verified

354 }
355 return ProjectDoc{}, errors.New("project instruction file not found")
356}
357
358func readFileWithByteLimit(path string, maxBytes int) ([]byte, bool, error) {
359 content, err := os.ReadFile(path)
360 if err != nil {
361 return nil, false, err
362 }
363 if maxBytes <= 0 || len(content) <= maxBytes {
364 return content, false, nil
365 }
366 return content[:maxBytes], true, nil
367}
368
369func LoadProjectInstructions(cwd string) (string, error) {

Calls 1

DiscoverProjectDocsFunction · 0.85

Tested by

no test coverage detected