Unified Agent Chat Component. More...
#include <agent_chat.h>
Classes | |
| struct | AutomationTelemetry |
| struct | ContentBlock |
| struct | ConversationEntry |
Public Member Functions | |
| AgentChat () | |
| ~AgentChat ()=default | |
| void | Initialize (ToastManager *toast_manager, ProposalDrawer *proposal_drawer) |
| void | SetRomContext (Rom *rom) |
| void | SetContext (AgentUIContext *context) |
| void | SetPanelOpener (std::function< void(const std::string &)> opener) |
| void | Draw (float available_height=0.0f) |
| void | SendMessage (const std::string &message) |
| void | ClearHistory () |
| void | ScrollToBottom () |
| absl::Status | LoadHistory (const std::string &filepath) |
| absl::Status | SaveHistory (const std::string &filepath) |
| cli::agent::ConversationalAgentService * | GetAgentService () |
| bool | auto_scroll () const |
| void | set_auto_scroll (bool v) |
| bool | show_timestamps () const |
| void | set_show_timestamps (bool v) |
| bool | show_reasoning () const |
| void | set_show_reasoning (bool v) |
| bool * | active () |
| void | set_active (bool active) |
| void | UpdateHarnessTelemetry (const AutomationTelemetry &telemetry) |
| void | SetLastPlanSummary (const std::string &summary) |
| const std::vector< AutomationTelemetry > & | GetTelemetryHistory () const |
| const std::string & | GetLastPlanSummary () const |
Private Member Functions | |
| void | RenderToolbar (bool compact) |
| void | RenderConversationSidebar (float height) |
| void | RenderHistory () |
| void | RenderInputBox (float height) |
| void | RenderMessage (const cli::agent::ChatMessage &msg, int index) |
| void | RenderThinkingIndicator () |
| void | RenderProposalQuickActions (const cli::agent::ChatMessage &msg, int index) |
| void | RenderCodeBlock (const std::string &code, const std::string &language, int msg_index) |
| void | RenderTableData (const cli::agent::ChatMessage::TableData &table) |
| void | RenderToolTimeline (const cli::agent::ChatMessage &msg) |
| std::vector< ContentBlock > | ParseMessageContent (const std::string &content) |
| void | HandleAgentResponse (const absl::StatusOr< cli::agent::ChatMessage > &response) |
| void | RefreshConversationList (bool force=false) |
| void | SelectConversation (const std::filesystem::path &path) |
Private Attributes | |
| AgentUIContext * | context_ = nullptr |
| ToastManager * | toast_manager_ = nullptr |
| ProposalDrawer * | proposal_drawer_ = nullptr |
| Rom * | rom_ = nullptr |
| cli::agent::ConversationalAgentService | agent_service_ |
| bool | active_ = false |
| bool | waiting_for_response_ = false |
| float | thinking_animation_ = 0.0f |
| char | input_buffer_ [4096] = {} |
| bool | scroll_to_bottom_ = false |
| bool | history_loaded_ = false |
| std::vector< ConversationEntry > | conversations_ |
| absl::Time | last_conversation_refresh_ = absl::InfinitePast() |
| std::filesystem::path | active_history_path_ |
| char | conversation_filter_ [128] = {} |
| bool | auto_scroll_ = true |
| bool | show_timestamps_ = true |
| bool | show_reasoning_ = false |
| float | message_spacing_ = 12.0f |
| std::vector< AutomationTelemetry > | telemetry_history_ |
| std::string | last_plan_summary_ |
| std::function< void(const std::string &) | panel_opener_ ) |
Unified Agent Chat Component.
Handles:
Definition at line 32 of file agent_chat.h.
| yaze::editor::AgentChat::AgentChat | ( | ) |
Definition at line 100 of file agent_chat.cc.
|
default |
| void yaze::editor::AgentChat::Initialize | ( | ToastManager * | toast_manager, |
| ProposalDrawer * | proposal_drawer ) |
Definition at line 104 of file agent_chat.cc.
References active_history_path_, proposal_drawer_, and toast_manager_.
| void yaze::editor::AgentChat::SetRomContext | ( | Rom * | rom | ) |
Definition at line 113 of file agent_chat.cc.
References rom_.
| void yaze::editor::AgentChat::SetContext | ( | AgentUIContext * | context | ) |
Definition at line 117 of file agent_chat.cc.
References context_.
|
inline |
Definition at line 41 of file agent_chat.h.
References panel_opener_.
| void yaze::editor::AgentChat::Draw | ( | float | available_height = 0.0f | ) |
Definition at line 273 of file agent_chat.cc.
Referenced by yaze::editor::AgentChatPanel::Draw(), and yaze::editor::RightPanelManager::DrawAgentChatPanel().
| void yaze::editor::AgentChat::SendMessage | ( | const std::string & | message | ) |
Definition at line 136 of file agent_chat.cc.
References agent_service_, HandleAgentResponse(), ScrollToBottom(), yaze::cli::agent::ConversationalAgentService::SendMessage(), thinking_animation_, and waiting_for_response_.
Referenced by yaze::editor::RightPanelManager::DrawAgentQuickActions().

