d60c73b3a3841e9a13280c1396d961efabcd963f
OpenCode has no per-session `directory` — a session inherits the server's cwd (POST /session ignores extra fields). So the previous "pass directory on create" was a no-op and every OpenCode chat ran in the fixed server's dir (~), including the email chat. Fix: hybrid server model. server-manager.ensureServer(cwd?, home?) returns the fixed pm2 server (OPENCODE_SERVER_URL, :4096) for the general /chat, but for a context-scoped cwd (email account dir, project dir) it spawns/pools an `opencode serve` rooted at that directory — so the session's agent actually operates there. send-opencode passes the resolved cwd + the user's home; createSession drops the ignored directory param. Verified live: a cwd-scoped server reports the session directory as the target dir (not ~), while /chat still uses :4096. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
51 MiB
Languages
TypeScript
84.6%
CSS
6.7%
Shell
5%
JavaScript
3.7%