From d92138cb8df0a0e893294f7613dec0070b7262b0 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Mon, 27 Oct 2025 16:42:28 -0700 Subject: [PATCH 01/10] Fix clippy and test failures --- .../src/shell/inline_shell_completion/strategies/inline.zsh | 2 +- ...grations__shell__test__bash_post_bash_login.post.bash.snap | 2 +- ...ations__shell__test__bash_post_bash_profile.post.bash.snap | 2 +- ...integrations__shell__test__bash_post_bashrc.post.bash.snap | 2 +- ...ntegrations__shell__test__bash_post_profile.post.bash.snap | 2 +- ...tegrations__shell__test__bash_pre_bash_login.pre.bash.snap | 2 +- ...grations__shell__test__bash_pre_bash_profile.pre.bash.snap | 2 +- ...g_integrations__shell__test__bash_pre_bashrc.pre.bash.snap | 2 +- ..._integrations__shell__test__bash_pre_profile.pre.bash.snap | 2 +- ...integrations__shell__test__zsh_post_zprofile.post.zsh.snap | 2 +- ...ig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap | 2 +- ...g_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap | 2 +- .../fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap | 2 +- crates/fig_util/src/directories.rs | 4 ++-- crates/zbus/src/connection/socket/mod.rs | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/fig_integrations/src/shell/inline_shell_completion/strategies/inline.zsh b/crates/fig_integrations/src/shell/inline_shell_completion/strategies/inline.zsh index 30e6c0bee..86f2eb027 100644 --- a/crates/fig_integrations/src/shell/inline_shell_completion/strategies/inline.zsh +++ b/crates/fig_integrations/src/shell/inline_shell_completion/strategies/inline.zsh @@ -6,5 +6,5 @@ # _q_autosuggest_strategy_inline_shell_completion() { - typeset -g suggestion="$(command -v q >/dev/null 2>&1 && q _ inline-shell-completion --buffer "${BUFFER}")" + typeset -g suggestion="$(command -v kiro-cli >/dev/null 2>&1 && kiro-cli _ inline-shell-completion --buffer "${BUFFER}")" } diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_login.post.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_login.post.bash.snap index c9878d0c5..c813d76cf 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_login.post.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_login.post.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bash_login)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash post --rcfile bash_login)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap index 5f0277121..b9c6131b8 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bash_profile.post.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bash_profile)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash post --rcfile bash_profile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bashrc.post.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bashrc.post.bash.snap index 474998792..2f5977910 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bashrc.post.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_bashrc.post.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile bashrc)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash post --rcfile bashrc)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_profile.post.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_profile.post.bash.snap index 16b2fd075..fd6cfd061 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_profile.post.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_post_profile.post.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash post --rcfile profile)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash post --rcfile profile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap index 4fbc79d2f..367066d11 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_login.pre.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bash_login)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash pre --rcfile bash_login)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap index fed7f427e..7f27a1c42 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bash_profile.pre.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bash_profile)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash pre --rcfile bash_profile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap index efe03fbc9..9754239c2 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_bashrc.pre.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile bashrc)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash pre --rcfile bashrc)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_profile.pre.bash.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_profile.pre.bash.snap index 7b5f1bf51..08f5687eb 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_profile.pre.bash.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__bash_pre_profile.pre.bash.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -[ -n "$BASH_VERSION" ] && command -v q >/dev/null 2>&1 && eval "$(q init bash pre --rcfile profile)" +[ -n "$BASH_VERSION" ] && command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init bash pre --rcfile profile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap index 186dfb451..c2eadebb0 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zprofile.post.zsh.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -command -v q >/dev/null 2>&1 && eval "$(q init zsh post --rcfile zprofile)" +command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init zsh post --rcfile zprofile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap index 2082c3458..1043eb622 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_post_zshrc.post.zsh.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -command -v q >/dev/null 2>&1 && eval "$(q init zsh post --rcfile zshrc)" +command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init zsh post --rcfile zshrc)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap index 2ebdc12e6..2637bf034 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zprofile.pre.zsh.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -command -v q >/dev/null 2>&1 && eval "$(q init zsh pre --rcfile zprofile)" +command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init zsh pre --rcfile zprofile)" diff --git a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap index a1abd8cef..173d70b5c 100644 --- a/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap +++ b/crates/fig_integrations/src/shell/snapshots/fig_integrations__shell__test__zsh_pre_zshrc.pre.zsh.snap @@ -6,4 +6,4 @@ _Q_LOCAL_BIN="$HOME/.local/bin" [[ ":$PATH:" != *":$_Q_LOCAL_BIN:"* ]] && PATH="${PATH:+"$PATH:"}$_Q_LOCAL_BIN" unset _Q_LOCAL_BIN -command -v q >/dev/null 2>&1 && eval "$(q init zsh pre --rcfile zshrc)" +command -v kiro-cli >/dev/null 2>&1 && eval "$(kiro-cli init zsh pre --rcfile zshrc)" diff --git a/crates/fig_util/src/directories.rs b/crates/fig_util/src/directories.rs index b5b24bd78..31216b864 100644 --- a/crates/fig_util/src/directories.rs +++ b/crates/fig_util/src/directories.rs @@ -699,8 +699,8 @@ mod tests { #[test] fn snapshot_fig_data_dir() { - linux!(fig_data_dir(), @"$HOME/.local/share/kiro-cli"); - macos!(fig_data_dir(), @"$HOME/Library/Application Support/kiro-cli"); + linux!(fig_data_dir(), @"$HOME/.local/share/amazon-q"); + macos!(fig_data_dir(), @"$HOME/Library/Application Support/amazon-q"); windows!(fig_data_dir(), @r"C:\Users\$USER\AppData\Local\AmazonQ"); } diff --git a/crates/zbus/src/connection/socket/mod.rs b/crates/zbus/src/connection/socket/mod.rs index d792418a4..dfca480ef 100644 --- a/crates/zbus/src/connection/socket/mod.rs +++ b/crates/zbus/src/connection/socket/mod.rs @@ -231,7 +231,7 @@ pub trait ReadHalf: std::fmt::Debug + Send + Sync + 'static { /// The default implementation simply panics. Implementers must override either `read_message` /// or this method. async fn recvmsg(&mut self, _buf: &mut [u8]) -> RecvmsgResult { - unimplemented!("`ReadHalf` implementers must either override `read_message` or `recvmsg`"); + panic!("`ReadHalf` implementers must either override `read_message` or `recvmsg`"); } /// Return whether passing file descriptors is supported. @@ -299,7 +299,7 @@ pub trait WriteHalf: std::fmt::Debug + Send + Sync + 'static { /// The default implementation simply panics. Implementers must override either `send_message` /// or this method. async fn sendmsg(&mut self, _buffer: &[u8], #[cfg(unix)] _fds: &[BorrowedFd<'_>]) -> io::Result { - unimplemented!("`WriteHalf` implementers must either override `send_message` or `sendmsg`"); + panic!("`WriteHalf` implementers must either override `send_message` or `sendmsg`"); } /// The dbus daemon on `freebsd` and `dragonfly` currently requires sending the zero byte From eb189fcdb8571878e101047105d4d16ce495e39f Mon Sep 17 00:00:00 2001 From: kkashilk Date: Mon, 27 Oct 2025 16:58:35 -0700 Subject: [PATCH 02/10] Fix chat-binary s3 path and fix windows clippy errors --- build-scripts/build.py | 3 ++- build-scripts/const.py | 1 + crates/chat-cli/src/cli/chat/context.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build-scripts/build.py b/build-scripts/build.py index 6ea12715f..fb628e2be 100644 --- a/build-scripts/build.py +++ b/build-scripts/build.py @@ -53,6 +53,7 @@ PTY_BINARY_NAME, PTY_PACKAGE_NAME, URL_SCHEMA, + CHAT_BINARY_BRANCH, ) BUILD_DIR_RELATIVE = pathlib.Path(os.environ.get("BUILD_DIR") or "build") @@ -208,7 +209,7 @@ def fetch_chat_bin(chat_build_bucket_name: str | None, chat_download_role_arn: s # The path to the download should be: # BUILD_BUCKET/prod/latest/{target}/kiro-cli-chat.zip target = get_target_triple() - chat_bucket_path = f"prod/latest/{target}/{CHAT_BINARY_NAME}.zip" + chat_bucket_path = f"{CHAT_BINARY_BRANCH}/latest/{target}/{CHAT_BINARY_NAME}.zip" chat_dl_dir = BUILD_DIR / "chat_download" chat_dl_dir.mkdir(exist_ok=True) chat_dl_path = chat_dl_dir / f"{CHAT_BINARY_NAME}.zip" diff --git a/build-scripts/const.py b/build-scripts/const.py index bc62e6c1a..d29a3f570 100644 --- a/build-scripts/const.py +++ b/build-scripts/const.py @@ -9,6 +9,7 @@ URL_SCHEMA = "kiro-cli" TAURI_PRODUCT_NAME = "kiro_cli_desktop" LINUX_PACKAGE_NAME = "kiro-cli" +CHAT_BINARY_BRANCH = "qv2" # macos specific MACOS_BUNDLE_ID = "com.amazon.codewhisperer" diff --git a/crates/chat-cli/src/cli/chat/context.rs b/crates/chat-cli/src/cli/chat/context.rs index 9727ed928..4aff145fc 100644 --- a/crates/chat-cli/src/cli/chat/context.rs +++ b/crates/chat-cli/src/cli/chat/context.rs @@ -251,6 +251,7 @@ impl ContextManager { /// /// # Returns /// A Result containing a vector of profile names, with "default" always first + #[cfg_attr(target_os = "windows", allow(dead_code))] pub fn list_profiles_blocking(&self, os: &Os) -> Result> { let _ = self; From c3dc6bed255de960c97a6e8e107ff3101bc60a1f Mon Sep 17 00:00:00 2001 From: kkashilk Date: Mon, 27 Oct 2025 17:15:28 -0700 Subject: [PATCH 03/10] update buildspec to use new build server --- build-config/buildspec-macos_aarch64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-config/buildspec-macos_aarch64.yml b/build-config/buildspec-macos_aarch64.yml index 96b3c6cf9..08b40f6a1 100644 --- a/build-config/buildspec-macos_aarch64.yml +++ b/build-config/buildspec-macos_aarch64.yml @@ -15,7 +15,7 @@ phases: - AWS_ACCOUNT=`aws sts get-caller-identity | jq -r '.Account'` # For now assume there is a suitable EC2 instance running. Obviously, we could add a StepFunction here to # get a new one, but this is a start - - INSTANCE_ID=`aws ec2 describe-instances --filters "Name=tag:Name,Values=FigIoDesktop MacOS aarch64 Build Server 1" "Name=instance-state-name,Values=running" | jq -r '.Reservations[0].Instances[0].InstanceId'` + - INSTANCE_ID=`aws ec2 describe-instances --filters "Name=tag:Name,Values=FigIoDesktop MacOS aarch64 Build Server V2" "Name=instance-state-name,Values=running" | jq -r '.Reservations[0].Instances[0].InstanceId'` - echo "ec2 instance id - $INSTANCE_ID" # The name of the SSM document has to change every time its deployed, so go look for it # We can make this an environment variable passed into CodeBuild. From fff312e3fa5390a8097687bfee542bf24f6d7dab Mon Sep 17 00:00:00 2001 From: kkashilk Date: Mon, 27 Oct 2025 17:44:40 -0700 Subject: [PATCH 04/10] Update build-config manifest --- build-config/buildspec-macos_aarch64.yml | 1 + build-config/signing/app/manifest.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build-config/buildspec-macos_aarch64.yml b/build-config/buildspec-macos_aarch64.yml index 08b40f6a1..7a40b2b26 100644 --- a/build-config/buildspec-macos_aarch64.yml +++ b/build-config/buildspec-macos_aarch64.yml @@ -36,6 +36,7 @@ phases: # TODO(grant): change bucket name to env var - aws s3 cp --recursive s3://fig-io-desktop-build-output-$AWS_ACCOUNT-$AWS_REGION/staging . - aws s3 rm --recursive s3://fig-io-desktop-build-output-$AWS_ACCOUNT-$AWS_REGION/staging + - ls -la artifacts: files: diff --git a/build-config/signing/app/manifest.yaml b/build-config/signing/app/manifest.yaml index bf94c01e5..3299c8e01 100644 --- a/build-config/signing/app/manifest.yaml +++ b/build-config/signing/app/manifest.yaml @@ -1,9 +1,9 @@ type: :app # no need to change this for .pkg, .dmg and executables os: :osx -name: Amazon Q.app +name: Kiro-Cli.app outputs: - label: macos - path: Amazon Q.app + path: Kiro-Cli.app app: :identifier: com.amazon.codewhisperer # this has to be same as Bundle identifier value in info.plist signing_requirements: @@ -12,9 +12,9 @@ app: signing_args: entitlements_path: SIGNING_METADATA/entitlements.plist embedded_requirements: - Contents/MacOS/q: - :identifier: com.amazon.q + Contents/MacOS/kiro-cli: + :identifier: com.amazon.kiro-cli signing_args: - Contents/MacOS/qterm: - :identifier: com.amazon.qterm + Contents/MacOS/kiro-cli-term: + :identifier: com.amazon.kiro-cli-term signing_args: From aed1a385c6dba0604b16055e0e85f34f19deaf94 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Tue, 28 Oct 2025 12:32:47 -0700 Subject: [PATCH 05/10] Fix issues with macOs build server --- build-config/buildspec-macos_aarch64.yml | 1 + build-scripts/build-macos.sh | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-config/buildspec-macos_aarch64.yml b/build-config/buildspec-macos_aarch64.yml index 7a40b2b26..a6cc01038 100644 --- a/build-config/buildspec-macos_aarch64.yml +++ b/build-config/buildspec-macos_aarch64.yml @@ -12,6 +12,7 @@ phases: commands: - export AWS_MAX_ATTEMPTS=10 - echo "path - $PATH" + - echo "user - $(whoami)" - AWS_ACCOUNT=`aws sts get-caller-identity | jq -r '.Account'` # For now assume there is a suitable EC2 instance running. Obviously, we could add a StepFunction here to # get a new one, but this is a start diff --git a/build-scripts/build-macos.sh b/build-scripts/build-macos.sh index 658b3889f..192d80972 100755 --- a/build-scripts/build-macos.sh +++ b/build-scripts/build-macos.sh @@ -50,9 +50,8 @@ done export CARGO_HOME="$PWD/../.cargo" RUSTUP_HOME="$PWD/../.rustup" -# TODO: reenable once mise fixes http issues -# mise install --verbose -# eval "$(mise activate bash --shims)" +mise install --verbose +eval "$(mise activate bash --shims)" # clean up old install rm -rf "$CARGO_HOME" From f2fa1beaf75d01804496cd39305260393ff2610f Mon Sep 17 00:00:00 2001 From: kkashilk Date: Tue, 28 Oct 2025 12:50:22 -0700 Subject: [PATCH 06/10] fix shellcheck test failure --- crates/fig_integrations/src/shell/mod.rs | 2 ++ crates/fig_integrations/src/shell/scripts/bash-preexec.sh | 2 +- .../init__init_snapshot_bash_post_bash_profile.snap | 5 +++-- .../snapshots/init__init_snapshot_bash_post_bashrc.snap | 5 +++-- .../snapshots/init__init_snapshot_bash_pre_bash_profile.snap | 5 +++-- .../tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap | 5 +++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/crates/fig_integrations/src/shell/mod.rs b/crates/fig_integrations/src/shell/mod.rs index 2f1d78957..bf5258421 100644 --- a/crates/fig_integrations/src/shell/mod.rs +++ b/crates/fig_integrations/src/shell/mod.rs @@ -196,6 +196,7 @@ impl ShellExt for Shell { include_str!("scripts/bash-preexec.sh"), "}\n", "__fig_source_bash_preexec\n", + "# shellcheck disable=SC2329\n", "function __bp_adjust_histcontrol() { :; }\n", include_str!("scripts/pre.sh") ) @@ -206,6 +207,7 @@ impl ShellExt for Shell { include_str!("scripts/bash-preexec.sh"), "}\n", "__fig_source_bash_preexec\n", + "# shellcheck disable=SC2329\n", "function __bp_adjust_histcontrol() { :; }\n", include_str!("scripts/post.bash") ) diff --git a/crates/fig_integrations/src/shell/scripts/bash-preexec.sh b/crates/fig_integrations/src/shell/scripts/bash-preexec.sh index f78835c8a..fe92daab2 100644 --- a/crates/fig_integrations/src/shell/scripts/bash-preexec.sh +++ b/crates/fig_integrations/src/shell/scripts/bash-preexec.sh @@ -88,7 +88,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap index 00f094cbf..c75b8a0c7 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bash_profile.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -94,7 +94,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -387,6 +387,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } if [[ -n "${BASH:-}" ]]; then diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap index 00f094cbf..c75b8a0c7 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_post_bashrc.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -94,7 +94,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -387,6 +387,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } if [[ -n "${BASH:-}" ]]; then diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap index ef7e36f89..f22a81479 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bash_profile.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -95,7 +95,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -388,6 +388,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } #!/usr/bin/env bash diff --git a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap index ef7e36f89..f22a81479 100644 --- a/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap +++ b/crates/q_cli/tests/snapshots/init__init_snapshot_bash_pre_bashrc.snap @@ -1,5 +1,5 @@ --- -source: q_cli/tests/init.rs +source: crates/q_cli/tests/init.rs expression: init --- Q_SHELL="/bin/zsh" @@ -95,7 +95,7 @@ __bp_require_not_readonly() { # Remove ignorespace and or replace ignoreboth from HISTCONTROL # so we can accurately invoke preexec with a command from our # history even if it starts with a space. -# shellcheck disable=SC2317 +# shellcheck disable=SC2317,SC2329 __bp_adjust_histcontrol() { local histcontrol histcontrol="${HISTCONTROL:-}" @@ -388,6 +388,7 @@ if [[ -z "${__bp_delay_install:-}" ]]; then fi; } __fig_source_bash_preexec +# shellcheck disable=SC2329 function __bp_adjust_histcontrol() { :; } #!/usr/bin/env bash From b243198ada7da47753e3c72ed99b5c19c73e5d28 Mon Sep 17 00:00:00 2001 From: kkashilk Date: Tue, 28 Oct 2025 15:10:57 -0700 Subject: [PATCH 07/10] Fix linux binary-name to address build failures --- bundle/deb/control | 4 ++-- bundle/deb/control_minimal | 4 ++-- bundle/deb/postrm | 2 +- crates/fig_desktop/src/install.rs | 8 ++++++-- crates/fig_desktop/tauri.conf.json | 2 +- crates/fig_desktop_api/src/requests/install.rs | 8 +++++--- crates/fig_integrations/src/desktop_entry.rs | 4 ++-- crates/fig_util/src/directories.rs | 7 +++++-- 8 files changed, 24 insertions(+), 15 deletions(-) diff --git a/bundle/deb/control b/bundle/deb/control index be3d184ec..da7f9cc53 100644 --- a/bundle/deb/control +++ b/bundle/deb/control @@ -1,8 +1,8 @@ -Package: amazon-q +Package: kiro-cli Description: Amazon Q CLI for Linux Maintainer: Amazon Q CLI Team Homepage: https://github.com/aws/q-cli Version: $VERSION Architecture: $APT_ARCH -Conflicts: amazon-q-minimal +Conflicts: kiro-cli-minimal Depends: libayatana-appindicator3-1, libwebkit2gtk-4.1-0, libgtk-3-0, util-linux diff --git a/bundle/deb/control_minimal b/bundle/deb/control_minimal index 430bef807..ed36aea67 100644 --- a/bundle/deb/control_minimal +++ b/bundle/deb/control_minimal @@ -1,7 +1,7 @@ -Package: amazon-q-minimal +Package: kiro-cli-minimal Description: Amazon Q CLI for Linux Maintainer: Amazon Q CLI Team Homepage: https://github.com/aws/q-cli Version: $VERSION Architecture: $APT_ARCH -Conflicts: amazon-q +Conflicts: kiro-cli diff --git a/bundle/deb/postrm b/bundle/deb/postrm index d9a9c3d09..78d009f22 100644 --- a/bundle/deb/postrm +++ b/bundle/deb/postrm @@ -1,3 +1,3 @@ #!/bin/bash -killall q-desktop || true +killall kiro-cli-desktop || true diff --git a/crates/fig_desktop/src/install.rs b/crates/fig_desktop/src/install.rs index a7dd40d81..da850514d 100644 --- a/crates/fig_desktop/src/install.rs +++ b/crates/fig_desktop/src/install.rs @@ -1134,7 +1134,9 @@ echo "{binary_name} {version}" let entry_path = appimage_desktop_entry_path(&ctx).unwrap(); let icon_path = appimage_desktop_entry_icon_path(&ctx).unwrap(); fs.create_dir_all(&entry_path.parent().unwrap()).await.unwrap(); - fs.write(&entry_path, "[Desktop Entry]\nExec=q-desktop").await.unwrap(); + fs.write(&entry_path, "[Desktop Entry]\nExec=kiro-cli-desktop") + .await + .unwrap(); fs.create_dir_all(icon_path.parent().unwrap()).await.unwrap(); fs.write(&icon_path, "image").await.unwrap(); let state = State::from_slice(&[("appimage.manageDesktopEntry", true.into())]); @@ -1159,7 +1161,9 @@ echo "{binary_name} {version}" let entry_path = appimage_desktop_entry_path(&ctx).unwrap(); let icon_path = appimage_desktop_entry_icon_path(&ctx).unwrap(); fs.create_dir_all(&entry_path.parent().unwrap()).await.unwrap(); - fs.write(&entry_path, "[Desktop Entry]\nExec=q-desktop").await.unwrap(); + fs.write(&entry_path, "[Desktop Entry]\nExec=kiro-cli-desktop") + .await + .unwrap(); fs.create_dir_all(icon_path.parent().unwrap()).await.unwrap(); fs.write(&icon_path, "image").await.unwrap(); let state = State::new_fake(); diff --git a/crates/fig_desktop/tauri.conf.json b/crates/fig_desktop/tauri.conf.json index a1be7debb..ddb1db558 100644 --- a/crates/fig_desktop/tauri.conf.json +++ b/crates/fig_desktop/tauri.conf.json @@ -3,7 +3,7 @@ "distDir": [] }, "package": { - "productName": "q_desktop" + "productName": "kiro_cli_desktop" }, "tauri": { "bundle": { diff --git a/crates/fig_desktop_api/src/requests/install.rs b/crates/fig_desktop_api/src/requests/install.rs index 0e564ac04..af2022ea4 100644 --- a/crates/fig_desktop_api/src/requests/install.rs +++ b/crates/fig_desktop_api/src/requests/install.rs @@ -228,12 +228,12 @@ where .env() .current_dir() .map_err(super::Error::from_std)? - .join("share/applications/q-desktop.desktop"); + .join("share/applications/kiro-cli-desktop.desktop"); let icon_path = ctx .env() .current_dir() .map_err(super::Error::from_std)? - .join("share/icons/hicolor/128x128/apps/q-desktop.png"); + .join("share/icons/hicolor/128x128/apps/kiro-cli-desktop.png"); let desktop_integration = DesktopEntryIntegration::new(ctx, Some(entry_path), Some(icon_path), Some(exec_path.into())); match action { @@ -409,7 +409,9 @@ mod tests { let entry_path = appimage_desktop_entry_path(&ctx).unwrap(); let icon_path = appimage_desktop_entry_icon_path(&ctx).unwrap(); fs.create_dir_all(entry_path.parent().unwrap()).await.unwrap(); - fs.write(&entry_path, "[Desktop Entry]\nExec=q-desktop").await.unwrap(); + fs.write(&entry_path, "[Desktop Entry]\nExec=kiro-cli-desktop") + .await + .unwrap(); fs.create_dir_all(icon_path.parent().unwrap()).await.unwrap(); fs.write(&icon_path, "image").await.unwrap(); let ctx = TestContext { diff --git a/crates/fig_integrations/src/desktop_entry.rs b/crates/fig_integrations/src/desktop_entry.rs index 6d91d6cb1..a7a6495df 100644 --- a/crates/fig_integrations/src/desktop_entry.rs +++ b/crates/fig_integrations/src/desktop_entry.rs @@ -393,8 +393,8 @@ mod tests { const TEST_DESKTOP_ENTRY: &str = r#"[Desktop Entry] Categories=Development; -Exec=q-desktop -Icon=q-desktop +Exec=kiro-cli-desktop +Icon=kiro-cli-desktop Name=q_desktop Terminal=false Type=Application"#; diff --git a/crates/fig_util/src/directories.rs b/crates/fig_util/src/directories.rs index 31216b864..f9a70b827 100644 --- a/crates/fig_util/src/directories.rs +++ b/crates/fig_util/src/directories.rs @@ -520,7 +520,10 @@ pub fn appimage_desktop_entry_path(ctx: &Ctx) -> Result(ctx: &Ctx) -> Result

