pub struct BuiltinCommands;Expand description
Handles built-in slash commands.
Implementations§
Source§impl BuiltinCommands
impl BuiltinCommands
Sourcepub fn dispatch(
&self,
cmd: &str,
args: &str,
state: &mut ReplState,
) -> CommandOutcome
pub fn dispatch( &self, cmd: &str, args: &str, state: &mut ReplState, ) -> CommandOutcome
Dispatch a slash command.
Returns the outcome indicating how the REPL should proceed.
Sourcepub fn handle_model_picker(
&self,
cache_dir: Option<&Path>,
) -> Vec<(String, String)>
pub fn handle_model_picker( &self, cache_dir: Option<&Path>, ) -> Vec<(String, String)>
Display a numbered list of models from the models.dev registry.
If cache_dir is None, uses the default ~/.opendev/cache directory.
Returns the list of (provider_id, model_id) pairs for use by callers
that want to act on the user’s selection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BuiltinCommands
impl RefUnwindSafe for BuiltinCommands
impl Send for BuiltinCommands
impl Sync for BuiltinCommands
impl Unpin for BuiltinCommands
impl UnsafeUnpin for BuiltinCommands
impl UnwindSafe for BuiltinCommands
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
Mutably borrows from an owned value. Read more