Skip to main content

Action

Enum Action 

Source
pub enum Action {
Show 85 variants Tick, Render, Resize(u16, u16), Quit, Suspend, Resume, Error(String), Help, FocusNext, FocusPrev, Focus, UnFocus, Up, Down, Submit, Update, Tab(u32), ToggleFullScreen, StatusLine(String), TimedStatusLine(String, u64), InputSubmit(String), ReconnectGateway, DisconnectGateway, RestartGateway, SendToGateway(String), GatewayDisconnected(String), ShowSkills, ShowSecrets, CopyMessage, ShowProviderSelector, SetProvider(String), PromptApiKey(String), ConfirmStoreSecret { provider: String, key: String, }, FetchModels(String), FetchModelsFailed(String), ShowModelSelector { provider: String, models: Vec<String>, }, StartDeviceFlow(String), DeviceFlowCodeReady { url: String, code: String, }, DeviceFlowAuthenticated { provider: String, token: String, }, DeviceFlowFailed(String), ShowCredentialDialog { name: String, disabled: bool, policy: String, }, ShowTotpSetup, GatewayAuthChallenge, GatewayAuthResponse(String), GatewayVaultLocked, GatewayUnlockVault(String), CloseHatching, BeginHatchingExchange, HatchingResponse(String), FinishHatching(String), SecretsListResult { entries: Vec<SecretEntryDto>, }, SecretsGetResult { key: String, value: Option<String>, }, SecretsStoreResult { ok: bool, message: String, }, SecretsPeekResult { name: String, ok: bool, fields: Vec<(String, String)>, message: Option<String>, }, SecretsSetPolicyResult { ok: bool, message: Option<String>, }, SecretsSetDisabledResult { ok: bool, cred_name: String, disabled: bool, }, SecretsDeleteCredentialResult { ok: bool, cred_name: String, }, SecretsHasTotpResult { has_totp: bool, }, SecretsSetupTotpResult { ok: bool, uri: Option<String>, message: Option<String>, }, SecretsVerifyTotpResult { ok: bool, }, SecretsRemoveTotpResult { ok: bool, }, GatewayStreamStart, GatewayThinkingStart, GatewayThinkingDelta, GatewayThinkingEnd, GatewayChunk(String), GatewayResponseDone, GatewayToolCall { id: String, name: String, arguments: String, }, GatewayToolResult { id: String, name: String, result: String, is_error: bool, }, GatewayAuthenticated, GatewayReloaded { provider: String, model: String, }, GatewayVaultUnlocked, Info(String), Success(String), Warning(String), ShowToolPermissions, SaveToolPermissions(HashMap<String, ToolPermission>), ToolApprovalRequest { id: String, name: String, arguments: String, }, ToolApprovalResponse { id: String, approved: bool, }, UserPromptRequest(UserPrompt), UserPromptResponse(UserPromptResponse), ThreadsUpdate { threads: Vec<ThreadInfo>, foreground_id: Option<u64>, }, ThreadSwitched { thread_id: u64, context_summary: Option<String>, }, ToolCommandDone { message: String, is_error: bool, }, Noop,
}
Expand description

Actions that drive the application, inspired by openapi-tui.

Variants§

§

Tick

§

Render

§

Resize(u16, u16)

§

Quit

§

Suspend

§

Resume

§

Error(String)

§

Help

§

FocusNext

§

FocusPrev

§

Focus

§

UnFocus

§

Up

§

Down

§

Submit

§

Update

§

Tab(u32)

§

ToggleFullScreen

§

StatusLine(String)

§

TimedStatusLine(String, u64)

§

InputSubmit(String)

The user submitted text from the input bar (prompt or /command)

§

ReconnectGateway

Request to connect (or reconnect) to the gateway

§

DisconnectGateway

Request to disconnect from the gateway

§

RestartGateway

Request to restart the gateway (stop + start)

§

SendToGateway(String)

Send a text message to the gateway (prompt from the input bar)

§

GatewayDisconnected(String)

The gateway reader detected a connection drop

§

ShowSkills

Toggle the skills dialog overlay

§

ShowSecrets

Toggle the secrets dialog overlay

§

CopyMessage

Copy the currently selected message to clipboard

§

ShowProviderSelector

Show the provider-selection dialog

§

SetProvider(String)

Set the active provider (triggers auth check + model fetch)

§

PromptApiKey(String)

Open the API-key input dialog for the given provider

§

ConfirmStoreSecret

The user entered an API key in the dialog — proceed to store confirmation

Fields

§provider: String
§

FetchModels(String)

Fetch models from the provider API, then open the model selector

§

FetchModelsFailed(String)

The model fetch failed

§

ShowModelSelector

Open the model-selection dialog with a fetched list

