pub enum CommandResult {
Show 24 variants
Info(String),
Quit,
ModelChanged(String),
ShowHelp,
Reloaded,
NewSession,
SessionSwitched {
path: PathBuf,
},
SessionInfo {Show 14 fields
session_id: String,
file_path: Option<PathBuf>,
name: Option<String>,
message_count: usize,
user_messages: usize,
assistant_messages: usize,
tool_calls: usize,
tool_results: usize,
total_tokens: u64,
input_tokens: u64,
output_tokens: u64,
cache_read_tokens: u64,
cache_write_tokens: u64,
cost: f64,
},
OpenSessionSelector,
SessionNamed {
name: String,
},
OpenSettings,
ScopedModels,
ExportSession {
path: Option<String>,
},
ImportSession {
path: String,
},
ShareSession,
CopyLastMessage,
ShowChangelog,
ForkSession {
message_id: Option<String>,
},
CloneSession,
SessionTree,
TrustDecision {
decision: String,
},
Login {
provider: Option<String>,
},
Logout {
provider: Option<String>,
},
CompactSession(Option<String>),
}Expand description
Result of executing a slash command.
Variants§
Info(String)
Command handled, show this info message.
Quit
Command caused a quit request.
ModelChanged(String)
Command switched the model (new model name).
ShowHelp
Show keyboard shortcuts help overlay.
Reloaded
Reload settings, extensions, keybindings, themes from disk.
NewSession
Start a new session (clear conversation).
SessionSwitched
Switch to a different session file.
SessionInfo
Show session info (ID, file, messages, tokens, cost).
Fields
OpenSessionSelector
Open session selector UI.
SessionNamed
Name was set for the session.
OpenSettings
Open settings menu.
ScopedModels
Enable/disable models for cycling.
ExportSession
Export session (HTML default, or specify path).
ImportSession
Import and resume a session from a JSONL file.
Share session as a secret GitHub gist.
CopyLastMessage
Copy last agent message to clipboard.
ShowChangelog
Show changelog entries.
ForkSession
Create a new fork from a previous user message.
CloneSession
Duplicate the current session at the current position.
SessionTree
Navigate session tree (switch branches).
TrustDecision
Save project trust decision.
Login
Configure provider authentication.
Logout
Remove provider authentication.
CompactSession(Option<String>)
Manually compact the session context.
Trait Implementations§
Source§impl Clone for CommandResult
impl Clone for CommandResult
Source§fn clone(&self) -> CommandResult
fn clone(&self) -> CommandResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more