Skip to content

Commit d8d5868

Browse files
committed
Revert "Add migration flow for desktop app (#909)"
This reverts commit 11a2953.
1 parent 11a2953 commit d8d5868

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

crates/fig_util/src/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ pub const RUNTIME_DIR_NAME: &str = "cwrun";
2727

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

3434
/// Backup directory name
3535
pub const BACKUP_DIR_NAME: &str = ".amazon-q.dotfiles.bak";

crates/fig_util/src/directories.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ pub fn config_dir() -> Result<PathBuf> {
133133
/// This should be removed at some point in the future, once all our users have migrated
134134
/// - MacOS: `$HOME/Library/Application Support/codewhisperer`
135135
pub fn old_fig_data_dir() -> Result<PathBuf> {
136-
Ok(dirs::data_local_dir().ok_or(DirectoryError::NoHomeDirectory)?.join("q"))
136+
Ok(dirs::data_local_dir()
137+
.ok_or(DirectoryError::NoHomeDirectory)?
138+
.join("codewhisperer"))
137139
}
138140

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

447449
/// The path to the fig settings file
448450
///
449-
/// - Linux: `$HOME/.aws/kiro-cli/settings.json`
450-
/// - MacOS: `$HOME/.aws/kiro-cli/settings.json`
451-
/// - Windows: `$HOME/.aws/kiro-cli/settings.json`
451+
/// - Linux: `$HOME/.local/share/{data_dir}/settings.json`
452+
/// - MacOS: `$HOME/Library/Application Support/{data_dir}/settings.json`
453+
/// - Windows: `%LOCALAPPDATA%\{data_dir}\settings.json`
452454
pub fn settings_path() -> Result<PathBuf> {
453-
Ok(home_dir()?.join(".aws").join("kiro-cli").join("settings.json"))
455+
Ok(fig_data_dir()?.join("settings.json"))
454456
}
455457

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

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

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

crates/q_cli/src/cli/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,6 @@ impl Cli {
340340

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

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

348345
if self.help_all {

0 commit comments

Comments
 (0)