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

Compact proposal management panel for agent sidebar. More...

#include <agent_proposals_panel.h>

Public Member Functions

 AgentProposalsPanel ()
 
 ~AgentProposalsPanel ()=default
 
void SetContext (AgentUIContext *context)
 Set the shared UI context.
 
void SetToastManager (ToastManager *toast_manager)
 Set toast manager for notifications.
 
void SetRom (Rom *rom)
 Set ROM reference for proposal merging.
 
void SetProposalCallbacks (const ProposalCallbacks &callbacks)
 Set proposal callbacks.
 
void Draw (float available_height=0.0f)
 Draw the complete proposals panel.
 
void DrawProposalList ()
 Draw just the proposal list (for custom layouts)
 
void DrawProposalDetail ()
 Draw the detail view for selected proposal.
 
void SetCompactMode (bool compact)
 Set compact mode for sidebar usage.
 
bool IsCompactMode () const
 
void FocusProposal (const std::string &proposal_id)
 Focus a specific proposal by ID.
 
void RefreshProposals ()
 Refresh the proposal list from registry.
 
int GetPendingCount () const
 Get count of pending proposals.
 
int GetTotalCount () const
 Get total proposal count.
 

Private Member Functions

void DrawStatusFilter ()
 
void DrawProposalRow (const cli::ProposalRegistry::ProposalMetadata &proposal)
 
void DrawQuickActions (const cli::ProposalRegistry::ProposalMetadata &proposal)
 
void DrawDiffView ()
 
void DrawLogView ()
 
absl::Status AcceptProposal (const std::string &proposal_id)
 
absl::Status RejectProposal (const std::string &proposal_id)
 
absl::Status DeleteProposal (const std::string &proposal_id)
 
void SelectProposal (const std::string &proposal_id)
 
const char * GetStatusIcon (cli::ProposalRegistry::ProposalStatus status) const
 
ImVec4 GetStatusColor (cli::ProposalRegistry::ProposalStatus status) const
 

Private Attributes

AgentUIContextcontext_ = nullptr
 
ToastManagertoast_manager_ = nullptr
 
Romrom_ = nullptr
 
ProposalCallbacks proposal_callbacks_
 
bool compact_mode_ = false
 
bool needs_refresh_ = true
 
std::vector< cli::ProposalRegistry::ProposalMetadataproposals_
 
std::string selected_proposal_id_
 
const cli::ProposalRegistry::ProposalMetadataselected_proposal_ = nullptr
 
std::string diff_content_
 
std::string log_content_
 
bool show_confirm_dialog_ = false
 
std::string confirm_action_
 
std::string confirm_proposal_id_
 

Detailed Description

Compact proposal management panel for agent sidebar.

This component displays a list of agent-generated proposals with:

  • Compact list view with status indicators
  • Quick accept/reject actions
  • Expandable detail view for selected proposal
  • Status filtering (All/Pending/Accepted/Rejected)

Designed to work in both sidebar mode (compact) and standalone (full detail). Uses AgentUIContext for shared state with other agent components.

Definition at line 32 of file agent_proposals_panel.h.

Constructor & Destructor Documentation

◆ AgentProposalsPanel()

yaze::editor::AgentProposalsPanel::AgentProposalsPanel ( )

Definition at line 64 of file agent_proposals_panel.cc.

References proposals_.

◆ ~AgentProposalsPanel()

yaze::editor::AgentProposalsPanel::~AgentProposalsPanel ( )
default

Member Function Documentation

◆ SetContext()

void yaze::editor::AgentProposalsPanel::SetContext ( AgentUIContext * context)

Set the shared UI context.

Definition at line 68 of file agent_proposals_panel.cc.

References context_.

◆ SetToastManager()

void yaze::editor::AgentProposalsPanel::SetToastManager ( ToastManager * toast_manager)

Set toast manager for notifications.

Definition at line 72 of file agent_proposals_panel.cc.

References toast_manager_.

◆ SetRom()

void yaze::editor::AgentProposalsPanel::SetRom ( Rom * rom)

Set ROM reference for proposal merging.

Definition at line 76 of file agent_proposals_panel.cc.

References rom_.

◆ SetProposalCallbacks()

void yaze::editor::AgentProposalsPanel::SetProposalCallbacks ( const ProposalCallbacks & callbacks)

Set proposal callbacks.

Definition at line 78 of file agent_proposals_panel.cc.

References proposal_callbacks_.

◆ Draw()

void yaze::editor::AgentProposalsPanel::Draw ( float available_height = 0.0f)

◆ DrawProposalList()

◆ DrawProposalDetail()

◆ SetCompactMode()

void yaze::editor::AgentProposalsPanel::SetCompactMode ( bool compact)
inline

Set compact mode for sidebar usage.

Definition at line 76 of file agent_proposals_panel.h.

References compact_mode_.

◆ IsCompactMode()

bool yaze::editor::AgentProposalsPanel::IsCompactMode ( ) const
inline

Definition at line 77 of file agent_proposals_panel.h.

References compact_mode_.

◆ FocusProposal()

void yaze::editor::AgentProposalsPanel::FocusProposal ( const std::string & proposal_id)

Focus a specific proposal by ID.

Definition at line 420 of file agent_proposals_panel.cc.

References context_, yaze::editor::ProposalState::focused_proposal_id, yaze::editor::AgentUIContext::proposal_state(), and SelectProposal().

Here is the call graph for this function:

◆ RefreshProposals()

◆ GetPendingCount()

int yaze::editor::AgentProposalsPanel::GetPendingCount ( ) const

Get count of pending proposals.

Definition at line 473 of file agent_proposals_panel.cc.

References yaze::cli::ProposalRegistry::kPending, and proposals_.

Referenced by DrawStatusFilter().

◆ GetTotalCount()

int yaze::editor::AgentProposalsPanel::GetTotalCount ( ) const
inline

Get total proposal count.

Definition at line 97 of file agent_proposals_panel.h.

References proposals_.

◆ DrawStatusFilter()

void yaze::editor::AgentProposalsPanel::DrawStatusFilter ( )
private

◆ DrawProposalRow()

◆ DrawQuickActions()

void yaze::editor::AgentProposalsPanel::DrawQuickActions ( const cli::ProposalRegistry::ProposalMetadata & proposal)
private

◆ DrawDiffView()

void yaze::editor::AgentProposalsPanel::DrawDiffView ( )
private

Definition at line 359 of file agent_proposals_panel.cc.

References diff_content_, yaze::cli::ProposalRegistry::ProposalMetadata::diff_path, yaze::editor::AgentUI::GetTheme(), and selected_proposal_.

Referenced by DrawProposalDetail().

Here is the call graph for this function:

◆ DrawLogView()

void yaze::editor::AgentProposalsPanel::DrawLogView ( )
private

Definition at line 400 of file agent_proposals_panel.cc.

References yaze::editor::AgentUI::GetTheme(), log_content_, yaze::cli::ProposalRegistry::ProposalMetadata::log_path, and selected_proposal_.

Referenced by DrawProposalDetail().

Here is the call graph for this function:

◆ AcceptProposal()

absl::Status yaze::editor::AgentProposalsPanel::AcceptProposal ( const std::string & proposal_id)
private

◆ RejectProposal()

absl::Status yaze::editor::AgentProposalsPanel::RejectProposal ( const std::string & proposal_id)
private

◆ DeleteProposal()

absl::Status yaze::editor::AgentProposalsPanel::DeleteProposal ( const std::string & proposal_id)
private

◆ SelectProposal()

void yaze::editor::AgentProposalsPanel::SelectProposal ( const std::string & proposal_id)
private

◆ GetStatusIcon()

◆ GetStatusColor()

ImVec4 yaze::editor::AgentProposalsPanel::GetStatusColor ( cli::ProposalRegistry::ProposalStatus status) const
private

Member Data Documentation

◆ context_

AgentUIContext* yaze::editor::AgentProposalsPanel::context_ = nullptr
private

◆ toast_manager_

ToastManager* yaze::editor::AgentProposalsPanel::toast_manager_ = nullptr
private

◆ rom_

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

Definition at line 116 of file agent_proposals_panel.h.

Referenced by SetRom().

◆ proposal_callbacks_

ProposalCallbacks yaze::editor::AgentProposalsPanel::proposal_callbacks_
private

Definition at line 117 of file agent_proposals_panel.h.

Referenced by AcceptProposal(), RejectProposal(), and SetProposalCallbacks().

◆ compact_mode_

bool yaze::editor::AgentProposalsPanel::compact_mode_ = false
private

◆ needs_refresh_

bool yaze::editor::AgentProposalsPanel::needs_refresh_ = true
private

◆ proposals_

std::vector<cli::ProposalRegistry::ProposalMetadata> yaze::editor::AgentProposalsPanel::proposals_
private

◆ selected_proposal_id_

std::string yaze::editor::AgentProposalsPanel::selected_proposal_id_
private

◆ selected_proposal_

const cli::ProposalRegistry::ProposalMetadata* yaze::editor::AgentProposalsPanel::selected_proposal_ = nullptr
private

◆ diff_content_

std::string yaze::editor::AgentProposalsPanel::diff_content_
private

◆ log_content_

std::string yaze::editor::AgentProposalsPanel::log_content_
private

◆ show_confirm_dialog_

bool yaze::editor::AgentProposalsPanel::show_confirm_dialog_ = false
private

Definition at line 132 of file agent_proposals_panel.h.

Referenced by Draw(), and DrawQuickActions().

◆ confirm_action_

std::string yaze::editor::AgentProposalsPanel::confirm_action_
private

Definition at line 133 of file agent_proposals_panel.h.

Referenced by Draw(), and DrawQuickActions().

◆ confirm_proposal_id_

std::string yaze::editor::AgentProposalsPanel::confirm_proposal_id_
private

Definition at line 134 of file agent_proposals_panel.h.

Referenced by Draw(), and DrawQuickActions().


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