Date: Tue, 28 Oct 2025 16:43:26 -0700 Subject: [PATCH 08/10] Update installation script for kiro-cli --- bundle/linux/install.sh | 4 ++-- scripts/install.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bundle/linux/install.sh b/bundle/linux/install.sh index 86ee530c1..df27489fc 100755 --- a/bundle/linux/install.sh +++ b/bundle/linux/install.sh @@ -143,7 +143,7 @@ if [ -n "${Q_INSTALL_GLOBAL:-}" ]; then install -m 755 "$SCRIPT_DIR/bin/$CHAT_BINARY_NAME" /usr/local/bin/ install -m 755 "$SCRIPT_DIR/bin/$PTY_BINARY_NAME" /usr/local/bin/ - if [ -z "${Q_SKIP_SETUP:-}" ]; then + if [ -z "${KIRO_CLI_SKIP_SETUP:-}" ]; then /usr/local/bin/q integrations install dotfiles /usr/local/bin/q setup --global "$@" fi @@ -154,7 +154,7 @@ else install -m 755 "$SCRIPT_DIR/bin/$CHAT_BINARY_NAME" "$HOME/.local/bin/" install -m 755 "$SCRIPT_DIR/bin/$PTY_BINARY_NAME" "$HOME/.local/bin/" - if [ -z "${Q_SKIP_SETUP:-}" ]; then + if [ -z "${KIRO_CLI_SKIP_SETUP:-}" ]; then "$HOME/.local/bin/q" setup "$@" fi fi diff --git a/scripts/install.sh b/scripts/install.sh index f05b33f4b..d5f51c463 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -3,17 +3,17 @@ set -eu # ============================================================================= -# Q CLI Installation Script +# Kiro CLI Installation Script # ============================================================================= # Configuration -BINARY_NAME="q" -CLI_NAME="Q CLI" -COMMAND_NAME="q" +BINARY_NAME="kiro-cli" +CLI_NAME="Kiro-Cli" +COMMAND_NAME="kiro-cli" BASE_URL="https://desktop-release.q.us-east-1.amazonaws.com" MANIFEST_URL="${BASE_URL}/latest/manifest.json" -MACOS_FILENAME="Amazon Q.dmg" -MACOS_FILENAME_ESCAPED="Amazon%20Q.dmg" +MACOS_FILENAME="Kiro-Cli.dmg" +MACOS_FILENAME_ESCAPED="Kiro-Cli.dmg" # Installation directories MACOS_APP_DIR="/Applications" @@ -360,7 +360,7 @@ install_macos() { mkdir -p "$HOME/.local/bin" local macos_bin="$MACOS_APP_DIR/$app_name/Contents/MacOS" - "$macos_bin/q_desktop" --no-dashboard > /dev/null 2>&1 & + "$macos_bin/kiro_cli_desktop" --no-dashboard > /dev/null 2>&1 & } # Install on Linux @@ -383,7 +383,7 @@ install_linux() { log "Running installer..." chmod +x "$install_script" - Q_SKIP_SETUP=1 "$install_script" + KIRO_CLI_SKIP_SETUP=1 "$install_script" } # Cleanup function - only removes files/dirs we created From aba9467df67d068d608d0c8c38c58aff0c9bc736 Mon Sep 17 00:00:00 2001 From: YIFAN LIU Date: Wed, 29 Oct 2025 10:12:37 -0700 Subject: [PATCH 09/10] restrict profilie --- crates/chat-cli/src/auth/builder_id.rs | 7 ++----- crates/chat-cli/src/cli/user.rs | 7 +++---- crates/q_cli/src/cli/user.rs | 15 ++++++++++----- .../src/pages/settings/preferences.tsx | 6 +++++- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/crates/chat-cli/src/auth/builder_id.rs b/crates/chat-cli/src/auth/builder_id.rs index 101ad19ec..658e708d9 100644 --- a/crates/chat-cli/src/auth/builder_id.rs +++ b/crates/chat-cli/src/auth/builder_id.rs @@ -41,10 +41,7 @@ use aws_smithy_runtime_api::client::identity::{ }; use aws_smithy_types::error::display::DisplayErrorContext; use aws_types::region::Region; -use eyre::{ - Result, - eyre, -}; +use eyre::Result; use time::OffsetDateTime; use tracing::{ debug, @@ -606,7 +603,7 @@ pub async fn is_idc_user(database: &Database) -> Result { if let Ok(Some(token)) = BuilderIdToken::load(database).await { Ok(token.token_type() == TokenType::IamIdentityCenter) } else { - Err(eyre!("No auth token found - is the user signed in?")) + Ok(false) } } diff --git a/crates/chat-cli/src/cli/user.rs b/crates/chat-cli/src/cli/user.rs index 3cc3629c3..1f3898277 100644 --- a/crates/chat-cli/src/cli/user.rs +++ b/crates/chat-cli/src/cli/user.rs @@ -33,6 +33,7 @@ use crate::auth::builder_id::{ BuilderIdToken, PollCreateToken, TokenType, + is_idc_user, poll_create_token, start_device_authorization, }; @@ -338,10 +339,8 @@ pub enum LicenseType { } pub async fn profile(os: &mut Os) -> Result { - if let Ok(Some(token)) = BuilderIdToken::load(&os.database).await { - if matches!(token.token_type(), TokenType::BuilderId) { - bail!("This command is only available for Pro users"); - } + if !is_idc_user(&os.database).await? { + bail!("This command is only available for IAM Identity Center users"); } select_profile_interactive(os, false).await?; diff --git a/crates/q_cli/src/cli/user.rs b/crates/q_cli/src/cli/user.rs index 70e56a22e..c93a7a254 100644 --- a/crates/q_cli/src/cli/user.rs +++ b/crates/q_cli/src/cli/user.rs @@ -229,13 +229,18 @@ impl RootUserSubcommand { Self::Profile => { assert_logged_in().await?; - if let Ok(Some(token)) = fig_auth::builder_id_token().await { - if matches!(token.token_type(), TokenType::IamIdentityCenter) { - select_profile_interactive(false).await?; - } + let is_idc = fig_auth::builder_id_token() + .await + .ok() + .flatten() + .is_some_and(|token| matches!(token.token_type(), TokenType::IamIdentityCenter)); + + if !is_idc { + bail!("This command is only available for IAM Identity Center users"); } - bail!("This command is only available for IAM Identity Center users"); + select_profile_interactive(false).await?; + Ok(ExitCode::SUCCESS) }, } } diff --git a/packages/dashboard-app/src/pages/settings/preferences.tsx b/packages/dashboard-app/src/pages/settings/preferences.tsx index c946ea5cb..7f43da03b 100644 --- a/packages/dashboard-app/src/pages/settings/preferences.tsx +++ b/packages/dashboard-app/src/pages/settings/preferences.tsx @@ -23,6 +23,10 @@ export default function Page() { const [profiles, setProfiles] = useState(undefined); useEffect(() => { + if (auth.authKind !== "IamIdentityCenter") { + return; + } + Profile.listAvailableProfiles() .then(async (res) => { setProfiles( @@ -35,7 +39,7 @@ export default function Page() { .catch((err) => { console.error(err); }); - }, []); + }, [auth.authKind]); useEffect(() => { State.get("api.codewhisperer.profile").then((profile) => { From 9bcabaa1ebb87256901a8e428c841d078fc074fe Mon Sep 17 00:00:00 2001 From: YIFAN LIU Date: Wed, 29 Oct 2025 13:59:55 -0700 Subject: [PATCH 10/10] change return type --- crates/chat-cli/src/auth/builder_id.rs | 8 ++++---- crates/chat-cli/src/cli/chat/cli/subscribe.rs | 5 +---- crates/chat-cli/src/cli/chat/mod.rs | 2 +- crates/chat-cli/src/cli/user.rs | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/crates/chat-cli/src/auth/builder_id.rs b/crates/chat-cli/src/auth/builder_id.rs index 658e708d9..61e1bfd23 100644 --- a/crates/chat-cli/src/auth/builder_id.rs +++ b/crates/chat-cli/src/auth/builder_id.rs @@ -596,14 +596,14 @@ impl ResolveIdentity for BearerResolver { } } -pub async fn is_idc_user(database: &Database) -> Result { +pub async fn is_idc_user(database: &Database) -> bool { if cfg!(test) { - return Ok(false); + return false; } if let Ok(Some(token)) = BuilderIdToken::load(database).await { - Ok(token.token_type() == TokenType::IamIdentityCenter) + token.token_type() == TokenType::IamIdentityCenter } else { - Ok(false) + false } } diff --git a/crates/chat-cli/src/cli/chat/cli/subscribe.rs b/crates/chat-cli/src/cli/chat/cli/subscribe.rs index c92090874..abfbf9619 100644 --- a/crates/chat-cli/src/cli/chat/cli/subscribe.rs +++ b/crates/chat-cli/src/cli/chat/cli/subscribe.rs @@ -37,10 +37,7 @@ pub struct SubscribeArgs { impl SubscribeArgs { pub async fn execute(self, os: &mut Os, session: &mut ChatSession) -> Result { - if is_idc_user(&os.database) - .await - .map_err(|e| ChatError::Custom(e.to_string().into()))? - { + if is_idc_user(&os.database).await { execute!( session.stderr, style::SetForegroundColor(Color::Yellow), diff --git a/crates/chat-cli/src/cli/chat/mod.rs b/crates/chat-cli/src/cli/chat/mod.rs index 76609e3c9..b975c7f62 100644 --- a/crates/chat-cli/src/cli/chat/mod.rs +++ b/crates/chat-cli/src/cli/chat/mod.rs @@ -2378,7 +2378,7 @@ enum ActualSubscriptionStatus { // // Also, it is currently not possible to subscribe or re-subscribe via console, only IDE/CLI. async fn get_subscription_status(os: &mut Os) -> Result { - if is_idc_user(&os.database).await? { + if is_idc_user(&os.database).await { return Ok(ActualSubscriptionStatus::Active); } diff --git a/crates/chat-cli/src/cli/user.rs b/crates/chat-cli/src/cli/user.rs index 1f3898277..83eee422f 100644 --- a/crates/chat-cli/src/cli/user.rs +++ b/crates/chat-cli/src/cli/user.rs @@ -339,7 +339,7 @@ pub enum LicenseType { } pub async fn profile(os: &mut Os) -> Result { - if !is_idc_user(&os.database).await? { + if !is_idc_user(&os.database).await { bail!("This command is only available for IAM Identity Center users"); }