pub enum ViewerMessage {
Show 21 variants
UserInput {
content: String,
context_files: Vec<String>,
},
Cancel,
SyncRequest,
Detach {
exit_when_done: bool,
},
Exit,
SlashCommand {
command: String,
args: Vec<String>,
},
SetToolMode {
mode: ToolMode,
},
QueueMessage {
content: String,
},
AcquireLock {
resource_type: ResourceLockType,
scope: String,
description: String,
},
ReleaseLock {
resource_type: ResourceLockType,
scope: String,
},
QueryLocks {
scope: Option<String>,
},
UpdateLockStatus {
resource_type: ResourceLockType,
scope: String,
status: String,
},
ListAgents,
SpawnAgent {
model: Option<String>,
reason: Option<String>,
working_directory: Option<String>,
},
NotifyChildren {
action: ChildNotifyAction,
},
ParentSignal {
signal: ParentSignalType,
parent_session_id: String,
},
Disconnect,
EnterPlanMode {
focus: Option<String>,
},
ExitPlanMode,
PlanModeUserInput {
content: String,
context_files: Vec<String>,
},
PlanModeSyncRequest,
}Expand description
Messages sent from Viewer (TUI) to Agent
Variants§
UserInput
User submitted input text
Fields
Cancel
Cancel the current operation (streaming or tool execution)
SyncRequest
Request full conversation state sync
Detach
Viewer is detaching (going to background)
Exit
Request agent to exit immediately
SlashCommand
Execute a slash command
SetToolMode
Change tool mode
QueueMessage
Queue a message for injection during agent processing
AcquireLock
Request to acquire a resource lock
Fields
resource_type: ResourceLockTypeType of resource to lock
ReleaseLock
Release a resource lock
QueryLocks
Query lock status
UpdateLockStatus
Update lock status message
Fields
resource_type: ResourceLockTypeType of resource
ListAgents
Request list of all active agents
SpawnAgent
Request to spawn a new child agent
Fields
NotifyChildren
Notify child agents on parent exit
Fields
action: ChildNotifyActionWhat action children should take
ParentSignal
Signal from parent to child agent (via IPC or message queue)
Disconnect
Viewer is disconnecting (graceful close, different from Detach)
EnterPlanMode
Enter plan mode with optional focus/goal
ExitPlanMode
Exit plan mode and return to main context
PlanModeUserInput
User input while in plan mode
Fields
PlanModeSyncRequest
Request plan mode state sync
Trait Implementations§
Source§impl Clone for ViewerMessage
impl Clone for ViewerMessage
Source§fn clone(&self) -> ViewerMessage
fn clone(&self) -> ViewerMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more