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

Method GetChatSystemPromptConfig

coderd/database/dbauthz/dbauthz.go:3201–3211  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

3199}
3200
3201func (q *querier) GetChatSystemPromptConfig(ctx context.Context) (database.GetChatSystemPromptConfigRow, error) {
3202 // The system prompt configuration is a deployment-wide setting read during
3203 // chat creation by every authenticated user, so no RBAC policy check is
3204 // needed. We still verify that a valid actor exists in the context to
3205 // ensure this is never callable by an unauthenticated or system-internal
3206 // path without an explicit actor.
3207 if _, ok := ActorFromContext(ctx); !ok {
3208 return database.GetChatSystemPromptConfigRow{}, ErrNoActor
3209 }
3210 return q.db.GetChatSystemPromptConfig(ctx)
3211}
3212
3213// GetChatTemplateAllowlist requires deployment-config read permission,
3214// unlike the peer getters (GetChatDesktopEnabled, etc.) which only

Callers

nothing calls this directly

Calls 2

ActorFromContextFunction · 0.70

Tested by

no test coverage detected