feat: Update AI Model References and Enhance Agent Chat Widget Functionality

- Updated AI model references from "gemini-2.0-flash-exp" to "gemini-2.5-flash" across various components, ensuring compatibility with the latest AI capabilities.
- Enhanced the AgentChatWidget to improve user experience with new features such as message copying, improved input handling, and session management.
- Introduced a chat session management system, allowing users to create and switch between multiple chat sessions seamlessly.
- Improved UI elements for better visibility and interaction, including styled buttons and tooltips for enhanced usability.
This commit is contained in:
scawful
2025-10-05 04:55:18 -04:00
parent 12c2837c9a
commit 8d13c31df8
9 changed files with 407 additions and 103 deletions

View File

@@ -301,7 +301,7 @@ void EditorManager::Initialize(const std::string& filename) {
// Create Gemini service
cli::GeminiConfig config;
config.api_key = api_key;
config.model = "gemini-2.0-flash-exp"; // Use vision-capable model
config.model = "gemini-2.5-flash"; // Use vision-capable model
config.verbose = false;
cli::GeminiAIService gemini_service(config);
@@ -350,10 +350,18 @@ void EditorManager::Initialize(const std::string& filename) {
// Initialize editor selection dialog callback
editor_selection_dialog_.SetSelectionCallback([this](EditorType type) {
if (!current_editor_set_) return;
editor_selection_dialog_.MarkRecentlyUsed(type);
// Handle agent editor separately (doesn't require ROM)
if (type == EditorType::kAgent) {
#ifdef YAZE_WITH_GRPC
agent_editor_.set_active(true);
#endif
return;
}
if (!current_editor_set_) return;
switch (type) {
case EditorType::kOverworld:
current_editor_set_->overworld_editor_.set_active(true);