| void yaze::editor::AgentChat::ClearHistory | ( | ) |
Definition at line 129 of file agent_chat.cc.
References agent_service_, yaze::editor::kInfo, yaze::cli::agent::ConversationalAgentService::ResetConversation(), yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by yaze::editor::RightPanelManager::DrawAgentChatPanel().

| void yaze::editor::AgentChat::ScrollToBottom | ( | ) |
Definition at line 125 of file agent_chat.cc.
References scroll_to_bottom_.
Referenced by HandleAgentResponse(), and SendMessage().
| absl::Status yaze::editor::AgentChat::LoadHistory | ( | const std::string & | filepath | ) |
Definition at line 845 of file agent_chat.cc.
| absl::Status yaze::editor::AgentChat::SaveHistory | ( | const std::string & | filepath | ) |
Definition at line 861 of file agent_chat.cc.
References yaze::editor::AgentChatHistoryCodec::Snapshot::history.
Referenced by yaze::editor::RightPanelManager::DrawAgentChatPanel().
| cli::agent::ConversationalAgentService * yaze::editor::AgentChat::GetAgentService | ( | ) |
Definition at line 121 of file agent_chat.cc.
References agent_service_.
|
inline |
Definition at line 62 of file agent_chat.h.
References auto_scroll_.
|
inline |
Definition at line 63 of file agent_chat.h.
References auto_scroll_.
|
inline |
Definition at line 64 of file agent_chat.h.
References show_timestamps_.
|
inline |
Definition at line 65 of file agent_chat.h.
References show_timestamps_.
|
inline |
Definition at line 66 of file agent_chat.h.
References show_reasoning_.
|
inline |
Definition at line 67 of file agent_chat.h.
References show_reasoning_.
|
inline |
|
inline |
Definition at line 71 of file agent_chat.h.
References active(), and active_.
Referenced by yaze::editor::AgentChatPanel::Draw(), yaze::editor::RightPanelManager::DrawAgentChatPanel(), and yaze::editor::EditorManager::InitializeSubsystems().

| void yaze::editor::AgentChat::UpdateHarnessTelemetry | ( | const AutomationTelemetry & | telemetry | ) |
Definition at line 710 of file agent_chat.cc.
| void yaze::editor::AgentChat::SetLastPlanSummary | ( | const std::string & | summary | ) |
Definition at line 718 of file agent_chat.cc.
|
inline |
Definition at line 84 of file agent_chat.h.
References telemetry_history_.
|
inline |
Definition at line 85 of file agent_chat.h.
References last_plan_summary_.
|
private |
Definition at line 327 of file agent_chat.cc.
References ICON_MD_ADD_COMMENT, ICON_MD_DELETE_FOREVER, ICON_MD_FOLDER_OPEN, ICON_MD_SAVE, and ICON_MD_TUNE.
|
private |
Definition at line 416 of file agent_chat.cc.
References ICON_MD_AUTO_FIX_HIGH, ICON_MD_REFRESH, and ICON_MD_SETTINGS.
|
private |
Definition at line 507 of file agent_chat.cc.
|
private |
Definition at line 620 of file agent_chat.cc.
References ICON_MD_DELETE_FOREVER, and ICON_MD_SEND.
|
private |
Definition at line 526 of file agent_chat.cc.
References yaze::gui::GetDisabledColor(), yaze::gui::GetInfoColor(), yaze::gui::GetSuccessColor(), ICON_MD_PERSON, ICON_MD_SMART_TOY, yaze::cli::agent::ChatMessage::json_pretty, yaze::cli::agent::ChatMessage::kUser, yaze::cli::agent::ChatMessage::message, yaze::cli::agent::ChatMessage::sender, yaze::cli::agent::ChatMessage::table_data, and yaze::cli::agent::ChatMessage::timestamp.

