Skip to content

Commit 0efe4b3

Browse files
committed
small fixes
1 parent 51ea250 commit 0efe4b3

File tree

4 files changed

+37
-26
lines changed

4 files changed

+37
-26
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use crate::cli::experiment::experiment_manager::{
2626
ExperimentManager,
2727
ExperimentName,
2828
};
29+
use crate::constants::CLI_NAME;
2930
use crate::os::Os;
3031
use crate::theme::StyledText;
3132
use crate::util::directories::get_shadow_repo_dir;
@@ -91,9 +92,9 @@ impl CheckpointSubcommand {
9192
execute!(
9293
session.stderr,
9394
StyledText::error_fg(),
94-
style::Print(
95-
"\nCheckpoint is disabled. Enable it with: kiro-cli settings chat.enableCheckpoint true\n"
96-
),
95+
style::Print(&format!(
96+
"\nCheckpoint is disabled. Enable it with: {CLI_NAME} settings chat.enableCheckpoint true\n"
97+
)),
9798
StyledText::reset(),
9899
)?;
99100
return Ok(ChatState::PromptUser {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::cli::chat::{
2121
};
2222
use crate::constants::context_text;
2323
use crate::constants::help_text::{
24-
CONTEXT_DESCRIPTION,
24+
context_description,
2525
context_long_help,
2626
};
2727
use crate::os::Os;
@@ -30,7 +30,7 @@ use crate::theme::StyledText;
3030
#[deny(missing_docs)]
3131
#[derive(Debug, PartialEq, Subcommand)]
3232
#[command(
33-
about = CONTEXT_DESCRIPTION,
33+
about = context_description(),
3434
before_long_help = context_long_help()
3535
)]
3636
/// Context subcommands

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::cli::experiment::experiment_manager::{
1616
ExperimentManager,
1717
ExperimentName,
1818
};
19+
use crate::constants::CLI_NAME;
1920
use crate::os::Os;
2021
use crate::theme::StyledText;
2122

@@ -53,9 +54,9 @@ impl TangentArgs {
5354
execute!(
5455
session.stderr,
5556
StyledText::error_fg(),
56-
style::Print(
57-
"\nTangent mode is disabled. Enable it with: kiro-cli settings chat.enableTangentMode true\n"
58-
),
57+
style::Print(&format!(
58+
"\nTangent mode is disabled. Enable it with: {CLI_NAME} settings chat.enableTangentMode true\n"
59+
)),
5960
StyledText::reset(),
6061
)?;
6162
return Ok(ChatState::PromptUser {

crates/chat-cli/src/constants.rs

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,21 @@ pub mod error_messages {
2424
pub mod ui_text {
2525
use super::{
2626
CLI_NAME,
27+
PRODUCT_NAME,
2728
StyledText,
2829
};
2930

3031
/// Welcome text for small screens
3132
pub fn small_screen_welcome() -> String {
32-
format!("Welcome to {}!", StyledText::brand("Kiro"))
33+
format!("Welcome to {}!", StyledText::brand(PRODUCT_NAME))
3334
}
3435

3536
/// Changelog header text
3637
pub fn changelog_header() -> String {
37-
format!("{}\n\n", StyledText::primary("✨ What's New in Kiro CLI"))
38+
format!(
39+
"{}\n\n",
40+
StyledText::primary(&format!("✨ What's New in {PRODUCT_NAME} CLI"))
41+
)
3842
}
3943

4044
/// Trust all tools warning text
@@ -43,9 +47,9 @@ pub mod ui_text {
4347

4448
warning.push_str(&StyledText::success("All tools are now trusted ("));
4549
warning.push_str(&StyledText::error("!"));
46-
warning.push_str(&StyledText::success(
47-
"). Kiro will execute tools without asking for confirmation.",
48-
));
50+
warning.push_str(&StyledText::success(&format!(
51+
"). {PRODUCT_NAME} will execute tools without asking for confirmation.",
52+
)));
4953
warning.push_str("\nAgents can sometimes do unexpected things so understand the risks.");
5054
warning.push_str("\n\nLearn more at https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-chat-security.html#command-line-chat-trustall-safety");
5155

@@ -69,9 +73,9 @@ pub mod ui_text {
6973

7074
// MCP section
7175
help.push('\n');
72-
help.push_str(&StyledText::primary(
73-
"💡 Did you know, You can now configure Kiro to use MCP servers. Learn how at https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html",
74-
));
76+
help.push_str(&StyledText::primary(&format!(
77+
"💡 Did you know, You can now configure {PRODUCT_NAME} to use MCP servers. Learn how at https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html",
78+
)));
7579

7680
// Shortcuts section
7781
help.push_str("\n\n");
@@ -208,21 +212,25 @@ pub mod context_text {
208212

209213
/// Help text constants for CLI commands
210214
pub mod help_text {
215+
use super::PRODUCT_NAME;
216+
211217
/// Context command description
212-
pub const CONTEXT_DESCRIPTION: &str = "Subcommands for managing context rules and files in Kiro chat sessions";
218+
pub fn context_description() -> String {
219+
format!("Subcommands for managing context rules and files in {PRODUCT_NAME} chat sessions")
220+
}
213221

214222
/// Full context command long help text
215223
pub fn context_long_help() -> String {
216-
format!("Context rules determine which files are included in your {} session.
224+
format!("Context rules determine which files are included in your {PRODUCT_NAME} session.
217225
They are derived from the current active agent.
218-
The files matched by these rules provide {} with additional information
219-
about your project or environment. Adding relevant files helps Kiro generate
226+
The files matched by these rules provide {PRODUCT_NAME} with additional information
227+
about your project or environment. Adding relevant files helps {PRODUCT_NAME} generate
220228
more accurate and helpful responses.
221229
222230
Notes:
223231
• You can add specific files or use glob patterns (e.g., \"*.py\", \"src/**/*.js\")
224232
• Agent rules apply only to the current agent
225-
• Context changes are NOT preserved between chat sessions. To make these changes permanent, edit the agent config file.", super::PRODUCT_NAME, super::PRODUCT_NAME)
233+
• Context changes are NOT preserved between chat sessions. To make these changes permanent, edit the agent config file.")
226234
}
227235

228236
/// Full tools command long help text
@@ -251,6 +259,7 @@ Notes:
251259
pub mod tips {
252260
use super::{
253261
CLI_NAME,
262+
PRODUCT_NAME,
254263
StyledText,
255264
};
256265

@@ -262,7 +271,7 @@ pub mod tips {
262271
StyledText::command(&format!("{CLI_NAME} chat --resume"))
263272
),
264273
format!(
265-
"Get notified whenever Kiro CLI finishes responding. Just run {}",
274+
"Get notified whenever {PRODUCT_NAME} CLI finishes responding. Just run {}",
266275
StyledText::command(&format!("{CLI_NAME} settings chat.enableNotifications true"))
267276
),
268277
format!(
@@ -274,15 +283,15 @@ pub mod tips {
274283
StyledText::command("/usage")
275284
),
276285
format!(
277-
"Get notified whenever Kiro CLI finishes responding. Just run {}",
286+
"Get notified whenever {PRODUCT_NAME} CLI finishes responding. Just run {}",
278287
StyledText::command(&format!("{CLI_NAME} settings chat.enableNotifications true"))
279288
),
280289
format!(
281290
"You can execute bash commands by typing {} followed by the command",
282291
StyledText::command("!")
283292
),
284293
format!(
285-
"Kiro can use tools without asking for confirmation every time. Give {} a try",
294+
"{PRODUCT_NAME} can use tools without asking for confirmation every time. Give {} a try",
286295
StyledText::command("/tools trust")
287296
),
288297
format!(
@@ -294,7 +303,7 @@ pub mod tips {
294303
StyledText::command("/compact")
295304
),
296305
format!(
297-
"If you want to file an issue to the Kiro CLI team, just tell me, or run {}",
306+
"If you want to file an issue to the {PRODUCT_NAME} CLI team, just tell me, or run {}",
298307
StyledText::command(&format!("{CLI_NAME} issue"))
299308
),
300309
format!(
@@ -333,7 +342,7 @@ pub mod tips {
333342
StyledText::command("\"Can you save conversations?\"")
334343
),
335344
format!(
336-
"Stay up to date with the latest features and improvements! Use {} to see what's new in Kiro CLI",
345+
"Stay up to date with the latest features and improvements! Use {} to see what's new in {PRODUCT_NAME} CLI",
337346
StyledText::command("/changelog")
338347
),
339348
format!(

0 commit comments

Comments
 (0)