refactor(ui): remove AI commit controls
This commit is contained in:
@@ -980,14 +980,6 @@ void draw_working_details() {
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
ImGui::SameLine(ImGui::GetWindowWidth() - ui(27.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.19f, 0.08f, 0.38f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.48f, 0.14f, 0.86f, 1.0f));
|
||||
if (ImGui::Button(ICON_FA_WAND_MAGIC_SPARKLES "##working_assist", {ui(23.0f), ui(23.0f)})) {
|
||||
const std::string suggestion = "Update " + std::to_string(repo().working_files.size()) + " files";
|
||||
std::snprintf(g_commit_summary.data(), g_commit_summary.size(), "%s", suggestion.c_str());
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
ImGui::EndChild();
|
||||
ImGui::Separator();
|
||||
|
||||
@@ -1069,19 +1061,11 @@ void draw_working_details() {
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(31 / 255.0f, 34 / 255.0f, 39 / 255.0f, 1.0f));
|
||||
ImGui::BeginChild("commit_message_card", {-1, ui(165.0f)}, ImGuiChildFlags_Borders);
|
||||
const float summary_controls_width = ui(60.0f);
|
||||
const float summary_controls_width = ui(30.0f);
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - summary_controls_width);
|
||||
ImGui::InputTextWithHint("##commit_summary", "Commit summary", g_commit_summary.data(), g_commit_summary.size());
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled("72");
|
||||
ImGui::SameLine(0, ui(4.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.12f, 0.12f, 0.29f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.35f, 0.16f, 0.62f, 1.0f));
|
||||
if (ImGui::SmallButton(ICON_FA_WAND_MAGIC_SPARKLES "##summary_assist")) {
|
||||
const std::string suggestion = "Update " + std::to_string(repo().working_files.size()) + " files";
|
||||
std::snprintf(g_commit_summary.data(), g_commit_summary.size(), "%s", suggestion.c_str());
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
ImGui::InputTextMultiline("##commit_description", g_commit_description.data(), g_commit_description.size(),
|
||||
{-1, -1});
|
||||
@@ -1095,17 +1079,6 @@ void draw_working_details() {
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
ImGui::TextDisabled(ICON_FA_CHEVRON_RIGHT " Commit options");
|
||||
ImGui::SameLine(std::max(ui(130.0f), ImGui::GetWindowWidth() - ui(181.0f)));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.20f, 0.06f, 0.40f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.48f, 0.12f, 0.82f, 1.0f));
|
||||
if (ImGui::SmallButton(ICON_FA_WAND_MAGIC_SPARKLES " Compose commits with AI")) {
|
||||
const std::string suggestion = "Update " + std::to_string(repo().working_files.size()) + " files";
|
||||
std::snprintf(g_commit_summary.data(), g_commit_summary.size(), "%s", suggestion.c_str());
|
||||
if (g_commit_description[0] == '\0')
|
||||
std::snprintf(g_commit_description.data(), g_commit_description.size(),
|
||||
"Update the current working tree changes.");
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
ImGui::BeginDisabled(staged == 0 || g_commit_summary[0] == '\0');
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.12f, 0.24f, 0.18f, 1.0f));
|
||||
|
||||
Reference in New Issue
Block a user