feat(editor): add hex editor and AI agent functionalities to MenuOrchestrator
- Implemented methods in EditorManager to show the hex editor, AI agent, and chat history, enhancing the editor's capabilities. - Updated MenuOrchestrator to include new menu items for accessing the hex editor, AI agent, chat history, and other UI elements. - Improved user interaction by providing quick access to essential features through keyboard shortcuts. Benefits: - Streamlines the user experience by integrating additional editor functionalities. - Enhances the overall architecture by clearly defining roles for UI and editor operations within the MenuOrchestrator.
This commit is contained in:
@@ -177,10 +177,34 @@ void MenuOrchestrator::AddViewMenuItems() {
|
||||
[this]() { OnSwitchToEditor(EditorType::kPalette); }, "Ctrl+7")
|
||||
.Item("Screens", ICON_MD_TV,
|
||||
[this]() { OnSwitchToEditor(EditorType::kScreen); }, "Ctrl+8")
|
||||
.Item("Hex Editor", ICON_MD_DATA_ARRAY,
|
||||
[this]() { OnSwitchToEditor(EditorType::kHex); }, "Ctrl+9")
|
||||
.Item("Assembly", ICON_MD_CODE,
|
||||
[this]() { OnSwitchToEditor(EditorType::kAssembly); }, "Ctrl+0")
|
||||
[this]() { OnSwitchToEditor(EditorType::kAssembly); }, "Ctrl+9")
|
||||
.Item("Hex Editor", ICON_MD_DATA_ARRAY,
|
||||
[this]() { OnShowHexEditor(); }, "Ctrl+0")
|
||||
.Separator();
|
||||
|
||||
// Special Editors
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
menu_builder_
|
||||
.Item("AI Agent", ICON_MD_SMART_TOY,
|
||||
[this]() { OnShowAIAgent(); }, "Ctrl+Shift+A")
|
||||
.Item("Chat History", ICON_MD_CHAT,
|
||||
[this]() { OnShowChatHistory(); }, "Ctrl+H")
|
||||
.Item("Proposal Drawer", ICON_MD_PREVIEW,
|
||||
[this]() { OnShowProposalDrawer(); }, "Ctrl+P");
|
||||
#endif
|
||||
|
||||
menu_builder_
|
||||
.Item("Emulator", ICON_MD_VIDEOGAME_ASSET,
|
||||
[this]() { OnShowEmulator(); }, "Ctrl+Shift+E")
|
||||
.Separator();
|
||||
|
||||
// Additional UI Elements
|
||||
menu_builder_
|
||||
.Item("Card Browser", ICON_MD_DASHBOARD,
|
||||
[this]() { OnShowCardBrowser(); }, "Ctrl+Shift+B")
|
||||
.Item("Welcome Screen", ICON_MD_HOME,
|
||||
[this]() { OnShowWelcomeScreen(); })
|
||||
.Separator();
|
||||
|
||||
// Display Settings
|
||||
@@ -497,6 +521,51 @@ void MenuOrchestrator::OnShowDisplaySettings() {
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowHexEditor() {
|
||||
// Show hex editor card via EditorCardManager
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowHexEditor();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowEmulator() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowEmulator();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowCardBrowser() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowCardBrowser();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowWelcomeScreen() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowWelcomeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
void MenuOrchestrator::OnShowAIAgent() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowAIAgent();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowChatHistory() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowChatHistory();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuOrchestrator::OnShowProposalDrawer() {
|
||||
if (editor_manager_) {
|
||||
editor_manager_->ShowProposalDrawer();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Session management menu actions
|
||||
void MenuOrchestrator::OnCreateNewSession() {
|
||||
session_coordinator_.CreateNewSession();
|
||||
|
||||
@@ -87,6 +87,16 @@ class MenuOrchestrator {
|
||||
void OnSwitchToEditor(EditorType editor_type);
|
||||
void OnShowEditorSelection();
|
||||
void OnShowDisplaySettings();
|
||||
void OnShowHexEditor();
|
||||
void OnShowEmulator();
|
||||
void OnShowCardBrowser();
|
||||
void OnShowWelcomeScreen();
|
||||
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
void OnShowAIAgent();
|
||||
void OnShowChatHistory();
|
||||
void OnShowProposalDrawer();
|
||||
#endif
|
||||
|
||||
// Session management menu actions
|
||||
void OnCreateNewSession();
|
||||
|
||||
Reference in New Issue
Block a user