Rename copilot_button crate to copilot_ui

This commit is contained in:
Piotr Osiewicz 2024-01-05 16:36:26 +01:00
parent 0670a6f838
commit 0602953af4
8 changed files with 13 additions and 10 deletions

4
Cargo.lock generated
View file

@ -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",

View file

@ -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",

View file

@ -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]

View file

@ -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::{

View file

@ -0,0 +1,5 @@
mod copilot_button;
mod sign_in;
pub use copilot_button::*;
pub use sign_in::*;

View file

@ -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" }

View file

@ -123,7 +123,7 @@ pub fn initialize_workspace(app_state: Arc<AppState>, 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 =