(maxBudgetUsd?: number)
| 3844 | } |
| 3845 | |
| 3846 | function getMaxBudgetUsdAttachment(maxBudgetUsd?: number): Attachment[] { |
| 3847 | if (maxBudgetUsd === undefined) { |
| 3848 | return [] |
| 3849 | } |
| 3850 | |
| 3851 | const usedCost = getTotalCostUSD() |
| 3852 | const remainingBudget = maxBudgetUsd - usedCost |
| 3853 | |
| 3854 | return [ |
| 3855 | { |
| 3856 | type: 'budget_usd', |
| 3857 | used: usedCost, |
| 3858 | total: maxBudgetUsd, |
| 3859 | remaining: remainingBudget, |
| 3860 | }, |
| 3861 | ] |
| 3862 | } |
| 3863 | |
| 3864 | /** |
| 3865 | * Count human turns since plan mode exit (plan_mode_exit attachment). |
no test coverage detected