From 0602953af457c24574d654d2137c56822bc7611b Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:36:26 +0100 Subject: [PATCH] Rename copilot_button crate to copilot_ui --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/{copilot_button => copilot_ui}/Cargo.toml | 4 ++-- crates/{copilot_button => copilot_ui}/src/copilot_button.rs | 4 +--- crates/copilot_ui/src/copilot_ui.rs | 5 +++++ crates/{copilot_button => copilot_ui}/src/sign_in.rs | 0 crates/zed/Cargo.toml | 2 +- crates/zed/src/zed.rs | 2 +- 8 files changed, 13 insertions(+), 10 deletions(-) rename crates/{copilot_button => copilot_ui}/Cargo.toml (91%) rename crates/{copilot_button => copilot_ui}/src/copilot_button.rs (99%) create mode 100644 crates/copilot_ui/src/copilot_ui.rs rename crates/{copilot_button => copilot_ui}/src/sign_in.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index e0bfcc79b6..ac167dcc7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1688,7 +1688,7 @@ dependencies = [ ] [[package]] -name = "copilot_button" +name = "copilot_ui" version = "0.1.0" dependencies = [ "anyhow", @@ -9537,7 +9537,7 @@ dependencies = [ "collections", "command_palette", "copilot", - "copilot_button", + "copilot_ui", "ctor", "db", "diagnostics", diff --git a/Cargo.toml b/Cargo.toml index 9f2bc14590..fa21cc5364 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ members = [ "crates/collections", "crates/command_palette", "crates/copilot", - "crates/copilot_button", + "crates/copilot_ui", "crates/db", "crates/refineable", "crates/refineable/derive_refineable", diff --git a/crates/copilot_button/Cargo.toml b/crates/copilot_ui/Cargo.toml similarity index 91% rename from crates/copilot_button/Cargo.toml rename to crates/copilot_ui/Cargo.toml index e166e760c1..491f4f3cde 100644 --- a/crates/copilot_button/Cargo.toml +++ b/crates/copilot_ui/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "copilot_button" +name = "copilot_ui" version = "0.1.0" edition = "2021" publish = false [lib] -path = "src/copilot_button.rs" +path = "src/copilot_ui.rs" doctest = false [dependencies] diff --git a/crates/copilot_button/src/copilot_button.rs b/crates/copilot_ui/src/copilot_button.rs similarity index 99% rename from crates/copilot_button/src/copilot_button.rs rename to crates/copilot_ui/src/copilot_button.rs index 2a1bde785e..e55f45c293 100644 --- a/crates/copilot_button/src/copilot_button.rs +++ b/crates/copilot_ui/src/copilot_button.rs @@ -1,5 +1,4 @@ -mod sign_in; - +use crate::sign_in::CopilotCodeVerification; use anyhow::Result; use copilot::{Copilot, SignOut, Status}; use editor::{scroll::autoscroll::Autoscroll, Editor}; @@ -13,7 +12,6 @@ use language::{ File, Language, }; use settings::{update_settings_file, Settings, SettingsStore}; -use sign_in::CopilotCodeVerification; use std::{path::Path, sync::Arc}; use util::{paths, ResultExt}; use workspace::{ diff --git a/crates/copilot_ui/src/copilot_ui.rs b/crates/copilot_ui/src/copilot_ui.rs new file mode 100644 index 0000000000..64dd068d5a --- /dev/null +++ b/crates/copilot_ui/src/copilot_ui.rs @@ -0,0 +1,5 @@ +mod copilot_button; +mod sign_in; + +pub use copilot_button::*; +pub use sign_in::*; diff --git a/crates/copilot_button/src/sign_in.rs b/crates/copilot_ui/src/sign_in.rs similarity index 100% rename from crates/copilot_button/src/sign_in.rs rename to crates/copilot_ui/src/sign_in.rs diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 39ab5e285b..2d6ad999a5 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -30,7 +30,7 @@ command_palette = { path = "../command_palette" } client = { path = "../client" } # clock = { path = "../clock" } copilot = { path = "../copilot" } -copilot_button = { path = "../copilot_button" } +copilot_ui = { path = "../copilot_ui" } diagnostics = { path = "../diagnostics" } db = { path = "../db" } editor = { path = "../editor" } diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index c7d30230ea..f0634081f3 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -123,7 +123,7 @@ pub fn initialize_workspace(app_state: Arc, cx: &mut AppContext) { // workspace.set_titlebar_item(collab_titlebar_item.into_any(), cx); let copilot = - cx.new_view(|cx| copilot_button::CopilotButton::new(app_state.fs.clone(), cx)); + cx.new_view(|cx| copilot_ui::CopilotButton::new(app_state.fs.clone(), cx)); let diagnostic_summary = cx.new_view(|cx| diagnostics::items::DiagnosticIndicator::new(workspace, cx)); let activity_indicator =