MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getQuerySourceForAgent

Function getQuerySourceForAgent

src/utils/promptCategory.ts:16–28  ·  view source on GitHub ↗
(
  agentType: string | undefined,
  isBuiltInAgent: boolean,
)

Source from the content-addressed store, hash-verified

14 * @returns The agent prompt category string
15 */
16export function getQuerySourceForAgent(
17 agentType: string | undefined,
18 isBuiltInAgent: boolean,
19): QuerySource {
20 if (isBuiltInAgent) {
21 // TODO: avoid this cast
22 return agentType
23 ? (`agent:builtin:${agentType}` as QuerySource)
24 : 'agent:default'
25 } else {
26 return 'agent:custom'
27 }
28}
29
30/**
31 * Determines the prompt category based on output style settings.

Callers 2

resumeAgentBackgroundFunction · 0.85
callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected