fix: terminal, persistent (#12357)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-07-21 17:15:02 +08:00
committed by GitHub
parent 9bcfe9d148
commit 391ef70007
2 changed files with 3 additions and 9 deletions

View File

@@ -124,7 +124,7 @@ class _TerminalTabPageState extends State<TerminalTabPage> {
},
setter: (bool v) async {
final ffi = Get.find<FFI>(tag: 'terminal_$peerId');
bind.sessionToggleOption(
await bind.sessionToggleOption(
sessionId: ffi.sessionId,
value: kOptionTerminalPersistent,
);

View File

@@ -696,10 +696,7 @@ impl TerminalServiceProxy {
opened.success = true;
opened.message = "Reconnected to existing terminal".to_string();
opened.pid = session.pid;
// Return service_id for persistent sessions
if self.is_persistent {
opened.service_id = self.service_id.clone();
}
if service.needs_session_sync {
if service.sessions.len() > 1 {
// No need to include the current terminal in the list.
@@ -869,10 +866,7 @@ impl TerminalServiceProxy {
opened.success = true;
opened.message = "Terminal opened".to_string();
opened.pid = session.pid;
// Return service_id for persistent sessions
if self.is_persistent {
opened.service_id = service.service_id.clone();
}
if service.needs_session_sync {
if !service.sessions.is_empty() {
opened.persistent_sessions = service.sessions.keys().cloned().collect();