yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
agent_proposals_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_AGENT_AGENT_PROPOSALS_PANEL_H_
2#define YAZE_APP_EDITOR_AGENT_AGENT_PROPOSALS_PANEL_H_
3
4#include <string>
5#include <vector>
6
7#include "absl/status/status.h"
10
11namespace yaze {
12
13class Rom;
14
15namespace editor {
16
17class ToastManager;
18
33 public:
36
40 void SetContext(AgentUIContext* context);
41
45 void SetToastManager(ToastManager* toast_manager);
46
50 void SetRom(Rom* rom);
51
55 void SetProposalCallbacks(const ProposalCallbacks& callbacks);
56
61 void Draw(float available_height = 0.0f);
62
66 void DrawProposalList();
67
71 void DrawProposalDetail();
72
76 void SetCompactMode(bool compact) { compact_mode_ = compact; }
77 bool IsCompactMode() const { return compact_mode_; }
78
82 void FocusProposal(const std::string& proposal_id);
83
87 void RefreshProposals();
88
92 int GetPendingCount() const;
93
97 int GetTotalCount() const { return static_cast<int>(proposals_.size()); }
98
99 private:
100 void DrawStatusFilter();
103 void DrawDiffView();
104 void DrawLogView();
105
106 absl::Status AcceptProposal(const std::string& proposal_id);
107 absl::Status RejectProposal(const std::string& proposal_id);
108 absl::Status DeleteProposal(const std::string& proposal_id);
109
110 void SelectProposal(const std::string& proposal_id);
113
116 Rom* rom_ = nullptr;
118
119 bool compact_mode_ = false;
120 bool needs_refresh_ = true;
121
122 // Proposal data
123 std::vector<cli::ProposalRegistry::ProposalMetadata> proposals_;
126
127 // Detail view data
128 std::string diff_content_;
129 std::string log_content_;
130
131 // Confirmation state
133 std::string confirm_action_;
135};
136
137} // namespace editor
138} // namespace yaze
139
140#endif // YAZE_APP_EDITOR_AGENT_AGENT_PROPOSALS_PANEL_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
Compact proposal management panel for agent sidebar.
void SetToastManager(ToastManager *toast_manager)
Set toast manager for notifications.
int GetPendingCount() const
Get count of pending proposals.
void SelectProposal(const std::string &proposal_id)
const char * GetStatusIcon(cli::ProposalRegistry::ProposalStatus status) const
void DrawProposalRow(const cli::ProposalRegistry::ProposalMetadata &proposal)
void DrawProposalList()
Draw just the proposal list (for custom layouts)
void SetRom(Rom *rom)
Set ROM reference for proposal merging.
void SetCompactMode(bool compact)
Set compact mode for sidebar usage.
void Draw(float available_height=0.0f)
Draw the complete proposals panel.
absl::Status DeleteProposal(const std::string &proposal_id)
ImVec4 GetStatusColor(cli::ProposalRegistry::ProposalStatus status) const
void SetContext(AgentUIContext *context)
Set the shared UI context.
std::vector< cli::ProposalRegistry::ProposalMetadata > proposals_
void FocusProposal(const std::string &proposal_id)
Focus a specific proposal by ID.
void DrawProposalDetail()
Draw the detail view for selected proposal.
const cli::ProposalRegistry::ProposalMetadata * selected_proposal_
void DrawQuickActions(const cli::ProposalRegistry::ProposalMetadata &proposal)
absl::Status AcceptProposal(const std::string &proposal_id)
absl::Status RejectProposal(const std::string &proposal_id)
int GetTotalCount() const
Get total proposal count.
void SetProposalCallbacks(const ProposalCallbacks &callbacks)
Set proposal callbacks.
void RefreshProposals()
Refresh the proposal list from registry.
Unified context for agent UI components.
Callbacks for proposal operations.