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

Function validateGeneratedTitle

coderd/x/chatd/quickgen.go:514–522  ·  view source on GitHub ↗
(title string)

Source from the content-addressed store, hash-verified

512}
513
514func validateGeneratedTitle(title string) error {
515 if title == "" {
516 return xerrors.New("generated title was empty")
517 }
518 if len(strings.Fields(title)) > 8 {
519 return xerrors.New("generated title exceeded 8 words")
520 }
521 return nil
522}
523
524// titleInput returns the first user message text and whether title
525// generation should proceed. It returns false when the chat already

Callers 1

Calls 2

NewMethod · 0.65
FieldsMethod · 0.65

Tested by

no test coverage detected