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