Spelling (#7137)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -149,7 +149,7 @@ impl AppsManagerClient {
|
||||
}
|
||||
|
||||
fn ensure_default_apps(&self) -> Result<(), String> {
|
||||
// TODO(Douwe): we have the same check in cache, consider unfiying that
|
||||
// TODO(Douwe): we have the same check in cache, consider unifying that
|
||||
const CLOCK_HTML: &str = include_str!("../goose_apps/clock.html");
|
||||
|
||||
// Check if clock app exists
|
||||
|
||||
@@ -441,7 +441,7 @@ async fn create_streamable_http_client(
|
||||
let client_res = McpClient::connect(transport, timeout_duration, provider.clone()).await;
|
||||
|
||||
if extract_auth_error(&client_res).is_some() {
|
||||
let am = oauth_flow(&uri.to_string(), &name.to_string())
|
||||
let auth_manager = oauth_flow(&uri.to_string(), &name.to_string())
|
||||
.await
|
||||
.map_err(|_| ExtensionError::SetupError("auth error".to_string()))?;
|
||||
let mut auth_headers = HeaderMap::new();
|
||||
@@ -452,7 +452,7 @@ async fn create_streamable_http_client(
|
||||
.map_err(|_| {
|
||||
ExtensionError::ConfigError("could not construct http client".to_string())
|
||||
})?;
|
||||
let auth_client = AuthClient::new(auth_http_client, am);
|
||||
let auth_client = AuthClient::new(auth_http_client, auth_manager);
|
||||
let transport = StreamableHttpClientTransport::with_client(
|
||||
auth_client,
|
||||
StreamableHttpClientTransportConfig {
|
||||
|
||||
@@ -750,7 +750,7 @@ impl Config {
|
||||
.and_then(|v| Ok(serde_json::from_value(v.clone())?))
|
||||
}
|
||||
|
||||
/// Get secrets. If primary is in env, use env for all keys. Otherwise use secret storage.
|
||||
/// Get secrets. If primary is in env, use env for all keys. Otherwise, use secret storage.
|
||||
pub fn get_secrets(
|
||||
&self,
|
||||
primary: &str,
|
||||
@@ -876,7 +876,7 @@ impl Config {
|
||||
Paths::config_dir().join("secrets.yaml")
|
||||
}
|
||||
|
||||
/// Perform fallback to file storage when keyring is unavailable
|
||||
/// Fall back to file storage when keyring is unavailable
|
||||
fn fallback_to_file_storage(&self) -> Result<HashMap<String, Value>, ConfigError> {
|
||||
let path = Self::secrets_file_path();
|
||||
self.read_secrets_from_file(&path)
|
||||
|
||||
@@ -159,7 +159,7 @@ impl<'a> IntoIterator for &'a Conversation {
|
||||
}
|
||||
}
|
||||
|
||||
/// Fix a conversation that we're about to send to an LLM. So the last and first
|
||||
/// Fix a conversation that we're about to send to an LLM. So the first and last
|
||||
/// messages should always be from the user.
|
||||
pub fn fix_conversation(conversation: Conversation) -> (Conversation, Vec<String>) {
|
||||
let all_messages = conversation.messages();
|
||||
|
||||
@@ -339,7 +339,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_remove_nonexistent_session_error() {
|
||||
// Test that removing a non-existent session returns an error
|
||||
// Test that removing a nonexistent session returns an error
|
||||
let temp_dir = TempDir::new().unwrap();
|
||||
let manager = create_test_manager(&temp_dir).await;
|
||||
let session = String::from("never-created");
|
||||
|
||||
@@ -161,7 +161,7 @@ impl CursorAgentProvider {
|
||||
}
|
||||
}
|
||||
|
||||
// If no valid result line found, fallback to joining all lines
|
||||
// If no valid result line found, fall back to joining all lines
|
||||
let response_text = lines.join("\n");
|
||||
|
||||
let message_content = vec![MessageContent::text(response_text)];
|
||||
|
||||
@@ -143,7 +143,7 @@ pub fn to_bedrock_tool_result_content_block(
|
||||
bail!("Blob resource content is not supported by Bedrock provider yet")
|
||||
}
|
||||
},
|
||||
RawContent::Audio(..) => bail!("Audio is not not supported by Bedrock provider"),
|
||||
RawContent::Audio(..) => bail!("Audio is not supported by Bedrock provider"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -597,7 +597,7 @@ where
|
||||
// Skip event type lines
|
||||
continue;
|
||||
} else {
|
||||
// Try to parse as-is in case there's no prefix
|
||||
// Try to parse as-is when there's no prefix
|
||||
&response_str
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use rmcp::model::{Content, RawContent};
|
||||
const LEAD_WORKER_PROVIDER_NAME: &str = "lead_worker";
|
||||
|
||||
/// A provider that switches between a lead model and a worker model based on turn count
|
||||
/// and can fallback to lead model on consecutive failures
|
||||
/// and can fall back to lead model on consecutive failures
|
||||
pub struct LeadWorkerProvider {
|
||||
lead_provider: Arc<dyn Provider>,
|
||||
worker_provider: Arc<dyn Provider>,
|
||||
|
||||
@@ -295,7 +295,7 @@ impl OAuthFlow {
|
||||
// though it will ultimately only get used once
|
||||
let tx = Arc::new(tokio::sync::Mutex::new(Some(tx)));
|
||||
|
||||
// Setup a server that will receive the redirect, capture the code, and display success/failure
|
||||
// Set up a server that will receive the redirect, capture the code, and display success/failure
|
||||
let app = Router::new().route(
|
||||
"/",
|
||||
get(move |Query(params): Query<HashMap<String, String>>| {
|
||||
|
||||
@@ -113,7 +113,7 @@ impl OllamaInterpreter {
|
||||
Ok(base_url.to_string())
|
||||
}
|
||||
|
||||
fn tool_structured_ouput_format_schema() -> Value {
|
||||
fn tool_structured_output_format_schema() -> Value {
|
||||
json!({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -282,7 +282,7 @@ Otherwise, if no JSON tool requests are provided, use the no-op tool:
|
||||
let format_instruction = format!("{}\nRequest: {}\n\n", system_prompt, last_assistant_msg);
|
||||
|
||||
// Define the JSON schema for tool call format
|
||||
let format_schema = OllamaInterpreter::tool_structured_ouput_format_schema();
|
||||
let format_schema = OllamaInterpreter::tool_structured_output_format_schema();
|
||||
|
||||
// Determine which model to use for interpretation (from env var or default)
|
||||
let interpreter_model = std::env::var("GOOSE_TOOLSHIM_OLLAMA_MODEL")
|
||||
|
||||
@@ -528,7 +528,7 @@ mod tests {
|
||||
let text = format!("Here is a fake image {}", fake_png_path.to_str().unwrap());
|
||||
assert_eq!(detect_image_path(&text), None);
|
||||
|
||||
// Test with non-existent file
|
||||
// Test with nonexistent file
|
||||
let text = "Here is a fake.png that doesn't exist";
|
||||
assert_eq!(detect_image_path(text), None);
|
||||
|
||||
@@ -573,7 +573,7 @@ mod tests {
|
||||
.to_string()
|
||||
.contains("not a valid image"));
|
||||
|
||||
// Test non-existent file
|
||||
// Test nonexistent file
|
||||
let result = load_image_file("nonexistent.png");
|
||||
assert!(result.is_err());
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ impl ProviderDef for MockCompactionProvider {
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper: Setup a test session with initial messages and token counts
|
||||
/// Helper: Set up a test session with initial messages and token counts
|
||||
async fn setup_test_session(
|
||||
agent: &Agent,
|
||||
temp_dir: &TempDir,
|
||||
|
||||
Reference in New Issue
Block a user