|
private |
Definition at line 601 of file agent_chat.cc.
References ICON_MD_PENDING.
|
private |
Definition at line 673 of file agent_chat.cc.
References yaze::cli::agent::ChatMessage::message.
|
private |
Definition at line 688 of file agent_chat.cc.
References ICON_MD_CONTENT_COPY.
|
private |
Definition at line 768 of file agent_chat.cc.
References yaze::cli::agent::ChatMessage::TableData::headers, and yaze::cli::agent::ChatMessage::TableData::rows.
|
private |
Definition at line 799 of file agent_chat.cc.
References ICON_MD_BUILD_CIRCLE, and yaze::cli::agent::ChatMessage::model_metadata.
|
private |
Definition at line 722 of file agent_chat.cc.
|
private |
Definition at line 149 of file agent_chat.cc.
References yaze::editor::kError, LOG_ERROR, ScrollToBottom(), yaze::editor::ToastManager::Show(), toast_manager_, and waiting_for_response_.
Referenced by SendMessage().

|
private |
Definition at line 165 of file agent_chat.cc.
References active_history_path_, yaze::editor::AgentChatHistoryCodec::Available(), conversations_, yaze::editor::AgentChat::ConversationEntry::is_active, last_conversation_refresh_, yaze::editor::AgentChat::ConversationEntry::last_updated, yaze::editor::AgentChatHistoryCodec::Load(), yaze::editor::AgentChat::ConversationEntry::message_count, yaze::editor::AgentChat::ConversationEntry::path, and yaze::editor::AgentChat::ConversationEntry::title.

|
private |
Definition at line 256 of file agent_chat.cc.
|
private |
Definition at line 113 of file agent_chat.h.
Referenced by SetContext().
|
private |
Definition at line 114 of file agent_chat.h.
Referenced by ClearHistory(), HandleAgentResponse(), and Initialize().
|
private |
Definition at line 115 of file agent_chat.h.
Referenced by Initialize().
|
private |
Definition at line 116 of file agent_chat.h.
Referenced by SetRomContext().
|
private |
Definition at line 119 of file agent_chat.h.
Referenced by ClearHistory(), GetAgentService(), and SendMessage().
|
private |
Definition at line 120 of file agent_chat.h.
Referenced by active(), and set_active().
|
private |
Definition at line 121 of file agent_chat.h.
Referenced by HandleAgentResponse(), and SendMessage().
|
private |
Definition at line 122 of file agent_chat.h.
Referenced by SendMessage().
|
private |
Definition at line 123 of file agent_chat.h.
|
private |
Definition at line 124 of file agent_chat.h.
Referenced by ScrollToBottom().
|
private |
Definition at line 125 of file agent_chat.h.
|
private |
Definition at line 134 of file agent_chat.h.
Referenced by RefreshConversationList().
|
private |
Definition at line 135 of file agent_chat.h.
Referenced by RefreshConversationList().
|
private |
Definition at line 136 of file agent_chat.h.
Referenced by Initialize(), and RefreshConversationList().
|
private |
Definition at line 137 of file agent_chat.h.
|
private |
Definition at line 140 of file agent_chat.h.
Referenced by auto_scroll(), and set_auto_scroll().
|
private |
Definition at line 141 of file agent_chat.h.
Referenced by set_show_timestamps(), and show_timestamps().
|
private |
Definition at line 142 of file agent_chat.h.
Referenced by set_show_reasoning(), and show_reasoning().
|
private |
Definition at line 143 of file agent_chat.h.
|
private |
Definition at line 146 of file agent_chat.h.
Referenced by GetTelemetryHistory().
|
private |
Definition at line 147 of file agent_chat.h.
Referenced by GetLastPlanSummary().
|
private |
Definition at line 148 of file agent_chat.h.
Referenced by SetPanelOpener().