feat: Enhance Agent Editor and Chat History Management

- Added support for internal message handling in the AgentChatHistoryCodec, allowing messages marked as internal to be excluded from user display.
- Updated the AgentChatWidget to skip rendering internal messages, improving user experience by reducing clutter.
- Introduced a comprehensive bot profile management system in the AgentEditor, enabling users to create, save, load, and manage bot profiles with detailed configurations.
- Enhanced the UI for the AgentEditor, including a new tabbed interface for better organization of settings, prompts, and profiles, along with improved metrics and chat history viewing capabilities.
- Implemented JSON support for bot profile management, allowing for easy export and import of profiles, streamlining user workflows.
This commit is contained in:
scawful
2025-10-05 05:27:11 -04:00
parent 4cca86cf83
commit e490dea2e5
6 changed files with 897 additions and 182 deletions

View File

@@ -337,8 +337,9 @@ absl::StatusOr<ChatMessage> ConversationalAgentService::SendMessage(
"The tool returned the following data:\n",
tool_output, "\n\n",
"Please provide a text_response field in your JSON to summarize this information for the user.");
history_.push_back(
CreateMessage(ChatMessage::Sender::kUser, marked_output));
auto tool_result_msg = CreateMessage(ChatMessage::Sender::kUser, marked_output);
tool_result_msg.is_internal = true; // Don't show this to the human user
history_.push_back(tool_result_msg);
}
executed_tool = true;
}

View File

@@ -37,6 +37,7 @@ struct ChatMessage {
absl::Time timestamp;
std::optional<std::string> json_pretty;
std::optional<TableData> table_data;
bool is_internal = false; // True for tool results and other messages not meant for user display
struct SessionMetrics {
int turn_index = 0;
int total_user_messages = 0;