Skip to content

Commit f5f28e0

Browse files
ravarora2BuzzPRReviewAssistant1
andcommitted
fix(desktop): cover GIF CLI calls and bundle guidance
Recognize the shipped gifs command and direct old scripts to the CLI now bundled in app resources. Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz> Signed-off-by: Ravneet Arora <[email protected]>
1 parent 908a18b commit f5f28e0

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎docs/buzz-help.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ the interface unless an available tool actually supports that action.
107107

108108
## Optional features and limits
109109

110+
- Desktop packages include a `buzz` command line client. On macOS, use
111+
`Buzz.app/Contents/Resources/bin/buzz`. Recognized CLI commands sent to the
112+
old `Contents/MacOS/buzz` path fail with exit code 2 instead of running the
113+
command. Update scripts or PATH links to use the bundled CLI.
110114
- Plugins can add features. **Settings → Plugins → Manage plugins** controls
111115
them. Do not assume a particular optional plugin is on.
112116
- **Attention**, when available, lets agents use Interests, watches, and timers

‎src-tauri/src/legacy_cli_invocation.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub(crate) fn is_legacy_cli_arg(arg: &OsStr) -> bool {
1919
| "canvas"
2020
| "reactions"
2121
| "emoji"
22+
| "gifs"
2223
| "dms"
2324
| "users"
2425
| "workflows"
@@ -59,6 +60,7 @@ mod tests {
5960
"canvas",
6061
"reactions",
6162
"emoji",
63+
"gifs",
6264
"dms",
6365
"users",
6466
"workflows",
@@ -97,6 +99,7 @@ mod tests {
9799
for arg in [
98100
"buzz://message?channel=messages&id=help",
99101
"buzz://channel/general",
102+
"buzz://channel/gifs",
100103
"buzz://join?relay=wss://example.com&code=notes",
101104
"-psn_0_12345",
102105
"-NSDocumentRevisionsDebugMode",

‎src-tauri/src/main.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ fn main() -> std::process::ExitCode {
1111
.is_some_and(legacy_cli_invocation::is_legacy_cli_arg)
1212
{
1313
eprintln!(
14-
"This executable is the Buzz desktop app. The legacy Buzz CLI is not \
15-
included in this app bundle; no CLI command was executed. Update \
16-
your script to use a separately installed Buzz CLI."
14+
"This executable is the Buzz desktop app; no CLI command was executed. \
15+
Use the bundled buzz CLI instead (on macOS: \
16+
Buzz.app/Contents/Resources/bin/buzz). Update your script or PATH \
17+
to point to that executable."
1718
);
1819
return std::process::ExitCode::from(2);
1920
}

‎src-tauri/tests/legacy_cli_invocation.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn legacy_cli_commands_fail_without_echoing_payloads() {
2828
for args in [
2929
vec!["--help"],
3030
vec!["messages", "send", "--content", "private-message-payload"],
31+
vec!["gifs", "search", "private-gif-query"],
3132
vec!["--private-key=private-key-payload", "messages", "list"],
3233
vec!["--format", "compact", "channels", "list"],
3334
] {
@@ -37,7 +38,9 @@ fn legacy_cli_commands_fail_without_echoing_payloads() {
3738
let stderr = String::from_utf8(output.stderr).unwrap();
3839
assert!(stderr.contains("Buzz desktop app"));
3940
assert!(stderr.contains("no CLI command was executed"));
41+
assert!(stderr.contains("Buzz.app/Contents/Resources/bin/buzz"));
4042
assert!(!stderr.contains("private-message-payload"));
43+
assert!(!stderr.contains("private-gif-query"));
4144
assert!(!stderr.contains("private-key-payload"));
4245
}
4346
}

0 commit comments

Comments
 (0)