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

Function appendChatMessage

coderd/x/chatd/chatd.go:4056–4064  ·  view source on GitHub ↗

appendChatMessage appends a non-user message to the batch insert params.

(
	params *database.InsertChatMessagesParams,
	msg chatMessage,
)

Source from the content-addressed store, hash-verified

4054
4055// appendChatMessage appends a non-user message to the batch insert params.
4056func appendChatMessage(
4057 params *database.InsertChatMessagesParams,
4058 msg chatMessage,
4059) {
4060 if msg.role == database.ChatMessageRoleUser {
4061 panic("developer error: use appendUserChatMessage for user-role messages")
4062 }
4063 appendMessageFields(params, msg, "")
4064}
4065
4066// appendUserChatMessage inserts a user message with its apiKeyID preserved.
4067func appendUserChatMessage(

Callers 5

CreateChatMethod · 0.85
runChatMethod · 0.85

Calls 1

appendMessageFieldsFunction · 0.85

Tested by

no test coverage detected