ScriptEditor

Struct ScriptEditor 

Source
pub struct ScriptEditor;
Expand description

Handles script editing functionality for the command panel

Implementations§

Source§

impl ScriptEditor

Source

pub fn enter_script_mode( state: &mut CommandPanelState, command: &str, ) -> Vec<Action>

Enter script editing mode for a trace command

Source

pub fn exit_script_mode(state: &mut CommandPanelState) -> Vec<Action>

Exit script editing mode

Source

pub fn submit_script(state: &mut CommandPanelState) -> Vec<Action>

Submit the current script

Source

pub fn clear_script(state: &mut CommandPanelState) -> Vec<Action>

Clear the current script

Source

pub fn insert_char(state: &mut CommandPanelState, c: char) -> Vec<Action>

Insert a character at the cursor position in script

Source

pub fn insert_text(state: &mut CommandPanelState, text: &str) -> Vec<Action>

Insert a string at the cursor position (supports newlines)

Source

pub fn insert_newline(state: &mut CommandPanelState) -> Vec<Action>

Insert a newline at the cursor position

Source

pub fn insert_tab(state: &mut CommandPanelState) -> Vec<Action>

Insert a tab (4 spaces) at the cursor position

Source

pub fn delete_char(state: &mut CommandPanelState) -> Vec<Action>

Delete character before cursor in script

Source

pub fn move_cursor_up(state: &mut CommandPanelState) -> Vec<Action>

Move cursor up in script

Source

pub fn move_cursor_down(state: &mut CommandPanelState) -> Vec<Action>

Move cursor down in script

Source

pub fn move_cursor_left(state: &mut CommandPanelState) -> Vec<Action>

Move cursor left in script

Source

pub fn move_cursor_right(state: &mut CommandPanelState) -> Vec<Action>

Move cursor right in script

Source

pub fn move_to_beginning(state: &mut CommandPanelState) -> Vec<Action>

Move cursor to beginning of line

Source

pub fn move_to_end(state: &mut CommandPanelState) -> Vec<Action>

Move cursor to end of line

Source

pub fn move_to_next_word(state: &mut CommandPanelState) -> Vec<Action>

Move cursor to next word (Ctrl+f)

Source

pub fn move_to_previous_word(state: &mut CommandPanelState) -> Vec<Action>

Move cursor to previous word (Ctrl+b)

Source

pub fn delete_previous_word(state: &mut CommandPanelState) -> Vec<Action>

Delete previous word (Ctrl+w)

Source

pub fn delete_to_end(state: &mut CommandPanelState) -> Vec<Action>

Delete from cursor to end of line

Source

pub fn delete_to_line_start(state: &mut CommandPanelState) -> Vec<Action>

Delete from cursor to beginning of line (Ctrl+u)

Source

pub fn delete_to_beginning(state: &mut CommandPanelState) -> Vec<Action>

Delete from cursor to beginning of line (legacy name for compatibility)

Source

pub fn delete_char_at_cursor(state: &mut CommandPanelState) -> Vec<Action>

Delete character at cursor position (Ctrl+h - backspace)

Source

pub fn can_edit_script(state: &CommandPanelState) -> bool

Check if script editor can be re-entered

Source

pub fn edit_script_again(state: &mut CommandPanelState) -> Vec<Action>

Re-enter script editing mode for last submitted script

Source

pub fn format_script_display_with_config( target: &str, lines: &[String], emoji_config: &EmojiConfig, ) -> String

Format script for display with emoji configuration

Source

pub fn format_trace_success_response( target: &str, details: Option<&TraceDetails>, emoji_config: &EmojiConfig, ) -> String

Format trace success response with detailed information

Source

pub fn format_trace_success_response_with_script( target: &str, details: Option<&TraceDetails>, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String

Source

pub fn format_compilation_results( compilation_details: &ScriptCompilationDetails, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String

Format compilation results with all successful and failed traces

Source

pub fn format_trace_error_response( target: &str, error: &str, details: Option<&TraceErrorDetails>, emoji_config: &EmojiConfig, ) -> String

Format trace error response with detailed information

Source

pub fn format_trace_error_response_with_script( target: &str, error: &str, _details: Option<&TraceErrorDetails>, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more