Publish harness and TUI open-source
initial sync from the monorepo
This commit is contained in:
commit
c68e39f604
2734 changed files with 1437016 additions and 0 deletions
29
crates/codegen/xai-grok-pager/src/slash/commands/new.rs
Normal file
29
crates/codegen/xai-grok-pager/src/slash/commands/new.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
//! `/new` (alias `/clear`) -- create a new session.
|
||||
|
||||
use crate::app::actions::Action;
|
||||
use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
|
||||
|
||||
/// Start a new agent session, clearing the current conversation.
|
||||
pub struct NewCommand;
|
||||
|
||||
impl SlashCommand for NewCommand {
|
||||
fn name(&self) -> &str {
|
||||
"new"
|
||||
}
|
||||
|
||||
fn aliases(&self) -> &[&str] {
|
||||
&["clear"]
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"Start a new session"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"/new"
|
||||
}
|
||||
|
||||
fn run(&self, _ctx: &mut CommandExecCtx, _args: &str) -> CommandResult {
|
||||
CommandResult::Action(Action::NewSession)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue