story-kit: merge 91_bug_permissions_dialog_never_triggers_in_web_ui

This commit is contained in:
Dave
2026-02-23 21:38:45 +00:00
parent 02a1edc3de
commit 3087297b88
6 changed files with 127 additions and 95 deletions

View File

@@ -66,6 +66,9 @@ async fn main() -> Result<(), std::io::Error> {
}
}
// Permission channel: MCP prompt_permission → WebSocket handler.
let (perm_tx, perm_rx) = tokio::sync::mpsc::unbounded_channel();
// Capture project root and agents Arc before ctx is consumed by build_routes.
let startup_root: Option<PathBuf> = app_state.project_root.lock().unwrap().clone();
let startup_agents = Arc::clone(&agents);
@@ -76,6 +79,8 @@ async fn main() -> Result<(), std::io::Error> {
workflow,
agents,
watcher_tx,
perm_tx,
perm_rx: Arc::new(tokio::sync::Mutex::new(perm_rx)),
};
let app = build_routes(ctx);