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

Function normalizeShortTextOutput

coderd/x/chatd/quickgen.go:121–129  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

119}
120
121func normalizeShortTextOutput(text string) string {
122 text = strings.TrimSpace(text)
123 if text == "" {
124 return ""
125 }
126
127 text = strings.Trim(text, "\"'`")
128 return strings.Join(strings.Fields(text), " ")
129}
130
131type generatedTitle struct {
132 Title string `json:"title" description:"Short descriptive chat title"`

Callers 1

normalizeTitleOutputFunction · 0.85

Calls 1

FieldsMethod · 0.65

Tested by

no test coverage detected