Skip to content

Commit ffb0c50

Browse files
committed
ux changes
1 parent 665e97e commit ffb0c50

File tree

15 files changed

+221
-108
lines changed

15 files changed

+221
-108
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ impl CheckpointSubcommand {
9191
execute!(
9292
session.stderr,
9393
StyledText::error_fg(),
94-
style::Print("\nCheckpoint is disabled. Enable it with: kiro-cli settings chat.enableCheckpoint true\n"),
94+
style::Print(
95+
"\nCheckpoint is disabled. Enable it with: kiro-cli settings chat.enableCheckpoint true\n"
96+
),
9597
StyledText::reset(),
9698
)?;
9799
return Ok(ChatState::PromptUser {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::cli::chat::{
1919
ChatSession,
2020
ChatState,
2121
};
22+
use crate::constants::context_text;
2223
use crate::constants::help_text::{
2324
CONTEXT_DESCRIPTION,
2425
context_long_help,
@@ -238,7 +239,8 @@ impl ContextSubcommand {
238239
session.stderr,
239240
StyledText::warning_fg(),
240241
style::Print(format!(
241-
"Total token count exceeds limit: {context_files_max_size}. The following files will be automatically dropped when interacting with Kiro. Consider removing them. \n\n"
242+
"{} \n\n",
243+
context_text::context_limit_warning(context_files_max_size)
242244
)),
243245
StyledText::reset(),
244246
)?;

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ use crate::cli::issue;
5656
use crate::constants::ui_text;
5757
use crate::os::Os;
5858

59-
/// q (Kiro Chat)
6059
#[derive(Debug, PartialEq, Parser)]
61-
#[command(color = clap::ColorChoice::Always, term_width = 0, after_long_help = &ui_text::extra_help())]
60+
#[command(
61+
color = clap::ColorChoice::Always, term_width = 0, after_long_help = &ui_text::extra_help(), override_usage = "/<COMMAND>",
62+
)]
6263
pub enum SlashCommand {
6364
/// Quit the application
64-
#[command(aliases = ["q", "exit"])]
65+
#[command(aliases = ["/q", "/exit"])]
6566
Quit,
6667
/// Clear the conversation history
6768
Clear(ClearArgs),

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,36 @@ pub async fn select_model(os: &Os, session: &mut ChatSession) -> Result<Option<C
109109
let description = model.description();
110110
if Some(model.model_id.as_str()) == active_model_id {
111111
if let Some(desc) = description {
112-
format!("{display_name} (active) | {desc}")
112+
if desc.to_lowercase().contains("experimental") {
113+
format!(
114+
"{display_name} {} {}",
115+
StyledText::current_item("(current)"),
116+
StyledText::secondary("-- experimental")
117+
)
118+
} else {
119+
format!("{display_name} {} | {desc}", StyledText::current_item("(current)"))
120+
}
113121
} else {
114-
format!("{display_name} (active)")
122+
format!("{display_name} {}", StyledText::current_item("(current)"))
115123
}
116124
} else if let Some(desc) = description {
117-
format!("{display_name} | {desc}")
125+
if desc.to_lowercase().contains("experimental") {
126+
format!("{display_name} {}", StyledText::secondary("-- experimental"))
127+
} else {
128+
format!("{display_name} | {desc}")
129+
}
118130
} else {
119131
display_name.to_string()
120132
}
121133
})
122134
.collect();
123135

124136
let selection: Option<_> = match Select::with_theme(&crate::util::dialoguer_theme())
125-
.with_prompt("Select a model for this chat session")
137+
.with_prompt(format!(
138+
"Press ({}) to navigate · Enter({}) to select model",
139+
StyledText::current_item("↑↓"),
140+
StyledText::current_item("⏎")
141+
))
126142
.items(&labels)
127143
.default(0)
128144
.interact_on_opt(&dialoguer::console::Term::stdout())

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::cli::chat::{
1414
use crate::os::Os;
1515
use crate::theme::StyledText;
1616

17-
/// Commands for persisting and loading conversation state
17+
/// Use any of these commands to manage your Kiro session. All commands start with '/'.
1818
#[deny(missing_docs)]
1919
#[derive(Debug, PartialEq, Subcommand)]
2020
pub enum PersistSubcommand {

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@ use crate::cli::chat::{
1616
get_subscription_status_with_spinner,
1717
with_spinner,
1818
};
19+
use crate::constants::subscription_text;
1920
use crate::os::Os;
2021
use crate::theme::StyledText;
2122
use crate::util::system_info::is_remote;
2223

23-
const SUBSCRIBE_TITLE_TEXT: &str = color_print::cstr! { "<white!,bold>Subscribe to Kiro Developer Pro</white!,bold>" };
24-
25-
const SUBSCRIBE_TEXT: &str = color_print::cstr! { "During the upgrade, you'll be asked to link your Builder ID to the AWS account that will be billed the monthly subscription fee.
26-
27-
Need help? Visit our subscription support page> <blue!>https://docs.aws.amazon.com/console/amazonq/upgrade-builder-id</blue!>" };
28-
29-
/// Arguments for the subscribe command to manage Kiro Developer Pro subscriptions
24+
/// Arguments for the subscribe command to manage Developer Pro subscriptions
3025
#[deny(missing_docs)]
3126
#[derive(Debug, PartialEq, Args)]
3227
pub struct SubscribeArgs {
@@ -41,7 +36,7 @@ impl SubscribeArgs {
4136
execute!(
4237
session.stderr,
4338
StyledText::warning_fg(),
44-
style::Print("\nYour Kiro Developer Pro subscription is managed through IAM Identity Center.\n\n"),
39+
style::Print(format!("\n{}\n\n", subscription_text::idc_subscription_message())),
4540
StyledText::reset(),
4641
)?;
4742
} else if self.manage {
@@ -52,7 +47,7 @@ impl SubscribeArgs {
5247
queue!(
5348
session.stderr,
5449
StyledText::warning_fg(),
55-
style::Print("You don't seem to have a Kiro Developer Pro subscription. "),
50+
style::Print(format!("{}. ", subscription_text::no_subscription_message())),
5651
StyledText::secondary_fg(),
5752
style::Print("Use "),
5853
StyledText::success_fg(),
@@ -109,7 +104,7 @@ async fn upgrade_to_pro(os: &mut Os, session: &mut ChatSession) -> Result<(), Ch
109104
queue!(
110105
session.stderr,
111106
StyledText::warning_fg(),
112-
style::Print("Your Builder ID already has a Kiro Developer Pro subscription.\n\n"),
107+
style::Print(format!("{}\n\n", subscription_text::already_subscribed_message())),
113108
StyledText::reset(),
114109
)?;
115110
return Ok(());
@@ -129,9 +124,10 @@ async fn upgrade_to_pro(os: &mut Os, session: &mut ChatSession) -> Result<(), Ch
129124
// Upgrade information
130125
queue!(
131126
session.stderr,
132-
style::Print(SUBSCRIBE_TITLE_TEXT),
127+
StyledText::primary_fg(),
128+
style::Print(subscription_text::subscribe_title()),
133129
StyledText::secondary_fg(),
134-
style::Print(format!("\n\n{SUBSCRIBE_TEXT}\n\n")),
130+
style::Print(format!("\n\n{}\n\n", subscription_text::SUBSCRIBE_INFO)),
135131
StyledText::reset(),
136132
cursor::Show
137133
)?;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ impl TangentArgs {
5353
execute!(
5454
session.stderr,
5555
StyledText::error_fg(),
56-
style::Print("\nTangent mode is disabled. Enable it with: kiro-cli settings chat.enableTangentMode true\n"),
56+
style::Print(
57+
"\nTangent mode is disabled. Enable it with: kiro-cli settings chat.enableTangentMode true\n"
58+
),
5759
StyledText::reset(),
5860
)?;
5961
return Ok(ChatState::PromptUser {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3447,7 +3447,7 @@ impl ChatSession {
34473447
self.stderr,
34483448
style::Print(format!(
34493449
"\n(To exit the CLI, press Ctrl+C or Ctrl+D again or type {})\n\n",
3450-
"/quit".green()
3450+
StyledText::brand("/quit")
34513451
))
34523452
)
34533453
.unwrap_or_default();

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,19 @@ pub fn get_available_commands(os: &Os) -> Vec<String> {
6767
/// Format commands for skim display
6868
/// Create a standard set of skim options with consistent styling
6969
fn create_skim_options(prompt: &str, multi: bool) -> Result<SkimOptions> {
70+
use crate::theme::{
71+
BRAND_COLOR_ANSI,
72+
SECONDARY_COLOR_ANSI,
73+
};
74+
7075
SkimOptionsBuilder::default()
7176
.height("100%".to_string())
7277
.prompt(prompt.to_string())
7378
.reverse(true)
7479
.multi(multi)
80+
.color(Some(format!(
81+
"current:{BRAND_COLOR_ANSI}:bold,pointer:{BRAND_COLOR_ANSI},prompt:{SECONDARY_COLOR_ANSI}"
82+
)))
7583
.build()
7684
.map_err(|e| eyre!("Failed to build skim options: {}", e))
7785
}
@@ -210,7 +218,11 @@ pub fn select_context_paths_with_skim(context_manager: &ContextManager) -> Resul
210218
pub fn select_command(os: &Os, context_manager: &ContextManager, tools: &[String]) -> Result<Option<String>> {
211219
let commands = get_available_commands(os);
212220

213-
match launch_skim_selector(&commands, "Select command: ", false)? {
221+
match launch_skim_selector(
222+
&commands,
223+
"Commands: Press (↑↓) to navigate · Enter(⏎) to select command",
224+
false,
225+
)? {
214226
Some(selections) if !selections.is_empty() => {
215227
let selected_command = &selections[0];
216228

crates/chat-cli/src/constants.rs

Lines changed: 76 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub mod ui_text {
2828

2929
/// Changelog header text
3030
pub fn changelog_header() -> String {
31-
format!("{}\n\n", StyledText::emphasis("What's New in Kiro CLI"))
31+
format!("{}\n\n", StyledText::primary("✨ What's New in Kiro CLI"))
3232
}
3333

3434
/// Trust all tools warning text
@@ -63,65 +63,38 @@ pub mod ui_text {
6363

6464
// MCP section
6565
help.push('\n');
66-
help.push_str(&StyledText::brand("MCP:"));
67-
help.push('\n');
68-
help.push_str(&StyledText::secondary(
69-
"You can now configure the Kiro CLI to use MCP servers.",
70-
));
71-
help.push_str(&StyledText::secondary(
72-
"\nLearn how: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html",
66+
help.push_str(&StyledText::primary(
67+
"💡 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",
7368
));
7469

75-
// Tips section
70+
// Shortcuts section
7671
help.push_str("\n\n");
77-
help.push_str(&StyledText::brand("Tips:"));
72+
help.push_str(&StyledText::clap_heading("Shortcuts:"));
7873
help.push('\n');
7974

80-
// Command execution tip
75+
// Multi-line prompt shortcut
8176
help.push_str(&format!(
82-
"{} {}",
83-
StyledText::primary("!{command}"),
84-
StyledText::secondary("Quickly execute a command in your current session")
77+
"{} {}",
78+
StyledText::primary("^ + J"),
79+
StyledText::secondary("Ctrl(^) + J or Alt(⌥) + Enter(⏎) to insert new-line for multi-line prompt")
8580
));
8681
help.push('\n');
8782

88-
// Multi-line prompt tip
83+
// Fuzzy search shortcut
8984
help.push_str(&format!(
90-
"{} {}",
91-
StyledText::primary("Ctrl(^) + j"),
92-
StyledText::secondary("Insert new-line to provide multi-line prompt")
93-
));
94-
help.push_str(&format!(
95-
"\n {}",
96-
StyledText::secondary("Alternatively, [Alt(⌥) + Enter(⏎)]")
85+
"{} {}",
86+
StyledText::primary("^ + s"),
87+
StyledText::secondary(
88+
"Ctrl(^) + s for fuzzy search commands and context files, use tab to select multiple items"
89+
)
9790
));
9891
help.push('\n');
9992

100-
// Fuzzy search tip
93+
// Tangent mode shortcut
10194
help.push_str(&format!(
102-
"{} {}",
103-
StyledText::primary("Ctrl(^) + s"),
104-
StyledText::secondary("Fuzzy search commands and context files")
105-
));
106-
help.push_str(&format!(
107-
"\n {}",
108-
StyledText::secondary("Use Tab to select multiple items")
109-
));
110-
help.push_str(&format!(
111-
"\n {}",
112-
StyledText::secondary("Change the keybind using: kiro-cli settings chat.skimCommandKey x")
113-
));
114-
help.push('\n');
115-
116-
// Tangent mode tip
117-
help.push_str(&format!(
118-
"{} {}",
119-
StyledText::primary("Ctrl(^) + t"),
120-
StyledText::secondary("Toggle tangent mode for isolated conversations")
121-
));
122-
help.push_str(&format!(
123-
"\n {}",
124-
StyledText::secondary("Change the keybind using: kiro-cli settings chat.tangentModeKey x")
95+
"{} {}",
96+
StyledText::primary("^ + t"),
97+
StyledText::secondary("Ctrl(^) + t to toggle tangent mode for isolated conversations")
12598
));
12699
help.push('\n');
127100

@@ -133,15 +106,28 @@ pub mod ui_text {
133106
));
134107
help.push_str(&format!(
135108
"\n {}",
136-
StyledText::secondary("Change using: kiro-cli settings chat.skimCommandKey x")
109+
StyledText::secondary("Change these keybinding at anytime using: kiro-cli settings chat.skimCommandKey x")
137110
));
138111

139112
help
140113
}
141114

142115
/// Welcome text with ASCII art logo for large screens
143116
pub fn welcome_text() -> String {
144-
StyledText::brand("KIRO")
117+
StyledText::brand(
118+
"⠀⠀⠀⠀⠀⠀⠀
119+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣀⠀⠀⠀⠀⠀⠀⢀⣤⣤⣄⡀⠀⠀⠀⣀⣤⣤⣄⡀⠀⠀⠀⢀⣠⣤⣤⣤⣤⣤⣤⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
120+
⠀⠀⠀⠀⠀⠀⠀⠀⣾⠟⠉⠉⠻⣷⡄⠀⠀⢀⣾⠟⠋⠉⠻⣿⡄⠀⣼⡟⠉⠉⠙⣿⡆⠀⢠⣿⠋⠉⠉⠉⠉⠉⠉⠉⠉⠙⠛⠿⣶⣄⠀⠀⠀⠀⢀⣴⡿⠟⠋⠉⠉⠉⠉⠛⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀
121+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢀⣴⡿⠃⠀⠀⠀⢠⣿⠇⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡟⠀⠀⠀⠀⣀⣀⣀⣀⠀⠀⠀⠀⠈⢿⣆⠀⠀⣰⡿⠋⠀⠀⠀⠀⣀⡀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀
122+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⣿⡿⠋⠀⠀⠀⣀⣴⡿⠃⠀⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡇⠀⠀⠀⠀⣿⡟⠛⠛⣿⡆⠀⠀⠀⢸⣿⠀⣸⡿⠁⠀⠀⢀⣶⡿⠛⠻⢿⣦⠀⠀⠀⠘⣿⡄⠀⠀⠀⠀
123+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠙⠋⠀⠀⠀⢠⣾⡟⠁⠀⠀⠀⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡇⠀⠀⠀⠀⣿⣷⣶⣶⠿⠃⠀⠀⠀⢸⣿⠀⣿⡇⠀⠀⠀⣾⡟⠀⠀⠀⠈⢿⡇⠀⠀⠀⢻⣧
124+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣧⡀⠀⠀⠀⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠃⠀⣿⡇⠀⠀⠀⣿⡇⠀⠀⠀⠀⢸⡇⠀⠀⠀⢸⣿
125+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣠⣶⡀⠀⠀⠀⠹⣷⣄⠀⠀⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡇⠀⠀⠀⠀⣤⣤⣄⠀⠀⠀⠀⢿⣿⠁⠀⠀⣿⡇⠀⠀⠀⢿⣇⠀⠀⠀⠀⣼⡇⠀⠀⠀⣸⡿
126+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣾⡟⠹⣿⡄⠀⠀⠀⠘⢿⣦⠀⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⡇⠀⠀⠀⠀⣿⡏⢿⣦⠀⠀⠀⠀⠻⣷⡀⠀⢹⣷⠀⠀⠀⠘⢿⣦⣤⣤⣾⠟⠀⠀⠀⢠⣿⠇
127+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⠀⠘⣿⣄⠀⠀⠀⠀⢿⣧⠀⣿⡇⠀⠀⠀⢸⣿⠀⢸⣇⠀⠀⠀⠀⣿⡇⠈⢻⣧⠀⠀⠀⠀⢹⣷⠀⠀⢻⣧⡀⠀⠀⠀⠉⠉⠉⠁⠀⠀⠀⣠⣾⠏
128+
⠀⠀⠀⠀⠀⠀⠀⠈⣿⣄⡀⢀⣠⣿⠃⠀⠀⠈⢿⣦⡀⠀⣀⣾⠏⠀⢿⣧⡀⠀⣀⣾⠏⠀⠸⣿⣄⠀⢀⣼⡿⠀⠀⠀⢻⣷⣀⠀⣀⣼⡿⠀⠀⠀⠙⠿⣦⣄⣀⡀⠀⠀⣀⣀⣤⣾⠟⠁
129+
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠛⠛⠛⠁⠀⠀⠀⠀⠀⠙⠛⠛⠛⠉⠀⠀⠀⠙⠛⠛⠛⠉⠀⠀⠀⠈⠛⠛⠛⠋⠀⠀⠀⠀⠀⠉⠛⠛⠛⠋⠀⠀⠀⠀⠀⠀⠈⠙⠛⠛⠛⠛⠛⠛⠉",
130+
)
145131
}
146132

147133
/// Resume conversation text
@@ -170,6 +156,48 @@ pub mod ui_text {
170156
}
171157
}
172158

159+
/// Subscription-related text constants
160+
pub mod subscription_text {
161+
use super::PRODUCT_NAME;
162+
163+
/// Title for subscription upgrade dialog
164+
pub fn subscribe_title() -> String {
165+
format!("Subscribe to {PRODUCT_NAME} Pro")
166+
}
167+
168+
/// Subscription upgrade information text
169+
pub const SUBSCRIBE_INFO: &str = "During the upgrade, you'll be asked to link your Builder ID to the AWS account that will be billed the monthly subscription fee.
170+
171+
Need help? Visit our subscription support page> https://docs.aws.amazon.com/console/amazonq/upgrade-builder-id";
172+
173+
/// Message for IDC users about subscription management
174+
pub fn idc_subscription_message() -> String {
175+
format!("Your {PRODUCT_NAME} Pro subscription is managed through IAM Identity Center.")
176+
}
177+
178+
/// Message when user doesn't have an active subscription
179+
pub fn no_subscription_message() -> String {
180+
format!("You don't seem to have a {PRODUCT_NAME} Pro subscription.")
181+
}
182+
183+
/// Message when user already has an active subscription
184+
pub fn already_subscribed_message() -> String {
185+
format!("Your Builder ID already has a {PRODUCT_NAME} Pro subscription.")
186+
}
187+
}
188+
189+
/// Context-related text constants
190+
pub mod context_text {
191+
use super::PRODUCT_NAME;
192+
193+
/// Warning message when context files exceed token limit
194+
pub fn context_limit_warning(context_files_max_size: usize) -> String {
195+
format!(
196+
"Total token count exceeds limit: {context_files_max_size}. The following files will be automatically dropped when interacting with {PRODUCT_NAME}. Consider removing them."
197+
)
198+
}
199+
}
200+
173201
/// Help text constants for CLI commands
174202
pub mod help_text {
175203
/// Context command description

0 commit comments

Comments
 (0)