Skip to content

Commit 65ba7fe

Browse files
committed
Merge branch 'qv2' into split_usage
2 parents b2ab96c + 2866262 commit 65ba7fe

File tree

11 files changed

+118
-89
lines changed

11 files changed

+118
-89
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl ApiClient {
365365
let request = self
366366
.client
367367
.list_available_models()
368-
.set_origin(Some(Origin::from("KIRO_CLI")))
368+
.set_origin(Some(Origin::KiroCli))
369369
.set_profile_arn(self.profile.as_ref().map(|p| p.arn.clone()));
370370
let mut paginator = request.into_paginator().send();
371371

@@ -458,7 +458,7 @@ impl ApiClient {
458458
) -> Result<amzn_codewhisperer_client::operation::get_usage_limits::GetUsageLimitsOutput, ApiClientError> {
459459
self.client
460460
.get_usage_limits()
461-
.set_origin(Some(amzn_codewhisperer_client::types::Origin::from("KIRO_CLI")))
461+
.set_origin(Some(amzn_codewhisperer_client::types::Origin::KiroCli))
462462
.send()
463463
.await
464464
.map_err(ApiClientError::GetUsageLimitsError)
@@ -543,7 +543,7 @@ impl ApiClient {
543543
match client
544544
.send_message()
545545
.conversation_state(conversation_state)
546-
.set_source(Some(QDeveloperOrigin::from("KIRO_CLI")))
546+
.set_source(Some(QDeveloperOrigin::KiroCli))
547547
.send()
548548
.await
549549
{

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,7 @@ impl From<UserInputMessage> for amzn_codewhisperer_streaming_client::types::User
940940
.set_user_input_message_context(value.user_input_message_context.map(Into::into))
941941
.set_user_intent(value.user_intent.map(Into::into))
942942
.set_model_id(value.model_id)
943-
//TODO: Setup new origin.
944-
.origin(amzn_codewhisperer_streaming_client::types::Origin::from("KIRO_CLI"))
943+
.origin(amzn_codewhisperer_streaming_client::types::Origin::KiroCli)
945944
.build()
946945
.expect("Failed to build UserInputMessage")
947946
}
@@ -955,8 +954,7 @@ impl From<UserInputMessage> for amzn_qdeveloper_streaming_client::types::UserInp
955954
.set_user_input_message_context(value.user_input_message_context.map(Into::into))
956955
.set_user_intent(value.user_intent.map(Into::into))
957956
.set_model_id(value.model_id)
958-
//TODO: Setup new origin.
959-
.origin(amzn_qdeveloper_streaming_client::types::Origin::from("KIRO_CLI"))
957+
.origin(amzn_qdeveloper_streaming_client::types::Origin::KiroCli)
960958
.build()
961959
.expect("Failed to build UserInputMessage")
962960
}

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl ContextSubcommand {
132132
session.stderr,
133133
style::SetAttribute(Attribute::Bold),
134134
StyledText::emphasis_fg(),
135-
style::Print(format!("👤 Agent ({}):\n", context_manager.current_profile)),
135+
style::Print(format!("Agent ({}):\n", context_manager.current_profile)),
136136
StyledText::reset_attributes(),
137137
)?;
138138

@@ -145,7 +145,10 @@ impl ContextSubcommand {
145145
)?;
146146
} else {
147147
for path in &agent_owned_list {
148-
execute!(session.stderr, style::Print(format!(" {} ", path.get_path_as_str())))?;
148+
execute!(
149+
session.stderr,
150+
style::Print(format!(" - {} ", path.get_path_as_str()))
151+
)?;
149152
if let Ok(context_files) = context_manager
150153
.get_context_files_by_path(os, path.get_path_as_str())
151154
.await
@@ -172,7 +175,7 @@ impl ContextSubcommand {
172175
session.stderr,
173176
style::SetAttribute(Attribute::Bold),
174177
StyledText::emphasis_fg(),
175-
style::Print("💬 Session (temporary):\n"),
178+
style::Print("Session (temporary):\n"),
176179
StyledText::reset_attributes(),
177180
)?;
178181

@@ -185,7 +188,10 @@ impl ContextSubcommand {
185188
)?;
186189
} else {
187190
for path in &session_owned_list {
188-
execute!(session.stderr, style::Print(format!(" {} ", path.get_path_as_str())))?;
191+
execute!(
192+
session.stderr,
193+
style::Print(format!(" - {} ", path.get_path_as_str()))
194+
)?;
189195
if let Ok(context_files) = context_manager
190196
.get_context_files_by_path(os, path.get_path_as_str())
191197
.await
@@ -234,12 +240,11 @@ impl ContextSubcommand {
234240
StyledText::reset_attributes()
235241
)?;
236242

237-
for (filename, content, is_temporary) in &profile_context_files {
243+
for (filename, content, _is_temporary) in &profile_context_files {
238244
let est_tokens = TokenCounter::count_tokens(content);
239-
let icon = if *is_temporary { "💬" } else { "👤" };
240245
execute!(
241246
session.stderr,
242-
style::Print(format!("{icon} {filename} ")),
247+
style::Print(format!("- {filename} ")),
243248
StyledText::secondary_fg(),
244249
style::Print(format!("(~{est_tokens} tkns)\n")),
245250
StyledText::reset(),

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ pub async fn select_model(os: &Os, session: &mut ChatSession) -> Result<Option<C
116116
StyledText::secondary("-- experimental")
117117
)
118118
} else {
119-
format!("{display_name} {} | {desc}", StyledText::current_item("(current)"))
119+
format!(
120+
"{display_name} {} | {}",
121+
StyledText::current_item("(current)"),
122+
StyledText::secondary(desc)
123+
)
120124
}
121125
} else {
122126
format!("{display_name} {}", StyledText::current_item("(current)"))
@@ -125,7 +129,7 @@ pub async fn select_model(os: &Os, session: &mut ChatSession) -> Result<Option<C
125129
if desc.to_lowercase().contains("experimental") {
126130
format!("{display_name} {}", StyledText::secondary("-- experimental"))
127131
} else {
128-
format!("{display_name} | {desc}")
132+
format!("{display_name} | {}", StyledText::secondary(desc))
129133
}
130134
} else {
131135
display_name.to_string()
@@ -135,9 +139,13 @@ pub async fn select_model(os: &Os, session: &mut ChatSession) -> Result<Option<C
135139

136140
let selection: Option<_> = match Select::with_theme(&crate::util::dialoguer_theme())
137141
.with_prompt(format!(
138-
"Press ({}) to navigate · Enter({}) to select model",
142+
"{}({}) {} · {}({}) {}",
143+
StyledText::secondary("Press "),
139144
StyledText::current_item("↑↓"),
140-
StyledText::current_item("⏎")
145+
StyledText::secondary("to navigate"),
146+
StyledText::secondary("Enter"),
147+
StyledText::current_item("⏎"),
148+
StyledText::secondary("to select model")
141149
))
142150
.items(&labels)
143151
.default(0)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2598,7 +2598,7 @@ impl ChatSession {
25982598
StyledText::reset_attributes(),
25992599
)?;
26002600
}
2601-
execute!(self.stdout, style::Print("\n\n"))?;
2601+
execute!(self.stdout, style::Print("\n"))?;
26022602

26032603
tool_telemetry = tool_telemetry.and_modify(|ev| ev.is_success = Some(true));
26042604
if let Tool::Custom(_) = &tool.tool {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn create_skim_options(prompt: &str, multi: bool) -> Result<SkimOptions> {
7878
.reverse(true)
7979
.multi(multi)
8080
.color(Some(format!(
81-
"current:{BRAND_COLOR_ANSI}:bold,pointer:{BRAND_COLOR_ANSI},prompt:{SECONDARY_COLOR_ANSI}"
81+
"current:{BRAND_COLOR_ANSI}:bold,pointer:{BRAND_COLOR_ANSI},prompt:{SECONDARY_COLOR_ANSI},current_bg:-1"
8282
)))
8383
.build()
8484
.map_err(|e| eyre!("Failed to build skim options: {}", e))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ mod tests {
22142214
let path_str = path.to_string_lossy();
22152215

22162216
// Should end with .kiro/mcp.json (default fallback)
2217-
assert!(path_str.ends_with(".kiro/mcp.json"));
2217+
assert!(path_str.ends_with(".kiro/settings/mcp.json"));
22182218

22192219
Ok(())
22202220
}

crates/chat-cli/src/constants.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ pub mod ui_text {
131131
pub fn welcome_text() -> String {
132132
StyledText::brand(
133133
"⠀⠀⠀⠀⠀⠀⠀
134-
⠀⠀⠀⠀⠀⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⠀⠀⢀⣴⣶⣦⣄⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⢀⣴⣶⣶⣶⣶⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
135-
⠀⠀⠀⠀⠀⠀⠀⢰⣿⠋⠁⠈⠙⣿⡆⠀⢀⣾⡿⠁⠀⠈⢻⢰⣿⠋⠁⠈⠙⣿⡆⢰⣿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⣦⠀⠀⠀⠀⣴⡿⠟⠋⠁⠀⠀⠀⠈⠙⠻⢿⣦⠀⠀⠀⠀⠀⠀⠀
136-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⣇⣴⡿⠋⠀⠀⠀⣠⡿⠃⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢠⣤⣤⣤⣤⣄⠀⠀⠀⠀⣿⡆⠀⠀⣼⡟⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⢻⣧⠀⠀⠀⠀⠀
134+
⠀⠀⠀⠀⠀⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⠀⠀⢀⣴⣶⣦⣄⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⢀⣴⣶⣶⣶⣶⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
135+
⠀⠀⠀⠀⠀⠀⠀⢰⣿⠋⠁⠈⠙⣿⡆⠀⢀⣾⡿⠁⠀⠈⢻⢰⣿⠋⠁⠈⠙⣿⡆⢰⣿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⣦⠀⠀⠀⠀⣴⡿⠟⠋⠁⠀⠀⠀⠈⠙⠻⢿⣦⠀⠀⠀⠀⠀⠀⠀
136+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⣇⣴⡿⠋⠀⠀⠀⢀⣼⠇⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢠⣤⣤⣤⣤⣄⠀⠀⠀⠀⣿⡆⠀⠀⣼⡟⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⢻⣧⠀⠀⠀⠀⠀
137137
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡿⠋⠀⠀⠀⢀⣾⡿⠁⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢸⣿⠉⠉⠉⣿⡇⠀⠀⠀⣿⡇⠀⣼⡟⠀⠀⠀⣰⡿⠟⠛⠻⢿⣆⠀⠀⠀⢻⣧⠀⠀⠀⠀
138-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠙⠁⠀⠀⣼⡟⠁⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢸⣿⣶⣶⡶⠋⠀⠀⠀⠀⣿⠇⢰⣿⠀⠀⠀⢰⣿⠀⠀⠀⠀⠀⣿⡆⠀⠀⠀⣿⡆
139-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣼⠟⠀⢸⣿⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⣿⡇
140-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣠⡀⠀⠀⠹⣷⡄⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣤⣄⠀⠀⠀⠀⠹⣿⡅⠀⠀⠸⣿⠀⠀⠀⠸⣿⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⣿⠇
141-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣾⡟⣷⡀⠀⠀⠘⣿⣆⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡟⣷⡀⠀⠀⠀⠘⣿⣆⠀⠀⢻⣧⠀⠀⠀⠹⣷⣦⣤⣤⣾⠏⠀⠀⠀⣼⡟
142-
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠈⢻⡇⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠀⠈⢻⡇⠀⠀⢻⣧⠀⠀⠀⠀⠉⠉⠉⠀⠀⠀⠀⣼⡟
143-
⠀⠀⠀⠀⠀⠀⠀⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⢀⣼⠇⠸⣿⣄⡀⢀⣠⣿⠇⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⠀⢀⣼⠇⠀⠀⠀⠻⣷⣦⣄⡀⠀⠀⠀⢀⣠⣴⣾⠟
138+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠙⠁⠀⠀⣼⡟⠁⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢸⣿⣶⣶⡶⠋⠀⠀⠀⠀⣿⠇⢰⣿⠀⠀⠀⢰⣿⠀⠀⠀⠀⠀⣿⡆⠀⠀⠀⣿⡆
139+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣼⠟⠀⢸⣿⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⣿⡇
140+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣠⡀⠀⠀⠹⣷⡄⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣤⣄⠀⠀⠀⠀⠹⣿⡅⠀⠀⠸⣿⠀⠀⠀⠸⣿⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⣿⠇
141+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣾⡟⣷⡀⠀⠀⠘⣿⣆⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡟⣷⡀⠀⠀⠀⠘⣿⣆⠀⠀⢻⣧⠀⠀⠀⠹⣷⣦⣤⣤⣾⠏⠀⠀⠀⣼⡟
142+
⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠈⢻⡇⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠀⠈⢻⡇⠀⠀⢻⣧⠀⠀⠀⠀⠉⠉⠉⠀⠀⠀⠀⣼⡟
143+
⠀⠀⠀⠀⠀⠀⠀⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⢀⣼⠇⠸⣿⣄⡀⢀⣠⣿⠇⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⠀⢀⣼⠇⠀⠀⠀⠻⣷⣦⣄⡀⠀⠀⠀⢀⣠⣴⣾⠟
144144
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠀⠀⠈⠙⠻⠿⠿⠿⠿⠟⠋⠁",
145145
)
146146
}

crates/chat-cli/src/theme/colors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl Default for InteractiveColors {
8888
Self {
8989
prompt_symbol: Color::AnsiValue(BRIGHT_MAGENTA),
9090
profile_indicator: Color::AnsiValue(BRAND_PURPLE),
91-
tangent_indicator: Color::AnsiValue(BRIGHT_MAGENTA),
91+
tangent_indicator: Color::Yellow,
9292
usage_low: Color::Green,
9393
usage_medium: Color::Yellow,
9494
usage_high: Color::Red,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub fn dialoguer_theme() -> ColorfulTheme {
103103

104104
ColorfulTheme {
105105
prompt_prefix: dialoguer::console::style("".into()).for_stderr(),
106+
prompt_suffix: dialoguer::console::style("".into()).for_stderr(),
106107
active_item_prefix: dialoguer::console::style("❯".into())
107108
.for_stderr()
108109
.color256(BRAND_COLOR_ANSI),

0 commit comments

Comments
 (0)