Skip to content

Commit 47ba775

Browse files
committed
chore: Bump xcap to 0.7.0 and update Cross.toml for new dependencies
Updated `xcap` to 0.7.0. Added `pipewire-debian/pipewire-upstream` PPA and new `libegl1-mesa-dev`, `libgbm-dev`, `libpipewire-0.3-dev`, `libwayland-dev` dependencies in `Cross.toml` for both ARM64 and x86_64. Also, updated `w.title()` calls to `w.title().unwrap_or_default()` in `goose-mcp/src/developer/mod.rs` for robustness. Signed-off-by: Shawn Wang <shawn111@gmail.com>
1 parent 3029b14 commit 47ba775

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

Cross.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ pre-build = [
55
# Add the ARM64 architecture and install necessary dependencies
66
"dpkg --add-architecture arm64",
77
"""\
8+
apt-get update && apt install -y software-properties-common && \
9+
add-apt-repository -y ppa:pipewire-debian/pipewire-upstream
10+
""",
11+
"""\
812
apt-get update --fix-missing && apt-get install -y \
913
curl \
1014
unzip \
1115
pkg-config \
1216
libssl-dev:arm64 \
1317
libdbus-1-dev:arm64 \
18+
libegl1-mesa-dev:arm64 \
19+
libgbm-dev:arm64 \
20+
libpipewire-0.3-dev:arm64 \
21+
libwayland-dev:arm64 \
1422
libxcb1-dev:arm64
1523
""",
1624
"""\
@@ -26,13 +34,21 @@ pre-build = [
2634
[target.x86_64-unknown-linux-gnu]
2735
xargo = false
2836
pre-build = [
37+
"""\
38+
apt-get update && apt install -y software-properties-common && \
39+
add-apt-repository -y ppa:pipewire-debian/pipewire-upstream
40+
""",
2941
"""\
3042
apt-get update && apt-get install -y \
3143
curl \
3244
unzip \
3345
pkg-config \
3446
libssl-dev \
3547
libdbus-1-dev \
48+
libegl1-mesa-dev \
49+
libgbm-dev \
50+
libpipewire-0.3-dev \
51+
libwayland-dev \
3652
libxcb1-dev
3753
""",
3854
"""\

crates/goose-mcp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ serde_json = "1.0"
2828
lazy_static = "1.5"
2929
shellexpand = "3.1.0"
3030
indoc = "2.0.5"
31-
xcap = "0.0.14"
31+
xcap = "0.7.0"
3232
reqwest = { version = "0.11", features = [
3333
"json",
3434
"rustls-tls-native-roots",

crates/goose-mcp/src/developer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ impl DeveloperRouter {
13801380
})?;
13811381

13821382
let window_titles: Vec<String> =
1383-
windows.into_iter().map(|w| w.title().to_string()).collect();
1383+
windows.into_iter().map(|w| w.title().unwrap_or_default().to_string()).collect();
13841384

13851385
Ok(vec![
13861386
Content::text(format!("Available windows:\n{}", window_titles.join("\n")))
@@ -1551,7 +1551,7 @@ impl DeveloperRouter {
15511551

15521552
let window = windows
15531553
.into_iter()
1554-
.find(|w| w.title() == window_title)
1554+
.find(|w| w.title().unwrap_or_default() == window_title)
15551555
.ok_or_else(|| {
15561556
ErrorData::new(
15571557
ErrorCode::INTERNAL_ERROR,

0 commit comments

Comments
 (0)