ImGui popup drawer for displaying chat history on the left side. More...
#include <agent_chat_history_popup.h>

Public Types | |
| using | OpenChatCallback = std::function< void()> |
| using | SendMessageCallback = std::function< void(const std::string &)> |
| using | CaptureSnapshotCallback = std::function< void()> |
Public Member Functions | |
| AgentChatHistoryPopup () | |
| ~AgentChatHistoryPopup ()=default | |
| void | SetToastManager (ToastManager *toast_manager) |
| void | Draw () |
| void | Show () |
| void | Hide () |
| void | Toggle () |
| bool | IsVisible () const |
| void | UpdateHistory (const std::vector< cli::agent::ChatMessage > &history) |
| void | NotifyNewMessage () |
| void | SetOpenChatCallback (OpenChatCallback callback) |
| void | SetSendMessageCallback (SendMessageCallback callback) |
| void | SetCaptureSnapshotCallback (CaptureSnapshotCallback callback) |
Private Types | |
| enum class | MessageFilter { kAll , kUserOnly , kAgentOnly } |
Private Member Functions | |
| void | DrawHeader () |
| void | DrawMessageList () |
| void | DrawMessage (const cli::agent::ChatMessage &msg, int index) |
| void | DrawInputSection () |
| void | DrawQuickActions () |
| void | SendMessage (const std::string &message) |
| void | ClearHistory () |
| void | ExportHistory () |
| void | ScrollToBottom () |
Private Attributes | |
| bool | visible_ = false |
| bool | needs_scroll_ = false |
| bool | auto_scroll_ = true |
| bool | compact_mode_ = true |
| bool | show_quick_actions_ = true |
| std::vector< cli::agent::ChatMessage > | messages_ |
| int | display_limit_ = 50 |
| char | input_buffer_ [512] = {} |
| bool | focus_input_ = false |
| float | drawer_width_ = 420.0f |
| float | min_drawer_width_ = 300.0f |
| float | max_drawer_width_ = 700.0f |
| bool | is_resizing_ = false |
| MessageFilter | message_filter_ = MessageFilter::kAll |
| float | header_pulse_ = 0.0f |
| int | unread_count_ = 0 |
| float | pulse_animation_ = 0.0f |
| float | scanline_offset_ = 0.0f |
| float | glitch_animation_ = 0.0f |
| int | blink_counter_ = 0 |
| ToastManager * | toast_manager_ = nullptr |
| OpenChatCallback | open_chat_callback_ |
| SendMessageCallback | send_message_callback_ |
| CaptureSnapshotCallback | capture_snapshot_callback_ |
ImGui popup drawer for displaying chat history on the left side.
Provides a quick-access sidebar for viewing recent chat messages, complementing the ProposalDrawer on the right. Features:
Positioned on the LEFT side of the screen as a slide-out panel.
Definition at line 28 of file agent_chat_history_popup.h.
| using yaze::editor::AgentChatHistoryPopup::OpenChatCallback = std::function<void()> |
Definition at line 54 of file agent_chat_history_popup.h.
| using yaze::editor::AgentChatHistoryPopup::SendMessageCallback = std::function<void(const std::string&)> |
Definition at line 60 of file agent_chat_history_popup.h.
| using yaze::editor::AgentChatHistoryPopup::CaptureSnapshotCallback = std::function<void()> |
Definition at line 66 of file agent_chat_history_popup.h.
|
strongprivate |
| Enumerator | |
|---|---|
| kAll | |
| kUserOnly | |
| kAgentOnly | |
Definition at line 104 of file agent_chat_history_popup.h.
| yaze::editor::AgentChatHistoryPopup::AgentChatHistoryPopup | ( | ) |
Definition at line 17 of file agent_chat_history_popup.cc.
References input_buffer_.
|
default |
|
inline |
Definition at line 34 of file agent_chat_history_popup.h.
References toast_manager_.
Referenced by yaze::editor::EditorManager::Initialize().
| void yaze::editor::AgentChatHistoryPopup::Draw | ( | ) |
Definition at line 21 of file agent_chat_history_popup.cc.
References blink_counter_, drawer_width_, DrawHeader(), DrawInputSection(), DrawMessageList(), DrawQuickActions(), yaze::editor::AgentUI::GetTheme(), glitch_animation_, needs_scroll_, pulse_animation_, scanline_offset_, show_quick_actions_, and visible_.
Referenced by yaze::editor::EditorManager::DrawMenuBar().
|
inline |
Definition at line 42 of file agent_chat_history_popup.h.
References visible_.
|
inline |
Definition at line 43 of file agent_chat_history_popup.h.
References visible_.
|
inline |
Definition at line 44 of file agent_chat_history_popup.h.
References visible_.
|
inline |
Definition at line 45 of file agent_chat_history_popup.h.
References visible_.
| void yaze::editor::AgentChatHistoryPopup::UpdateHistory | ( | const std::vector< cli::agent::ChatMessage > & | history | ) |
Definition at line 438 of file agent_chat_history_popup.cc.
References auto_scroll_, messages_, and needs_scroll_.
Referenced by yaze::editor::AgentChatWidget::SyncHistoryToPopup().
| void yaze::editor::AgentChatHistoryPopup::NotifyNewMessage | ( | ) |
Definition at line 450 of file agent_chat_history_popup.cc.
References auto_scroll_, ICON_MD_CHAT, yaze::editor::kInfo, needs_scroll_, yaze::editor::ToastManager::Show(), toast_manager_, and visible_.

