MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / buildSystemPrompt

Function buildSystemPrompt

apps/api/src/agents/prompt.ts:144–148  ·  view source on GitHub ↗
(context: ChatAgentContext)

Source from the content-addressed store, hash-verified

142 * function.
143 */
144export function buildSystemPrompt(context: ChatAgentContext): string {
145 return [buildBasePrompt(), buildPageContextSection(context.pageContext)]
146 .filter(Boolean)
147 .join('\n\n');
148}
149
150function buildPageContextSection(pc?: PageContext): string {
151 // The date varies every day, so we keep it out of the cached prefix

Callers 1

createChatAgentFunction · 0.90

Calls 3

buildBasePromptFunction · 0.85
joinMethod · 0.80
buildPageContextSectionFunction · 0.70

Tested by

no test coverage detected