feat: Enhance agent chat widget with history management and proposal handling

This commit is contained in:
scawful
2025-10-04 14:05:36 -04:00
parent c59a4592c3
commit 3735a0d4a7
8 changed files with 639 additions and 52 deletions

View File

@@ -40,6 +40,9 @@ void ProposalDrawer::Draw() {
if (needs_refresh_) {
RefreshProposals();
needs_refresh_ = false;
if (!selected_proposal_id_.empty() && !selected_proposal_) {
SelectProposal(selected_proposal_id_);
}
}
// Header with refresh button
@@ -441,6 +444,13 @@ void ProposalDrawer::DrawActionButtons() {
}
}
void ProposalDrawer::FocusProposal(const std::string& proposal_id) {
visible_ = true;
selected_proposal_id_ = proposal_id;
selected_proposal_ = nullptr;
needs_refresh_ = true;
}
void ProposalDrawer::RefreshProposals() {
auto& registry = cli::ProposalRegistry::Instance();