UNPKG

@webdevtoday/grok-cli

Version:

A sophisticated CLI tool for interacting with xAI Grok 4, featuring conversation history, file reference, custom commands, memory system, and genetic development workflows

88 lines 2.15 kB
/** * Memory System for Grok CLI * Handles GROK.md files and project context injection */ import type { MemoryConfiguration, MemoryFile } from '../types'; /** * Memory Manager - handles GROK.md files and project context */ export declare class MemoryManager { private memoryFiles; private config; private baseDir; constructor(baseDir: string, config: MemoryConfiguration); /** * Load all memory files from the project */ loadMemoryFiles(): Promise<void>; /** * Load GROK.md files from parent directories */ private loadParentMemoryFiles; /** * Load user-level memory from home directory */ private loadUserMemory; /** * Load a specific memory file */ private loadMemoryFile; /** * Load files referenced by memory files */ private loadImportedFile; /** * Extract imports from memory file content */ private extractImports; /** * Check if a path should be excluded based on configuration */ private shouldExcludePath; /** * Get compiled memory content for injection into conversations */ getMemoryContent(): string; /** * Get memory statistics */ getMemoryStats(): { totalFiles: number; userFiles: number; projectFiles: number; localFiles: number; totalSize: number; }; /** * Get all loaded memory files */ getMemoryFiles(): MemoryFile[]; /** * Add content to memory */ addToMemory(content: string, type?: 'note' | 'context'): Promise<void>; /** * Create a new GROK.md file with template */ createMemoryFile(filePath?: string): Promise<void>; /** * Search memory content */ searchMemory(query: string): Array<{ file: MemoryFile; matches: Array<{ line: number; content: string; context: string; }>; }>; /** * Clear all loaded memory */ clearMemory(): void; /** * Reload memory files */ reloadMemory(): Promise<void>; } //# sourceMappingURL=memory.d.ts.map