()
| 3833 | } |
| 3834 | |
| 3835 | function getOutputTokenUsageAttachment(): Attachment[] { |
| 3836 | if (feature('TOKEN_BUDGET')) { |
| 3837 | const budget = getCurrentTurnTokenBudget() |
| 3838 | if (budget === null || budget <= 0) { |
| 3839 | return [] |
| 3840 | } |
| 3841 | return [ |
| 3842 | { |
| 3843 | type: 'output_token_usage', |
| 3844 | turn: getTurnOutputTokens(), |
| 3845 | session: getTotalOutputTokens(), |
| 3846 | budget, |
| 3847 | }, |
| 3848 | ] |
| 3849 | } |
| 3850 | return [] |
| 3851 | } |
| 3852 | |
| 3853 | function getMaxBudgetUsdAttachment(maxBudgetUsd?: number): Attachment[] { |
| 3854 | if (maxBudgetUsd === undefined) { |
no test coverage detected