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:
@@ -4,8 +4,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/flags/declare.h"
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/status/status.h"
|
||||
|
||||
ABSL_DECLARE_FLAG(bool, quiet);
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
namespace agent {
|
||||
@@ -133,7 +137,7 @@ absl::Status Agent::Run(const std::vector<std::string>& arg_vec) {
|
||||
return agent::HandleChatCommand(rom_);
|
||||
}
|
||||
if (subcommand == "simple-chat") {
|
||||
return agent::HandleSimpleChatCommand(subcommand_args, rom_, absl::GetFlag(FLAGS_quiet));
|
||||
return agent::HandleSimpleChatCommand(subcommand_args, &rom_, absl::GetFlag(FLAGS_quiet));
|
||||
}
|
||||
|
||||
return absl::InvalidArgumentError(std::string(agent::kUsage));
|
||||
|
||||
Reference in New Issue
Block a user