Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist
/node_modules
/src-tauri/binaries/rg-*
/src-tauri/gen/schemas/windows-schema.json
/.history
/.sinew/
.DS_Store
Expand Down
7 changes: 6 additions & 1 deletion crates/sinew-app/src/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,14 @@ mod tests {
let root = temp_workspace("interactive_session_accepts_input");
let tool = BashTool::new(&root);

#[cfg(windows)]
let command = "[Console]::Write('Name: '); $name = [Console]::In.ReadLine(); [Console]::WriteLine(\"Hello $name\")";
#[cfg(not(windows))]
let command = "printf 'Name: '; read name; printf 'Hello %s\\n' \"$name\"";

let started = tool
.run(json!({
"command": "printf 'Name: '; read name; printf 'Hello %s\\n' \"$name\"",
"command": command,
"yield_time_ms": 500
}))
.await;
Expand Down
17 changes: 14 additions & 3 deletions src-tauri/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,20 @@ pub(super) async fn handle_openai_oauth_request(

pub(super) async fn bind_anthropic_oauth_listener() -> Result<tokio::net::TcpListener> {
const CALLBACK_PORT: u16 = 53692;
tokio::net::TcpListener::bind(("127.0.0.1", CALLBACK_PORT))
.await
.context("unable to bind Anthropic OAuth callback port 53692")
match tokio::net::TcpListener::bind(("127.0.0.1", CALLBACK_PORT)).await {
Ok(listener) => Ok(listener),
Err(err) => {
let mut message =
format!("unable to bind Anthropic OAuth callback port {CALLBACK_PORT}");
#[cfg(target_os = "windows")]
if err.raw_os_error() == Some(10013) {
message.push_str(
"; Windows may have reserved this port. Check excluded TCP port ranges or restart WinNAT/HNS before trying again",
);
}
Err(err).with_context(|| message)
}
}
}

pub(super) async fn run_anthropic_oauth_server(
Expand Down