|
inline |
Definition at line 55 of file agent_chat_history_popup.h.
References open_chat_callback_.
Referenced by yaze::editor::AgentChatWidget::SetChatHistoryPopup().
|
inline |
Definition at line 61 of file agent_chat_history_popup.h.
References send_message_callback_.
Referenced by yaze::editor::AgentChatWidget::SetChatHistoryPopup().
|
inline |
Definition at line 67 of file agent_chat_history_popup.h.
References capture_snapshot_callback_.
Referenced by yaze::editor::AgentChatWidget::SetChatHistoryPopup().
|
private |
Definition at line 207 of file agent_chat_history_popup.cc.
References blink_counter_, compact_mode_, yaze::editor::AgentUI::GetTheme(), ICON_MD_CHAT, ICON_MD_CLOSE, ICON_MD_NOTIFICATION_IMPORTANT, ICON_MD_OPEN_IN_NEW, ICON_MD_UNFOLD_LESS, ICON_MD_UNFOLD_MORE, yaze::cli::agent::ChatMessage::kAgent, kAgentOnly, yaze::cli::agent::ChatMessage::kUser, kUserOnly, message_filter_, messages_, open_chat_callback_, pulse_animation_, unread_count_, and visible_.
Referenced by Draw().

|
private |
Definition at line 116 of file agent_chat_history_popup.cc.
References display_limit_, DrawMessage(), yaze::cli::agent::ChatMessage::kAgent, kAgentOnly, yaze::cli::agent::ChatMessage::kUser, kUserOnly, message_filter_, and messages_.
Referenced by Draw().

|
private |
Definition at line 142 of file agent_chat_history_popup.cc.
References ICON_MD_DATA_OBJECT, ICON_MD_PREVIEW, ICON_MD_TABLE_CHART, yaze::cli::agent::ChatMessage::json_pretty, yaze::cli::agent::ChatMessage::kUser, yaze::cli::agent::ChatMessage::message, yaze::cli::agent::ChatMessage::proposal, pulse_animation_, yaze::cli::agent::ChatMessage::sender, yaze::cli::agent::ChatMessage::table_data, and yaze::cli::agent::ChatMessage::timestamp.
Referenced by DrawMessageList().
|
private |
Definition at line 388 of file agent_chat_history_popup.cc.
References focus_input_, ICON_MD_INFO, ICON_MD_SEND, input_buffer_, and SendMessage().
Referenced by Draw().

