feat: Enhance AI service with verbose logging and command help

- Added a `--verbose` flag to enable detailed debug output for the Gemini AI service.
- Updated `GeminiAIService` constructor to log initialization details when verbose mode is enabled.
- Modified `CreateAIService` to pass the verbose flag to the Gemini configuration.
- Enhanced command help in `ModernCLI` to categorize commands and provide detailed descriptions.
- Refactored `HandleSimpleChatCommand` to accept a pointer to `Rom` instead of a reference.
- Updated `ShowCategoryHelp` to display command categories and examples.
- Improved error handling and logging in `GeminiAIService` for better debugging.
This commit is contained in:
scawful
2025-10-04 04:28:44 -04:00
parent 173685a928
commit 8deb2656d5
8 changed files with 374 additions and 120 deletions

View File

@@ -619,10 +619,10 @@ absl::Status HandleChatCommand(Rom& rom) {
}
absl::Status HandleSimpleChatCommand(const std::vector<std::string>& arg_vec,
Rom& rom, bool quiet) {
RETURN_IF_ERROR(EnsureRomLoaded(rom, "agent simple-chat"));
Rom* rom, bool quiet) {
RETURN_IF_ERROR(EnsureRomLoaded(*rom, "agent simple-chat"));
auto _ = TryLoadProjectAndLabels(rom);
auto _ = TryLoadProjectAndLabels(*rom);
std::optional<std::string> batch_file;
std::optional<std::string> single_message;
@@ -646,8 +646,7 @@ absl::Status HandleSimpleChatCommand(const std::vector<std::string>& arg_vec,
SimpleChatSession session;
session.SetConfig(config);
session.SetRomContext(&rom);
session.SetQuietMode(quiet);
session.SetRomContext(rom);
if (batch_file.has_value()) {
std::ifstream file(*batch_file);