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

Function appendAdditionalInstructions

cli/spec/main.go:761–783  ·  view source on GitHub ↗
(prompt string, blocks []string)

Source from the content-addressed store, hash-verified

759}
760
761func appendAdditionalInstructions(prompt string, blocks []string) string {
762 if len(blocks) == 0 {
763 return prompt
764 }
765
766 var b strings.Builder
767 b.WriteString(strings.TrimSpace(prompt))
768 b.WriteString("\n\nAdditional operator instructions:\n")
769 for i, block := range blocks {
770 trimmed := strings.TrimSpace(block)
771 if trimmed == "" {
772 continue
773 }
774 if i > 0 {
775 b.WriteString("\n")
776 }
777 b.WriteString(fmt.Sprintf("%d) ", i+1))
778 b.WriteString(trimmed)
779 b.WriteString("\n")
780 }
781
782 return strings.TrimSpace(b.String()) + "\n"
783}
784
785func hasCodexCdArg(args []string) bool {
786 for _, arg := range args {

Callers 1

runExecFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected