yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::AgentEditor Class Reference

Comprehensive AI Agent Platform & Bot Creator. More...

#include <agent_editor.h>

Inheritance diagram for yaze::editor::AgentEditor:

Classes

struct  AgentConfig
 
struct  BotProfile
 
struct  CaptureConfig
 
struct  SessionInfo
 

Public Types

enum class  CollaborationMode { kLocal , kNetwork }
 

Public Member Functions

 AgentEditor ()
 
 ~AgentEditor () override
 
void Initialize () override
 
absl::Status Load () override
 
absl::Status Save () override
 
absl::Status Update () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Find () override
 
void InitializeWithDependencies (ToastManager *toast_manager, ProposalDrawer *proposal_drawer, Rom *rom)
 
void SetRomContext (Rom *rom)
 
void DrawDashboard ()
 
AgentConfig GetCurrentConfig () const
 
void ApplyConfig (const AgentConfig &config)
 
absl::Status SaveBotProfile (const BotProfile &profile)
 
absl::Status LoadBotProfile (const std::string &name)
 
absl::Status DeleteBotProfile (const std::string &name)
 
std::vector< BotProfileGetAllProfiles () const
 
BotProfile GetCurrentProfile () const
 
void SetCurrentProfile (const BotProfile &profile)
 
absl::Status ExportProfile (const BotProfile &profile, const std::filesystem::path &path)
 
absl::Status ImportProfile (const std::filesystem::path &path)
 
AgentChatWidgetGetChatWidget ()
 
bool IsChatActive () const
 
void SetChatActive (bool active)
 
void ToggleChat ()
 
void OpenChatWindow ()
 
absl::StatusOr< SessionInfoHostSession (const std::string &session_name, CollaborationMode mode=CollaborationMode::kLocal)
 
absl::StatusOr< SessionInfoJoinSession (const std::string &session_code, CollaborationMode mode=CollaborationMode::kLocal)
 
absl::Status LeaveSession ()
 
absl::StatusOr< SessionInfoRefreshSession ()
 
absl::Status CaptureSnapshot (std::filesystem::path *output_path, const CaptureConfig &config)
 
absl::Status SendToGemini (const std::filesystem::path &image_path, const std::string &prompt)
 
bool IsInSession () const
 
CollaborationMode GetCurrentMode () const
 
std::optional< SessionInfoGetCurrentSession () const
 
AgentCollaborationCoordinatorGetLocalCoordinator ()
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual absl::Status Clear ()
 
EditorType type () const
 
void set_context (EditorContext *context)
 
bool * active ()
 
void set_active (bool active)
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 

Public Attributes

float pulse_animation_ = 0.0f
 
float scanline_offset_ = 0.0f
 
float glitch_timer_ = 0.0f
 
int blink_counter_ = 0
 

Private Member Functions

void DrawConfigurationPanel ()
 
void DrawStatusPanel ()
 
void DrawMetricsPanel ()
 
void DrawPromptEditorPanel ()
 
void DrawBotProfilesPanel ()
 
void DrawChatHistoryViewer ()
 
void DrawAdvancedMetricsPanel ()
 
void DrawCommonTilesEditor ()
 
void DrawNewPromptCreator ()
 
void SetupChatWidgetCallbacks ()
 
void SetupMultimodalCallbacks ()
 
std::filesystem::path GetProfilesDirectory () const
 
absl::Status EnsureProfilesDirectory ()
 
std::string ProfileToJson (const BotProfile &profile) const
 
absl::StatusOr< BotProfileJsonToProfile (const std::string &json) const
 

Private Attributes

std::unique_ptr< AgentChatWidgetchat_widget_
 
std::unique_ptr< AgentCollaborationCoordinatorlocal_coordinator_
 
ToastManagertoast_manager_ = nullptr
 
ProposalDrawerproposal_drawer_ = nullptr
 
Romrom_ = nullptr
 
AgentConfig current_config_
 
BotProfile current_profile_
 
std::vector< BotProfileloaded_profiles_
 
std::unique_ptr< TextEditorprompt_editor_
 
std::unique_ptr< TextEditorcommon_tiles_editor_
 
bool prompt_editor_initialized_ = false
 
bool common_tiles_initialized_ = false
 
std::string active_prompt_file_ = "system_prompt_v3.txt"
 
char new_prompt_name_ [128] = {}
 
CollaborationMode current_mode_ = CollaborationMode::kLocal
 
bool in_session_ = false
 
std::string current_session_id_
 
std::string current_session_name_
 
std::vector< std::string > current_participants_
 
bool show_advanced_settings_ = false
 
bool show_prompt_editor_ = false
 
bool show_bot_profiles_ = false
 
bool show_chat_history_ = false
 
bool show_metrics_dashboard_ = false
 
int selected_tab_ = 0
 
std::vector< cli::agent::ChatMessagecached_history_
 
bool history_needs_refresh_ = true
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakeCardTitle (const std::string &base_title) const
 
template<typename T >
absl::StatusOr< T > SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const
 
- Protected Attributes inherited from yaze::editor::Editor
bool active_ = false
 
EditorType type_
 
EditorContextcontext_ = nullptr
 

Detailed Description

Comprehensive AI Agent Platform & Bot Creator.

A full-featured bot creation and management platform:

  • Agent provider configuration (Ollama, Gemini, Mock)
  • Model selection and parameters
  • System prompt editing with live syntax highlighting
  • Bot profile management (create, save, load custom bots)
  • Chat history viewer and management
  • Session metrics and analytics dashboard
  • Collaboration settings (Local/Network)
  • Z3ED command automation presets
  • Multimodal/vision configuration
  • Export/Import bot configurations

The chat widget is separate and managed by EditorManager, with a dense/compact mode for focused conversations.

Definition at line 50 of file agent_editor.h.

Member Enumeration Documentation

◆ CollaborationMode

Enumerator
kLocal 
kNetwork 

Definition at line 133 of file agent_editor.h.

Constructor & Destructor Documentation

◆ AgentEditor()

◆ ~AgentEditor()

yaze::editor::AgentEditor::~AgentEditor ( )
overridedefault

Member Function Documentation

◆ Initialize()

void yaze::editor::AgentEditor::Initialize ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 69 of file agent_editor.cc.

References EnsureProfilesDirectory().

Here is the call graph for this function:

◆ Load()

absl::Status yaze::editor::AgentEditor::Load ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 74 of file agent_editor.cc.

References GetProfilesDirectory(), JsonToProfile(), and loaded_profiles_.

Referenced by DeleteBotProfile(), and SaveBotProfile().

Here is the call graph for this function:

◆ Save()

absl::Status yaze::editor::AgentEditor::Save ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 97 of file agent_editor.cc.

References current_profile_, and SaveBotProfile().

Referenced by DrawConfigurationPanel(), and DrawDashboard().

Here is the call graph for this function:

◆ Update()

absl::Status yaze::editor::AgentEditor::Update ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 102 of file agent_editor.cc.

References yaze::editor::Editor::active_, and DrawDashboard().

Here is the call graph for this function:

◆ Cut()

absl::Status yaze::editor::AgentEditor::Cut ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 60 of file agent_editor.h.

◆ Copy()

absl::Status yaze::editor::AgentEditor::Copy ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 61 of file agent_editor.h.

◆ Paste()

absl::Status yaze::editor::AgentEditor::Paste ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 62 of file agent_editor.h.

◆ Undo()

absl::Status yaze::editor::AgentEditor::Undo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 63 of file agent_editor.h.

◆ Redo()

absl::Status yaze::editor::AgentEditor::Redo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 64 of file agent_editor.h.

◆ Find()

absl::Status yaze::editor::AgentEditor::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 65 of file agent_editor.h.

◆ InitializeWithDependencies()

void yaze::editor::AgentEditor::InitializeWithDependencies ( ToastManager toast_manager,
ProposalDrawer proposal_drawer,
Rom rom 
)

Definition at line 114 of file agent_editor.cc.

References chat_widget_, proposal_drawer_, rom_, SetupChatWidgetCallbacks(), SetupMultimodalCallbacks(), and toast_manager_.

