( agentType: string | undefined, isBuiltInAgent: boolean, )
| 14 | * @returns The agent prompt category string |
| 15 | */ |
| 16 | export 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. |
no outgoing calls
no test coverage detected