MCPcopy Index your code
hub / github.com/nikivdev/go / specRefForPrompt

Function specRefForPrompt

cli/spec/main.go:985–1000  ·  view source on GitHub ↗
(specPath, repoRoot string)

Source from the content-addressed store, hash-verified

983}
984
985func specRefForPrompt(specPath, repoRoot string) string {
986 if repoRoot == "" {
987 return specPath
988 }
989 rel, err := filepath.Rel(repoRoot, specPath)
990 if err != nil {
991 return specPath
992 }
993 if strings.HasPrefix(rel, "..") {
994 return specPath
995 }
996 if rel == "." {
997 return specPath
998 }
999 return filepath.ToSlash(rel)
1000}
1001
1002func parseTitle(content string) string {
1003 for _, line := range strings.Split(content, "\n") {

Callers 1

buildCodexPromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected