Ephemeral inline edit overlays keyed by buffer.
The shared per-buffer store mechanics (active/2, put/2, dismiss/2, session?/2) and prompt-input mechanics (append_input/2, backspace/1, scroll/2) live in MingaEditor.InlineOverlay.Store and MingaEditor.InlineOverlay.Prompt and are reused here. This module owns only the edit-specific shape and transitions: the selection/original text, tagged proposal data, and the :proposed terminal state.
Summary
Functions
Builds the constrained rewrite prompt.
Appends proposed replacement text streamed by the assistant.
Marks the edit as failed.
Returns the prompt header.
Installs proposed replacement text from the constrained rewrite tool.
Creates a new inline edit for a selected line range.
Marks the edit as proposed.
Constructs a proposed streamed rewrite for direct tests.
Marks the edit as thinking.
Types
@type t() :: %MingaEditor.State.InlineEdit{ buffer_pid: pid(), file_label: String.t(), file_ref: Minga.Project.FileRef.t(), original_text: String.t(), phase: phase(), prompt: String.t(), scroll: non_neg_integer(), selection_range: {non_neg_integer(), non_neg_integer()} }
Functions
Builds the constrained rewrite prompt.
Appends proposed replacement text streamed by the assistant.
Marks the edit as failed.
Returns the prompt header.
Installs proposed replacement text from the constrained rewrite tool.
@spec new( pid(), Minga.Project.FileRef.t(), String.t(), {non_neg_integer(), non_neg_integer()}, String.t() ) :: t()
Creates a new inline edit for a selected line range.
Marks the edit as proposed.
Constructs a proposed streamed rewrite for direct tests.
Marks the edit as thinking.