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

Method GetChatSystemPromptConfig

coderd/database/querier.go:419–419  ·  view source on GitHub ↗

GetChatSystemPromptConfig returns both chat system prompt settings in a single read to avoid torn reads between separate site-config lookups. The include-default fallback preserves the legacy behavior where a non-empty custom prompt implied opting out before the explicit toggle existed.

(ctx context.Context)

Source from the content-addressed store, hash-verified

417 // non-empty custom prompt implied opting out before the explicit toggle
418 // existed.
419 GetChatSystemPromptConfig(ctx context.Context) (GetChatSystemPromptConfigRow, error)
420 // GetChatTemplateAllowlist returns the JSON-encoded template allowlist.
421 // Returns an empty string when no allowlist has been configured (all templates allowed).
422 GetChatTemplateAllowlist(ctx context.Context) (string, error)

Callers 6

getChatSystemPromptMethod · 0.65
TestChatsMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 2

TestChatsMethod · 0.52