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)
16#endif
17
18// LearnedKnowledgeService requires Z3ED_AI build
19#if defined(Z3ED_AI)
21#endif
22
23namespace yaze {
24
25class Rom;
26
27namespace editor {
28
29class ToastManager;
30class ProposalDrawer;
31class RightPanelManager;
32class PanelManager;
33
34// Forward declarations for when YAZE_BUILD_AGENT_UI is not defined
35#if !defined(YAZE_BUILD_AGENT_UI)
36class AgentEditor;
37#endif
38
47 public:
48 void Initialize(ToastManager* toast_manager,
49 ProposalDrawer* proposal_drawer,
50 RightPanelManager* right_panel_manager,
51 PanelManager* panel_manager);
52
53 void SetRomContext(Rom* rom);
55 void SetAsarWrapperContext(core::AsarWrapper* asar_wrapper);
56
57 absl::Status Update();
58
59 // UI visibility controls
60 void ShowAgent();
61 void ShowChatHistory();
62 bool IsAvailable() const;
63 void DrawPopups();
64
65 // Component access
67
68#if defined(YAZE_BUILD_AGENT_UI)
69 // Direct access to session manager for advanced use cases
70 AgentSessionManager& GetSessionManager() { return session_manager_; }
71 const AgentSessionManager& GetSessionManager() const { return session_manager_; }
72
73 // Direct access to active session's context (legacy compatibility)
74 AgentUIContext* GetContext();
75 const AgentUIContext* GetContext() const;
76
77 // Knowledge service access (requires Z3ED_AI build)
78#if defined(Z3ED_AI)
79 cli::agent::LearnedKnowledgeService* GetKnowledgeService();
80 bool IsKnowledgeServiceAvailable() const;
81 void InitializeKnowledge();
82 void SyncKnowledgeToContext();
83 AgentKnowledgePanel& GetKnowledgePanel() { return knowledge_panel_; }
84#endif
85#endif
86
87 private:
88#if defined(YAZE_BUILD_AGENT_UI)
89 void SyncStateFromEditor();
90 void SyncStateToComponents();
91
92 AgentSessionManager session_manager_;
93 AgentEditor agent_editor_;
94 AgentUIContext agent_ui_context_;
95 AgentConfigState last_synced_config_;
96 RightPanelManager* right_panel_manager_ = nullptr;
97 ToastManager* toast_manager_ = nullptr;
98
99#if defined(Z3ED_AI)
100 cli::agent::LearnedKnowledgeService learned_knowledge_;
101 bool knowledge_initialized_ = false;
102 AgentKnowledgePanel knowledge_panel_;
103#endif
104#endif
105};
106
107// =============================================================================
108// Stub implementation when agent UI is disabled
109// =============================================================================
110#if !defined(YAZE_BUILD_AGENT_UI)
117inline absl::Status AgentUiController::Update() { return absl::OkStatus(); }
120inline bool AgentUiController::IsAvailable() const { return false; }
123#endif
124
125} // namespace editor
126} // namespace yaze
127
128#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:24
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 SetProjectContext(project::YazeProject *project)
void SetAsarWrapperContext(core::AsarWrapper *asar_wrapper)
void Initialize(ToastManager *toast_manager, ProposalDrawer *proposal_drawer, RightPanelManager *right_panel_manager, PanelManager *panel_manager)
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.
Agent configuration state.
Modern project structure with comprehensive settings consolidation.
Definition project.h:84