mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-04-23 20:22:41 +00:00
73 lines
1.9 KiB
TypeScript
73 lines
1.9 KiB
TypeScript
import type { HudConfig } from './config.js';
|
|
import type { GitStatus } from './git.js';
|
|
export interface StdinData {
|
|
transcript_path?: string;
|
|
cwd?: string;
|
|
model?: {
|
|
id?: string;
|
|
display_name?: string;
|
|
};
|
|
context_window?: {
|
|
context_window_size?: number;
|
|
current_usage?: {
|
|
input_tokens?: number;
|
|
cache_creation_input_tokens?: number;
|
|
cache_read_input_tokens?: number;
|
|
};
|
|
};
|
|
}
|
|
export interface ToolEntry {
|
|
id: string;
|
|
name: string;
|
|
target?: string;
|
|
status: 'running' | 'completed' | 'error';
|
|
startTime: Date;
|
|
endTime?: Date;
|
|
}
|
|
export interface AgentEntry {
|
|
id: string;
|
|
type: string;
|
|
model?: string;
|
|
description?: string;
|
|
status: 'running' | 'completed';
|
|
startTime: Date;
|
|
endTime?: Date;
|
|
}
|
|
export interface TodoItem {
|
|
content: string;
|
|
status: 'pending' | 'in_progress' | 'completed';
|
|
}
|
|
/** Usage window data from the OAuth API */
|
|
export interface UsageWindow {
|
|
utilization: number | null;
|
|
resetAt: Date | null;
|
|
}
|
|
export interface UsageData {
|
|
planName: string | null;
|
|
fiveHour: number | null;
|
|
sevenDay: number | null;
|
|
fiveHourResetAt: Date | null;
|
|
sevenDayResetAt: Date | null;
|
|
apiUnavailable?: boolean;
|
|
}
|
|
/** Check if usage limit is reached (either window at 100%) */
|
|
export declare function isLimitReached(data: UsageData): boolean;
|
|
export interface TranscriptData {
|
|
tools: ToolEntry[];
|
|
agents: AgentEntry[];
|
|
todos: TodoItem[];
|
|
sessionStart?: Date;
|
|
}
|
|
export interface RenderContext {
|
|
stdin: StdinData;
|
|
transcript: TranscriptData;
|
|
claudeMdCount: number;
|
|
rulesCount: number;
|
|
mcpCount: number;
|
|
hooksCount: number;
|
|
sessionDuration: string;
|
|
gitStatus: GitStatus | null;
|
|
usageData: UsageData | null;
|
|
config: HudConfig;
|
|
}
|
|
//# sourceMappingURL=types.d.ts.map
|