pub enum Command {
Show 13 variants
SendUserMessage {
text: String,
attachments: Vec<Attachment>,
},
CancelAgent,
Quit,
ResolvePermission(PermissionResolution),
RunInlineBash {
command: String,
send_to_llm: bool,
},
Compact,
NewSession,
CloneSession,
GetMessages,
GetState,
SwitchModel(ModelId),
LoadSession(String),
ForkFrom {
from: String,
message: String,
},
}Variants§
SendUserMessage
CancelAgent
Quit
ResolvePermission(PermissionResolution)
RunInlineBash
!cmd / !!cmd — run a shell command typed directly by the user.
send_to_llm is true for !cmd (output becomes a user message),
false for !!cmd (output shown in the transcript only).
Compact
Manual context compaction, triggered by the /compact slash command.
NewSession
/new — replace the live session with a fresh empty one.
CloneSession
/clone — copy the current session to a new independent file and
switch to it. Handled by forward_commands.
GetMessages
--rpc read query: reply with the session’s Vec<Message>
history via UiEvent::MessagesSnapshot. No effect on the agent.
GetState
--rpc read query: reply with a small status snapshot via
UiEvent::StateSnapshot. No effect on the agent.
SwitchModel(ModelId)
/model — rebuild the live session under a different model.
LoadSession(String)
/resume — replace the live session with a stored one, by id.
ForkFrom
/fork — continue from an earlier entry, creating a branch.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.