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

@@ -229,6 +229,25 @@ public:
void HandleSnapshotReceived(const std::string& snapshot_data, const std::string& snapshot_type);
void HandleProposalReceived(const std::string& proposal_data);
// Chat session management
struct ChatSession {
std::string id;
std::string name;
cli::agent::ConversationalAgentService agent_service;
size_t last_history_size = 0;
bool history_loaded = false;
bool history_dirty = false;
std::filesystem::path history_path;
absl::Time last_persist_time = absl::InfinitePast();
ChatSession(const std::string& session_id, const std::string& session_name)
: id(session_id), name(session_name) {}
};
std::vector<ChatSession> chat_sessions_;
int active_session_index_ = 0;
// Legacy single session support (will migrate to sessions)
cli::agent::ConversationalAgentService agent_service_;
char input_buffer_[1024];
bool active_ = false;