Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "1.18.0"
version = "1.19.0"
authors = ["Block <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/block/goose"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/cargo
2 changes: 1 addition & 1 deletion bin/cargo-clippy
2 changes: 1 addition & 1 deletion bin/cargo-fmt
2 changes: 1 addition & 1 deletion bin/cargo-miri
2 changes: 1 addition & 1 deletion bin/clippy-driver
2 changes: 1 addition & 1 deletion bin/rls
2 changes: 1 addition & 1 deletion bin/rust-analyzer
2 changes: 1 addition & 1 deletion bin/rust-gdb
2 changes: 1 addition & 1 deletion bin/rust-gdbgui
2 changes: 1 addition & 1 deletion bin/rust-lldb
2 changes: 1 addition & 1 deletion bin/rustc
2 changes: 1 addition & 1 deletion bin/rustdoc
2 changes: 1 addition & 1 deletion bin/rustfmt
2 changes: 1 addition & 1 deletion bin/rustup
4 changes: 2 additions & 2 deletions crates/goose-cli/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ fn setup_logging_internal(
result = (|| {
let log_dir = goose::logging::prepare_log_directory("cli", true)?;
let timestamp = chrono::Local::now().format("%Y%m%d_%H%M%S").to_string();
let log_filename = if name.is_some() {
format!("{}-{}.log", timestamp, name.unwrap())
let log_filename = if let Some(n) = name {
format!("{}-{}.log", timestamp, n)
} else {
format!("{}.log", timestamp)
};
Expand Down
3 changes: 3 additions & 0 deletions crates/goose-mcp/src/computercontroller/platform/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "windows")]
mod windows;

#[cfg(target_os = "windows")]
Expand Down
6 changes: 2 additions & 4 deletions crates/goose-mcp/src/developer/tests/test_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ new file mode 100644
// mpatch may add a trailing newline
let content = std::fs::read_to_string(&file_path).unwrap();
assert!(content == "different\ncontent" || content == "different\ncontent\n");
} else {
} else if let Err(err) = result {
// Or it might return an error
let err = result.unwrap_err();
assert!(
err.message.contains("diff")
|| err.message.contains("version")
Expand All @@ -213,8 +212,7 @@ new file mode 100644

// The behavior might be different with patcher - it might create the file
// or it might fail. Let's check what happens.
if result.is_err() {
let err = result.unwrap_err();
if let Err(err) = result {
// Could be "Failed to read" or similar
assert!(err.message.contains("Failed") || err.message.contains("exist"));
} else {
Expand Down
6 changes: 3 additions & 3 deletions crates/goose-mcp/src/developer/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,16 +483,16 @@ pub fn format_file_content(
};

let language = lang::get_language_identifier(path);
if view_range.is_some() {
if let Some((start, end)) = view_range {
formatdoc! {"
### {path} (lines {start}-{end})
```{language}
{content}
```
",
path=path.display(),
start=view_range.unwrap().0,
end=if view_range.unwrap().1 == -1 { "end".to_string() } else { view_range.unwrap().1.to_string() },
start=start,
end=if end == -1 { "end".to_string() } else { end.to_string() },
language=language,
content=display_content,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/goose-server/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use goose::tracing::{langfuse_layer, otlp_layer};
pub fn setup_logging(name: Option<&str>) -> Result<()> {
let log_dir = goose::logging::prepare_log_directory("server", true)?;
let timestamp = chrono::Local::now().format("%Y%m%d_%H%M%S").to_string();
let log_filename = if name.is_some() {
format!("{}-{}.log", timestamp, name.unwrap())
let log_filename = if let Some(n) = name {
format!("{}-{}.log", timestamp, n)
} else {
format!("{}.log", timestamp)
};
Expand Down
6 changes: 3 additions & 3 deletions crates/goose/src/agents/extension_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ impl ExtensionManager {
let extension_name = params.get("extension_name").and_then(|v| v.as_str());

// If extension name is provided, we can just look it up
if extension_name.is_some() {
if let Some(ext_name) = extension_name {
let read_result = self
.read_resource(uri, extension_name.unwrap(), cancellation_token.clone())
.read_resource(uri, ext_name, cancellation_token.clone())
.await?;

let mut result = Vec::new();
Expand Down Expand Up @@ -1288,7 +1288,7 @@ mod tests {
use rmcp::model::ListToolsResult;
use rmcp::model::ReadResourceResult;
use rmcp::model::ServerNotification;
use serde_json::json;

use tokio::sync::mpsc;

impl ExtensionManager {
Expand Down
2 changes: 1 addition & 1 deletion crates/goose/src/conversation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ mod tests {

#[test]
fn test_valid_conversation() {
let all_messages = vec![
let all_messages = [
Message::user().with_text("Can you help me search for something?"),
Message::assistant()
.with_text("I'll help you search.")
Expand Down
3 changes: 1 addition & 2 deletions crates/goose/src/permission/permission_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ impl ToolPermissionStore {
self.permissions.get(&key).and_then(|records| {
records
.iter()
.filter(|record| record.expiry.is_none_or(|exp| exp > Utc::now().timestamp()))
.next_back()
.rfind(|record| record.expiry.is_none_or(|exp| exp > Utc::now().timestamp()))
.map(|record| record.allowed)
})
}
Expand Down
Loading
Loading