wip: in-progress changes (grid, config, wizard, settings, pty) before session-persistence
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -241,7 +241,7 @@ fn err(id: u64, code: &str, msg: &str) -> Envelope {
|
||||
/// Compute spawn env (hooks for claude agents, zsh integration for zsh shells)
|
||||
/// and whether a deterministic hook source is active.
|
||||
fn spawn_env(sid: &SurfaceId, spec: &spacesh_proto::workspace::SurfaceSpec) -> (Vec<(String, String)>, bool) {
|
||||
if crate::hooks::is_agent(&spec.command, spec.agent_label.as_deref()) {
|
||||
let (mut env, active) = if crate::hooks::is_agent(&spec.command, spec.agent_label.as_deref()) {
|
||||
let env = crate::hooks::prepare(sid, &crate::hooks::spacesh_bin());
|
||||
let active = !env.is_empty();
|
||||
(env, active)
|
||||
@@ -249,7 +249,13 @@ fn spawn_env(sid: &SurfaceId, spec: &spacesh_proto::workspace::SurfaceSpec) -> (
|
||||
(crate::hooks::shell_env(sid), false)
|
||||
} else {
|
||||
(vec![], false)
|
||||
};
|
||||
// Ensure the child sees the user's full PATH; the GUI/launchd-launched daemon
|
||||
// otherwise can't find agents (claude/codex/gemini) and the panel exits at once.
|
||||
if !env.iter().any(|(k, _)| k == "PATH") {
|
||||
env.push(("PATH".to_string(), crate::config::enriched_path()));
|
||||
}
|
||||
(env, active)
|
||||
}
|
||||
|
||||
/// Emit a `layout_changed` event for a workspace's current tree.
|
||||
@@ -628,6 +634,11 @@ async fn handle_request(
|
||||
}))).await;
|
||||
}
|
||||
|
||||
Cmd::WhichAgents { candidates } => {
|
||||
let available: Vec<String> = candidates.into_iter().filter(|c| crate::config::is_installed(c)).collect();
|
||||
let _ = out.send(ok(id, serde_json::json!({ "available": available }))).await;
|
||||
}
|
||||
|
||||
Cmd::Status => {
|
||||
let (groups, workspaces) = reg.status();
|
||||
let _ = out.send(ok(id, serde_json::json!({ "groups": groups, "workspaces": workspaces }))).await;
|
||||
|
||||
Reference in New Issue
Block a user