giga-code
Version:
A personal AI CLI assistant powered by Grok for local development.
25 lines (24 loc) • 633 B
TypeScript
interface ConversationTokenTrackerOptions {
model: string;
maxTokens: number;
}
export declare class ConversationTokenTracker {
private readonly model;
private readonly maxTokens;
private currentTokens;
private tokenCounter;
private conversationId;
constructor(options: ConversationTokenTrackerOptions);
startNewConversation(conversationId: string): void;
addTokens(text: string): number;
reset(): void;
get a(): {
current: number;
max: number;
percentage: number;
model: string;
conversationId: string;
};
dispose(): void;
}
export {};