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

Function TestFallbackTurnStatusLabel

coderd/x/chatd/quickgen_internal_test.go:651–671  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

649}
650
651func TestFallbackTurnStatusLabel(t *testing.T) {
652 t.Parallel()
653
654 tests := []struct {
655 status database.ChatStatus
656 want string
657 }{
658 {status: database.ChatStatusWaiting, want: "Finished latest turn"},
659 {status: database.ChatStatusPending, want: "Still working on request"},
660 {status: database.ChatStatusRequiresAction, want: "Waiting for user input"},
661 {status: database.ChatStatusError, want: "Hit an error"},
662 {status: database.ChatStatus("unknown"), want: "Updated chat status"},
663 }
664
665 for _, tt := range tests {
666 t.Run(string(tt.status), func(t *testing.T) {
667 t.Parallel()
668 require.Equal(t, tt.want, fallbackTurnStatusLabel(tt.status))
669 })
670 }
671}
672
673func TestGenerateStructuredTitleWithUsage_OpenAICompatibleRequiredToolChoice(t *testing.T) {
674 t.Parallel()

Callers

nothing calls this directly

Calls 4

ChatStatusTypeAlias · 0.92
fallbackTurnStatusLabelFunction · 0.85
RunMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected