( usage: BetaUsage, )
| 115 | } |
| 116 | |
| 117 | export function getAdvisorUsage( |
| 118 | usage: BetaUsage, |
| 119 | ): Array<BetaUsage & { model: string }> { |
| 120 | const iterations = usage.iterations as |
| 121 | | Array<{ type: string }> |
| 122 | | null |
| 123 | | undefined |
| 124 | if (!iterations) { |
| 125 | return [] |
| 126 | } |
| 127 | return iterations.filter( |
| 128 | it => it.type === 'advisor_message', |
| 129 | ) as unknown as Array<BetaUsage & { model: string }> |
| 130 | } |
| 131 | |
| 132 | export const ADVISOR_TOOL_INSTRUCTIONS = `# Advisor Tool |
| 133 |
no outgoing calls
no test coverage detected