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

Function requireAgentChatContextMessages

coderd/workspaceagents_chat_context_test.go:908–917  ·  view source on GitHub ↗
(ctx context.Context, t testing.TB, db database.Store, chatID uuid.UUID)

Source from the content-addressed store, hash-verified

906}
907
908func requireAgentChatContextMessages(ctx context.Context, t testing.TB, db database.Store, chatID uuid.UUID) []database.ChatMessage {
909 t.Helper()
910
911 messages, err := db.GetChatMessagesByChatID(
912 dbauthz.AsSystemRestricted(ctx),
913 database.GetChatMessagesByChatIDParams{ChatID: chatID, AfterID: 0},
914 )
915 require.NoError(t, err)
916 return messages
917}
918
919func requireAgentChatContextCachedParts(ctx context.Context, t testing.TB, db database.Store, chatID uuid.UUID) []codersdk.ChatMessagePart {
920 t.Helper()

Callers 1

TestAgentChatContextFunction · 0.85

Calls 3

AsSystemRestrictedFunction · 0.92
HelperMethod · 0.65

Tested by

no test coverage detected