20 ImGui::PushID(
"Z3EDCmdPanel");
21 ImVec4 command_color = ImVec4(1.0f, 0.647f, 0.0f, 1.0f);
26 "Z3ED_CommandsChild", ImVec2(0, 100),
27 {.bg = ImVec4(0.14f, 0.12f, 0.18f, 0.95f)},
true);
32 ImGui::SetNextItemWidth(-60);
33 ImGui::InputTextWithHint(
34 "##z3ed_cmd",
"Command...", state.command_input_buffer,
35 IM_ARRAYSIZE(state.command_input_buffer));
37 ImGui::BeginDisabled(state.command_running);
40 std::string command = state.command_input_buffer;
41 state.command_running =
true;
43 state.command_running =
false;
44 if (status.ok() && toast_manager) {
50 if (ImGui::IsItemHovered()) {
51 ImGui::SetTooltip(
"Run command");
59 const auto& proposals = *result;
60 state.command_output = absl::StrJoin(proposals,
"\n");
64 if (ImGui::IsItemHovered())
65 ImGui::SetTooltip(
"List");
71 state.command_output = *result;
74 if (ImGui::IsItemHovered())
75 ImGui::SetTooltip(
"Diff");
82 if (ImGui::IsItemHovered())
83 ImGui::SetTooltip(
"Accept");
90 if (ImGui::IsItemHovered())
91 ImGui::SetTooltip(
"Reject");
93 if (!state.command_output.empty()) {
96 "%s", state.command_output.substr(0, 100).c_str());
Unified context for agent UI components.
Z3EDCommandState & z3ed_command_state()