MCPcopy Create free account
hub / github.com/nikivdev/go / optionRequiresValue

Function optionRequiresValue

cli/spec/main.go:900–920  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

898}
899
900func optionRequiresValue(arg string) bool {
901 if strings.HasPrefix(arg, "-in=") || strings.HasPrefix(arg, "--in=") {
902 return false
903 }
904 if strings.HasPrefix(arg, "-mode=") || strings.HasPrefix(arg, "--mode=") {
905 return false
906 }
907 if strings.HasPrefix(arg, "--api-origin=") || strings.HasPrefix(arg, "--title=") || strings.HasPrefix(arg, "--hash=") {
908 return false
909 }
910 if strings.HasPrefix(arg, "--append=") || strings.HasPrefix(arg, "--append-file=") {
911 return false
912 }
913
914 switch arg {
915 case "-in", "--in", "-mode", "--mode", "--append", "--append-file", "--api-origin", "--title", "--hash":
916 return true
917 default:
918 return false
919 }
920}
921
922func buildCodexPrompt(specPath, repoRoot, branch, title string, sections map[string]section) string {
923 var b strings.Builder

Callers 1

normalizeArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected