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

Function extractAdvisorText

coderd/x/chatd/chatadvisor/runner.go:113–127  ·  view source on GitHub ↗
(step chatloop.PersistedStep)

Source from the content-addressed store, hash-verified

111}
112
113func extractAdvisorText(step chatloop.PersistedStep) string {
114 parts := make([]string, 0, len(step.Content))
115 for _, content := range step.Content {
116 text, ok := fantasy.AsContentType[fantasy.TextContent](content)
117 if !ok {
118 continue
119 }
120 trimmed := strings.TrimSpace(text.Text)
121 if trimmed == "" {
122 continue
123 }
124 parts = append(parts, trimmed)
125 }
126 return strings.TrimSpace(strings.Join(parts, "\n\n"))
127}

Callers 1

RunAdvisorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected