MCPcopy Index your code
hub / github.com/coder/coder / LooksLikeHomePlanFile

Function LooksLikeHomePlanFile

coderd/x/chatd/chattool/planpath.go:96–102  ·  view source on GitHub ↗

LooksLikeHomePlanFile reports whether requestedPath is a plan.md variant (case-insensitive) sitting directly in the workspace home directory. The filename is compared case-insensitively because LLM output varies.

(requestedPath, home string)

Source from the content-addressed store, hash-verified

94// directory.
95// The filename is compared case-insensitively because LLM output varies.
96func LooksLikeHomePlanFile(requestedPath, home string) bool {
97 normalized := path.Clean(requestedPath)
98 normalizedHome := path.Clean(home)
99
100 return looksLikePlanFileName(normalized) &&
101 strings.EqualFold(path.Dir(normalized), normalizedHome)
102}
103
104// looksLikeLegacySharedPlanPath reports whether requestedPath
105// matches the legacy shared plan path (case-insensitive). Used as a

Callers 2

rejectSharedPlanPathFunction · 0.85

Calls 1

looksLikePlanFileNameFunction · 0.85

Tested by 1