Skip to content

Commit 32843f8

Browse files
bobleerbowen628
andauthored
chore(deps): russh-keys without OpenSSL; bot terse processing reply (#230)
- Remove workspace openssl; use russh-keys default (pure-Rust) crypto for ssh-remote - Git2 on non-Windows still uses vendored-openssl for libgit2 only - Bot chat: when verbose_mode is off, processing reply omits /cancel_task hint Co-authored-by: bowen628 <bowen628@noreply.gitcode.com>
1 parent ecfb7f5 commit 32843f8

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ toml = "0.8"
8080
# Git
8181
git2 = { version = "0.18", default-features = false, features = ["https", "vendored-libgit2"] }
8282

83-
# OpenSSL — Linux/macOS: `bitfun-core` adds `vendored` via target cfg. Windows: link prebuilt (OPENSSL_DIR); see README.
84-
openssl = { version = "0.10" }
85-
8683
# Terminal
8784
portable-pty = "0.8"
8885
vte = "0.15.0"

src/crates/core/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ tokio-tungstenite = { workspace = true }
112112
# SSH - Remote SSH support (optional feature)
113113
russh = { version = "0.45", optional = true }
114114
russh-sftp = { version = "2.1", optional = true }
115-
russh-keys = { version = "0.45", features = ["openssl"], optional = true }
116-
openssl = { workspace = true, optional = true }
115+
russh-keys = { version = "0.45", optional = true }
117116
shellexpand = { version = "3", optional = true }
118117
ssh_config = { version = "0.1", optional = true }
119118

@@ -129,15 +128,14 @@ bitfun-transport = { path = "../transport" }
129128
# Tauri dependency (optional, enabled only when needed)
130129
tauri = { workspace = true, optional = true }
131130

132-
# Non-Windows: vendored OpenSSL (no system install). Windows: prebuilt OpenSSL via OPENSSL_DIR (see README).
131+
# Non-Windows: vendored OpenSSL for libgit2 (no system install).
133132
[target.'cfg(not(windows))'.dependencies]
134133
git2 = { workspace = true, features = ["vendored-openssl"] }
135-
openssl = { workspace = true, optional = true, features = ["vendored"] }
136134

137135
[target.'cfg(windows)'.dependencies]
138136
win32job = { workspace = true }
139137

140138
[features]
141139
default = ["ssh-remote"]
142140
tauri-support = ["tauri"] # Optional tauri support
143-
ssh-remote = ["russh", "russh-sftp", "russh-keys", "openssl", "shellexpand", "ssh_config"] # Optional SSH remote support
141+
ssh-remote = ["russh", "russh-sftp", "russh-keys", "shellexpand", "ssh_config"] # russh-keys pure-Rust crypto backend (no openssl)

src/crates/core/src/service/remote_connect/bot/command_router.rs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,20 +2536,27 @@ async fn handle_chat_message(
25362536
}
25372537

25382538
let cancel_command = format!("/cancel_task {}", turn_id);
2539-
HandleResult {
2540-
reply: format!(
2539+
let verbose_mode = super::load_bot_persistence().verbose_mode;
2540+
let processing_line = if language.is_chinese() {
2541+
"正在处理你的消息..."
2542+
} else {
2543+
"Processing your message..."
2544+
};
2545+
let reply = if verbose_mode {
2546+
format!(
25412547
"{}\n\n{}",
2542-
if language.is_chinese() {
2543-
"正在处理你的消息..."
2544-
} else {
2545-
"Processing your message..."
2546-
},
2548+
processing_line,
25472549
if language.is_chinese() {
25482550
format!("如需停止本次请求,请发送 `{}`。", cancel_command)
25492551
} else {
25502552
format!("If needed, send `{}` to stop this request.", cancel_command)
25512553
},
2552-
),
2554+
)
2555+
} else {
2556+
processing_line.to_string()
2557+
};
2558+
HandleResult {
2559+
reply,
25532560
actions: cancel_task_actions(language, cancel_command),
25542561
forward_to_session: Some(ForwardRequest {
25552562
session_id,

0 commit comments

Comments
 (0)