Fields

§provider: String
§models: Vec<String>
§

StartDeviceFlow(String)

Begin OAuth device flow authentication for the given provider

§

DeviceFlowCodeReady

Device flow: verification URL and user code are ready for display

Fields

§code: String
§

DeviceFlowAuthenticated

Device flow authentication succeeded — store the token and proceed

Fields

§provider: String
§token: String
§

DeviceFlowFailed(String)

Device flow authentication failed

§

ShowCredentialDialog

Open the credential-management dialog for a secret

Fields

§name: String
§disabled: bool
§policy: String
§

ShowTotpSetup

Open the 2FA (TOTP) setup / management dialog

§

GatewayAuthChallenge

Gateway sent an auth_challenge — prompt user for TOTP code

§

GatewayAuthResponse(String)

User submitted a TOTP code for gateway authentication

§

GatewayVaultLocked

Gateway vault is locked — prompt user for password

§

GatewayUnlockVault(String)

User submitted a password to unlock the gateway vault

§

CloseHatching

Close the hatching animation and transition to normal TUI

§

BeginHatchingExchange

Begin the hatching exchange — send the identity prompt to the gateway

§

HatchingResponse(String)

A gateway response routed to the hatching exchange

§

FinishHatching(String)

The hatching exchange is complete — save SOUL.md and close

§

SecretsListResult

Gateway returned the secrets list

Fields

§

SecretsGetResult

Gateway returned a secret value (for provider probing, device flow, etc.)

Fields

§

SecretsStoreResult

Gateway stored a secret successfully

Fields

§ok: bool
§message: String
§

SecretsPeekResult

Gateway returned peek result (for secret viewer)

Fields

§name: String
§ok: bool
§fields: Vec<(String, String)>
§message: Option<String>
§

SecretsSetPolicyResult

Gateway set policy result

Fields

§ok: bool
§message: Option<String>
§

SecretsSetDisabledResult

Gateway set disabled result

Fields

§ok: bool
§cred_name: String
§disabled: bool
§

SecretsDeleteCredentialResult

Gateway deleted credential result

Fields

§ok: bool
§cred_name: String
§

SecretsHasTotpResult

Gateway returned TOTP status

Fields

§has_totp: bool
§

SecretsSetupTotpResult

Gateway returned TOTP setup URI

Fields

§ok: bool
§message: Option<String>
§

SecretsVerifyTotpResult

Gateway returned TOTP verification result

Fields

§ok: bool
§

SecretsRemoveTotpResult

Gateway returned TOTP removal result

Fields

§ok: bool
§

GatewayStreamStart

Gateway stream started (API connected, waiting for response)

§

GatewayThinkingStart

Gateway extended thinking started

§

GatewayThinkingDelta

Gateway extended thinking delta (update loading indicator)

§

GatewayThinkingEnd

Gateway extended thinking ended

§

GatewayChunk(String)

Gateway sent a text chunk

§

GatewayResponseDone

Gateway response is complete

§

GatewayToolCall

Gateway sent a tool call from the model

Fields

§name: String
§arguments: String
§

GatewayToolResult

Gateway sent a tool result from execution

Fields

§name: String
§result: String
§is_error: bool
§

GatewayAuthenticated

Gateway authenticated successfully

§

GatewayReloaded

Gateway config reloaded with new provider/model

Fields

§provider: String
§model: String
§

GatewayVaultUnlocked

Gateway vault unlocked successfully

§

Info(String)

Info message

§

Success(String)

Success message

§

Warning(String)

Warning message

§

ShowToolPermissions

Show the tool permissions editor dialog

§

SaveToolPermissions(HashMap<String, ToolPermission>)

Save updated tool permissions to config

§

ToolApprovalRequest

Gateway is requesting user approval to run a tool (Ask mode)

Fields

§name: String
§arguments: String
§

ToolApprovalResponse

User responded to a tool approval request

Fields

§approved: bool
§

UserPromptRequest(UserPrompt)

Gateway is requesting structured user input (ask_user tool)

§

UserPromptResponse(UserPromptResponse)

User responded to a structured prompt

§

ThreadsUpdate

Gateway sent a threads update (unified tasks + threads)

Fields

§threads: Vec<ThreadInfo>
§foreground_id: Option<u64>
§

ThreadSwitched

Gateway confirmed thread switch

Fields

§thread_id: u64
§context_summary: Option<String>
§

ToolCommandDone

A long-running slash-command tool finished (msg, is_error)

Fields

§message: String
§is_error: bool
§

Noop

Trait Implementations§

Source§

impl Clone for Action

Source§

fn clone(&self) -> Action

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Action

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Action

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Action

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Action

Source§

fn eq(&self, other: &Action) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Action

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Action

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,