|
private |
Definition at line 324 of file agent_chat_history_popup.cc.
References capture_snapshot_callback_, ClearHistory(), ICON_MD_CAMERA, ICON_MD_DELETE, ICON_MD_FILTER_LIST, ICON_MD_PERSON, ICON_MD_SAVE, ICON_MD_SMART_TOY, kAgentOnly, kAll, yaze::editor::kSuccess, kUserOnly, message_filter_, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by Draw().

|
private |
Definition at line 425 of file agent_chat_history_popup.cc.
References ICON_MD_SEND, yaze::editor::kSuccess, needs_scroll_, send_message_callback_, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by DrawInputSection().

|
private |
Definition at line 461 of file agent_chat_history_popup.cc.
References yaze::editor::kInfo, messages_, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by DrawQuickActions().

|
private |
Definition at line 469 of file agent_chat_history_popup.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

|
private |
Definition at line 476 of file agent_chat_history_popup.cc.
References needs_scroll_.
|
private |
Definition at line 83 of file agent_chat_history_popup.h.
Referenced by Draw(), DrawHeader(), Hide(), IsVisible(), NotifyNewMessage(), Show(), and Toggle().
|
private |
Definition at line 84 of file agent_chat_history_popup.h.
Referenced by Draw(), NotifyNewMessage(), ScrollToBottom(), SendMessage(), and UpdateHistory().
|
private |
Definition at line 85 of file agent_chat_history_popup.h.
Referenced by NotifyNewMessage(), and UpdateHistory().
|
private |
Definition at line 86 of file agent_chat_history_popup.h.
Referenced by DrawHeader().
|
private |
Definition at line 87 of file agent_chat_history_popup.h.
Referenced by Draw().
|
private |
Definition at line 90 of file agent_chat_history_popup.h.
Referenced by ClearHistory(), DrawHeader(), DrawMessageList(), and UpdateHistory().
|
private |
Definition at line 91 of file agent_chat_history_popup.h.
Referenced by DrawMessageList().
|
private |
Definition at line 94 of file agent_chat_history_popup.h.
Referenced by AgentChatHistoryPopup(), and DrawInputSection().
|
private |
Definition at line 95 of file agent_chat_history_popup.h.
Referenced by DrawInputSection().
|
private |
Definition at line 98 of file agent_chat_history_popup.h.
Referenced by Draw().
|
private |
Definition at line 99 of file agent_chat_history_popup.h.
|
private |
Definition at line 100 of file agent_chat_history_popup.h.
|
private |
Definition at line 101 of file agent_chat_history_popup.h.
|
private |
Definition at line 109 of file agent_chat_history_popup.h.
Referenced by DrawHeader(), DrawMessageList(), and DrawQuickActions().
|
private |
Definition at line 112 of file agent_chat_history_popup.h.
|
private |
Definition at line 113 of file agent_chat_history_popup.h.
Referenced by DrawHeader().
|
private |
Definition at line 116 of file agent_chat_history_popup.h.
Referenced by Draw(), DrawHeader(), and DrawMessage().
|
private |
Definition at line 117 of file agent_chat_history_popup.h.
Referenced by Draw().
|
private |
Definition at line 118 of file agent_chat_history_popup.h.
Referenced by Draw().
|
private |
Definition at line 119 of file agent_chat_history_popup.h.
Referenced by Draw(), and DrawHeader().
|
private |
Definition at line 122 of file agent_chat_history_popup.h.
Referenced by ClearHistory(), DrawQuickActions(), ExportHistory(), NotifyNewMessage(), SendMessage(), and SetToastManager().
|
private |
Definition at line 123 of file agent_chat_history_popup.h.
Referenced by DrawHeader(), and SetOpenChatCallback().
|
private |
Definition at line 124 of file agent_chat_history_popup.h.
Referenced by SendMessage(), and SetSendMessageCallback().
|
private |
Definition at line 125 of file agent_chat_history_popup.h.
Referenced by DrawQuickActions(), and SetCaptureSnapshotCallback().