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:
@@ -1722,6 +1722,7 @@ test("the home row is the only one with a secondary path; recents are labelled b
|
||||
test("newChatCreateState starts on home, not sending, with the caller's operation id", () => {
|
||||
assert.deepEqual(newChatCreateState("web-chat-op"), {
|
||||
directory: HOME_DIRECTORY,
|
||||
backend: "opencode",
|
||||
operationId: "web-chat-op",
|
||||
creating: false,
|
||||
error: "",
|
||||
@@ -1733,6 +1734,7 @@ test("selectChatDirectory sends the chosen value and clears a previous refusal",
|
||||
const recent = { label: "/repo/a", path: "/repo/a", home: false, createDirectory: "/repo/a", secondary: null };
|
||||
assert.deepEqual(selectChatDirectory(state, recent), {
|
||||
directory: "/repo/a",
|
||||
backend: "opencode",
|
||||
operationId: "op",
|
||||
creating: false,
|
||||
error: "",
|
||||
@@ -1745,6 +1747,7 @@ test("chatCreateFailed keeps the pane open with the server's message; success st
|
||||
const creating = { ...newChatCreateState("op"), creating: true };
|
||||
assert.deepEqual(chatCreateFailed(creating, "the directory is not available"), {
|
||||
directory: "~",
|
||||
backend: "opencode",
|
||||
operationId: "op",
|
||||
creating: false,
|
||||
error: "the directory is not available",
|
||||
|
||||
Reference in New Issue
Block a user