chat: add the Codex backend

Store a chat's harness with its operator session, expose chat_backends and a
backend choice in New chat, and route each session through a manager. The Codex
adapter uses the App Server's Unix WebSocket for threads, turns, history,
questions and interrupt; OpenCode remains the default and Claude is not
advertised until its sidecar and login are wired.
This commit is contained in:
2026-10-20 12:10:39 +01:00
parent 74b74adee7
commit f7a3a49f94
25 changed files with 1287 additions and 32 deletions
+2 -1
View File
@@ -336,6 +336,7 @@ const state = {
chatDirectoriesLoaded: false,
chatDirectoriesError: "",
chatCreate: null,
chatBackends: ["opencode"],
};
// The app-wide run-event watch (R10), owned by the connection rather than any
@@ -1692,7 +1693,6 @@ async function applyRoute(route) {
if (!state.chatLoaded) await loadCurrentView();
if (r.kind === "chat") {
state.chatActiveId = null;
state.chatCreate = null;
renderContent();
return;
}
@@ -1710,6 +1710,7 @@ async function applyRoute(route) {
renderContent();
return;
}
state.chatCreate = null;
state.chatActiveId = r.id;
renderContent();
await openChatSession(r.id, { updateRoute: false });