Here is the call graph for this function:

◆ SetRomContext()

void yaze::editor::AgentEditor::SetRomContext ( Rom rom)

Definition at line 133 of file agent_editor.cc.

References chat_widget_, and rom_.

◆ DrawDashboard()

◆ GetCurrentConfig()

AgentEditor::AgentConfig yaze::editor::AgentEditor::GetCurrentConfig ( ) const

Definition at line 1341 of file agent_editor.cc.

References current_config_.

◆ ApplyConfig()

◆ SaveBotProfile()

absl::Status yaze::editor::AgentEditor::SaveBotProfile ( const BotProfile profile)

Definition at line 1107 of file agent_editor.cc.

References EnsureProfilesDirectory(), GetProfilesDirectory(), Load(), yaze::editor::AgentEditor::BotProfile::name, ProfileToJson(), and RETURN_IF_ERROR.

Referenced by ImportProfile(), and Save().

Here is the call graph for this function:

◆ LoadBotProfile()

◆ DeleteBotProfile()

absl::Status yaze::editor::AgentEditor::DeleteBotProfile ( const std::string &  name)

Definition at line 1169 of file agent_editor.cc.

References GetProfilesDirectory(), and Load().

Referenced by DrawBotProfilesPanel().

Here is the call graph for this function:

◆ GetAllProfiles()

std::vector< AgentEditor::BotProfile > yaze::editor::AgentEditor::GetAllProfiles ( ) const

Definition at line 1184 of file agent_editor.cc.

References loaded_profiles_.

◆ GetCurrentProfile()

BotProfile yaze::editor::AgentEditor::GetCurrentProfile ( ) const
inline

Definition at line 120 of file agent_editor.h.

References current_profile_.

◆ SetCurrentProfile()

◆ ExportProfile()

absl::Status yaze::editor::AgentEditor::ExportProfile ( const BotProfile profile,
const std::filesystem::path &  path 
)

Definition at line 1201 of file agent_editor.cc.

References ProfileToJson().

Here is the call graph for this function:

◆ ImportProfile()

absl::Status yaze::editor::AgentEditor::ImportProfile ( const std::filesystem::path &  path)

Definition at line 1218 of file agent_editor.cc.

References ASSIGN_OR_RETURN, JsonToProfile(), and SaveBotProfile().

Here is the call graph for this function:

◆ GetChatWidget()

AgentChatWidget * yaze::editor::AgentEditor::GetChatWidget ( )
inline

Definition at line 126 of file agent_editor.h.

References chat_widget_.

◆ IsChatActive()

bool yaze::editor::AgentEditor::IsChatActive ( ) const

Definition at line 1362 of file agent_editor.cc.

References chat_widget_.

Referenced by ToggleChat().

◆ SetChatActive()

void yaze::editor::AgentEditor::SetChatActive ( bool  active)

Definition at line 1366 of file agent_editor.cc.

References yaze::editor::Editor::active(), and chat_widget_.

Referenced by ToggleChat().

Here is the call graph for this function:

◆ ToggleChat()

void yaze::editor::AgentEditor::ToggleChat ( )

Definition at line 1372 of file agent_editor.cc.

References IsChatActive(), and SetChatActive().

Here is the call graph for this function:

◆ OpenChatWindow()

void yaze::editor::AgentEditor::OpenChatWindow ( )

Definition at line 1376 of file agent_editor.cc.

References chat_widget_.

Referenced by DrawDashboard(), and DrawStatusPanel().

◆ HostSession()

◆ JoinSession()

◆ LeaveSession()

absl::Status yaze::editor::AgentEditor::LeaveSession ( )

◆ RefreshSession()

◆ CaptureSnapshot()

absl::Status yaze::editor::AgentEditor::CaptureSnapshot ( std::filesystem::path *  output_path,
const CaptureConfig config 
)

Definition at line 1587 of file agent_editor.cc.

◆ SendToGemini()

absl::Status yaze::editor::AgentEditor::SendToGemini ( const std::filesystem::path &  image_path,
const std::string &  prompt 
)

