feat(v2): add sidecar crash detection, restart UI, and auto-scroll lock
Phase 3 polish: dispatcher listens for sidecar-exited events and marks running sessions as error. AgentPane shows "Restart Sidecar" button on error. Auto-scroll disables when user scrolls >50px from bottom with "Scroll to bottom" button. Added agent_restart Tauri command.
This commit is contained in:
parent
da6d7272ee
commit
5ca035d438
4 changed files with 104 additions and 11 deletions
|
|
@ -159,6 +159,12 @@ impl SidecarManager {
|
|||
self.send_message(&msg)
|
||||
}
|
||||
|
||||
pub fn restart(&self, app: &AppHandle) -> Result<(), String> {
|
||||
log::info!("Restarting sidecar");
|
||||
let _ = self.shutdown();
|
||||
self.start(app)
|
||||
}
|
||||
|
||||
pub fn shutdown(&self) -> Result<(), String> {
|
||||
let mut child_lock = self.child.lock().unwrap();
|
||||
if let Some(ref mut child) = *child_lock {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue