Fix Warping indicator stuck after Bedrock LLM finishes responding

Bedrock was calling suggest_next_prompt tool which created a SuggestPrompt
action that waited forever on a oneshot channel for UI interaction that
never fires in the Bedrock path, keeping the conversation permanently
InProgress. Fixed by filtering the tool from the Bedrock tool list and
skipping it at the stream level when the LLM calls it from context history.

Also includes: Bedrock cache token tracking, cost estimation, LSP
improvements, conversation usage view updates, and external config support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ryan Ward
2026-05-18 12:13:05 -05:00
co-authored by Claude Opus 4.6
parent 95b4708e44
commit f37a744692
27 changed files with 2423 additions and 65 deletions
+22
View File
@@ -152,6 +152,28 @@ pub fn get_ai_block_overflow_menu_element_position_id(view_id: EntityId) -> Stri
}
/// Formats credit count to display as whole numbers when the value is effectively a whole number,
pub fn format_token_count(tokens: u32) -> String {
if tokens >= 1_000_000 {
format!("{:.1}M tokens", tokens as f64 / 1_000_000.0)
} else if tokens >= 1_000 {
format!("{:.1}k tokens", tokens as f64 / 1_000.0)
} else {
format!("{tokens} tokens")
}
}
pub fn format_cost_cents(cents: f32) -> String {
if cents >= 100.0 {
format!("${:.2}", cents / 100.0)
} else if cents >= 1.0 {
format!("{:.1}\u{00A2}", cents)
} else if cents > 0.0 {
format!("{:.2}\u{00A2}", cents)
} else {
"$0.00".to_string()
}
}
/// otherwise displays with one decimal place.
/// Returns a formatted string with proper pluralization ("credit" vs "credits").
pub fn format_credits(credits: f32) -> String {