sennenki/pretty_prompt/core does not have a README file

    CompletionCommitContext

    pub struct CompletionCommitContext {
    snapshot : PromptSnapshot
    key_press : KeyPress
    selected_item :
    CompletionItem

    span_to_replace : CompletionSpan
    }

    CompletionCommitContext::new

    CompletionRequest

    pub struct CompletionRequest {
    snapshot : PromptSnapshot
    span_to_replace : CompletionSpan
    }

    CompletionRequest::new

    fn CompletionRequest::new(snapshot : PromptSnapshot, span_to_replace : CompletionSpan) -> CompletionRequest

    CompletionSpan

    pub struct CompletionSpan {
    start : Int
    length : Int
    }

    CompletionSpan::contains_caret

    fn CompletionSpan::contains_caret(self : CompletionSpan, caret : Int) -> Bool

    CompletionSpan::end

    fn CompletionSpan::end(self : CompletionSpan) -> Int

    CompletionSpan::new

    fn CompletionSpan::new(start : Int, length : Int) -> CompletionSpan

    CompletionTriggerContext

    pub struct CompletionTriggerContext {
    snapshot : PromptSnapshot
    key_press : KeyPress
    }

    CompletionTriggerContext::new

    FormatInputContext

    pub struct FormatInputContext {
    snapshot : PromptSnapshot
    key_press : KeyPress
    }

    FormatInputContext::new

    fn FormatInputContext::new(snapshot : PromptSnapshot, key_press : KeyPress) -> FormatInputContext

    KeyBindings

    pub struct KeyBindings {
    submit_prompt : KeyPressPatterns
    new_line : KeyPressPatterns
    cancel_prompt : KeyPressPatterns
    history_previous : KeyPressPatterns
    history_next : KeyPressPatterns
    backward_delete_character : KeyPressPatterns
    delete_character : KeyPressPatterns
    move_left : KeyPressPatterns
    move_right : KeyPressPatterns
    move_home : KeyPressPatterns
    move_end : KeyPressPatterns
    move_word_left : KeyPressPatterns
    move_word_right : KeyPressPatterns
    backward_delete_word : KeyPressPatterns
    delete_word : KeyPressPatterns
    trigger_completion : KeyPressPatterns
    dismiss_completion : KeyPressPatterns
    undo : KeyPressPatterns
    redo : KeyPressPatterns
    move_left_selection : KeyPressPatterns
    move_right_selection : KeyPressPatterns
    move_home_selection : KeyPressPatterns
    move_end_selection : KeyPressPatterns
    copy_selection : KeyPressPatterns
    cut_selection : KeyPressPatterns
    kill_line_tail : KeyPressPatterns
    kill_line_head : KeyPressPatterns
    yank : KeyPressPatterns
    yank_pop : KeyPressPatterns
    reverse_search : KeyPressPatterns
    paste : KeyPressPatterns
    }

    KeyBindings::new

    fn KeyBindings::new(submit_prompt? : KeyPressPatterns, new_line? : KeyPressPatterns, cancel_prompt? : KeyPressPatterns, history_previous? : KeyPressPatterns, history_next? : KeyPressPatterns, backward_delete_character? : KeyPressPatterns, delete_character? : KeyPressPatterns, move_left? : KeyPressPatterns, move_right? : KeyPressPatterns, move_home? : KeyPressPatterns, move_end? : KeyPressPatterns, move_word_left? : KeyPressPatterns, move_word_right? : KeyPressPatterns, backward_delete_word? : KeyPressPatterns, delete_word? : KeyPressPatterns, trigger_completion? : KeyPressPatterns, dismiss_completion? : KeyPressPatterns, undo? : KeyPressPatterns, redo? : KeyPressPatterns, move_left_selection? : KeyPressPatterns, move_right_selection? : KeyPressPatterns, move_home_selection? : KeyPressPatterns, move_end_selection? : KeyPressPatterns, copy_selection? : KeyPressPatterns, cut_selection? : KeyPressPatterns, kill_line_tail? : KeyPressPatterns, kill_line_head? : KeyPressPatterns, yank? : KeyPressPatterns, yank_pop? : KeyPressPatterns, reverse_search? : KeyPressPatterns, paste? : KeyPressPatterns) -> KeyBindings

    KeyPress

    pub struct KeyPress {
    console_key_info :
    ConsoleKeyInfo

    pasted_text : String?
    }

    KeyPress::from_console_key_info

    fn KeyPress::from_console_key_info(console_key_info :
    ConsoleKeyInfo
    ) -> KeyPress

    KeyPress::from_pasted_text

    fn KeyPress::from_pasted_text(pasted_text : String) -> KeyPress

    KeyPressCallback

    pub struct KeyPressCallback {
    pattern : KeyPressPattern
    callback : async (PromptSnapshot) -> KeyPressCallbackResult
    }

    KeyPressCallback::new

    KeyPressCallbackResult

    pub(all) enum KeyPressCallbackResult {
    StayOnPrompt
    SubmitPrompt(String)
    }

    KeyPressPattern

    type KeyPressPattern

    KeyPressPattern::matches

    KeyPressPattern::new

    fn KeyPressPattern::new(key :
    ConsoleKey
    , shift? : Bool, alt? : Bool, control? : Bool) -> KeyPressPattern

    KeyPressPatterns

    type KeyPressPatterns

    KeyPressPatterns::empty

    KeyPressPatterns::has_any

    fn KeyPressPatterns::has_any(self : KeyPressPatterns) -> Bool

    KeyPressPatterns::matches

    KeyPressPatterns::new

    KeyPressPatterns::single

    KeyTransformContext

    pub struct KeyTransformContext {
    snapshot : PromptSnapshot
    key_press : KeyPress
    }

    KeyTransformContext::new

    Prompt

    type Prompt

    Prompt::dispose

    async fn Prompt::dispose(self : Prompt) -> Unit

    Prompt::read_line

    async fn Prompt::read_line(self : Prompt) -> PromptResult

    Prompt::read_line_with_prompt

    Prompt::take_execution_cancellation_requested

    fn Prompt::take_execution_cancellation_requested(self : Prompt) -> Bool

    PromptCallbacks

    pub struct PromptCallbacks {
    key_press_callbacks : Array[KeyPressCallback]
    highlight_callback : async (PromptSnapshot) -> Array[
    FormatSpan
    ]
    completion_span_provider : async (PromptSnapshot) -> CompletionSpan
    completion_items_provider : async (CompletionRequest) -> Array[
    CompletionItem
    ]
    should_open_completion_window : async (CompletionTriggerContext) -> Bool
    transform_key_press : async (KeyTransformContext) -> KeyPress
    confirm_completion_commit : async (CompletionCommitContext) -> Bool
    should_insert_soft_newline : async (PromptSnapshot, KeyPress) -> Bool
    format_input : async (FormatInputContext) -> (String, Int)
    overload_provider : async (PromptSnapshot) -> (Array[
    OverloadItem
    ], Int)
    }

    PromptCallbacks::new

    fn PromptCallbacks::new(key_press_callbacks? : Array[KeyPressCallback], highlight_callback? : async (PromptSnapshot) -> Array[
    FormatSpan
    ], completion_span_provider? : async (PromptSnapshot) -> CompletionSpan, completion_items_provider? : async (CompletionRequest) -> Array[
    CompletionItem
    ], should_open_completion_window? : async (CompletionTriggerContext) -> Bool, transform_key_press? : async (KeyTransformContext) -> KeyPress, confirm_completion_commit? : async (CompletionCommitContext) -> Bool, should_insert_soft_newline? : async (PromptSnapshot, KeyPress) -> Bool, format_input? : async (FormatInputContext) -> (String, Int), overload_provider? : async (PromptSnapshot) -> (Array[
    OverloadItem
    ], Int)) -> PromptCallbacks

    PromptConfiguration

    pub struct PromptConfiguration {
    prompt :
    FormattedString

    key_bindings : KeyBindings
    history :
    HistoryConfiguration

    callbacks : PromptCallbacks
    selection_background :
    AnsiColor

    use_colors : Bool
    max_completion_items_count : Int
    kill_ring_max_size : Int
    }

    PromptConfiguration::new

    fn PromptConfiguration::new(prompt? :
    FormattedString
    , key_bindings? : KeyBindings, history? :
    HistoryConfiguration
    , callbacks? : PromptCallbacks, selection_background? :
    AnsiColor
    , use_colors? : Bool, max_completion_items_count? : Int, kill_ring_max_size? : Int) -> PromptConfiguration

    PromptResult

    pub struct PromptResult {
    is_success : Bool
    text : String
    submit_key_info :
    ConsoleKeyInfo

    }

    PromptResult::cancelled

    PromptResult::submitted

    fn PromptResult::submitted(text : String, submit_key_info :
    ConsoleKeyInfo
    ) -> PromptResult

    PromptSnapshot

    pub struct PromptSnapshot {
    text : String
    caret : Int
    }

    PromptSnapshot::new

    fn PromptSnapshot::new(text : String, caret : Int) -> PromptSnapshot

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io