yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
proposal_drawer.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
2#define YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
3
4#include <string>
5#include <vector>
6
7#include "absl/status/status.h"
9
10namespace yaze {
11class Rom;
12}
13
14namespace yaze {
15namespace editor {
16
32 public:
34 ~ProposalDrawer() = default;
35
36 // Set the ROM instance to merge proposals into
37 void SetRom(Rom* rom) { rom_ = rom; }
38
39 // Render the proposal drawer UI
40 void Draw();
41
42 // Show/hide the drawer
43 void Show() { visible_ = true; }
44 void Hide() { visible_ = false; }
45 void Toggle() { visible_ = !visible_; }
46 bool IsVisible() const { return visible_; }
47 void FocusProposal(const std::string& proposal_id);
48
49 private:
50 void DrawProposalList();
51 void DrawProposalDetail();
52 void DrawPolicyStatus(); // NEW: Display policy evaluation results
53 void DrawStatusFilter();
54 void DrawActionButtons();
55
56 absl::Status AcceptProposal(const std::string& proposal_id);
57 absl::Status RejectProposal(const std::string& proposal_id);
58 absl::Status DeleteProposal(const std::string& proposal_id);
59
60 void RefreshProposals();
61 void SelectProposal(const std::string& proposal_id);
62
63 bool visible_ = false;
64 bool needs_refresh_ = true;
65
66 // Filter state
67 enum class StatusFilter {
68 kAll,
72 };
74
75 // Proposal state
76 std::vector<cli::ProposalRegistry::ProposalMetadata> proposals_;
79
80 // Diff display state
81 std::string diff_content_;
82 std::string log_content_;
84
85 // UI state
86 float drawer_width_ = 400.0f;
88 bool show_override_dialog_ = false; // NEW: Policy override confirmation
89 std::string confirm_action_;
91
92 // ROM reference for merging
93 Rom* rom_ = nullptr;
94};
95
96} // namespace editor
97} // namespace yaze
98
99#endif // YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
ImGui drawer for displaying and managing agent proposals.
absl::Status AcceptProposal(const std::string &proposal_id)
absl::Status RejectProposal(const std::string &proposal_id)
cli::ProposalRegistry::ProposalMetadata * selected_proposal_
absl::Status DeleteProposal(const std::string &proposal_id)
void FocusProposal(const std::string &proposal_id)
std::vector< cli::ProposalRegistry::ProposalMetadata > proposals_
void SelectProposal(const std::string &proposal_id)
Main namespace for the application.