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
+95 -4
View File
@@ -3,16 +3,17 @@ use crate::{
server_repo_watcher::LspRepoWatcher,
supported_servers::LSPServerType,
types::{
DefinitionLocation, DocumentVersion, HoverResult, Location, ReferenceLocation,
TextDocumentContentChangeEvent, TextEdit, WatchedFileChangeEvent,
CodeActionData, CompletionResult, CompletionTrigger, DefinitionLocation, DocumentVersion,
HoverResult, Location, PrepareRenameResult, ReferenceLocation, RenameResult,
SignatureHelpResult, TextDocumentContentChangeEvent, TextEdit, WatchedFileChangeEvent,
},
LspServerConfig, LspServerLogLevel, LspService,
};
use instant::Instant;
use lsp_types::{
notification::{self, Notification},
FormattingOptions, NumberOrString, ProgressParams, ProgressParamsValue,
PublishDiagnosticsParams, WorkDoneProgress,
CompletionItem, CompletionTriggerKind, FormattingOptions, NumberOrString, ProgressParams,
ProgressParamsValue, PublishDiagnosticsParams, Range as LspRange, WorkDoneProgress,
};
use std::{
collections::HashMap,
@@ -735,6 +736,96 @@ impl LspServerModel {
.await
})
}
pub fn completion(
&self,
path: PathBuf,
position: Location,
trigger: CompletionTrigger,
) -> Result<impl Future<Output = Result<Option<CompletionResult>>>> {
let service = self.service()?;
let (trigger_kind, trigger_character) = match trigger {
CompletionTrigger::Invoked => (CompletionTriggerKind::INVOKED, None),
CompletionTrigger::TriggerCharacter(ch) => {
(CompletionTriggerKind::TRIGGER_CHARACTER, Some(ch))
}
CompletionTrigger::Incomplete => {
(CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS, None)
}
};
Ok(async move {
service
.text_document()
.completion(&path, position.into_lsp(), Some(trigger_kind), trigger_character)
.await
})
}
pub fn completion_resolve(
&self,
item: CompletionItem,
) -> Result<impl Future<Output = Result<CompletionItem>>> {
let service = self.service()?;
Ok(async move { service.text_document().completion_resolve(item).await })
}
pub fn signature_help(
&self,
path: PathBuf,
position: Location,
) -> Result<impl Future<Output = Result<Option<SignatureHelpResult>>>> {
let service = self.service()?;
Ok(async move {
service
.text_document()
.signature_help(&path, position.into_lsp())
.await
})
}
pub fn code_actions(
&self,
path: PathBuf,
range: LspRange,
diagnostics: Vec<lsp_types::Diagnostic>,
) -> Result<impl Future<Output = Result<Vec<CodeActionData>>>> {
let service = self.service()?;
Ok(async move {
service
.text_document()
.code_action(&path, range, diagnostics)
.await
})
}
pub fn prepare_rename(
&self,
path: PathBuf,
position: Location,
) -> Result<impl Future<Output = Result<Option<PrepareRenameResult>>>> {
let service = self.service()?;
Ok(async move {
service
.text_document()
.prepare_rename(&path, position.into_lsp())
.await
})
}
pub fn rename(
&self,
path: PathBuf,
position: Location,
new_name: String,
) -> Result<impl Future<Output = Result<Option<RenameResult>>>> {
let service = self.service()?;
Ok(async move {
service
.text_document()
.rename(&path, position.into_lsp(), new_name)
.await
})
}
}
impl Entity for LspServerModel {