mirror of
https://github.com/block/goose.git
synced 2026-07-09 16:09:22 +00:00
Update Rust toolchain and raise recursion limit (#10303)
Some checks are pending
CI / Check Generated Schemas are Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Create Minor Release PR / check-version-bump-pr (push) Waiting to run
Create Minor Release PR / release (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Live Provider Tests / Compaction Tests (push) Blocked by required conditions
Publish Docker Image / docker (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-intel (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / bundle-desktop-windows-cuda (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
Cargo Deny / deny (push) Waiting to run
Unused Dependencies / machete (push) Waiting to run
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Build Rust Project on Windows (push) Waiting to run
CI / Check MSRV (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
Some checks are pending
CI / Check Generated Schemas are Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Create Minor Release PR / check-version-bump-pr (push) Waiting to run
Create Minor Release PR / release (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Live Provider Tests / Compaction Tests (push) Blocked by required conditions
Publish Docker Image / docker (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-intel (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / bundle-desktop-windows-cuda (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
Cargo Deny / deny (push) Waiting to run
Unused Dependencies / machete (push) Waiting to run
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Build Rust Project on Windows (push) Waiting to run
CI / Check MSRV (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
This commit is contained in:
parent
1bced6616b
commit
651dc973c8
20 changed files with 656 additions and 691 deletions
1261
Cargo.lock
generated
1261
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,7 +9,7 @@ resolver = "2"
|
|||
[workspace.package]
|
||||
edition = "2021"
|
||||
version = "1.41.0"
|
||||
rust-version = "1.91.1"
|
||||
rust-version = "1.94.1"
|
||||
authors = ["AAIF <ai-oss-tools@block.xyz>"]
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/aaif-goose/goose"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ pub fn handle_project_default() -> Result<()> {
|
|||
}
|
||||
|
||||
// Sort projects by last_accessed (newest first)
|
||||
projects.sort_by(|a, b| b.last_accessed.cmp(&a.last_accessed));
|
||||
projects.sort_by_key(|project| std::cmp::Reverse(project.last_accessed));
|
||||
|
||||
// Get the most recent project
|
||||
let project = &projects[0];
|
||||
|
|
@ -178,7 +178,7 @@ pub fn handle_projects_interactive() -> Result<()> {
|
|||
}
|
||||
|
||||
// Sort projects by last_accessed (newest first)
|
||||
projects.sort_by(|a, b| b.last_accessed.cmp(&a.last_accessed));
|
||||
projects.sort_by_key(|project| std::cmp::Reverse(project.last_accessed));
|
||||
|
||||
// Format project paths for display
|
||||
let project_choices: Vec<(String, String)> = projects
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#![recursion_limit = "256"]
|
||||
|
||||
#[cfg(not(any(feature = "rustls-tls", feature = "native-tls")))]
|
||||
compile_error!("At least one of `rustls-tls` or `native-tls` features must be enabled");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#![recursion_limit = "256"]
|
||||
|
||||
use anyhow::Result;
|
||||
use goose_cli::cli::cli;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ impl GooseCompleter {
|
|||
// Create completion candidates that match the prefix
|
||||
let candidates: Vec<Pair> = cache
|
||||
.prompts
|
||||
.iter()
|
||||
.flat_map(|(_, names)| names)
|
||||
.values()
|
||||
.flatten()
|
||||
.filter(|name| name.starts_with(prefix.trim()))
|
||||
.map(|name| Pair {
|
||||
display: name.clone(),
|
||||
|
|
|
|||
|
|
@ -524,10 +524,8 @@ impl MarkdownBuffer {
|
|||
}
|
||||
}
|
||||
"]" => {}
|
||||
")" => {
|
||||
if state.in_link_url {
|
||||
state.in_link_url = false;
|
||||
}
|
||||
")" if state.in_link_url => {
|
||||
state.in_link_url = false;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ pub fn recommend_local_model(runtime: &InferenceRuntime) -> String {
|
|||
.iter()
|
||||
.filter(|m| is_featured_model(&m.id) && m.size_bytes > 0)
|
||||
.collect();
|
||||
models.sort_by(|a, b| b.size_bytes.cmp(&a.size_bytes));
|
||||
models.sort_by_key(|model| std::cmp::Reverse(model.size_bytes));
|
||||
|
||||
// Return largest that fits in available memory
|
||||
for model in &models {
|
||||
|
|
|
|||
|
|
@ -84,11 +84,11 @@ pub async fn pdf_tool(
|
|||
last_was_text = false;
|
||||
}
|
||||
}
|
||||
Object::Real(offset) => {
|
||||
if *offset < -100.0 {
|
||||
text.push(' ');
|
||||
last_was_text = false;
|
||||
}
|
||||
Object::Real(offset)
|
||||
if *offset < -100.0 =>
|
||||
{
|
||||
text.push(' ');
|
||||
last_was_text = false;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ impl MemoryServer {
|
|||
let category_memories = self.retrieve(&category, is_global, working_dir)?;
|
||||
memories.insert(
|
||||
category,
|
||||
category_memories.into_iter().flat_map(|(_, v)| v).collect(),
|
||||
category_memories.into_values().flatten().collect(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,10 +53,8 @@ fn repair_truncated_json(s: &str) -> String {
|
|||
'"' => in_string = true,
|
||||
'{' => closers.push('}'),
|
||||
'[' => closers.push(']'),
|
||||
'}' | ']' => {
|
||||
if closers.last() == Some(&c) {
|
||||
closers.pop();
|
||||
}
|
||||
'}' | ']' if closers.last() == Some(&c) => {
|
||||
closers.pop();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -527,6 +527,7 @@ impl ClientHandler for GooseClient {
|
|||
})
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn get_info(&self) -> ClientInfo {
|
||||
let extensions = self.resolved_extensions();
|
||||
|
||||
|
|
@ -608,7 +609,7 @@ impl McpClient {
|
|||
);
|
||||
let client: rmcp::service::RunningService<rmcp::RoleClient, GooseClient> =
|
||||
client.serve(transport).await?;
|
||||
let server_info = client.peer_info().cloned();
|
||||
let server_info = client.peer_info().map(|info| (*info).clone());
|
||||
|
||||
Ok(Self {
|
||||
client: Mutex::new(client),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ pub fn format_structure(
|
|||
}
|
||||
if !lang_loc.is_empty() && total_loc > 0 {
|
||||
let mut langs: Vec<_> = lang_loc.into_iter().collect();
|
||||
langs.sort_by(|a, b| b.1.cmp(&a.1));
|
||||
langs.sort_by_key(|(_, loc)| std::cmp::Reverse(*loc));
|
||||
let parts: Vec<String> = langs
|
||||
.iter()
|
||||
.map(|(lang, loc)| {
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ impl OrchestratorClient {
|
|||
};
|
||||
|
||||
// Most recent first
|
||||
sessions.sort_by(|a, b| b.updated_at.cmp(&a.updated_at));
|
||||
sessions.sort_by_key(|session| std::cmp::Reverse(session.updated_at));
|
||||
let total = sessions.len();
|
||||
sessions.truncate(limit);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#![recursion_limit = "256"]
|
||||
|
||||
#[cfg(all(feature = "rustls-tls", feature = "native-tls"))]
|
||||
compile_error!("Features `rustls-tls` and `native-tls` are mutually exclusive");
|
||||
|
||||
|
|
|
|||
|
|
@ -195,18 +195,16 @@ fn unescape_json_values_in_place(value: &mut Value) {
|
|||
unescape_json_values_in_place(v);
|
||||
}
|
||||
}
|
||||
Value::String(s) => {
|
||||
if s.contains('\\') {
|
||||
*s = s
|
||||
.replace("\\\\n", "\n")
|
||||
.replace("\\\\t", "\t")
|
||||
.replace("\\\\r", "\r")
|
||||
.replace("\\\\\"", "\"")
|
||||
.replace("\\n", "\n")
|
||||
.replace("\\t", "\t")
|
||||
.replace("\\r", "\r")
|
||||
.replace("\\\"", "\"");
|
||||
}
|
||||
Value::String(s) if s.contains('\\') => {
|
||||
*s = s
|
||||
.replace("\\\\n", "\n")
|
||||
.replace("\\\\t", "\t")
|
||||
.replace("\\\\r", "\r")
|
||||
.replace("\\\\\"", "\"")
|
||||
.replace("\\n", "\n")
|
||||
.replace("\\t", "\t")
|
||||
.replace("\\r", "\r")
|
||||
.replace("\\\"", "\"");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -454,9 +454,10 @@ impl Scheduler {
|
|||
}
|
||||
};
|
||||
|
||||
let reset_stale_running_state = list
|
||||
.iter_mut()
|
||||
.fold(false, |changed, job| clear_running_state(job) || changed);
|
||||
let mut reset_stale_running_state = false;
|
||||
for job in &mut list {
|
||||
reset_stale_running_state |= clear_running_state(job);
|
||||
}
|
||||
if reset_stale_running_state {
|
||||
match serde_json::to_string_pretty(&list) {
|
||||
Ok(data) => {
|
||||
|
|
@ -635,7 +636,7 @@ impl Scheduler {
|
|||
.map(|s| (s.id.clone(), s))
|
||||
.collect();
|
||||
|
||||
schedule_sessions.sort_by(|a, b| b.1.created_at.cmp(&a.1.created_at));
|
||||
schedule_sessions.sort_by_key(|(_, session)| std::cmp::Reverse(session.created_at));
|
||||
schedule_sessions.truncate(limit);
|
||||
|
||||
Ok(schedule_sessions)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ impl<'a> ChatHistorySearch<'a> {
|
|||
)
|
||||
.collect();
|
||||
|
||||
results.sort_by(|a, b| b.last_activity.cmp(&a.last_activity));
|
||||
results.sort_by_key(|result| std::cmp::Reverse(result.last_activity));
|
||||
|
||||
let total_matches = results.iter().map(|r| r.messages.len()).sum();
|
||||
ChatRecallResults {
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ impl ProviderFixture {
|
|||
for &var in config.clear_env {
|
||||
env_vars.push((var, None));
|
||||
}
|
||||
let guard = env_lock::lock_env(env_vars.into_iter());
|
||||
let guard = env_lock::lock_env(env_vars);
|
||||
|
||||
let expected_session_id = (config.expected_session_id)();
|
||||
let mcp = McpFixture::new(expected_session_id.clone()).await;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.92"
|
||||
channel = "1.96.1"
|
||||
profile = "default"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue