feat: Enhance Agent Editor and Chat Widget for Improved Configuration and Collaboration
- Introduced a comprehensive AI Agent configuration dashboard, allowing users to select providers, models, and adjust settings. - Updated the AgentChatWidget to include a reactive UI for collaboration status and improved connection management. - Enhanced the EditorManager to initialize the agent editor with dependencies and streamline the editor selection process. - Added functionality to clear recent editors upon loading a new ROM, ensuring a fresh start for user sessions. - Improved the menu structure to include new options for the AI Agent, enhancing user interaction and accessibility.
This commit is contained in:
@@ -55,6 +55,10 @@ EditorSelectionDialog::EditorSelectionDialog() {
|
||||
{EditorType::kHex, "Hex Editor", ICON_MD_DATA_ARRAY,
|
||||
"Direct ROM memory editing and comparison", "Ctrl+0", false, true,
|
||||
ImVec4(0.2f, 0.8f, 0.4f, 1.0f)}, // Matrix green
|
||||
|
||||
{EditorType::kAgent, "AI Agent", ICON_MD_SMART_TOY,
|
||||
"Configure AI agent, collaboration, and automation", "Ctrl+Shift+A", false, false,
|
||||
ImVec4(0.8f, 0.4f, 1.0f, 1.0f)}, // Purple/magenta
|
||||
|
||||
{EditorType::kSettings, "Settings", ICON_MD_SETTINGS,
|
||||
"Configure ROM and project settings", "", false, true,
|
||||
|
||||
@@ -85,6 +85,14 @@ class EditorSelectionDialog {
|
||||
*/
|
||||
void SaveRecentEditors();
|
||||
|
||||
/**
|
||||
* @brief Clear recent editors (for new ROM sessions)
|
||||
*/
|
||||
void ClearRecentEditors() {
|
||||
recent_editors_.clear();
|
||||
SaveRecentEditors();
|
||||
}
|
||||
|
||||
private:
|
||||
void DrawEditorCard(const EditorInfo& info, int index);
|
||||
void DrawWelcomeHeader();
|
||||
|
||||
@@ -552,7 +552,7 @@ void WelcomeScreen::DrawRecentProjects() {
|
||||
}
|
||||
|
||||
// Grid layout for project cards (compact)
|
||||
float card_width = 200.0f; // Reduced for compactness
|
||||
float card_width = 220.0f; // Reduced for compactness
|
||||
float card_height = 95.0f; // Reduced for less scrolling
|
||||
int columns = std::max(1, (int)(ImGui::GetContentRegionAvail().x / (card_width + 12)));
|
||||
|
||||
@@ -650,8 +650,8 @@ void WelcomeScreen::DrawProjectCard(const RecentProject& project, int index) {
|
||||
ImGui::SetCursorScreenPos(ImVec2(content_pos.x + 4, content_pos.y + 58));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.4f, 0.4f, 0.4f, 1.0f));
|
||||
std::string short_path = project.filepath;
|
||||
if (short_path.length() > 28) {
|
||||
short_path = "..." + short_path.substr(short_path.length() - 25);
|
||||
if (short_path.length() > 26) {
|
||||
short_path = "..." + short_path.substr(short_path.length() - 23);
|
||||
}
|
||||
ImGui::Text(ICON_MD_FOLDER " %s", short_path.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
Reference in New Issue
Block a user