Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/fig_util/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ pub const RUNTIME_DIR_NAME: &str = "cwrun";

/// Data directory name used in paths like ~/.local/share/{DATA_DIR_NAME}
#[cfg(unix)]
pub const DATA_DIR_NAME: &str = "amazon-q";
pub const DATA_DIR_NAME: &str = "kiro-cli";
#[cfg(windows)]
pub const DATA_DIR_NAME: &str = "AmazonQ";
pub const DATA_DIR_NAME: &str = "KiroCli";

/// Backup directory name
pub const BACKUP_DIR_NAME: &str = ".amazon-q.dotfiles.bak";
Expand Down
18 changes: 8 additions & 10 deletions crates/fig_util/src/directories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ pub fn config_dir() -> Result<PathBuf> {
/// This should be removed at some point in the future, once all our users have migrated
/// - MacOS: `$HOME/Library/Application Support/codewhisperer`
pub fn old_fig_data_dir() -> Result<PathBuf> {
Ok(dirs::data_local_dir()
.ok_or(DirectoryError::NoHomeDirectory)?
.join("codewhisperer"))
Ok(dirs::data_local_dir().ok_or(DirectoryError::NoHomeDirectory)?.join("q"))
}

/// The q data directory
Expand Down Expand Up @@ -448,11 +446,11 @@ pub fn bundle_metadata_path<Ctx: EnvProvider + PlatformProvider>(ctx: &Ctx) -> R

/// The path to the fig settings file
///
/// - Linux: `$HOME/.local/share/{data_dir}/settings.json`
/// - MacOS: `$HOME/Library/Application Support/{data_dir}/settings.json`
/// - Windows: `%LOCALAPPDATA%\{data_dir}\settings.json`
/// - Linux: `$HOME/.aws/kiro-cli/settings.json`
/// - MacOS: `$HOME/.aws/kiro-cli/settings.json`
/// - Windows: `$HOME/.aws/kiro-cli/settings.json`
pub fn settings_path() -> Result<PathBuf> {
Ok(fig_data_dir()?.join("settings.json"))
Ok(home_dir()?.join(".aws").join("kiro-cli").join("settings.json"))
}

/// The path to the lock file used to indicate that the app is updating
Expand Down Expand Up @@ -691,7 +689,7 @@ mod tests {
#[test]
fn snapshot_fig_data_dir() {
linux!(fig_data_dir(), @"$HOME/.local/share/amazon-q");
macos!(fig_data_dir(), @"$HOME/Library/Application Support/amazon-q");
macos!(fig_data_dir(), @"$HOME/Library/Application Support/kiro-cli");
windows!(fig_data_dir(), @r"C:\Users\$USER\AppData\Local\AmazonQ");
}

Expand Down Expand Up @@ -747,15 +745,15 @@ mod tests {
#[test]
fn snapshot_settings_path() {
linux!(settings_path(), @"$HOME/.local/share/amazon-q/settings.json");
macos!(settings_path(), @"$HOME/Library/Application Support/amazon-q/settings.json");
macos!(settings_path(), @"$HOME/.aws/kiro-cli/settings.json");
windows!(settings_path(), @r"C:\Users\$USER\AppData\Local\AmazonQ\settings.json");
}

#[test]
fn snapshot_update_lock_path() {
let ctx = Context::new();
linux!(update_lock_path(&ctx), @"$HOME/.local/share/amazon-q/update.lock");
macos!(update_lock_path(&ctx), @"$HOME/Library/Application Support/amazon-q/update.lock");
macos!(update_lock_path(&ctx), @"$HOME/Library/Application Support/kiro-cli/update.lock");
windows!(update_lock_path(&ctx), @r"C:\Users\$USER\AppData\Local\AmazonQ\update.lock");
}

Expand Down
3 changes: 3 additions & 0 deletions crates/q_cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ impl Cli {

debug!(command =? std::env::args().collect::<Vec<_>>(), "Command ran");

// Run migration silently on startup (skips if already completed or locked)
let _ = Self::execute_chat("chat", Some(vec!["migrate".to_owned(), "--yes".to_owned()]), false).await;

self.send_telemetry().await;

if self.help_all {
Expand Down
Loading