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 <map>
5#include <memory>
6#include <string>
7#include <vector>
8
9#include "absl/status/status.h"
10#include "core/project.h"
11#include "core/asar_wrapper.h"
12
13#if defined(YAZE_BUILD_AGENT_UI)
19#endif
20
21// LearnedKnowledgeService requires Z3ED_AI build
22#if defined(Z3ED_AI)
24#endif
25
26namespace yaze {
27
28class Rom;
29
30namespace editor {
31
32class ToastManager;
33class ProposalDrawer;
34class RightDrawerManager;
35class WorkspaceWindowManager;
36class UserSettings;
37
38// Forward declarations for when YAZE_BUILD_AGENT_UI is not defined
39#if !defined(YAZE_BUILD_AGENT_UI)
40class AgentEditor;
41class AgentUIContext;
42#endif
43
52 public:
53 void Initialize(ToastManager* toast_manager,
54 ProposalDrawer* proposal_drawer,
55 RightDrawerManager* right_drawer_manager,
56 WorkspaceWindowManager* window_manager,
57 UserSettings* user_settings);
58
59 void ApplyUserSettingsDefaults(bool force = false);
60
61 void SetRomContext(Rom* rom);
63 void SetAsarWrapperContext(core::AsarWrapper* asar_wrapper);
65 const std::map<std::string, core::AsarSymbol>* table);
66
67 absl::Status Update();
68
69 // UI visibility controls
70 void ShowAgent();
71 void ShowChatHistory();
72 bool IsAvailable() const;
73 void DrawPopups();
74
75 // Component access
78 const AgentUIContext* GetContext() const;
79
80#if defined(YAZE_BUILD_AGENT_UI)
81 // Direct access to session manager for advanced use cases
82 AgentSessionManager& GetSessionManager() { return session_manager_; }
83 const AgentSessionManager& GetSessionManager() const { return session_manager_; }
84
85 // Knowledge service access (requires Z3ED_AI build)
86#if defined(Z3ED_AI)
87 cli::agent::LearnedKnowledgeService* GetKnowledgeService();
88 bool IsKnowledgeServiceAvailable() const;
89 void InitializeKnowledge();
90 void SyncKnowledgeToContext();
91 AgentKnowledgePanel& GetKnowledgePanel() { return knowledge_panel_; }
92#endif
93#endif
94
95 private:
96#if defined(YAZE_BUILD_AGENT_UI)
97 void SyncStateFromEditor();
98 void SyncStateToComponents();
99
100 AgentSessionManager session_manager_;
101 AgentEditor agent_editor_;
102 AgentUIContext agent_ui_context_;
103 AgentConfigState last_synced_config_;
104 std::unique_ptr<AsmFollowService> asm_follow_service_;
105 RightDrawerManager* right_drawer_manager_ = nullptr;
106 WorkspaceWindowManager* window_manager_ = nullptr;
107 ToastManager* toast_manager_ = nullptr;
108 UserSettings* user_settings_ = nullptr;
109
110#if defined(Z3ED_AI)
111 cli::agent::LearnedKnowledgeService learned_knowledge_;
112 bool knowledge_initialized_ = false;
113 AgentKnowledgePanel knowledge_panel_;
114#endif
115#endif
116};
117
118// =============================================================================
119// Stub implementation when agent UI is disabled
120// =============================================================================
121#if !defined(YAZE_BUILD_AGENT_UI)
131 const std::map<std::string, core::AsarSymbol>*) {}
132inline absl::Status AgentUiController::Update() { return absl::OkStatus(); }
135inline bool AgentUiController::IsAvailable() const { return false; }
139inline const AgentUIContext* AgentUiController::GetContext() const { return nullptr; }
140#endif
141
142} // namespace editor
143} // namespace yaze
144
145#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 SetProjectContext(project::YazeProject *project)
void ApplyUserSettingsDefaults(bool force=false)
void SetAssemblySymbolTableContext(const std::map< std::string, core::AsarSymbol > *table)
void Initialize(ToastManager *toast_manager, ProposalDrawer *proposal_drawer, RightDrawerManager *right_drawer_manager, WorkspaceWindowManager *window_manager, UserSettings *user_settings)
void SetAsarWrapperContext(core::AsarWrapper *asar_wrapper)
ImGui drawer for displaying and managing agent proposals.
Manages right-side sliding drawers for agent chat, proposals, settings.
Manages user preferences and settings persistence.
Central registry for all editor cards with session awareness and dependency injection.
Agent configuration state.
Modern project structure with comprehensive settings consolidation.
Definition project.h:164