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

Function promptsBlock

cli/exp_mcp.go:955–973  ·  view source on GitHub ↗
(coderPrompt, systemPrompt, existingContent string)

Source from the content-addressed store, hash-verified

953}
954
955func promptsBlock(coderPrompt, systemPrompt, existingContent string) string {
956 var newContent strings.Builder
957 _, _ = newContent.WriteString(coderPromptStartGuard)
958 _, _ = newContent.WriteRune('\n')
959 _, _ = newContent.WriteString(coderPrompt)
960 _, _ = newContent.WriteRune('\n')
961 _, _ = newContent.WriteString(coderPromptEndGuard)
962 _, _ = newContent.WriteRune('\n')
963 _, _ = newContent.WriteString(systemPromptStartGuard)
964 _, _ = newContent.WriteRune('\n')
965 _, _ = newContent.WriteString(systemPrompt)
966 _, _ = newContent.WriteRune('\n')
967 _, _ = newContent.WriteString(systemPromptEndGuard)
968 _, _ = newContent.WriteRune('\n')
969 if existingContent != "" {
970 _, _ = newContent.WriteString(existingContent)
971 }
972 return newContent.String()
973}
974
975// indexOf returns the index of the first instance of substr in s,
976// or -1 if substr is not present in s.

Callers 1

injectClaudeMDFunction · 0.85

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected