MingaEditor.Shell.Traditional.AgentSurfaces (Minga v0.1.0)

Copy Markdown View Source

Pure owner of Traditional agent presentation and inline session surfaces.

The full agent presentation cache and both per-buffer inline stores are replaced only through this owner. Inline completion and cancellation match the originating session or buffer, so delayed events cannot update a replacement surface.

Summary

Functions

Activates or replaces the inline ask for its buffer.

Activates or replaces the inline edit for its buffer.

Appends output only to the matching inline ask session.

Appends output only to the matching inline edit session.

Returns the inline ask store.

Cancels the inline ask for a buffer and returns its session pid.

Cancels the inline edit for a buffer and returns its session pid.

Completes the matching inline ask session.

Completes the matching inline edit session.

Returns the inline edit store.

Fails the matching inline ask session.

Fails the matching inline edit session.

Returns the full agent presentation cache.

Replaces a current inline ask after an input transition.

Replaces a current inline edit after an input transition.

Replaces the full agent presentation cache.

Types

t()

@type t() :: %MingaEditor.Shell.Traditional.AgentSurfaces{
  asks: MingaEditor.State.InlineAsk.store(),
  edits: MingaEditor.State.InlineEdit.store(),
  presentation: MingaEditor.State.Agent.t()
}

Functions

activate_ask(surfaces, ask)

@spec activate_ask(t(), MingaEditor.State.InlineAsk.t()) :: t()

Activates or replaces the inline ask for its buffer.

activate_edit(surfaces, edit)

@spec activate_edit(t(), MingaEditor.State.InlineEdit.t()) :: t()

Activates or replaces the inline edit for its buffer.

append_ask_response(surfaces, session_pid, delta)

@spec append_ask_response(t(), pid(), String.t()) :: t()

Appends output only to the matching inline ask session.

append_edit_proposal(surfaces, session_pid, delta)

@spec append_edit_proposal(t(), pid(), String.t()) :: t()

Appends output only to the matching inline edit session.

asks(agent_surfaces)

Returns the inline ask store.

cancel_ask(surfaces, buffer_pid)

@spec cancel_ask(t(), pid() | nil) :: {t(), pid() | nil}

Cancels the inline ask for a buffer and returns its session pid.

cancel_edit(surfaces, buffer_pid)

@spec cancel_edit(t(), pid() | nil) :: {t(), pid() | nil}

Cancels the inline edit for a buffer and returns its session pid.

complete_ask(surfaces, session_pid)

@spec complete_ask(t(), pid()) :: t()

Completes the matching inline ask session.

complete_edit(surfaces, session_pid)

@spec complete_edit(t(), pid()) :: t()

Completes the matching inline edit session.

edits(agent_surfaces)

Returns the inline edit store.

fail_ask(surfaces, session_pid, message)

@spec fail_ask(t(), pid(), String.t()) :: t()

Fails the matching inline ask session.

fail_edit(surfaces, session_pid, message)

@spec fail_edit(t(), pid(), String.t()) :: t()

Fails the matching inline edit session.

presentation(agent_surfaces)

@spec presentation(t()) :: MingaEditor.State.Agent.t()

Returns the full agent presentation cache.

replace_ask(surfaces, ask)

@spec replace_ask(t(), MingaEditor.State.InlineAsk.t()) :: t()

Replaces a current inline ask after an input transition.

replace_edit(surfaces, edit)

@spec replace_edit(t(), MingaEditor.State.InlineEdit.t()) :: t()

Replaces a current inline edit after an input transition.

replace_presentation(surfaces, presentation)

@spec replace_presentation(t(), MingaEditor.State.Agent.t()) :: t()

Replaces the full agent presentation cache.