(state: SessionState, toolIds: string[])
| 129 | } |
| 130 | |
| 131 | export function getTotalToolTokens(state: SessionState, toolIds: string[]): number { |
| 132 | let total = 0 |
| 133 | for (const id of toolIds) { |
| 134 | const entry = state.toolParameters.get(id) |
| 135 | total += entry?.tokenCount ?? 0 |
| 136 | } |
| 137 | return total |
| 138 | } |
| 139 | |
| 140 | export function countMessageTextTokens(msg: WithParts): number { |
| 141 | const texts: string[] = [] |
no outgoing calls
no test coverage detected