Add step 625 tool call visualization model

This commit is contained in:
Bill
2026-02-17 21:10:53 -07:00
parent 49b80096f1
commit f770f173a0
6 changed files with 301 additions and 0 deletions

View File

@@ -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();