pub enum ServerMsg {
Show 30 variants
State(EngineState),
Notice {
level: NoticeLevel,
text: String,
},
Transcript {
entries: Vec<Entry>,
},
EntryAdded(Entry),
EntryDelta {
id: u64,
content: String,
reasoning: String,
},
EntryFinished {
id: u64,
error: Option<String>,
stats: Option<TurnStats>,
},
StepUpdated {
entry: u64,
step: Step,
},
EntryUndo {
id: u64,
undoable: bool,
undone: bool,
},
Chats {
pinned: Vec<ChatSummary>,
recent: Vec<ChatSummary>,
after: Option<ChatCursor>,
next: Option<ChatCursor>,
},
ChatUpdated(ChatSummary),
ChatDeleted {
id: String,
},
ChatOpened {
chat: Option<ChatSummary>,
workspace: Option<String>,
},
Uploaded {
upload: u64,
attachment: Option<MediaRef>,
error: Option<String>,
},
Media {
path: String,
content: MediaContent,
},
Artifacts {
chat: Option<String>,
artifacts: Vec<Artifact>,
},
ArtifactUpdated(Artifact),
ArtifactFile {
id: String,
version: u32,
data: Option<String>,
error: Option<String>,
},
Usage(ChatUsage),
Compactions {
chat: Option<String>,
items: Vec<Compaction>,
},
Compacted(Compaction),
Delegation {
entry: u64,
step: u64,
update: DelegationUpdate,
},
InferenceTested(InferenceTest),
WorkspaceEnv(WorkspaceEnv),
Workspaces {
items: Vec<WorkspaceSummary>,
current: Option<String>,
root: String,
support: EnvSupport,
},
Config(Box<ConfigView>),
Folders(FolderList),
ContainersChecked {
ok: bool,
message: String,
},
WorkspaceCreated {
id: Option<String>,
error: Option<String>,
},
Queue(ChatQueue),
Extensions(Box<Extensions>),
}Expand description
Engine -> client(s).
Variants§
State(EngineState)
Full engine state; sent on connect and whenever it changes.
Notice
A human-readable message for the user (errors, warnings).
Transcript
The whole conversation; sent on connect.
EntryAdded(Entry)
A new entry was appended.
EntryDelta
Streamed text appended to an entry.
EntryFinished
An entry finished streaming.
StepUpdated
A tool step of entry entry was added or changed (replace by step.id).
EntryUndo
Whether entry id’s file changes can be undone, or have been.
Chats
A page of the chat list. With after: None it replaces the client’s list (pinned
chats are in pinned); otherwise recent continues the list after after.
Fields
pinned: Vec<ChatSummary>recent: Vec<ChatSummary>after: Option<ChatCursor>next: Option<ChatCursor>ChatUpdated(ChatSummary)
A chat was created or changed (title, pin, activity, busy). Sent to every client.
ChatDeleted
A chat was deleted. Sent to every client.
ChatOpened
This client now looks at chat (None: a new chat, not sent yet), which is in
workspace workspace. The chat’s ServerMsg::Transcript follows; entry messages
only arrive for the chat in view.
Uploaded
An upload finished (attachment) or failed (error). Only sent to the uploader.
Media
Answer to ClientMsg::GetMedia.
Artifacts
Every artifact of the chat this client looks at (chat, None for a new chat).
Sent after ServerMsg::Transcript; replaces the client’s list.
ArtifactUpdated(Artifact)
An artifact of the chat in view was created or got a new version.
ArtifactFile
Answer to ClientMsg::GetArtifact: the file, base64 (see media::encode), or why not.
Usage(ChatUsage)
Context usage of the chat in view; sent after the transcript and whenever it changes.
Compactions
Every compaction of the chat in view, oldest first (chat, None for a new chat).
Sent after ServerMsg::Transcript (before Artifacts); replaces the client’s list.
Compacted(Compaction)
The chat in view was just compacted.
Delegation
The subagent run of step step (in entry entry) changed.
InferenceTested(InferenceTest)
Answer to ClientMsg::TestInference.
WorkspaceEnv(WorkspaceEnv)
Answer to ClientMsg::WorkspaceEnv: the environment of a workspace.
Workspaces
Every workspace, most recently active first; sent on connect and whenever one is
added, renamed, removed or changes its chat count. current is where new chats go
by default; root is where fresh workspace folders are created.
Config(Box<ConfigView>)
Answer to ClientMsg::GetConfig / ClientMsg::SetConfig.
Folders(FolderList)
Answer to ClientMsg::ListFolders.
ContainersChecked
Answer to ClientMsg::CheckContainers.
WorkspaceCreated
Answer to ClientMsg::CreateWorkspace.
Queue(ChatQueue)
The queue of the chat in view; sent after ServerMsg::Transcript and whenever it
changes.
Extensions(Box<Extensions>)
The plugins of the chat in view; sent after ServerMsg::ChatOpened, on
ClientMsg::GetExtensions, and whenever they change.