Definition at line 1594 of file agent_editor.cc.

◆ IsInSession()

bool yaze::editor::AgentEditor::IsInSession ( ) const

Definition at line 1636 of file agent_editor.cc.

References in_session_.

◆ GetCurrentMode()

AgentEditor::CollaborationMode yaze::editor::AgentEditor::GetCurrentMode ( ) const

Definition at line 1640 of file agent_editor.cc.

References current_mode_.

◆ GetCurrentSession()

◆ GetLocalCoordinator()

AgentCollaborationCoordinator * yaze::editor::AgentEditor::GetLocalCoordinator ( )
inline

Definition at line 177 of file agent_editor.h.

References local_coordinator_.

◆ DrawConfigurationPanel()

void yaze::editor::AgentEditor::DrawConfigurationPanel ( )
private

◆ DrawStatusPanel()

void yaze::editor::AgentEditor::DrawStatusPanel ( )
private

◆ DrawMetricsPanel()

void yaze::editor::AgentEditor::DrawMetricsPanel ( )
private

Definition at line 592 of file agent_editor.cc.

References chat_widget_, and ICON_MD_ANALYTICS.

Referenced by DrawConfigurationPanel().

◆ DrawPromptEditorPanel()

◆ DrawBotProfilesPanel()

◆ DrawChatHistoryViewer()

void yaze::editor::AgentEditor::DrawChatHistoryViewer ( )
private

◆ DrawAdvancedMetricsPanel()

void yaze::editor::AgentEditor::DrawAdvancedMetricsPanel ( )
private

◆ DrawCommonTilesEditor()

void yaze::editor::AgentEditor::DrawCommonTilesEditor ( )
private

◆ DrawNewPromptCreator()

void yaze::editor::AgentEditor::DrawNewPromptCreator ( )
private

◆ SetupChatWidgetCallbacks()

◆ SetupMultimodalCallbacks()

void yaze::editor::AgentEditor::SetupMultimodalCallbacks ( )
private

Definition at line 1708 of file agent_editor.cc.

Referenced by InitializeWithDependencies().

◆ GetProfilesDirectory()

std::filesystem::path yaze::editor::AgentEditor::GetProfilesDirectory ( ) const
private

Definition at line 1241 of file agent_editor.cc.

References yaze::util::PlatformPaths::GetConfigDirectory().

Referenced by DeleteBotProfile(), EnsureProfilesDirectory(), Load(), LoadBotProfile(), and SaveBotProfile().

Here is the call graph for this function:

◆ EnsureProfilesDirectory()

absl::Status yaze::editor::AgentEditor::EnsureProfilesDirectory ( )
private

Definition at line 1250 of file agent_editor.cc.

References GetProfilesDirectory().

Referenced by AgentEditor(), Initialize(), and SaveBotProfile().

Here is the call graph for this function:

◆ ProfileToJson()

◆ JsonToProfile()

Member Data Documentation

◆ pulse_animation_

float yaze::editor::AgentEditor::pulse_animation_ = 0.0f

Definition at line 107 of file agent_editor.h.

Referenced by DrawDashboard().

◆ scanline_offset_

float yaze::editor::AgentEditor::scanline_offset_ = 0.0f

Definition at line 108 of file agent_editor.h.

Referenced by DrawDashboard().

◆ glitch_timer_

float yaze::editor::AgentEditor::glitch_timer_ = 0.0f

Definition at line 109 of file agent_editor.h.

Referenced by DrawDashboard().

◆ blink_counter_

int yaze::editor::AgentEditor::blink_counter_ = 0

Definition at line 110 of file agent_editor.h.

Referenced by DrawDashboard().

◆ chat_widget_

◆ local_coordinator_

std::unique_ptr<AgentCollaborationCoordinator> yaze::editor::AgentEditor::local_coordinator_
private

◆ toast_manager_

◆ proposal_drawer_

ProposalDrawer* yaze::editor::AgentEditor::proposal_drawer_ = nullptr
private

Definition at line 212 of file agent_editor.h.

Referenced by InitializeWithDependencies().

◆ rom_

