spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / usage-at.ts
14 lines · 427 BRaw
1/**
2 * What `$.session.usage()` answers for a session that began at the given
3 * moment: an empty window, no rate limits, nothing spent.
4 *
5 * Left untyped, so it compiles against declarations that predate `startedAt`.
6 *
7 * @param startedAt when the session began, by the test's clock
8 * @returns the usage
9 */
10export const usageAt = (startedAt: number) => ({
11 startedAt,
12 context: { window: 200_000 },
13 rateLimits: [],
14})