Skip to content

Commit 661565c

Browse files
committed
Revert "feat: rebrand environment variables from Q_/AMAZON_Q_ to KIRO_"
This reverts commit 49cbe8e.
1 parent 2e59cd2 commit 661565c

File tree

11 files changed

+33
-33
lines changed

11 files changed

+33
-33
lines changed

crates/chat-cli/src/api_client/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl ApiClient {
139139
model_cache: Arc::new(RwLock::new(None)),
140140
};
141141

142-
if let Ok(json) = env.get("KIRO_MOCK_CHAT_RESPONSE") {
142+
if let Ok(json) = env.get("Q_MOCK_CHAT_RESPONSE") {
143143
this.set_mock_output(serde_json::from_str(fs.read_to_string(json).await.unwrap().as_str()).unwrap());
144144
}
145145

crates/chat-cli/src/cli/chat/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3026,7 +3026,7 @@ impl ChatSession {
30263026
}
30273027

30283028
// Display continuation ID if available and debug mode is enabled
3029-
if std::env::var_os("KIRO_SHOW_CONTINUATION_IDS").is_some() {
3029+
if std::env::var_os("Q_SHOW_CONTINUATION_IDS").is_some() {
30303030
queue!(
30313031
self.stdout,
30323032
style::Print(format!("({})\n", self.conversation.current_continuation_id())),

crates/chat-cli/src/cli/chat/tool_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ fn queue_failure_message(
19811981
style::Print(fail_load_msg),
19821982
style::Print("\n"),
19831983
style::Print(format!(
1984-
" - run with KIRO_LOG_LEVEL=trace and see $TMPDIR/qlog/{CHAT_BINARY_NAME}.log for detail\n"
1984+
" - run with Q_LOG_LEVEL=trace and see $TMPDIR/qlog/{CHAT_BINARY_NAME}.log for detail\n"
19851985
)),
19861986
StyledText::reset(),
19871987
)?)

crates/chat-cli/src/cli/chat/tools/execute/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub async fn run_command<W: Write>(
3030
max_result_size: usize,
3131
mut updates: Option<W>,
3232
) -> Result<CommandResult> {
33-
let shell = std::env::var("KIRO_CHAT_SHELL").unwrap_or("bash".to_string());
33+
let shell = std::env::var("AMAZON_Q_CHAT_SHELL").unwrap_or("bash".to_string());
3434

3535
// Set up environment variables with user agent metadata for CloudTrail tracking
3636
let env_vars = env_vars_with_user_agent(os);

crates/chat-cli/src/cli/chat/tools/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ fn format_path(cwd: impl AsRef<Path>, path: impl AsRef<Path>) -> String {
459459

460460
fn supports_truecolor(os: &Os) -> bool {
461461
// Simple override to disable truecolor since shell_color doesn't use Context.
462-
!os.env.get("KIRO_DISABLE_TRUECOLOR").is_ok_and(|s| !s.is_empty())
462+
!os.env.get("Q_DISABLE_TRUECOLOR").is_ok_and(|s| !s.is_empty())
463463
&& shell_color::get_color_support().contains(shell_color::ColorSupport::TERM24BIT)
464464
}
465465

crates/chat-cli/src/cli/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl Cli {
238238
),
239239
false => None,
240240
},
241-
log_to_stdout: std::env::var_os("KIRO_LOG_STDOUT").is_some() || self.verbose > 0,
241+
log_to_stdout: std::env::var_os("Q_LOG_STDOUT").is_some() || self.verbose > 0,
242242
log_file_path: match subcommand {
243243
RootSubcommand::Chat { .. } => Some(logs_dir().expect("home dir must be set").join("qchat.log")),
244244
_ => None,

crates/chat-cli/src/logging.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tracing_subscriber::{
1414
fmt,
1515
};
1616

17-
use crate::util::env_var::KIRO_LOG_LEVEL;
17+
use crate::util::env_var::Q_LOG_LEVEL;
1818

1919
const MAX_FILE_SIZE: u64 = 10 * 1024 * 1024;
2020
const DEFAULT_FILTER: LevelFilter = LevelFilter::ERROR;
@@ -196,7 +196,7 @@ pub fn get_log_level() -> String {
196196
.lock()
197197
.unwrap()
198198
.clone()
199-
.unwrap_or_else(|| std::env::var(KIRO_LOG_LEVEL).unwrap_or_else(|_| DEFAULT_FILTER.to_string()))
199+
.unwrap_or_else(|| std::env::var(Q_LOG_LEVEL).unwrap_or_else(|_| DEFAULT_FILTER.to_string()))
200200
}
201201

202202
/// Set the log level to the given level.
@@ -247,7 +247,7 @@ fn create_filter_layer() -> EnvFilter {
247247
.lock()
248248
.unwrap()
249249
.clone()
250-
.or_else(|| std::env::var(KIRO_LOG_LEVEL).ok());
250+
.or_else(|| std::env::var(Q_LOG_LEVEL).ok());
251251

252252
match log_level {
253253
Some(level) => EnvFilter::builder()

crates/chat-cli/src/os/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ impl Env {
152152
}
153153

154154
pub fn in_codespaces(&self) -> bool {
155-
self.get_os("CODESPACES").is_some() || self.get_os("KIRO_CODESPACES").is_some()
155+
self.get_os("CODESPACES").is_some() || self.get_os("Q_CODESPACES").is_some()
156156
}
157157

158158
pub fn in_ci(&self) -> bool {
159-
self.get_os("CI").is_some() || self.get_os("KIRO_CI").is_some()
159+
self.get_os("CI").is_some() || self.get_os("Q_CI").is_some()
160160
}
161161

162162
/// Whether or not the current executable is run from an AppImage.

crates/chat-cli/src/telemetry/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub use crate::telemetry::core::{
7474
QProfileSwitchIntent,
7575
TelemetryResult,
7676
};
77-
use crate::util::env_var::KIRO_CLI_CLIENT_APPLICATION;
77+
use crate::util::env_var::Q_CLI_CLIENT_APPLICATION;
7878
use crate::util::system_info::os_version;
7979

8080
#[derive(thiserror::Error, Debug)]
@@ -113,7 +113,7 @@ impl From<ApiClientError> for TelemetryError {
113113

114114
const PRODUCT: &str = "CodeWhisperer";
115115
const PRODUCT_VERSION: &str = env!("CARGO_PKG_VERSION");
116-
const CLIENT_ID_ENV_VAR: &str = "KIRO_TELEMETRY_CLIENT_ID";
116+
const CLIENT_ID_ENV_VAR: &str = "Q_TELEMETRY_CLIENT_ID";
117117

118118
/// A IDE toolkit telemetry stage
119119
#[derive(Debug, Clone)]
@@ -484,7 +484,7 @@ async fn set_event_metadata(database: &Database, event: &mut Event) {
484484
}
485485

486486
// Set the client application from environment variable
487-
if let Ok(client_app) = std::env::var(KIRO_CLI_CLIENT_APPLICATION) {
487+
if let Ok(client_app) = std::env::var(Q_CLI_CLIENT_APPLICATION) {
488488
event.set_client_application(client_app);
489489
}
490490
}
@@ -500,7 +500,7 @@ struct TelemetryClient {
500500
impl TelemetryClient {
501501
async fn new(env: &Env, fs: &Fs, database: &mut Database) -> Result<Self, TelemetryError> {
502502
let telemetry_enabled = !cfg!(test)
503-
&& env.get_os("KIRO_DISABLE_TELEMETRY").is_none()
503+
&& env.get_os("Q_DISABLE_TELEMETRY").is_none()
504504
&& database.settings.get_bool(Setting::TelemetryEnabled).unwrap_or(true);
505505

506506
// If telemetry is disabled we do not emit using toolkit_telemetry

crates/chat-cli/src/util/consts.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,43 @@ pub mod env_var {
3434
QTERM_SESSION_ID = "QTERM_SESSION_ID",
3535

3636
/// The current parent socket to connect to
37-
KIRO_PARENT = "KIRO_PARENT",
37+
Q_PARENT = "Q_PARENT",
3838

39-
/// Set the [`KIRO_PARENT`] parent socket to connect to
40-
KIRO_SET_PARENT = "KIRO_SET_PARENT",
39+
/// Set the [`Q_PARENT`] parent socket to connect to
40+
Q_SET_PARENT = "Q_SET_PARENT",
4141

42-
/// Guard for the [`KIRO_SET_PARENT`] check
43-
KIRO_SET_PARENT_CHECK = "KIRO_SET_PARENT_CHECK",
42+
/// Guard for the [`Q_SET_PARENT`] check
43+
Q_SET_PARENT_CHECK = "Q_SET_PARENT_CHECK",
4444

4545
/// Set if qterm is running, contains the version
46-
KIRO_TERM = "KIRO_TERM",
46+
Q_TERM = "Q_TERM",
4747

4848
/// Sets the current log level
49-
KIRO_LOG_LEVEL = "KIRO_LOG_LEVEL",
49+
Q_LOG_LEVEL = "Q_LOG_LEVEL",
5050

5151
/// Overrides the ZDOTDIR environment variable
52-
KIRO_ZDOTDIR = "KIRO_ZDOTDIR",
52+
Q_ZDOTDIR = "Q_ZDOTDIR",
5353

5454
/// Indicates a process was launched by Kiro
55-
PROCESS_LAUNCHED_BY_KIRO = "PROCESS_LAUNCHED_BY_KIRO",
55+
PROCESS_LAUNCHED_BY_Q = "PROCESS_LAUNCHED_BY_Q",
5656

5757
/// The shell to use in qterm
58-
KIRO_SHELL = "KIRO_SHELL",
58+
Q_SHELL = "Q_SHELL",
5959

6060
/// Indicates the user is debugging the shell
61-
KIRO_DEBUG_SHELL = "KIRO_DEBUG_SHELL",
61+
Q_DEBUG_SHELL = "Q_DEBUG_SHELL",
6262

6363
/// Indicates the user is using zsh autosuggestions which disables Inline
64-
KIRO_USING_ZSH_AUTOSUGGESTIONS = "KIRO_USING_ZSH_AUTOSUGGESTIONS",
64+
Q_USING_ZSH_AUTOSUGGESTIONS = "Q_USING_ZSH_AUTOSUGGESTIONS",
6565

6666
/// Overrides the path to the bundle metadata released with certain desktop builds.
67-
KIRO_BUNDLE_METADATA_PATH = "KIRO_BUNDLE_METADATA_PATH",
67+
Q_BUNDLE_METADATA_PATH = "Q_BUNDLE_METADATA_PATH",
6868

6969
/// Identifier for the client application or service using the chat-cli
70-
KIRO_CLI_CLIENT_APPLICATION = "KIRO_CLI_CLIENT_APPLICATION",
70+
Q_CLI_CLIENT_APPLICATION = "Q_CLI_CLIENT_APPLICATION",
7171

7272
/// Shows continuation IDs in chat output for debugging/development
73-
KIRO_SHOW_CONTINUATION_IDS = "KIRO_SHOW_CONTINUATION_IDS"
73+
Q_SHOW_CONTINUATION_IDS = "Q_SHOW_CONTINUATION_IDS"
7474
}
7575
}
7676

0 commit comments

Comments
 (0)