Add step 625 tool call visualization model
This commit is contained in:
@@ -25,6 +25,28 @@ static void renderAgentChatPanel(EditorState& state) {
|
||||
chat.autoScroll = false;
|
||||
ImGui::EndChild();
|
||||
|
||||
if (!chat.toolCalls.empty()) {
|
||||
ImGui::Separator();
|
||||
ImGui::TextUnformatted("Tool Calls");
|
||||
for (std::size_t i = 0; i < chat.toolCalls.size(); ++i) {
|
||||
auto& call = chat.toolCalls[i];
|
||||
std::string label = AgentToolCallVisualization::inlineLabel(call);
|
||||
if (ImGui::CollapsingHeader((label + "##tool_" + std::to_string(i)).c_str())) {
|
||||
call.expanded = true;
|
||||
ImGui::TextUnformatted("Input");
|
||||
ImGui::BeginChild(("##tool_in_" + std::to_string(i)).c_str(), ImVec2(-1, 70), true);
|
||||
ImGui::TextUnformatted(call.inputJson.c_str());
|
||||
ImGui::EndChild();
|
||||
ImGui::TextUnformatted("Output");
|
||||
ImGui::BeginChild(("##tool_out_" + std::to_string(i)).c_str(), ImVec2(-1, 70), true);
|
||||
ImGui::TextUnformatted(call.outputJson.c_str());
|
||||
ImGui::EndChild();
|
||||
} else {
|
||||
call.expanded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGuiInputTextFlags flags = ImGuiInputTextFlags_AllowTabInput;
|
||||
InputTextMultilineStr("##AgentChatInput", &chat.draftInput, ImVec2(-90, 80), flags);
|
||||
ImGui::SameLine();
|
||||
|
||||
Reference in New Issue
Block a user