yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
agent_ui_controller.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_AGENT_AGENT_UI_CONTROLLER_H_
2#define YAZE_APP_EDITOR_AGENT_AGENT_UI_CONTROLLER_H_
3
4#include <memory>
5#include <vector>
6
7#include "absl/status/status.h"
8#include "core/project.h"
9#include "core/asar_wrapper.h"
10
11#if defined(YAZE_BUILD_AGENT_UI)
17#endif
18
19// LearnedKnowledgeService requires Z3ED_AI build
20#if defined(Z3ED_AI)
22#endif
23
24namespace yaze {
25
26class Rom;
27
28namespace editor {
29
30class ToastManager;
31class ProposalDrawer;
32class RightPanelManager;
33class PanelManager;
34class UserSettings;
35
36// Forward declarations for when YAZE_BUILD_AGENT_UI is not defined
37#if !defined(YAZE_BUILD_AGENT_UI)
38class AgentEditor;
39class AgentUIContext;
40#endif
41
50 public:
51 void Initialize(ToastManager* toast_manager,
52 ProposalDrawer* proposal_drawer,
53 RightPanelManager* right_panel_manager,
54 PanelManager* panel_manager,
55 UserSettings* user_settings);
56
57 void ApplyUserSettingsDefaults(bool force = false);
58
59 void SetRomContext(Rom* rom);
61 void SetAsarWrapperContext(core::AsarWrapper* asar_wrapper);
62
63 absl::Status Update();
64
65 // UI visibility controls
66 void ShowAgent();
67 void ShowChatHistory();
68 bool IsAvailable() const;
69 void DrawPopups();
70
71 // Component access
74 const AgentUIContext* GetContext() const;
75
76#if defined(YAZE_BUILD_AGENT_UI)
77 // Direct access to session manager for advanced use cases
78 AgentSessionManager& GetSessionManager() { return session_manager_; }
79 const AgentSessionManager& GetSessionManager() const { return session_manager_; }
80
81 // Knowledge service access (requires Z3ED_AI build)
82#if defined(Z3ED_AI)
83 cli::agent::LearnedKnowledgeService* GetKnowledgeService();
84 bool IsKnowledgeServiceAvailable() const;
85 void InitializeKnowledge();
86 void SyncKnowledgeToContext();
87 AgentKnowledgePanel& GetKnowledgePanel() { return knowledge_panel_; }
88#endif
89#endif
90
91 private:
92#if defined(YAZE_BUILD_AGENT_UI)
93 void SyncStateFromEditor();
94 void SyncStateToComponents();
95
96 AgentSessionManager session_manager_;
97 AgentEditor agent_editor_;
98 AgentUIContext agent_ui_context_;
99 AgentConfigState last_synced_config_;
100 std::unique_ptr<AsmFollowService> asm_follow_service_;
101 RightPanelManager* right_panel_manager_ = nullptr;
102 PanelManager* panel_manager_ = nullptr;
103 ToastManager* toast_manager_ = nullptr;
104 UserSettings* user_settings_ = nullptr;
105
106#if defined(Z3ED_AI)
107 cli::agent::LearnedKnowledgeService learned_knowledge_;
108 bool knowledge_initialized_ = false;
109 AgentKnowledgePanel knowledge_panel_;
110#endif
111#endif
112};
113
114// =============================================================================
115// Stub implementation when agent UI is disabled
116// =============================================================================
117#if !defined(YAZE_BUILD_AGENT_UI)
126inline absl::Status AgentUiController::Update() { return absl::OkStatus(); }
129inline bool AgentUiController::IsAvailable() const { return false; }
133inline const AgentUIContext* AgentUiController::GetContext() const { return nullptr; }
134#endif
135
136} // namespace editor
137} // namespace yaze
138
139#endif // YAZE_APP_EDITOR_AGENT_AGENT_UI_CONTROLLER_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:28
Manages persistent learned information across agent sessions.
Modern C++ wrapper for Asar 65816 assembler integration.
Comprehensive AI Agent Platform & Bot Creator.
Panel for viewing/editing learned knowledge patterns.
Manages multiple agent sessions with dual-view support.
Unified context for agent UI components.
Central coordinator for all agent UI components.
void Initialize(ToastManager *toast_manager, ProposalDrawer *proposal_drawer, RightPanelManager *right_panel_manager, PanelManager *panel_manager, UserSettings *user_settings)
void SetProjectContext(project::YazeProject *project)
void ApplyUserSettingsDefaults(bool force=false)
void SetAsarWrapperContext(core::AsarWrapper *asar_wrapper)
Central registry for all editor cards with session awareness and dependency injection.
ImGui drawer for displaying and managing agent proposals.
Manages right-side sliding panels for agent chat, proposals, settings.
Manages user preferences and settings persistence.
Agent configuration state.
Modern project structure with comprehensive settings consolidation.
Definition project.h:120