Class ClaudeCliService
- Namespace
- SunamoAI
- Assembly
- SunamoAI.dll
Service for calling Claude CLI (claude.cmd) with retry logic and rate limit handling.
public class ClaudeCliService
- Inheritance
-
ClaudeCliService
- Inherited Members
- Extension Methods
Constructors
ClaudeCliService(ILogger, bool, bool)
Initializes a new instance of the ClaudeCliService class.
public ClaudeCliService(ILogger logger, bool isVerboseLoggingEnabled = false, bool isDetailedLoggingEnabled = false)
Parameters
loggerILoggerLogger instance for logging operations.
isVerboseLoggingEnabledboolWhether verbose logging is enabled for debugging.
isDetailedLoggingEnabledboolWhether detailed logging is enabled for CLI calls.
Methods
CallClaudeCli(string, int)
Calls Claude CLI with a prompt and returns the response. Includes automatic retry logic for rate limit errors (up to 3 retries with 65-second waits).
public Task<string?> CallClaudeCli(string prompt, int retryCount = 0)