Rom* yaze::editor::AgentEditor::rom_ = nullptr
private

Definition at line 213 of file agent_editor.h.

Referenced by DrawStatusPanel(), InitializeWithDependencies(), and SetRomContext().

◆ current_config_

AgentConfig yaze::editor::AgentEditor::current_config_
private

◆ current_profile_

BotProfile yaze::editor::AgentEditor::current_profile_
private

◆ loaded_profiles_

std::vector<BotProfile> yaze::editor::AgentEditor::loaded_profiles_
private

Definition at line 220 of file agent_editor.h.

Referenced by DrawBotProfilesPanel(), GetAllProfiles(), and Load().

◆ prompt_editor_

std::unique_ptr<TextEditor> yaze::editor::AgentEditor::prompt_editor_
private

Definition at line 223 of file agent_editor.h.

Referenced by AgentEditor(), DrawNewPromptCreator(), and DrawPromptEditorPanel().

◆ common_tiles_editor_

std::unique_ptr<TextEditor> yaze::editor::AgentEditor::common_tiles_editor_
private

Definition at line 224 of file agent_editor.h.

Referenced by AgentEditor(), and DrawCommonTilesEditor().

◆ prompt_editor_initialized_

bool yaze::editor::AgentEditor::prompt_editor_initialized_ = false
private

Definition at line 225 of file agent_editor.h.

Referenced by DrawPromptEditorPanel().

◆ common_tiles_initialized_

bool yaze::editor::AgentEditor::common_tiles_initialized_ = false
private

Definition at line 226 of file agent_editor.h.

Referenced by DrawCommonTilesEditor().

◆ active_prompt_file_

std::string yaze::editor::AgentEditor::active_prompt_file_ = "system_prompt_v3.txt"
private

Definition at line 227 of file agent_editor.h.

Referenced by DrawPromptEditorPanel().

◆ new_prompt_name_

char yaze::editor::AgentEditor::new_prompt_name_[128] = {}
private

Definition at line 228 of file agent_editor.h.

Referenced by DrawNewPromptCreator().

◆ current_mode_

CollaborationMode yaze::editor::AgentEditor::current_mode_ = CollaborationMode::kLocal
private

◆ in_session_

bool yaze::editor::AgentEditor::in_session_ = false
private

◆ current_session_id_

std::string yaze::editor::AgentEditor::current_session_id_
private

◆ current_session_name_

std::string yaze::editor::AgentEditor::current_session_name_
private

◆ current_participants_

std::vector<std::string> yaze::editor::AgentEditor::current_participants_
private

◆ show_advanced_settings_

bool yaze::editor::AgentEditor::show_advanced_settings_ = false
private

Definition at line 238 of file agent_editor.h.

◆ show_prompt_editor_

bool yaze::editor::AgentEditor::show_prompt_editor_ = false
private

Definition at line 239 of file agent_editor.h.

Referenced by DrawDashboard().

◆ show_bot_profiles_

bool yaze::editor::AgentEditor::show_bot_profiles_ = false
private

Definition at line 240 of file agent_editor.h.

Referenced by DrawDashboard().

◆ show_chat_history_

bool yaze::editor::AgentEditor::show_chat_history_ = false
private

Definition at line 241 of file agent_editor.h.

Referenced by DrawDashboard().

◆ show_metrics_dashboard_

bool yaze::editor::AgentEditor::show_metrics_dashboard_ = false
private

Definition at line 242 of file agent_editor.h.

Referenced by DrawDashboard().

◆ selected_tab_

int yaze::editor::AgentEditor::selected_tab_ = 0
private

Definition at line 243 of file agent_editor.h.

◆ cached_history_

std::vector<cli::agent::ChatMessage> yaze::editor::AgentEditor::cached_history_
private

Definition at line 246 of file agent_editor.h.

Referenced by DrawChatHistoryViewer().

◆ history_needs_refresh_

bool yaze::editor::AgentEditor::history_needs_refresh_ = true
private

Definition at line 247 of file agent_editor.h.

Referenced by DrawChatHistoryViewer().


The documentation for this class was generated from the following files: