chat: add model switching and preloaded instructions
Expose the OpenCode model list and session model switch over the chat protocol, carry a per-session model provider on chat rows, and apply a preloaded behavior brief as a durable session instruction entry when a chat is created.
This commit is contained in:
@@ -194,6 +194,10 @@ type Message struct {
|
||||
// ChatBackends is the chat_backends reply: the installed harnesses a new
|
||||
// chat can use.
|
||||
ChatBackends []string `json:"chat_backends,omitempty"`
|
||||
// ChatModels is the chat_models reply: models the session's harness offers.
|
||||
ChatModels []ChatModel `json:"chat_models,omitempty"`
|
||||
// ModelRequest is the chat_model body and echoed selection.
|
||||
ModelRequest *ChatModelRequest `json:"chat_model,omitempty"`
|
||||
// ChatSubscribe attaches this connection to one session's shared stream; the
|
||||
// body names the session like ChatQuery. A chat_prompt response sets
|
||||
// ChatQueued when the prompt had to wait for an in-flight turn and was
|
||||
|
||||
Reference in New Issue
Block a user