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
43
crates/codegen/xai-grok-pager/src/slash/commands/btw.rs
Normal file
43
crates/codegen/xai-grok-pager/src/slash/commands/btw.rs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//! `/btw` -- ask a side question without interrupting the running agent.
|
||||
//!
|
||||
//! Returns `CommandResult::Action(Action::SendBtw(...))` so the dispatch layer
|
||||
//! fires it as an ACP ext method (`x.ai/btw`) that bypasses the prompt queue.
|
||||
|
||||
use crate::app::actions::Action;
|
||||
use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
|
||||
|
||||
pub struct BtwCommand;
|
||||
|
||||
impl SlashCommand for BtwCommand {
|
||||
fn name(&self) -> &str {
|
||||
"btw"
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"Ask a side question without interrupting"
|
||||
}
|
||||
|
||||
fn session_scoped(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"/btw <question>"
|
||||
}
|
||||
|
||||
fn takes_args(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn args_required(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn arg_placeholder(&self) -> Option<&str> {
|
||||
Some("<question>")
|
||||
}
|
||||
|
||||
fn run(&self, _ctx: &mut CommandExecCtx, args: &str) -> CommandResult {
|
||||
CommandResult::Action(Action::SendBtw(args.trim().to_string()))
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue