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:
@@ -936,6 +936,7 @@ export function defaultDirectoryChoice(choices) {
|
||||
export function newChatCreateState(operationId) {
|
||||
return {
|
||||
directory: HOME_DIRECTORY,
|
||||
backend: "opencode",
|
||||
operationId: str(operationId),
|
||||
creating: false,
|
||||
error: "",
|
||||
@@ -954,6 +955,13 @@ export function selectChatDirectory(create, choice) {
|
||||
return { ...create, directory, error: "" };
|
||||
}
|
||||
|
||||
/** Choose the harness for a new chat. */
|
||||
export function selectChatBackend(create, backend) {
|
||||
const value = str(backend);
|
||||
if (value === "") return { ...create };
|
||||
return { ...create, backend: value, error: "" };
|
||||
}
|
||||
|
||||
/** The create failed: stop sending and keep the server's own reason in the pane. */
|
||||
export function chatCreateFailed(create, message) {
|
||||
return { ...create, creating: false, error: str(message) };
|
||||
|
||||
Reference in New Issue
Block a user