MCPcopy Create free account
hub / github.com/coder/coder / testMsg

Function testMsg

coderd/x/chatd/chatprompt/chatprompt_test.go:34–39  ·  view source on GitHub ↗

testMsg builds a database.ChatMessage for ParseContent tests. ContentVersion defaults to 0 (legacy), which exercises the heuristic detection path.

(role codersdk.ChatMessageRole, raw pqtype.NullRawMessage)

Source from the content-addressed store, hash-verified

32// ContentVersion defaults to 0 (legacy), which exercises the
33// heuristic detection path.
34func testMsg(role codersdk.ChatMessageRole, raw pqtype.NullRawMessage) database.ChatMessage {
35 return database.ChatMessage{
36 Role: database.ChatMessageRole(role),
37 Content: raw,
38 }
39}
40
41func TestConvertMessagesWithFilesPreservesEmptyRedactedReasoning(t *testing.T) {
42 t.Parallel()

Calls 1

ChatMessageRoleTypeAlias · 0.92

Tested by

no test coverage detected