MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getMaxBudgetUsdAttachment

Function getMaxBudgetUsdAttachment

src/utils/attachments.ts:3846–3862  ·  view source on GitHub ↗
(maxBudgetUsd?: number)

Source from the content-addressed store, hash-verified

3844}
3845
3846function 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).

Callers 1

getAttachmentsFunction · 0.85

Calls 1

getTotalCostUSDFunction · 0.85

Tested by

no test coverage detected