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:
@@ -31,7 +31,7 @@ func handleChatPrompt(ctx context.Context, request protocol.Message, broker chat
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: "a chat prompt payload is required"})
|
||||
return
|
||||
}
|
||||
if !opencode.ValidSessionID(prompt.SessionID) {
|
||||
if !validChatSessionID(prompt.SessionID) {
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: "a valid OpenCode session id is required"})
|
||||
return
|
||||
}
|
||||
@@ -104,7 +104,7 @@ func handleChatSubscribe(request protocol.Message, broker chatBroker, hub *chatH
|
||||
// subscribeRequest and docs/cli.md both use it), not the chat_query body the
|
||||
// other session-scoped commands carry.
|
||||
query := request.ChatSubscribe
|
||||
if query == nil || !opencode.ValidSessionID(query.SessionID) {
|
||||
if query == nil || !validChatSessionID(query.SessionID) {
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: "a valid OpenCode session id is required"})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user